作者 lyh

gx

... ... @@ -35,7 +35,7 @@ class ImageController extends Controller
public $map = [];
public $upload_location = 0;//是否同步到cos
public $upload_location = 1;//是否同步到cos
//上传图片类型
public $image_type = [
1 => 'image_product',
... ... @@ -372,8 +372,8 @@ class ImageController extends Controller
//根据项目上传标识区分上传到cos/本地
$projectModel = new Project();
$project_info = $projectModel->read(['id'=>$this->cache['project_id']],['project_location']);
if ($project_info['project_location'] == 0) {//普通项目时 上传到cos
$this->upload_location = 1;//上传到cos
if ($project_info['project_location'] != 0) {//危险项目时 上传到本地
$this->upload_location = 0;//上传到cos
}
}
$this->path = $this->uploads['path_b'].'/'.$this->cache['project_id'].'/'.$this->image_type[$this->param['refer']].'/'.date('Y-m');
... ...