正在显示
4 个修改的文件
包含
30 行增加
和
3 行删除
| @@ -74,8 +74,10 @@ class RemainDay extends Command | @@ -74,8 +74,10 @@ class RemainDay extends Command | ||
| 74 | } | 74 | } |
| 75 | } | 75 | } |
| 76 | $item->remain_day = $remain_day > 0 ? $remain_day : 0; | 76 | $item->remain_day = $remain_day > 0 ? $remain_day : 0; |
| 77 | - if($item->remain_day == 0){//TODO::未续费网站禁止登录及通知C端禁止网站 | 77 | + if($item->remain_day == 0){ |
| 78 | $item->extend_type = Project::TYPE_FIVE; | 78 | $item->extend_type = Project::TYPE_FIVE; |
| 79 | + $item->site_status = Project::TYPE_ONE;//关闭站点 | ||
| 80 | + //TODO::未续费网站禁止登录及通知C端禁止网站 | ||
| 79 | } | 81 | } |
| 80 | $item->save(); | 82 | $item->save(); |
| 81 | } | 83 | } |
| @@ -1050,4 +1050,26 @@ class ProjectController extends BaseController | @@ -1050,4 +1050,26 @@ class ProjectController extends BaseController | ||
| 1050 | $deployBuildModel->edit(['is_participle'=>$this->param['is_participle']],['project_id'=>$this->param['project_id']]); | 1050 | $deployBuildModel->edit(['is_participle'=>$this->param['is_participle']],['project_id'=>$this->param['project_id']]); |
| 1051 | $this->response('success'); | 1051 | $this->response('success'); |
| 1052 | } | 1052 | } |
| 1053 | + | ||
| 1054 | + /** | ||
| 1055 | + * @remark :(on/off)站点 | ||
| 1056 | + * @param : site_status(站点状态0/1:开启/关闭),id(项目id) | ||
| 1057 | + * @name :saveSiteStatus | ||
| 1058 | + * @author :lyh | ||
| 1059 | + * @method :post | ||
| 1060 | + * @time :2024/7/29 17:12 | ||
| 1061 | + */ | ||
| 1062 | + public function saveSiteStatus(){ | ||
| 1063 | + $projectModel = new Project(); | ||
| 1064 | + $this->request->validate([ | ||
| 1065 | + 'project_id'=>'required', | ||
| 1066 | + 'site_status'=>'required' | ||
| 1067 | + ],[ | ||
| 1068 | + 'project_id.required' => '项目id不能为空', | ||
| 1069 | + 'site_status.required' => '状态不能为空', | ||
| 1070 | + ]); | ||
| 1071 | + $projectModel->edit(['site_status'=>$this->map['site_status']],['id'=>$this->param['id']]); | ||
| 1072 | + //TODO::通知C端 | ||
| 1073 | + $this->response('success'); | ||
| 1074 | + } | ||
| 1053 | } | 1075 | } |
| @@ -156,6 +156,9 @@ class UserLoginLogic | @@ -156,6 +156,9 @@ class UserLoginLogic | ||
| 156 | */ | 156 | */ |
| 157 | public function autoAssembleParam($info){ | 157 | public function autoAssembleParam($info){ |
| 158 | $project = $this->getProjectInfo($info['project_id']); | 158 | $project = $this->getProjectInfo($info['project_id']); |
| 159 | + if($project['site_status'] != 0){//关闭站点 | ||
| 160 | + $this->fail('当前网站已过期,请联系管理员及时续费。'); | ||
| 161 | + } | ||
| 159 | $info['title'] = $project['title'] ?? ''; | 162 | $info['title'] = $project['title'] ?? ''; |
| 160 | $info['company'] = $project['company'] ?? ''; | 163 | $info['company'] = $project['company'] ?? ''; |
| 161 | $info['from_order_id'] = $project['from_order_id'] ?? ''; | 164 | $info['from_order_id'] = $project['from_order_id'] ?? ''; |
| @@ -257,7 +260,7 @@ class UserLoginLogic | @@ -257,7 +260,7 @@ class UserLoginLogic | ||
| 257 | $info = $this->model->read(['mobile'=>$mobile,'project_id'=>$project_id],['id','mobile','status','role_id','token','name','wechat','project_id']); | 260 | $info = $this->model->read(['mobile'=>$mobile,'project_id'=>$project_id],['id','mobile','status','role_id','token','name','wechat','project_id']); |
| 258 | //获取项目详情 | 261 | //获取项目详情 |
| 259 | $project = $this->getProjectInfo($project_id); | 262 | $project = $this->getProjectInfo($project_id); |
| 260 | - if($project['type'] == Project::TYPE_FIVE){ | 263 | + if($project['site_status'] != 0){//关闭站点 |
| 261 | $this->fail('当前网站已过期,请联系管理员及时续费。'); | 264 | $this->fail('当前网站已过期,请联系管理员及时续费。'); |
| 262 | } | 265 | } |
| 263 | $info['title'] = $project['title'] ?? ''; | 266 | $info['title'] = $project['title'] ?? ''; |
| @@ -190,7 +190,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -190,7 +190,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 190 | Route::any('/saveWebTrafficConfig', [Aside\Project\ProjectController::class, 'saveWebTrafficConfig'])->name('admin.project_web_traffic_config_save');//保存引流配置 | 190 | Route::any('/saveWebTrafficConfig', [Aside\Project\ProjectController::class, 'saveWebTrafficConfig'])->name('admin.project_web_traffic_config_save');//保存引流配置 |
| 191 | Route::any('/updateProjectManager', [Aside\Project\ProjectController::class, 'updateProjectManager'])->name('admin.project_updateProjectManager');//更改项目人员配置 | 191 | Route::any('/updateProjectManager', [Aside\Project\ProjectController::class, 'updateProjectManager'])->name('admin.project_updateProjectManager');//更改项目人员配置 |
| 192 | Route::any('/setIsParticiple', [Aside\Project\ProjectController::class, 'setIsParticiple'])->name('admin.project_setIsParticiple');//开启/关闭分词 | 192 | Route::any('/setIsParticiple', [Aside\Project\ProjectController::class, 'setIsParticiple'])->name('admin.project_setIsParticiple');//开启/关闭分词 |
| 193 | - | 193 | + Route::any('/saveSiteStatus', [Aside\Project\ProjectController::class, 'saveSiteStatus'])->name('admin.project_saveSiteStatus'); |
| 194 | //获取关键词前缀和后缀 | 194 | //获取关键词前缀和后缀 |
| 195 | Route::prefix('keyword')->group(function () { | 195 | Route::prefix('keyword')->group(function () { |
| 196 | Route::any('/getKeywordPrefix', [Aside\Project\KeywordPrefixController::class, 'getKeywordPrefix'])->name('admin.keyword_getKeywordPrefix'); | 196 | Route::any('/getKeywordPrefix', [Aside\Project\KeywordPrefixController::class, 'getKeywordPrefix'])->name('admin.keyword_getKeywordPrefix'); |
-
请 注册 或 登录 后发表评论