正在显示
4 个修改的文件
包含
14 行增加
和
5 行删除
| @@ -22,7 +22,7 @@ class BTemplateModuleProjectLogic extends BaseLogic | @@ -22,7 +22,7 @@ class BTemplateModuleProjectLogic extends BaseLogic | ||
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | /** | 24 | /** |
| 25 | - * @remark :保存私有化左侧模块1 | 25 | + * @remark :保存私有化左侧模块 |
| 26 | * @name :moduleProjectSave | 26 | * @name :moduleProjectSave |
| 27 | * @author :lyh | 27 | * @author :lyh |
| 28 | * @method :post | 28 | * @method :post |
| @@ -92,15 +92,15 @@ class VisualizationLogic extends BaseLogic | @@ -92,15 +92,15 @@ class VisualizationLogic extends BaseLogic | ||
| 92 | 'project_id'=>$this->user['project_id'], | 92 | 'project_id'=>$this->user['project_id'], |
| 93 | 'source_id'=>$this->param['source_id'], | 93 | 'source_id'=>$this->param['source_id'], |
| 94 | ]); | 94 | ]); |
| 95 | -// try { | 95 | + try { |
| 96 | if($templateInfo === false){ | 96 | if($templateInfo === false){ |
| 97 | $bTemplateModel->add($this->param); | 97 | $bTemplateModel->add($this->param); |
| 98 | }else{ | 98 | }else{ |
| 99 | $bTemplateModel->edit(['html'=>$this->param['html']],['source'=>$this->param['source'],'source_id'=>$this->param['source_id']]); | 99 | $bTemplateModel->edit(['html'=>$this->param['html']],['source'=>$this->param['source'],'source_id'=>$this->param['source_id']]); |
| 100 | } | 100 | } |
| 101 | -// }catch (\Exception $e){ | ||
| 102 | -// $this->fail('系统错误请联系管理员'); | ||
| 103 | -// } | 101 | + }catch (\Exception $e){ |
| 102 | + $this->fail('系统错误请联系管理员'); | ||
| 103 | + } | ||
| 104 | return $this->success(); | 104 | return $this->success(); |
| 105 | 105 | ||
| 106 | } | 106 | } |
| @@ -21,4 +21,6 @@ use App\Models\Base; | @@ -21,4 +21,6 @@ use App\Models\Base; | ||
| 21 | class BModuleProject extends Base | 21 | class BModuleProject extends Base |
| 22 | { | 22 | { |
| 23 | protected $table = 'gl_public_template_module_project'; | 23 | protected $table = 'gl_public_template_module_project'; |
| 24 | + //连接数据库 | ||
| 25 | + protected $connection = 'custom_mysql'; | ||
| 24 | } | 26 | } |
| @@ -320,6 +320,13 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -320,6 +320,13 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 320 | Route::any('/type', [\App\Http\Controllers\Bside\Template\BTemplateModuleController::class, 'getType'])->name('template_module_getType'); | 320 | Route::any('/type', [\App\Http\Controllers\Bside\Template\BTemplateModuleController::class, 'getType'])->name('template_module_getType'); |
| 321 | }); | 321 | }); |
| 322 | 322 | ||
| 323 | + // 保存私有模块 | ||
| 324 | + Route::prefix('moduleProject')->group(function () { | ||
| 325 | + //获取所有左侧模版 | ||
| 326 | + Route::any('/', [\App\Http\Controllers\Bside\Template\BTemplateModuleProjectController::class, 'lists'])->name('template_module_project_lists'); | ||
| 327 | + Route::any('/save', [\App\Http\Controllers\Bside\Template\BTemplateModuleProjectController::class, 'save'])->name('template_module_project_save'); | ||
| 328 | + }); | ||
| 329 | + | ||
| 323 | //编辑记录 | 330 | //编辑记录 |
| 324 | Route::prefix('log')->group(function () { | 331 | Route::prefix('log')->group(function () { |
| 325 | //获取所有左侧模版 | 332 | //获取所有左侧模版 |
-
请 注册 或 登录 后发表评论