正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -35,7 +35,7 @@ class ImageController extends Controller | @@ -35,7 +35,7 @@ class ImageController extends Controller | ||
| 35 | public $map = []; | 35 | public $map = []; |
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | - public $upload_location = 0;//是否同步到cos | 38 | + public $upload_location = 1;//是否同步到cos |
| 39 | //上传图片类型 | 39 | //上传图片类型 |
| 40 | public $image_type = [ | 40 | public $image_type = [ |
| 41 | 1 => 'image_product', | 41 | 1 => 'image_product', |
| @@ -372,8 +372,8 @@ class ImageController extends Controller | @@ -372,8 +372,8 @@ class ImageController extends Controller | ||
| 372 | //根据项目上传标识区分上传到cos/本地 | 372 | //根据项目上传标识区分上传到cos/本地 |
| 373 | $projectModel = new Project(); | 373 | $projectModel = new Project(); |
| 374 | $project_info = $projectModel->read(['id'=>$this->cache['project_id']],['project_location']); | 374 | $project_info = $projectModel->read(['id'=>$this->cache['project_id']],['project_location']); |
| 375 | - if ($project_info['project_location'] == 0) {//普通项目时 上传到cos | ||
| 376 | - $this->upload_location = 1;//上传到cos | 375 | + if ($project_info['project_location'] != 0) {//危险项目时 上传到本地 |
| 376 | + $this->upload_location = 0;//上传到cos | ||
| 377 | } | 377 | } |
| 378 | } | 378 | } |
| 379 | $this->path = $this->uploads['path_b'].'/'.$this->cache['project_id'].'/'.$this->image_type[$this->param['refer']].'/'.date('Y-m'); | 379 | $this->path = $this->uploads['path_b'].'/'.$this->cache['project_id'].'/'.$this->image_type[$this->param['refer']].'/'.date('Y-m'); |
-
请 注册 或 登录 后发表评论