作者 李宇航

合并分支 'lyh-server' 到 'master'

Lyh server



查看合并请求 !2020
@@ -25,6 +25,7 @@ use App\Models\Project\ProjectAiSetting; @@ -25,6 +25,7 @@ use App\Models\Project\ProjectAiSetting;
25 use App\Models\ProjectAssociation\ProjectAssociation; 25 use App\Models\ProjectAssociation\ProjectAssociation;
26 use App\Models\RouteMap\RouteMap; 26 use App\Models\RouteMap\RouteMap;
27 use App\Models\Template\BTemplateMain; 27 use App\Models\Template\BTemplateMain;
  28 +use App\Models\Template\TemplateTypeMain;
28 use App\Models\Visit\Visit; 29 use App\Models\Visit\Visit;
29 use App\Models\WebSetting\WebLanguage; 30 use App\Models\WebSetting\WebLanguage;
30 use App\Models\WebSetting\WebSetting; 31 use App\Models\WebSetting\WebSetting;
@@ -53,6 +54,10 @@ class lyhDemo extends Command @@ -53,6 +54,10 @@ class lyhDemo extends Command
53 protected $description = '更新路由'; 54 protected $description = '更新路由';
54 55
55 public function handle(){ 56 public function handle(){
  57 + return true;
  58 + }
  59 +
  60 + public function _actionTemplateMain(){
56 $data = []; 61 $data = [];
57 $projectModel = new Project(); 62 $projectModel = new Project();
58 $lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[2,3,4,6]]], 'id', ['id']); 63 $lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[2,3,4,6]]], 'id', ['id']);
@@ -64,6 +69,12 @@ class lyhDemo extends Command @@ -64,6 +69,12 @@ class lyhDemo extends Command
64 $categoryModel = new Category(); 69 $categoryModel = new Category();
65 $count = $categoryModel->counts(['id'=>['>',0]]); 70 $count = $categoryModel->counts(['id'=>['>',0]]);
66 if(($info === false) && ($count > 0)){ 71 if(($info === false) && ($count > 0)){
  72 + $mainModel = new TemplateTypeMain();
  73 + $mainInfo = $mainModel->read(['type'=>2,'is_list'=>1,'is_custom'=>0]);
  74 + $main_html = $mainInfo['main_html'];
  75 + $main_css = "<style id='globalsojs-styles'></style>";
  76 + //写入一条初始数据
  77 + $bTemplateMainModel->addReturnId(['type'=>2,'is_list'=>1,'is_custom'=>0,'project_id'=>$val['id'],'main_html'=>$main_html,'main_css'=>$main_css]);
67 $data[] = $val['id']; 78 $data[] = $val['id'];
68 } 79 }
69 DB::disconnect('custom_mysql'); 80 DB::disconnect('custom_mysql');
@@ -16,6 +16,7 @@ use App\Models\ASide\APublicModel; @@ -16,6 +16,7 @@ use App\Models\ASide\APublicModel;
16 use App\Models\Channel\Channel; 16 use App\Models\Channel\Channel;
17 use App\Models\Domain\DomainInfo; 17 use App\Models\Domain\DomainInfo;
18 use App\Models\Manage\Manage; 18 use App\Models\Manage\Manage;
  19 +use App\Models\Manage\ManageHr;
19 use App\Models\Project\Project; 20 use App\Models\Project\Project;
20 use App\Models\Project\ProjectRenew; 21 use App\Models\Project\ProjectRenew;
21 use App\Models\Task\Task; 22 use App\Models\Task\Task;
@@ -122,7 +123,7 @@ class RenewProjectController extends BaseController @@ -122,7 +123,7 @@ class RenewProjectController extends BaseController
122 ->with('project_after')->paginate($this->row, ['*'], 'page', $this->page); 123 ->with('project_after')->paginate($this->row, ['*'], 'page', $this->page);
123 if(!empty($lists)){ 124 if(!empty($lists)){
124 $lists = $lists->toArray(); 125 $lists = $lists->toArray();
125 - $manageModel = new Manage(); 126 + $manageModel = new ManageHr();
126 $domainModel = new DomainInfo(); 127 $domainModel = new DomainInfo();
127 foreach ($lists['list'] as $k=>$item){ 128 foreach ($lists['list'] as $k=>$item){
128 $item = $this->handleParam($item,$manageModel,$domainModel); 129 $item = $this->handleParam($item,$manageModel,$domainModel);