|
...
|
...
|
@@ -38,9 +38,8 @@ class CustomModuleContentController extends BaseController |
|
|
|
$data = $this->getAllCategoryName();
|
|
|
|
foreach ($lists['list'] as $k=>$v){
|
|
|
|
$v['url'] = $this->getUrl($v);
|
|
|
|
$v = $this->getHandleImageFile($v);
|
|
|
|
$v['category_name'] = $this->categoryName($v['category_id'],$data);
|
|
|
|
$v['image_link'] = getImageUrl($v['image'],$this->user['storage_type'],$this->user['project_location']);
|
|
|
|
$v['video_link'] = getFileUrl($v['video'],$this->user['storage_type'],$this->user['project_location']);
|
|
|
|
$v['operator_name'] = (new User())->getName($v['operator_id']);
|
|
|
|
$lists['list'][$k] = $v;
|
|
|
|
}
|
|
...
|
...
|
@@ -49,6 +48,24 @@ class CustomModuleContentController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取时处理视频,图片,文件
|
|
|
|
* @name :getHandleImageFile
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/1/31 15:48
|
|
|
|
*/
|
|
|
|
public function getHandleImageFile($v){
|
|
|
|
if(!empty($v['image'])){
|
|
|
|
$v['image_link'] = getImageUrl($v['image'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
|
|
|
|
}
|
|
|
|
if(!empty($v['video'])){
|
|
|
|
$v['video']['url'] = getFileUrl($v['video']['url'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
|
|
|
|
$v['video']['video_image'] = getImageUrl($v['video']['video_image'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
|
|
|
|
}
|
|
|
|
return $this->success($v);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取连接
|
|
|
|
* @name :getUrl
|
|
|
|
* @author :lyh
|
|
...
|
...
|
@@ -142,6 +159,7 @@ class CustomModuleContentController extends BaseController |
|
|
|
'id.required' => 'ID不能为空',
|
|
|
|
]);
|
|
|
|
$info = $logic->getContentInfo();
|
|
|
|
$info = $this->getHandleImageFile($info);
|
|
|
|
$this->response('success',Code::SUCCESS,$info);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|