作者 lyh

gx

@@ -10,6 +10,7 @@ use App\Http\Controllers\File\ImageController; @@ -10,6 +10,7 @@ use App\Http\Controllers\File\ImageController;
10 use App\Http\Logic\Aside\Project\ProjectLogic; 10 use App\Http\Logic\Aside\Project\ProjectLogic;
11 use App\Http\Logic\Logic; 11 use App\Http\Logic\Logic;
12 use App\Models\File\Image as ImageModel; 12 use App\Models\File\Image as ImageModel;
  13 +use App\Models\Project\Project;
13 use App\Models\UpdateNotify; 14 use App\Models\UpdateNotify;
14 use Illuminate\Support\Facades\Cache; 15 use Illuminate\Support\Facades\Cache;
15 16
@@ -36,10 +37,25 @@ class BaseLogic extends Logic @@ -36,10 +37,25 @@ class BaseLogic extends Logic
36 $this->request = request(); 37 $this->request = request();
37 $this->requestAll = request()->all(); 38 $this->requestAll = request()->all();
38 $this->user = Cache::get(request()->header('token')); 39 $this->user = Cache::get(request()->header('token'));
39 - $this->project = (new ProjectLogic())->getInfo($this->user['project_id']); 40 + $this->project = $this->getProjectInfo($this->user['project_id']);
40 } 41 }
41 42
42 - 43 + /**
  44 + * @remark :获取项目数据详情
  45 + * @name :getProjectInfo
  46 + * @author :lyh
  47 + * @method :post
  48 + * @time :2023/8/17 10:20
  49 + */
  50 + public function getProjectInfo($id){
  51 + $projectModel = new Project();
  52 + $info = $projectModel->with('payment')->with('deploy_build')
  53 + ->with('deploy_optimize')->with('online_check')->where(['id'=>$id])->first();
  54 + if($info['extend_type'] != 0){
  55 + $info['type'] = $info['extend_type'];
  56 + }
  57 + return $this->success($info);
  58 + }
43 /** 59 /**
44 * 列表 60 * 列表
45 * @param array $map 61 * @param array $map
@@ -32,7 +32,6 @@ class ProductLogic extends BaseLogic @@ -32,7 +32,6 @@ class ProductLogic extends BaseLogic
32 $data = parent::getList($map, $sort, $columns, $row); 32 $data = parent::getList($map, $sort, $columns, $row);
33 foreach ($data['list'] as &$v){ 33 foreach ($data['list'] as &$v){
34 $v = $this->formatData($v); 34 $v = $this->formatData($v);
35 - $v['thumb']['image_link'] = getImageUrl($v['thumb']['url']);//图片统一  
36 } 35 }
37 return $this->success($data); 36 return $this->success($data);
38 } 37 }
@@ -41,14 +40,6 @@ class ProductLogic extends BaseLogic @@ -41,14 +40,6 @@ class ProductLogic extends BaseLogic
41 { 40 {
42 $info = $this->model->read(['id'=>$id]); 41 $info = $this->model->read(['id'=>$id]);
43 $info = $this->formatData($info); 42 $info = $this->formatData($info);
44 - //统一图片链接  
45 - if(!empty($info['gallery'])){  
46 - foreach ($info['gallery'] as $k => $v){  
47 - $v['image_link'] = getImageUrl($v['url']);  
48 - $info['gallery'][$k] = $v;  
49 - }  
50 - }  
51 - $info['icon_link'] = getImageUrl($info['icon']);  
52 return $this->success($info); 43 return $this->success($info);
53 } 44 }
54 45