Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media-resource
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨昕
media-resource
Commits
857ea5b6
Commit
857ea5b6
authored
Jul 06, 2022
by
杨昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
58e20e4c
Pipeline
#18749
passed with stages
in 1 minute 9 seconds
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
MediaController.php
app/Http/Controllers/Api/MediaController.php
+0
-0
MediaModel.php
app/Model/MediaModel.php
+3
-3
api.php
routes/api.php
+3
-1
No files found.
app/Http/Controllers/Api/MediaController.php
View file @
857ea5b6
This diff is collapsed.
Click to expand it.
app/Model/MediaModel.php
View file @
857ea5b6
...
...
@@ -273,7 +273,7 @@ class MediaModel extends Eloquent
$id
=
MediaModel
::
insertGetId
(
$data
);
//处理封面图片以及分辨率
self
::
getScreeShotInfo
(
$media_id
);
//
self::getScreeShotInfo($media_id);
LogModel
::
addlog
([
"添加媒资信息"
=>
$data
,[
'媒资ID为:=> '
.
$id
]]);
}
catch
(
\Exception
$exception
){
...
...
@@ -364,7 +364,7 @@ class MediaModel extends Eloquent
throw
new
\Exception
(
"更新失败"
);
}
//处理封面图片以及分辨率
self
::
getScreeShotInfo
(
$id
);
//
self::getScreeShotInfo($id);
LogModel
::
addlog
([
"更新媒资信息=>"
.
$id
,
$data
]);
}
catch
(
\Exception
$exception
){
...
...
@@ -1085,7 +1085,7 @@ class MediaModel extends Eloquent
* @return mixed
* @throws DatabaseException
*/
public
static
function
getScreeShotInfo
(
$
media_id
){
public
static
function
getScreeShotInfo
(
$
request
){
try
{
$media
=
MediaModel
::
select
(
"_id"
,
"media_name"
,
"duration"
,
"secret_key"
,
"media_url"
)
->
where
(
'_id'
,
$media_id
)
->
first
();
...
...
routes/api.php
View file @
857ea5b6
...
...
@@ -53,5 +53,6 @@ Route::group(['namespace' => 'Api', 'prefix' => 'user','middleware' => ['api']],
Route
::
post
(
"getMediaListByMediaIds"
,
"MediaController@getMediaListByMediaIds"
);
//Route::get("media_url_change","MediaController@handleMediaUrl");
Route
::
get
(
"getScreeShotInfo/
{
id
}
"
,
"MediaController@getScreeShotInfo"
);
Route
::
post
(
"screenShot"
,
"MediaController@getScreeShotInfo"
);
Route
::
post
(
"screenShotCallback"
,
"MediaController@updateScreeShotInfo"
);
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment