作者 赵彬吉
... ... @@ -69,7 +69,6 @@ class AyrReleaseController extends BaseController
}
//参数处理
$this->param['mediaUrls'] = $ayrReleaseLogic->image_file_param($data);
//时间处理
//统一生成发布
$param = [
'post'=>$this->param['content'],
... ...
... ... @@ -96,7 +96,7 @@ class ProductController extends BaseController
}
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']);
$v['video']['video_image'] = getImageUrl($v['video']['video_image'] ?? '',$this->user['storage_type'] ?? 0,$this->user['project_location']);
}
if(!empty($v['files']) && !empty($v['files']['url'])){
$v['files']['url'] = getFileUrl($v['files']['url'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
... ...
... ... @@ -61,18 +61,14 @@ class AyrReleaseLogic extends BaseLogic
$arr = [];
foreach ($data as $k => $v){
if($k == 'images'){
$images = $v;
$imageModel = new Image();
$list = $imageModel->list(['path'=>['in',$images]],'id');
foreach ($list as $v1){
$arr[] = getImageUrl($v1['path'],$this->user['storage_type'],$this->user['project_location']);
foreach ($v as $v1){
$arr[] = $v1;
}
}else{
$fileModel = new File();
$info = $fileModel->read(['path'=>$v]);
$arr[] = getFileUrl($info['path'],$this->user['storage_type'],$this->user['project_location']);
$arr[] = $v;
}
}
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($arr, true) . PHP_EOL, FILE_APPEND);
return $this->success($arr);
}
... ...