正在显示
6 个修改的文件
包含
131 行增加
和
1 行删除
| @@ -105,6 +105,10 @@ class ComController extends BaseController | @@ -105,6 +105,10 @@ class ComController extends BaseController | ||
| 105 | if($uploadCode != 1){ | 105 | if($uploadCode != 1){ |
| 106 | $info['role_menu'] = trim(str_replace(',41,',',',','.$info['role_menu'].','),','); | 106 | $info['role_menu'] = trim(str_replace(',41,',',',','.$info['role_menu'].','),','); |
| 107 | } | 107 | } |
| 108 | + $projectCode = $this->getProjectWatermark(); | ||
| 109 | + if($projectCode != 1){ | ||
| 110 | + $info['role_menu'] = trim(str_replace(',50,',',',','.$info['role_menu'].','),','); | ||
| 111 | + } | ||
| 108 | $this->map = [ | 112 | $this->map = [ |
| 109 | 'status'=>0, | 113 | 'status'=>0, |
| 110 | 'is_role'=>0, | 114 | 'is_role'=>0, |
| @@ -140,9 +144,28 @@ class ComController extends BaseController | @@ -140,9 +144,28 @@ class ComController extends BaseController | ||
| 140 | if(!empty($data)){ | 144 | if(!empty($data)){ |
| 141 | $this->map['id'] = ['not in',$data]; | 145 | $this->map['id'] = ['not in',$data]; |
| 142 | } | 146 | } |
| 147 | + $projectCode = $this->getProjectWatermark(); | ||
| 148 | + if($projectCode != 1){ | ||
| 149 | + $data[] = 50; | ||
| 150 | + } | ||
| 151 | + if(!empty($data)){ | ||
| 152 | + $this->map['id'] = ['not in',$data]; | ||
| 153 | + } | ||
| 143 | return $this->map; | 154 | return $this->map; |
| 144 | } | 155 | } |
| 145 | 156 | ||
| 157 | + /** | ||
| 158 | + * @remark :是否开启水印功能 | ||
| 159 | + * @name :getProjectWatermark | ||
| 160 | + * @author :lyh | ||
| 161 | + * @method :post | ||
| 162 | + * @time :2024/8/28 14:47 | ||
| 163 | + */ | ||
| 164 | + public function getProjectWatermark(){ | ||
| 165 | + $projectModel = new Project(); | ||
| 166 | + $info = $projectModel->read(['id'=>$this->user['project_id']],['id','is_watermark']); | ||
| 167 | + return $info['is_watermark'] ?? 0; | ||
| 168 | + } | ||
| 146 | 169 | ||
| 147 | /** | 170 | /** |
| 148 | * @remark :查看是否显示网站装饰 | 171 | * @remark :查看是否显示网站装饰 |
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :OperationHeartbeatController.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2024/8/28 14:02 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Http\Controllers\Bside\BCom; | ||
| 11 | + | ||
| 12 | +use App\Enums\Common\Code; | ||
| 13 | +use App\Http\Controllers\Bside\BaseController; | ||
| 14 | +use App\Models\Log\OperationHeartbeat; | ||
| 15 | + | ||
| 16 | +class OperationHeartbeatController extends BaseController | ||
| 17 | +{ | ||
| 18 | + /** | ||
| 19 | + * @remark :保存数据 | ||
| 20 | + * @name :saveHeartbeat | ||
| 21 | + * @author :lyh | ||
| 22 | + * @method :post | ||
| 23 | + * @time :2024/8/28 14:03 | ||
| 24 | + */ | ||
| 25 | + public function saveHeartbeat(){ | ||
| 26 | + $this->request->validate([ | ||
| 27 | + 'source'=>'required', | ||
| 28 | + 'is_list' => 'required', | ||
| 29 | + 'is_custom'=>'required', | ||
| 30 | + 'is_template'=>'required', | ||
| 31 | + 'operator_id'=>'required', | ||
| 32 | + ], [ | ||
| 33 | + 'source.required' => '请选择页面', | ||
| 34 | + 'is_list.required' => '列表页/详情页', | ||
| 35 | + 'is_custom.required' => '是否为扩展模版', | ||
| 36 | + 'is_template.required' => '详情页/可视化', | ||
| 37 | + 'operator_id.required' => '操作人', | ||
| 38 | + ]); | ||
| 39 | + $condition = ['source'=>$this->param['source'],'is_list'=>$this->param['is_list'],'is_custom'=>$this->param['is_custom'],'is_template'=>$this->param['is_template']]; | ||
| 40 | + $operationHeartbeatModel = new OperationHeartbeat(); | ||
| 41 | + $info = $operationHeartbeatModel->read($condition,['id','status']); | ||
| 42 | + if($info === false){ | ||
| 43 | + $condition['status'] = 1; | ||
| 44 | + $operationHeartbeatModel->addReturnId($condition); | ||
| 45 | + }else{ | ||
| 46 | + $operationHeartbeatModel->edit(['status'=>1],['id'=>$info['id']]); | ||
| 47 | + } | ||
| 48 | + $this->response('success'); | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + /** | ||
| 52 | + * @remark :获取当前详情 | ||
| 53 | + * @name :getInfo | ||
| 54 | + * @author :lyh | ||
| 55 | + * @method :post | ||
| 56 | + * @time :2024/8/28 14:29 | ||
| 57 | + */ | ||
| 58 | + public function getInfo(){ | ||
| 59 | + $this->request->validate([ | ||
| 60 | + 'source'=>'required', | ||
| 61 | + 'is_list' => 'required', | ||
| 62 | + 'is_custom'=>'required', | ||
| 63 | + 'is_template'=>'required', | ||
| 64 | + 'operator_id'=>'required', | ||
| 65 | + ], [ | ||
| 66 | + 'source.required' => '请选择页面', | ||
| 67 | + 'is_list.required' => '列表页/详情页', | ||
| 68 | + 'is_custom.required' => '是否为扩展模版', | ||
| 69 | + 'is_template.required' => '详情页/可视化', | ||
| 70 | + 'operator_id.required' => '操作人', | ||
| 71 | + ]); | ||
| 72 | + $condition = ['source'=>$this->param['source'],'is_list'=>$this->param['is_list'],'is_custom'=>$this->param['is_custom'],'is_template'=>$this->param['is_template']]; | ||
| 73 | + $operationHeartbeatModel = new OperationHeartbeat(); | ||
| 74 | + $info = $operationHeartbeatModel->read($condition,['id','status']); | ||
| 75 | + $this->response('success',Code::SUCCESS,$info); | ||
| 76 | + } | ||
| 77 | +} |
| @@ -180,6 +180,7 @@ class UserLoginLogic | @@ -180,6 +180,7 @@ class UserLoginLogic | ||
| 180 | $info['project_location'] = $project['project_location']; | 180 | $info['project_location'] = $project['project_location']; |
| 181 | $info['open_export_product'] = $project['open_export_product']; | 181 | $info['open_export_product'] = $project['open_export_product']; |
| 182 | $info['is_update_language'] = $project['is_update_language']; | 182 | $info['is_update_language'] = $project['is_update_language']; |
| 183 | + $info['is_watermark'] = $project['is_watermark']; | ||
| 183 | $info['configuration'] = $project['deploy_build']['configuration']; | 184 | $info['configuration'] = $project['deploy_build']['configuration']; |
| 184 | $info['file_cdn'] = $project['deploy_build']['file_cdn']; | 185 | $info['file_cdn'] = $project['deploy_build']['file_cdn']; |
| 185 | $info['project_type'] = $project['type']; | 186 | $info['project_type'] = $project['type']; |
| @@ -284,6 +285,7 @@ class UserLoginLogic | @@ -284,6 +285,7 @@ class UserLoginLogic | ||
| 284 | $info['uptime_type'] = $this->getHistory($project); | 285 | $info['uptime_type'] = $this->getHistory($project); |
| 285 | $info['uptime'] = $project['uptime']; | 286 | $info['uptime'] = $project['uptime']; |
| 286 | $info['is_update_language'] = $project['is_update_language']; | 287 | $info['is_update_language'] = $project['is_update_language']; |
| 288 | + $info['is_watermark'] = $project['is_watermark']; | ||
| 287 | $info['configuration'] = $project['deploy_build']['configuration']; | 289 | $info['configuration'] = $project['deploy_build']['configuration']; |
| 288 | $info['project_type'] = $project['type']; | 290 | $info['project_type'] = $project['type']; |
| 289 | $info['storage_type'] = $project['storage_type']; | 291 | $info['storage_type'] = $project['storage_type']; |
app/Models/Log/OperationHeartbeat.php
0 → 100644
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :OperationHeartbeat.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2024/8/28 10:35 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Models\Log; | ||
| 11 | + | ||
| 12 | +use App\Models\Base; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * @remark :用户心跳 | ||
| 16 | + * @name :OperationHeartbeat | ||
| 17 | + * @author :lyh | ||
| 18 | + * @method :post | ||
| 19 | + * @time :2024/8/28 10:36 | ||
| 20 | + */ | ||
| 21 | +class OperationHeartbeat extends Base | ||
| 22 | +{ | ||
| 23 | + protected $table = 'gl_operation_heartbeat'; | ||
| 24 | +} |
| @@ -77,7 +77,6 @@ class Project extends Base | @@ -77,7 +77,6 @@ class Project extends Base | ||
| 77 | public static function planMap() | 77 | public static function planMap() |
| 78 | { | 78 | { |
| 79 | return [ | 79 | return [ |
| 80 | - 10 => '专业版', | ||
| 81 | 1 => '标准版', | 80 | 1 => '标准版', |
| 82 | 2 => '商务版', | 81 | 2 => '商务版', |
| 83 | 3 => '旗舰版', | 82 | 3 => '旗舰版', |
| @@ -87,6 +86,7 @@ class Project extends Base | @@ -87,6 +86,7 @@ class Project extends Base | ||
| 87 | 7 => '定制建站(PS订制)', | 86 | 7 => '定制建站(PS订制)', |
| 88 | 8 => '星链网站(1年版)', | 87 | 8 => '星链网站(1年版)', |
| 89 | 9 => '星链网站(2年版)', | 88 | 9 => '星链网站(2年版)', |
| 89 | + 10 => '专业版', | ||
| 90 | 11 => '俄语标准版', | 90 | 11 => '俄语标准版', |
| 91 | 12 => '俄语商务版', | 91 | 12 => '俄语商务版', |
| 92 | 14 => '俄语旗舰版', | 92 | 14 => '俄语旗舰版', |
| @@ -600,6 +600,10 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -600,6 +600,10 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 600 | Route::any('/save', [\App\Http\Controllers\Bside\Inquiry\InquiryFieldController::class, 'save'])->name('inquiry_field_save'); | 600 | Route::any('/save', [\App\Http\Controllers\Bside\Inquiry\InquiryFieldController::class, 'save'])->name('inquiry_field_save'); |
| 601 | Route::any('/del', [\App\Http\Controllers\Bside\Inquiry\InquiryFieldController::class, 'del'])->name('inquiry_field_del'); | 601 | Route::any('/del', [\App\Http\Controllers\Bside\Inquiry\InquiryFieldController::class, 'del'])->name('inquiry_field_del'); |
| 602 | }); | 602 | }); |
| 603 | + | ||
| 604 | + Route::prefix('operation_heartbeat')->group(function () { | ||
| 605 | + Route::any('/saveHeartbeat', [\App\Http\Controllers\Bside\BCom\OperationHeartbeatController::class, 'saveHeartbeat'])->name('operation_heartbeat_saveHeartbeat'); | ||
| 606 | + }); | ||
| 603 | }); | 607 | }); |
| 604 | //无需登录验证的路由组 | 608 | //无需登录验证的路由组 |
| 605 | Route::group([], function () { | 609 | Route::group([], function () { |
-
请 注册 或 登录 后发表评论