作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

@@ -4,6 +4,7 @@ namespace App\Console\Commands\RankData; @@ -4,6 +4,7 @@ namespace App\Console\Commands\RankData;
4 4
5 use App\Helper\Arr; 5 use App\Helper\Arr;
6 use App\Helper\SemrushApi; 6 use App\Helper\SemrushApi;
  7 +use App\Models\Domain\DomainInfo;
7 use App\Models\RankData\ExternalLinks as ExternalLinksModel; 8 use App\Models\RankData\ExternalLinks as ExternalLinksModel;
8 use App\Models\Project\DeployOptimize; 9 use App\Models\Project\DeployOptimize;
9 use App\Utils\LogUtils; 10 use App\Utils\LogUtils;
@@ -54,6 +55,7 @@ class ExternalLinks extends BaseCommands @@ -54,6 +55,7 @@ class ExternalLinks extends BaseCommands
54 } 55 }
55 56
56 //外链数据 57 //外链数据
  58 + $domain = (new DomainInfo())->getDomain($domain);
57 $res = $semrushApi->backlinks_overview($domain); 59 $res = $semrushApi->backlinks_overview($domain);
58 if (!$res) { 60 if (!$res) {
59 $error++; 61 $error++;
@@ -98,7 +100,7 @@ class ExternalLinks extends BaseCommands @@ -98,7 +100,7 @@ class ExternalLinks extends BaseCommands
98 //chat数据 100 //chat数据
99 for ($i = 1; $i < 12; $i++) { 101 for ($i = 1; $i < 12; $i++) {
100 $date = date("Y-m-d", strtotime(-7 * $i . 'days')); 102 $date = date("Y-m-d", strtotime(-7 * $i . 'days'));
101 - $chat_data[$date] = ceil($total - ($total * rand(5, 10) / 100)); 103 + $chat_data[$date] = 0; //伪造ceil($total - ($total * rand(5, 10) / 100));
102 } 104 }
103 } 105 }
104 $chat_data[date('Y-m-d')] = $data['total']; 106 $chat_data[date('Y-m-d')] = $data['total'];
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 namespace App\Console\Commands\RankData; 3 namespace App\Console\Commands\RankData;
4 4
5 use App\Helper\SemrushApi; 5 use App\Helper\SemrushApi;
  6 +use App\Models\Domain\DomainInfo;
6 use App\Models\RankData\RecommDomain as RecommDomainModel; 7 use App\Models\RankData\RecommDomain as RecommDomainModel;
7 use App\Models\Project\DeployOptimize; 8 use App\Models\Project\DeployOptimize;
8 use App\Utils\LogUtils; 9 use App\Utils\LogUtils;
@@ -53,6 +54,7 @@ class RecommDomain extends BaseCommands @@ -53,6 +54,7 @@ class RecommDomain extends BaseCommands
53 } 54 }
54 55
55 //外链引荐域名 56 //外链引荐域名
  57 + $domain = (new DomainInfo())->getDomain($domain);
56 $data = $semrushApi->backlinks_refdomains($domain); 58 $data = $semrushApi->backlinks_refdomains($domain);
57 if (!$data) { 59 if (!$data) {
58 $error++; 60 $error++;
@@ -4,6 +4,7 @@ namespace App\Console\Commands\RankData; @@ -4,6 +4,7 @@ namespace App\Console\Commands\RankData;
4 4
5 use App\Helper\Arr; 5 use App\Helper\Arr;
6 use App\Helper\GoogleSpeedApi; 6 use App\Helper\GoogleSpeedApi;
  7 +use App\Models\Domain\DomainInfo;
7 use App\Models\Project\DeployOptimize; 8 use App\Models\Project\DeployOptimize;
8 use App\Models\RankData\Speed as GoogleSpeedModel; 9 use App\Models\RankData\Speed as GoogleSpeedModel;
9 use App\Utils\LogUtils; 10 use App\Utils\LogUtils;
@@ -50,7 +51,7 @@ class Speed extends BaseCommands @@ -50,7 +51,7 @@ class Speed extends BaseCommands
50 //今周已更新 跳过 51 //今周已更新 跳过
51 continue; 52 continue;
52 } 53 }
53 - 54 + $domain = (new DomainInfo())->getDomain($domain);
54 $res = $googleSpeedApi->run($domain); 55 $res = $googleSpeedApi->run($domain);
55 if (!$res) { 56 if (!$res) {
56 $error++; 57 $error++;
@@ -786,9 +786,6 @@ class ProjectController extends BaseController @@ -786,9 +786,6 @@ class ProjectController extends BaseController
786 * @time :2023/11/8 14:17 786 * @time :2023/11/8 14:17
787 */ 787 */
788 public function copyProject(ProjectLogic $logic){ 788 public function copyProject(ProjectLogic $logic){
789 - if($this->manage['mobile'] != '15680871314' || $this->manage['mobile'] != '18008059100'){  
790 - $this->response('当前账号不支持复制项目');  
791 - }  
792 $this->request->validate([ 789 $this->request->validate([
793 'project_id'=>'required', 790 'project_id'=>'required',
794 ],[ 791 ],[
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :CustomModuleCategoryController.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2023/12/4 15:54
  8 + */
  9 +
  10 +namespace App\Http\Controllers\Bside\CustomModule;
  11 +
  12 +use App\Http\Controllers\Bside\BaseController;
  13 +use App\Http\Logic\Bside\CustomModule\CustomModuleCategoryLogic;
  14 +use App\Models\CustomModule\CustomModuleCategory;
  15 +
  16 +class CustomModuleCategoryController extends BaseController
  17 +{
  18 + /**
  19 + * @remark :获取自定义模块列表
  20 + * @name :ModuleList
  21 + * @author :lyh
  22 + * @method :post
  23 + * @time :2023/12/4 15:43
  24 + */
  25 + public function list(CustomModuleCategory $customModuleCategory){
  26 + $this->map['project_id'] = $this->user['project_id'];
  27 + $lists = $customModuleCategory->lists($this->map,$this->page,$this->row,$this->order);
  28 + $this->response('success',Code::SUCCESS,$lists);
  29 + }
  30 +
  31 + /**
  32 + * @remark :获取当前数据详情
  33 + * @name :info
  34 + * @author :lyh
  35 + * @method :post
  36 + * @time :2023/12/4 16:09
  37 + */
  38 + public function info(CustomModuleCategoryLogic $logic){
  39 + $this->request->validate([
  40 + 'id'=>['required'],
  41 + ],[
  42 + 'id.required' => 'ID不能为空',
  43 + ]);
  44 + $info = $logic->getCustomModuleCategoryInfo();
  45 + $this->response('success',Code::SUCCESS,$info);
  46 + }
  47 +
  48 + /**
  49 + * @remark :保存数据
  50 + * @name :save
  51 + * @author :lyh
  52 + * @method :post
  53 + * @time :2023/12/4 15:45
  54 + */
  55 + public function save(CustomModuleCategoryLogic $logic){
  56 + $logic->customModuleCategorySave();
  57 + $this->response('success');
  58 + }
  59 +
  60 + /**
  61 + * @remark :删除数据
  62 + * @name :del
  63 + * @author :lyh
  64 + * @method :post
  65 + * @time :2023/12/4 16:14
  66 + */
  67 + public function del(CustomModuleCategoryLogic $logic){
  68 + $this->request->validate([
  69 + 'id'=>['required'],
  70 + ],[
  71 + 'id.required' => 'ID不能为空',
  72 + ]);
  73 + $logic->customModuleCategoryDel();
  74 + $this->response('success');
  75 + }
  76 +}
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :CustomModuleContentController.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2023/12/4 15:55
  8 + */
  9 +
  10 +namespace App\Http\Controllers\Bside\CustomModule;
  11 +
  12 +use App\Http\Controllers\Bside\BaseController;
  13 +use App\Http\Logic\Bside\CustomModule\CustomModuleContentLogic;
  14 +use App\Models\CustomModule\CustomModuleContent;
  15 +
  16 +class CustomModuleContentController extends BaseController
  17 +{
  18 + /**
  19 + * @remark :获取自定义模块列表
  20 + * @name :ModuleList
  21 + * @author :lyh
  22 + * @method :post
  23 + * @time :2023/12/4 15:43
  24 + */
  25 + public function list(CustomModuleContent $customModuleContent){
  26 + $this->map['project_id'] = $this->user['project_id'];
  27 + $lists = $customModuleContent->lists($this->map,$this->page,$this->row,$this->order);
  28 + $this->response('success',Code::SUCCESS,$lists);
  29 + }
  30 +
  31 + /**
  32 + * @remark :获取当前数据详情
  33 + * @name :info
  34 + * @author :lyh
  35 + * @method :post
  36 + * @time :2023/12/4 16:09
  37 + */
  38 + public function info(CustomModuleContentLogic $logic){
  39 + $this->request->validate([
  40 + 'id'=>['required'],
  41 + ],[
  42 + 'id.required' => 'ID不能为空',
  43 + ]);
  44 + $info = $logic->getCustomModuleContentInfo();
  45 + $this->response('success',Code::SUCCESS,$info);
  46 + }
  47 +
  48 + /**
  49 + * @remark :保存数据
  50 + * @name :save
  51 + * @author :lyh
  52 + * @method :post
  53 + * @time :2023/12/4 15:45
  54 + */
  55 + public function save(CustomModuleContentLogic $logic){
  56 + $logic->customModuleContentSave();
  57 + $this->response('success');
  58 + }
  59 +
  60 + /**
  61 + * @remark :删除数据
  62 + * @name :del
  63 + * @author :lyh
  64 + * @method :post
  65 + * @time :2023/12/4 16:14
  66 + */
  67 + public function del(CustomModuleContentLogic $logic){
  68 + $this->request->validate([
  69 + 'id'=>['required'],
  70 + ],[
  71 + 'id.required' => 'ID不能为空',
  72 + ]);
  73 + $logic->customModuleContentDel();
  74 + $this->response('success');
  75 + }
  76 +}
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :CustomModuleController.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2023/12/4 15:42
  8 + */
  9 +
  10 +namespace App\Http\Controllers\Bside\CustomModule;
  11 +
  12 +use App\Enums\Common\Code;
  13 +use App\Http\Controllers\Bside\BaseController;
  14 +use App\Http\Logic\Bside\CustomModule\CustomModuleLogic;
  15 +use App\Models\CustomModule\CustomModule;
  16 +
  17 +/**
  18 + * @remark :自定义模块
  19 + * @name :CustomModuleController
  20 + * @author :lyh
  21 + * @method :post
  22 + * @time :2023/12/4 15:42
  23 + */
  24 +class CustomModuleController extends BaseController
  25 +{
  26 + /**
  27 + * @remark :获取自定义模块列表
  28 + * @name :ModuleList
  29 + * @author :lyh
  30 + * @method :post
  31 + * @time :2023/12/4 15:43
  32 + */
  33 + public function list(CustomModule $customModule){
  34 + $this->map['project_id'] = $this->user['project_id'];
  35 + $lists = $customModule->lists($this->map,$this->page,$this->row,$this->order);
  36 + $this->response('success',Code::SUCCESS,$lists);
  37 + }
  38 +
  39 + /**
  40 + * @remark :获取当前数据详情
  41 + * @name :info
  42 + * @author :lyh
  43 + * @method :post
  44 + * @time :2023/12/4 16:09
  45 + */
  46 + public function info(CustomModuleLogic $logic){
  47 + $this->request->validate([
  48 + 'id'=>['required'],
  49 + ],[
  50 + 'id.required' => 'ID不能为空',
  51 + ]);
  52 + $info = $logic->getCustomModuleInfo();
  53 + $this->response('success',Code::SUCCESS,$info);
  54 + }
  55 +
  56 + /**
  57 + * @remark :保存数据
  58 + * @name :save
  59 + * @author :lyh
  60 + * @method :post
  61 + * @time :2023/12/4 15:45
  62 + */
  63 + public function save(CustomModuleLogic $logic){
  64 + $logic->customModuleSave();
  65 + $this->response('success');
  66 + }
  67 +
  68 + public function del(CustomModuleLogic $logic){
  69 + $this->request->validate([
  70 + 'id'=>['required'],
  71 + ],[
  72 + 'id.required' => 'ID不能为空',
  73 + ]);
  74 + $logic->customModuleDel();
  75 + $this->response('success');
  76 + }
  77 +}
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :CustomModuleExtentController.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2023/12/4 15:58
  8 + */
  9 +
  10 +namespace App\Http\Controllers\Bside\CustomModule;
  11 +
  12 +use App\Http\Controllers\Bside\BaseController;
  13 +use App\Http\Logic\Bside\CustomModule\CustomModuleExtendLogic;
  14 +use App\Models\CustomModule\CustomModuleExtend;
  15 +
  16 +class CustomModuleExtentController extends BaseController
  17 +{
  18 + /**
  19 + * @remark :获取自定义模块列表
  20 + * @name :ModuleList
  21 + * @author :lyh
  22 + * @method :post
  23 + * @time :2023/12/4 15:43
  24 + */
  25 + public function list(CustomModuleExtend $customModuleExtend){
  26 + $this->map['project_id'] = $this->user['project_id'];
  27 + $lists = $customModuleExtend->lists($this->map,$this->page,$this->row,$this->order);
  28 + $this->response('success',Code::SUCCESS,$lists);
  29 + }
  30 +
  31 + /**
  32 + * @remark :获取当前数据详情
  33 + * @name :info
  34 + * @author :lyh
  35 + * @method :post
  36 + * @time :2023/12/4 16:09
  37 + */
  38 + public function info(CustomModuleExtendLogic $logic){
  39 + $this->request->validate([
  40 + 'id'=>['required'],
  41 + ],[
  42 + 'id.required' => 'ID不能为空',
  43 + ]);
  44 + $info = $logic->getCustomModuleExtendInfo();
  45 + $this->response('success',Code::SUCCESS,$info);
  46 + }
  47 +
  48 + /**
  49 + * @remark :保存数据
  50 + * @name :save
  51 + * @author :lyh
  52 + * @method :post
  53 + * @time :2023/12/4 15:45
  54 + */
  55 + public function save(CustomModuleExtendLogic $logic){
  56 + $logic->customModuleExtendSave();
  57 + $this->response('success');
  58 + }
  59 +
  60 + /**
  61 + * @remark :删除数据
  62 + * @name :del
  63 + * @author :lyh
  64 + * @method :post
  65 + * @time :2023/12/4 16:14
  66 + */
  67 + public function del(CustomModuleExtendLogic $logic){
  68 + $this->request->validate([
  69 + 'id'=>['required'],
  70 + ],[
  71 + 'id.required' => 'ID不能为空',
  72 + ]);
  73 + $logic->customModuleExtendDel();
  74 + $this->response('success');
  75 + }
  76 +}
@@ -21,11 +21,11 @@ class NavController extends BaseController @@ -21,11 +21,11 @@ class NavController extends BaseController
21 21
22 22
23 /** 23 /**
24 - * 列表数据  
25 - * @throws \Psr\Container\ContainerExceptionInterface  
26 - * @throws \Psr\Container\NotFoundExceptionInterface  
27 - * @author:dc  
28 - * @time 2023/5/8 16:37 24 + * @remark :获取列表数据
  25 + * @name :index
  26 + * @author :lyh
  27 + * @method :post
  28 + * @time :2023/12/4 15:00
29 */ 29 */
30 public function index(BNav $nav){ 30 public function index(BNav $nav){
31 $this->map['project_id'] = $this->user['project_id']; 31 $this->map['project_id'] = $this->user['project_id'];
@@ -42,6 +42,19 @@ class NavController extends BaseController @@ -42,6 +42,19 @@ class NavController extends BaseController
42 } 42 }
43 43
44 44
  45 +
  46 + /**
  47 + * @remark :获取当前id下的所有子集
  48 + * @name :getSubList
  49 + * @author :lyh
  50 + * @method :post
  51 + * @time :2023/12/4 15:04
  52 + */
  53 + public function getSubList(NavLogic $logic){
  54 + $data = $logic->getSubList();
  55 + $this->response('success',Code::SUCCESS,$data);
  56 + }
  57 +
45 /** 58 /**
46 * @remark :保存数据 59 * @remark :保存数据
47 * @name :save 60 * @name :save
@@ -36,7 +36,6 @@ class NewsController extends BaseController @@ -36,7 +36,6 @@ class NewsController extends BaseController
36 $user = new User(); 36 $user = new User();
37 foreach ($lists['list'] as $k => $v){ 37 foreach ($lists['list'] as $k => $v){
38 $v['category_name'] = $this->categoryName($v['category_id'],$data); 38 $v['category_name'] = $this->categoryName($v['category_id'],$data);
39 - $v['seo_mate'] =  
40 $v['url'] = $this->user['domain'].getRouteMap(RouteMap::SOURCE_NEWS,$v['id']); 39 $v['url'] = $this->user['domain'].getRouteMap(RouteMap::SOURCE_NEWS,$v['id']);
41 $v['image_link'] = getImageUrl($v['image']); 40 $v['image_link'] = getImageUrl($v['image']);
42 $v['operator_name'] = $user->getName($v['operator_id']); 41 $v['operator_name'] = $user->getName($v['operator_id']);
@@ -35,7 +35,7 @@ class OnlineCheckLogic extends BaseLogic @@ -35,7 +35,7 @@ class OnlineCheckLogic extends BaseLogic
35 $optimizeInfo = $optimizeModel->read(['project_id'=>$this->param['id']]); 35 $optimizeInfo = $optimizeModel->read(['project_id'=>$this->param['id']]);
36 //查看当前用户是否有权限审核 36 //查看当前用户是否有权限审核
37 if($this->param['type'] == 'optimist'){ 37 if($this->param['type'] == 'optimist'){
38 - if(($info['optimist_mid'] != $this->manager['id']) && ($optimizeInfo['assist_mid'] != $this->manager['id'])){ 38 + if(($optimizeInfo['optimist_mid'] != $this->manager['id']) && ($optimizeInfo['assist_mid'] != $this->manager['id'])){
39 $this->fail('你无权限提交审核'); 39 $this->fail('你无权限提交审核');
40 } 40 }
41 }else{ 41 }else{
@@ -43,7 +43,7 @@ class OnlineCheckLogic extends BaseLogic @@ -43,7 +43,7 @@ class OnlineCheckLogic extends BaseLogic
43 if($info['optimist_status'] != 1){ 43 if($info['optimist_status'] != 1){
44 $this->fail('请先优化师审核'); 44 $this->fail('请先优化师审核');
45 } 45 }
46 - if($info['qa_mid'] != 0 && $info['qa_mid'] != $this->manager['id']){ 46 + if(($info['qa_mid'] != 0) && ($info['qa_mid'] != $this->manager['id'])){
47 $this->fail('你无权限提交审核'); 47 $this->fail('你无权限提交审核');
48 } 48 }
49 if(isset($this->param['project_type']) && !empty($this->param['project_type'])){ 49 if(isset($this->param['project_type']) && !empty($this->param['project_type'])){
@@ -72,9 +72,9 @@ class OnlineCheckLogic extends BaseLogic @@ -72,9 +72,9 @@ class OnlineCheckLogic extends BaseLogic
72 if($info !== false){ 72 if($info !== false){
73 $this->fail('已提交,请勿重复提交'); 73 $this->fail('已提交,请勿重复提交');
74 }else{ 74 }else{
75 - $projectModel = new Project();  
76 - //提交审核修改状态为审核中  
77 - $projectModel->edit(['status'=>1],['id'=>$this->param['id']]); 75 + if(($this->param['optimist_mid'] == 0) || ($this->param['qa_mid'] == 0)){
  76 + $this->fail('请先选择优化师和品控,在提交审核');
  77 + }
78 //组装数据 78 //组装数据
79 $data = [ 79 $data = [
80 'project_id' => $this->param['id'], 80 'project_id' => $this->param['id'],
@@ -88,6 +88,9 @@ class OnlineCheckLogic extends BaseLogic @@ -88,6 +88,9 @@ class OnlineCheckLogic extends BaseLogic
88 $this->fail('error'); 88 $this->fail('error');
89 } 89 }
90 } 90 }
  91 + $projectModel = new Project();
  92 + //提交审核修改状态为审核中
  93 + $projectModel->edit(['status'=>1],['id'=>$this->param['id']]);
91 return $this->success(); 94 return $this->success();
92 } 95 }
93 } 96 }
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :CustomModuleCategoryLogic.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2023/12/4 16:07
  8 + */
  9 +
  10 +namespace App\Http\Logic\Bside\CustomModule;
  11 +
  12 +use App\Http\Logic\Bside\BaseLogic;
  13 +use App\Models\CustomModule\CustomModuleCategory;
  14 +
  15 +class CustomModuleCategoryLogic extends BaseLogic
  16 +{
  17 + public function __construct()
  18 + {
  19 + parent::__construct();
  20 + $this->param = $this->requestAll;
  21 + $this->model = new CustomModuleCategory();
  22 + }
  23 +
  24 + /**
  25 + * @remark :获取当前数据详情
  26 + * @name :getCustomModuleInfo
  27 + * @author :lyh
  28 + * @method :post
  29 + * @time :2023/12/4 16:10
  30 + */
  31 + public function getCustomModuleCategoryInfo(){
  32 +
  33 + }
  34 +
  35 + /**
  36 + * @remark :保存数据
  37 + * @name :ModuleSave
  38 + * @author :lyh
  39 + * @method :post
  40 + * @time :2023/12/4 15:47
  41 + */
  42 + public function customModuleCategorySave(){
  43 +
  44 + }
  45 +
  46 + /**
  47 + * @remark :删除数据
  48 + * @name :ModuleDel
  49 + * @author :lyh
  50 + * @method :post
  51 + * @time :2023/12/4 15:47
  52 + */
  53 + public function customModuleCategoryDel(){
  54 +
  55 + }
  56 +}
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :CustomModuleContentLogic.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2023/12/4 16:06
  8 + */
  9 +
  10 +namespace App\Http\Logic\Bside\CustomModule;
  11 +
  12 +use App\Http\Logic\Bside\BaseLogic;
  13 +use App\Models\CustomModule\CustomModuleContent;
  14 +
  15 +class CustomModuleContentLogic extends BaseLogic
  16 +{
  17 + public function __construct()
  18 + {
  19 + parent::__construct();
  20 + $this->param = $this->requestAll;
  21 + $this->model = new CustomModuleContent();
  22 + }
  23 +
  24 + /**
  25 + * @remark :获取当前数据详情
  26 + * @name :getCustomModuleInfo
  27 + * @author :lyh
  28 + * @method :post
  29 + * @time :2023/12/4 16:10
  30 + */
  31 + public function getCustomModuleContentInfo(){
  32 +
  33 + }
  34 +
  35 + /**
  36 + * @remark :保存数据
  37 + * @name :ModuleSave
  38 + * @author :lyh
  39 + * @method :post
  40 + * @time :2023/12/4 15:47
  41 + */
  42 + public function customModuleContentSave(){
  43 +
  44 + }
  45 +
  46 + /**
  47 + * @remark :删除数据
  48 + * @name :ModuleDel
  49 + * @author :lyh
  50 + * @method :post
  51 + * @time :2023/12/4 15:47
  52 + */
  53 + public function customModuleContentDel(){
  54 +
  55 + }
  56 +}
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :CustomModuleExtendLogic.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2023/12/4 16:07
  8 + */
  9 +
  10 +namespace App\Http\Logic\Bside\CustomModule;
  11 +
  12 +use App\Http\Logic\Bside\BaseLogic;
  13 +use App\Models\CustomModule\CustomModuleExtend;
  14 +
  15 +class CustomModuleExtendLogic extends BaseLogic
  16 +{
  17 + public function __construct()
  18 + {
  19 + parent::__construct();
  20 + $this->param = $this->requestAll;
  21 + $this->model = new CustomModuleExtend();
  22 + }
  23 +
  24 + /**
  25 + * @remark :获取当前数据详情
  26 + * @name :getCustomModuleInfo
  27 + * @author :lyh
  28 + * @method :post
  29 + * @time :2023/12/4 16:10
  30 + */
  31 + public function getCustomModuleExtendInfo(){
  32 +
  33 + }
  34 +
  35 + /**
  36 + * @remark :保存数据
  37 + * @name :ModuleSave
  38 + * @author :lyh
  39 + * @method :post
  40 + * @time :2023/12/4 15:47
  41 + */
  42 + public function customModuleExtendSave(){
  43 +
  44 + }
  45 +
  46 + /**
  47 + * @remark :删除数据
  48 + * @name :ModuleDel
  49 + * @author :lyh
  50 + * @method :post
  51 + * @time :2023/12/4 15:47
  52 + */
  53 + public function customModuleExtendDel(){
  54 +
  55 + }
  56 +}
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :CustomModuleLogic.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2023/12/4 15:46
  8 + */
  9 +
  10 +namespace App\Http\Logic\Bside\CustomModule;
  11 +
  12 +use App\Http\Logic\Bside\BaseLogic;
  13 +use App\Models\CustomModule\CustomModule;
  14 +
  15 +class CustomModuleLogic extends BaseLogic
  16 +{
  17 + public function __construct()
  18 + {
  19 + parent::__construct();
  20 + $this->param = $this->requestAll;
  21 + $this->model = new CustomModule();
  22 + }
  23 +
  24 + /**
  25 + * @remark :获取当前数据详情
  26 + * @name :getCustomModuleInfo
  27 + * @author :lyh
  28 + * @method :post
  29 + * @time :2023/12/4 16:10
  30 + */
  31 + public function getCustomModuleInfo(){
  32 +
  33 + }
  34 +
  35 + /**
  36 + * @remark :保存数据
  37 + * @name :ModuleSave
  38 + * @author :lyh
  39 + * @method :post
  40 + * @time :2023/12/4 15:47
  41 + */
  42 + public function customModuleSave(){
  43 +
  44 + }
  45 +
  46 + /**
  47 + * @remark :删除数据
  48 + * @name :ModuleDel
  49 + * @author :lyh
  50 + * @method :post
  51 + * @time :2023/12/4 15:47
  52 + */
  53 + public function customModuleDel(){
  54 +
  55 + }
  56 +}
@@ -26,6 +26,52 @@ class NavLogic extends BaseLogic @@ -26,6 +26,52 @@ class NavLogic extends BaseLogic
26 $this->model = new BNav(); 26 $this->model = new BNav();
27 } 27 }
28 28
  29 + /**
  30 + * @remark :获取当前id下所有子集
  31 + * @name :getSubList
  32 + * @author :lyh
  33 + * @method :post
  34 + * @time :2023/12/4 15:11
  35 + */
  36 + public function getSubList(){
  37 + //编辑时
  38 + if(isset($this->param['id']) && !empty($this->param['id'])) {
  39 + $str = [];
  40 + //排序掉当前id下所有子集
  41 + $str = $this->getAllSub($this->param['id'], $str);
  42 + $str[] = $this->param['id'];
  43 + $this->param['id'] = ['not in', $str];
  44 + }
  45 + $this->param['project_id'] = $this->user['project_id'];
  46 + $list = $this->model->list($this->param);
  47 + $data = array();
  48 + foreach ($list as $v){
  49 + $v = (array)$v;
  50 + if ($v['pid'] == 0) {
  51 + $v['sub'] = _get_child($v['id'], $list);
  52 + $data[] = $v;
  53 + }
  54 + }
  55 + return $this->success($data);
  56 + }
  57 +
  58 + /**
  59 + * @remark :获取当前id下所有子集
  60 + * @name :getAllSub
  61 + * @author :lyh
  62 + * @method :post
  63 + * @time :2023/10/18 15:10
  64 + */
  65 + public function getAllSub($id,&$str = []){
  66 + $list = $this->model->list(['pid'=>$id,'status'=>1],['id','pid']);
  67 + if(!empty($list)){
  68 + foreach ($list as $v){
  69 + $str[] = $v['id'];
  70 + $this->getAllSub($v['id'],$str);
  71 + }
  72 + }
  73 + return $str;
  74 + }
29 75
30 /** 76 /**
31 * @remark :保存数据 77 * @remark :保存数据
@@ -71,10 +117,10 @@ class NavLogic extends BaseLogic @@ -71,10 +117,10 @@ class NavLogic extends BaseLogic
71 if($this->param['pid'] == $info['id']){ 117 if($this->param['pid'] == $info['id']){
72 $this->fail('不允许成为自己的上级'); 118 $this->fail('不允许成为自己的上级');
73 } 119 }
74 - $pid_info = $this->model->read(['pid'=>$this->param['id']]);  
75 - if(($pid_info !== false) && $this->param['pid'] != $info['pid']){  
76 - $this->fail('当前菜单拥有子集不允许修改上级');  
77 - } 120 +// $pid_info = $this->model->read(['pid'=>$this->param['id']]);
  121 +// if(($pid_info !== false) && $this->param['pid'] != $info['pid']){
  122 +// $this->fail('当前菜单拥有子集不允许修改上级');
  123 +// }
78 return $this->success(); 124 return $this->success();
79 } 125 }
80 126
@@ -167,6 +167,7 @@ class UserLoginLogic @@ -167,6 +167,7 @@ class UserLoginLogic
167 $info['is_upload_manage'] = $project['is_upload_manage']; 167 $info['is_upload_manage'] = $project['is_upload_manage'];
168 $info['upload_config'] = $project['upload_config']; 168 $info['upload_config'] = $project['upload_config'];
169 $info['image_max'] = $project['image_max']; 169 $info['image_max'] = $project['image_max'];
  170 + $info['is_update_language'] = $project['is_update_language'];
170 $info['configuration'] = $project['deploy_build']['configuration']; 171 $info['configuration'] = $project['deploy_build']['configuration'];
171 if($info['is_customized'] == 1){ 172 if($info['is_customized'] == 1){
172 $info['is_visualization'] = json_decode($project['is_visualization']); 173 $info['is_visualization'] = json_decode($project['is_visualization']);
1 <?php 1 <?php
2 /** 2 /**
3 * @remark : 3 * @remark :
4 - * @name :CustomModuleLabel.php 4 + * @name :CustomModuleExtend.php
5 * @author :lyh 5 * @author :lyh
6 * @method :post 6 * @method :post
7 - * @time :2023/11/6 10:05 7 + * @time :2023/12/4 15:42
8 */ 8 */
9 9
10 namespace App\Models\CustomModule; 10 namespace App\Models\CustomModule;
11 11
12 use App\Models\Base; 12 use App\Models\Base;
13 13
14 -class CustomModuleLabel extends Base 14 +class CustomModuleExtend extends Base
15 { 15 {
16 - protected $table = 'gl_custom_module_label'; 16 + protected $table = 'gl_custom_module_extent';
17 } 17 }
@@ -363,6 +363,7 @@ Route::middleware(['bloginauth'])->group(function () { @@ -363,6 +363,7 @@ Route::middleware(['bloginauth'])->group(function () {
363 // 导航栏编辑 363 // 导航栏编辑
364 Route::prefix('nav')->group(function () { 364 Route::prefix('nav')->group(function () {
365 Route::get('/', [\App\Http\Controllers\Bside\Nav\NavController::class, 'index'])->name('nav'); 365 Route::get('/', [\App\Http\Controllers\Bside\Nav\NavController::class, 'index'])->name('nav');
  366 + Route::any('/get', [\App\Http\Controllers\Bside\Nav\NavController::class, 'getSubList'])->name('nav_getSubList');
366 Route::post('/create', [\App\Http\Controllers\Bside\Nav\NavController::class, 'save'])->name('nav_create'); 367 Route::post('/create', [\App\Http\Controllers\Bside\Nav\NavController::class, 'save'])->name('nav_create');
367 Route::post('/update', [\App\Http\Controllers\Bside\Nav\NavController::class, 'save'])->name('nav_update'); 368 Route::post('/update', [\App\Http\Controllers\Bside\Nav\NavController::class, 'save'])->name('nav_update');
368 Route::delete('/delete', [\App\Http\Controllers\Bside\Nav\NavController::class, 'delete'])->name('nav_delete'); 369 Route::delete('/delete', [\App\Http\Controllers\Bside\Nav\NavController::class, 'delete'])->name('nav_delete');