正在显示
3 个修改的文件
包含
29 行增加
和
0 行删除
| @@ -94,4 +94,16 @@ class InitHtmlController extends BaseController | @@ -94,4 +94,16 @@ class InitHtmlController extends BaseController | ||
| 94 | $logic->saveCustomizedHtml(); | 94 | $logic->saveCustomizedHtml(); |
| 95 | $this->response('success'); | 95 | $this->response('success'); |
| 96 | } | 96 | } |
| 97 | + | ||
| 98 | + /** | ||
| 99 | + * @remark :前端获取初始设置模块 | ||
| 100 | + * @name :getDetailInfo | ||
| 101 | + * @author :lyh | ||
| 102 | + * @method :post | ||
| 103 | + * @time :2024/1/3 14:27 | ||
| 104 | + */ | ||
| 105 | + public function getDetailInfo(InitHtmlLogic $logic){ | ||
| 106 | + $data = $logic->getInitModuleMain(); | ||
| 107 | + $this->response('success',Code::SUCCESS,$data); | ||
| 108 | + } | ||
| 97 | } | 109 | } |
| @@ -297,4 +297,20 @@ class InitHtmlLogic extends BaseLogic | @@ -297,4 +297,20 @@ class InitHtmlLogic extends BaseLogic | ||
| 297 | } | 297 | } |
| 298 | return $this->success(); | 298 | return $this->success(); |
| 299 | } | 299 | } |
| 300 | + | ||
| 301 | + /** | ||
| 302 | + * @remark :前端获取设置模块(侧边栏) | ||
| 303 | + * @name :getInitModuleMain | ||
| 304 | + * @author :lyh | ||
| 305 | + * @method :post | ||
| 306 | + * @time :2024/1/3 14:30 | ||
| 307 | + */ | ||
| 308 | + public function getInitModuleMain(){ | ||
| 309 | + $mainModel = new TemplateTypeMain(); | ||
| 310 | + $info = $mainModel->read(['type'=>$this->param['type']]); | ||
| 311 | + if($info === false){ | ||
| 312 | + $this->fail('当前类型数据不存在'); | ||
| 313 | + } | ||
| 314 | + return $this->success(['html'=>$info['main_html']]); | ||
| 315 | + } | ||
| 300 | } | 316 | } |
| @@ -349,6 +349,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -349,6 +349,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 349 | Route::any('/saveCustomizedHtml', [\App\Http\Controllers\Bside\Template\InitHtmlController::class, 'saveCustomizedHtml'])->name('init_saveCustomizedHtml'); | 349 | Route::any('/saveCustomizedHtml', [\App\Http\Controllers\Bside\Template\InitHtmlController::class, 'saveCustomizedHtml'])->name('init_saveCustomizedHtml'); |
| 350 | Route::any('/getDetailHtml', [\App\Http\Controllers\Bside\Template\InitHtmlController::class, 'getDetailHtml'])->name('init_getDetailHtml'); | 350 | Route::any('/getDetailHtml', [\App\Http\Controllers\Bside\Template\InitHtmlController::class, 'getDetailHtml'])->name('init_getDetailHtml'); |
| 351 | Route::any('/saveDetailHtml', [\App\Http\Controllers\Bside\Template\InitHtmlController::class, 'saveDetailHtml'])->name('init_saveDetailHtml'); | 351 | Route::any('/saveDetailHtml', [\App\Http\Controllers\Bside\Template\InitHtmlController::class, 'saveDetailHtml'])->name('init_saveDetailHtml'); |
| 352 | + Route::any('/getDetailInfo', [\App\Http\Controllers\Bside\Template\InitHtmlController::class, 'getDetailInfo'])->name('init_getDetailInfo'); | ||
| 352 | }); | 353 | }); |
| 353 | 354 | ||
| 354 | // 自定义页面,专题页 | 355 | // 自定义页面,专题页 |
-
请 注册 或 登录 后发表评论