|
...
|
...
|
@@ -7,6 +7,7 @@ use App\Enums\Common\Common; |
|
|
|
use App\Exceptions\BsideGlobalException;
|
|
|
|
use App\Http\Logic\Logic;
|
|
|
|
use App\Models\Com\UpdateNotify;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -33,11 +34,32 @@ class BaseLogic extends Logic |
|
|
|
$this->requestAll = $this->getParam();
|
|
|
|
$this->user = Cache::get(request()->header('token'));
|
|
|
|
if(!empty($this->user)){
|
|
|
|
$this->project = Cache::get('user-'.$this->user['project_id']);
|
|
|
|
$this->project = $this->getProjectInfo();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取项目详情
|
|
|
|
* @name :getProjectInfo
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/31 15:11
|
|
|
|
*/
|
|
|
|
public function getProjectInfo(){
|
|
|
|
$info = Cache::get('user-'.$this->user['project_id']);
|
|
|
|
if($info === false){
|
|
|
|
$projectModel = new Project();
|
|
|
|
$info = $projectModel->with('payment')->with('deploy_build')
|
|
|
|
->with('deploy_optimize')->with('online_check')->where(['id'=>$this->user['project_id']])->first();
|
|
|
|
if($info['extend_type'] != 0){
|
|
|
|
$info['type'] = $info['extend_type'];
|
|
|
|
}
|
|
|
|
Cache::add('user-'.$this->user['project_id'],$info);
|
|
|
|
}
|
|
|
|
return $this->success($info);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :请求参数处理
|
|
|
|
* @name :getParam
|
|
|
|
* @author :lyh
|
...
|
...
|
|