Commit 2b49db89 by 杨昕

添加

parent e0f6e40a
Pipeline #11437 passed with stages
in 47 seconds
......@@ -175,11 +175,21 @@ class MediaModel extends Eloquent
* 判断媒资ID是否存在
*/
$media_id = $request->media_id;
$media_type = $request->media_type;
$mediaCatg = MediaCategoryModel::where('_id',$media_type)->first();
if (empty($mediaCatg)){
throw new \Exception("媒资类别不存在");
}
if ($request->replace){
$recycleId = RecycleModel::addRecycle($media_id);
$call_back = $mediaCatg['call_back'];
self::updatehookMedia($request,$media_id);
http_request_code($call_back,null,'GET',['mediaId'=>$media_id]);
if (!$recycleId){
throw new \Exception('回收站保存失败');
}
......@@ -199,15 +209,6 @@ class MediaModel extends Eloquent
*/
$media_info = explode("&",$request->media_name);
$media_type = $request->media_type;
$mediaCatg = MediaCategoryModel::where('_id',$media_type)->first();
if (empty($mediaCatg)){
throw new \Exception("媒资类别不存在");
}
$media_url = $request->media_url;
$media_url = str_replace("http:","https:",$media_url);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment