正在显示
4 个修改的文件
包含
27 行增加
和
29 行删除
| @@ -110,20 +110,4 @@ class NavController extends BaseController | @@ -110,20 +110,4 @@ class NavController extends BaseController | ||
| 110 | $navLogic->navSort(); | 110 | $navLogic->navSort(); |
| 111 | $this->response('success'); | 111 | $this->response('success'); |
| 112 | } | 112 | } |
| 113 | - | ||
| 114 | - /** | ||
| 115 | - * @remark :执行初始数据 | ||
| 116 | - * @name :saveInitParam | ||
| 117 | - * @author :lyh | ||
| 118 | - * @method :post | ||
| 119 | - * @time :2023/9/19 14:45 | ||
| 120 | - */ | ||
| 121 | - public function saveInitParam($project_id){ | ||
| 122 | - $data = [ | ||
| 123 | - ['project_id'=>$project_id,'name'=>''], | ||
| 124 | - ]; | ||
| 125 | - } | ||
| 126 | - | ||
| 127 | - | ||
| 128 | - | ||
| 129 | } | 113 | } |
| @@ -250,8 +250,6 @@ class ProjectLogic extends BaseLogic | @@ -250,8 +250,6 @@ class ProjectLogic extends BaseLogic | ||
| 250 | if(isset($param['mysql_id']) && !empty($param['mysql_id'])){ | 250 | if(isset($param['mysql_id']) && !empty($param['mysql_id'])){ |
| 251 | $this->initializationMysql($param['id']); | 251 | $this->initializationMysql($param['id']); |
| 252 | } | 252 | } |
| 253 | - //创建初始角色 | ||
| 254 | -// $this->createdRole($param['id']); | ||
| 255 | //初始账号 | 253 | //初始账号 |
| 256 | if(isset($param['mobile']) && !empty($param['mobile'])){ | 254 | if(isset($param['mobile']) && !empty($param['mobile'])){ |
| 257 | $this->createUser($param['mobile'],$param['id'],$param['lead_name']); | 255 | $this->createUser($param['mobile'],$param['id'],$param['lead_name']); |
| @@ -312,6 +310,8 @@ class ProjectLogic extends BaseLogic | @@ -312,6 +310,8 @@ class ProjectLogic extends BaseLogic | ||
| 312 | ProjectServer::createDatabase($project); | 310 | ProjectServer::createDatabase($project); |
| 313 | //创建表 | 311 | //创建表 |
| 314 | ProjectServer::initTable(); | 312 | ProjectServer::initTable(); |
| 313 | + //初始数据 | ||
| 314 | + ProjectServer::saveInitParam($project_id); | ||
| 315 | return $this->success(); | 315 | return $this->success(); |
| 316 | } | 316 | } |
| 317 | 317 |
| @@ -62,14 +62,4 @@ class BNav extends Base | @@ -62,14 +62,4 @@ class BNav extends Base | ||
| 62 | return $value; | 62 | return $value; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | - /** | ||
| 66 | - * @remark : | ||
| 67 | - * @name :addInitParam | ||
| 68 | - * @author :lyh | ||
| 69 | - * @method :post | ||
| 70 | - * @time :2023/9/19 14:04 | ||
| 71 | - */ | ||
| 72 | - public function addInitParam(){ | ||
| 73 | - | ||
| 74 | - } | ||
| 75 | } | 65 | } |
| @@ -9,7 +9,6 @@ | @@ -9,7 +9,6 @@ | ||
| 9 | namespace App\Services; | 9 | namespace App\Services; |
| 10 | 10 | ||
| 11 | use App\Models\Project\Project; | 11 | use App\Models\Project\Project; |
| 12 | -use App\Utils\EncryptUtils; | ||
| 13 | use Illuminate\Support\Facades\DB; | 12 | use Illuminate\Support\Facades\DB; |
| 14 | use Illuminate\Support\Facades\Schema; | 13 | use Illuminate\Support\Facades\Schema; |
| 15 | 14 | ||
| @@ -85,4 +84,29 @@ class ProjectServer extends BaseService | @@ -85,4 +84,29 @@ class ProjectServer extends BaseService | ||
| 85 | } | 84 | } |
| 86 | return true; | 85 | return true; |
| 87 | } | 86 | } |
| 87 | + | ||
| 88 | + /** | ||
| 89 | + * @remark :执行初始数据 | ||
| 90 | + * @name :saveInitParam | ||
| 91 | + * @author :lyh | ||
| 92 | + * @method :post | ||
| 93 | + * @time :2023/9/19 14:45 | ||
| 94 | + */ | ||
| 95 | + public static function saveInitParam($project_id){ | ||
| 96 | + $info = DB::connection('custom_mysql')->table('gl_web_nav')->first(); | ||
| 97 | + if(empty($info)){ | ||
| 98 | + $created_at = date('Y-m-d H:i:s'); | ||
| 99 | + $data = [ | ||
| 100 | + ['project_id'=>$project_id,'name'=>'Home','url'=>'nav-home-'.$project_id,'location'=>'header','created_at'=>$created_at,'updated_at'=>$created_at], | ||
| 101 | + ['project_id'=>$project_id,'name'=>'Products','url'=>'nav-product'.$project_id,'location'=>'header','created_at'=>$created_at,'updated_at'=>$created_at], | ||
| 102 | + ['project_id'=>$project_id,'name'=>'News','url'=>'nav-news'.$project_id,'location'=>'header','created_at'=>$created_at,'updated_at'=>$created_at], | ||
| 103 | + ['project_id'=>$project_id,'name'=>'ABOUT US','url'=>'nav-about-us'.$project_id,'location'=>'footer','created_at'=>$created_at,'updated_at'=>$created_at], | ||
| 104 | + ['project_id'=>$project_id,'name'=>'Contact Us','url'=>'nav-contact-us'.$project_id,'location'=>'footer','created_at'=>$created_at,'updated_at'=>$created_at], | ||
| 105 | + ['project_id'=>$project_id,'name'=>'FAQ','url'=>'nav-faq'.$project_id,'location'=>'footer','created_at'=>$created_at,'updated_at'=>$created_at], | ||
| 106 | + ]; | ||
| 107 | + DB::connection('custom_mysql')->table('gl_web_nav')->insert($data); | ||
| 108 | + } | ||
| 109 | + DB::disconnect('custom_mysql'); | ||
| 110 | + return true; | ||
| 111 | + } | ||
| 88 | } | 112 | } |
-
请 注册 或 登录 后发表评论