|
...
|
...
|
@@ -35,6 +35,7 @@ class ImageController extends Controller |
|
|
|
public $map = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public $upload_location = 1;//是否同步到cos
|
|
|
|
//上传图片类型
|
|
|
|
public $image_type = [
|
|
...
|
...
|
@@ -53,6 +54,9 @@ class ImageController extends Controller |
|
|
|
$this->config = config('filesystems.disks.upload');
|
|
|
|
$this->uploads = config('upload.default_image');
|
|
|
|
$this->get_param();
|
|
|
|
//获取当前登录用户详情
|
|
|
|
$this->token = $this->request->header('token');
|
|
|
|
$this->cache = Cache::get($this->token);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -345,6 +349,9 @@ class ImageController extends Controller |
|
|
|
* @time :2023/6/29 11:48
|
|
|
|
*/
|
|
|
|
public function getImageList(){
|
|
|
|
if(isset($this->cache['project_id']) && !empty($this->cache['project_id'])){
|
|
|
|
$this->map['project_id'] = $this->cache['project_id'];
|
|
|
|
}
|
|
|
|
$imageModel = new ImageModel();
|
|
|
|
$lists = $imageModel->lists($this->map,$this->page,$this->row);
|
|
|
|
if(!empty($lists) && !empty($lists['list'])){
|
|
...
|
...
|
@@ -368,9 +375,6 @@ class ImageController extends Controller |
|
|
|
if(isset($this->param['refer_type']) && $this->param['refer_type'] == 1){
|
|
|
|
$this->path = $this->uploads['path_a'].'/'.$this->image_type[$this->param['refer']].'/'.date('Y-m');
|
|
|
|
}else{
|
|
|
|
//B端上传
|
|
|
|
$this->token = $this->request->header('token');
|
|
|
|
$this->cache = Cache::get($this->token);
|
|
|
|
if(!isset($this->param['upload_method'])){
|
|
|
|
//根据项目上传标识区分上传到cos/本地
|
|
|
|
$projectModel = new Project();
|
...
|
...
|
|