Merge remote-tracking branch 'origin/master' into akun
正在显示
5 个修改的文件
包含
31 行增加
和
8 行删除
| @@ -38,7 +38,24 @@ class CheckListController extends BaseController | @@ -38,7 +38,24 @@ class CheckListController extends BaseController | ||
| 38 | */ | 38 | */ |
| 39 | public function lists(){ | 39 | public function lists(){ |
| 40 | $field = ['id','status','sort','text','created_at']; | 40 | $field = ['id','status','sort','text','created_at']; |
| 41 | - $data = $this->model->list($this->map,$this->page,$this->row,'id',$field); | 41 | + $data = $this->model->lists($this->map,$this->page,$this->row,'id',$field); |
| 42 | + $this->response('success',Code::SUCCESS,$data); | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + /** | ||
| 46 | + * @remark :获取数据详情 | ||
| 47 | + * @name :info | ||
| 48 | + * @author :lyh | ||
| 49 | + * @method :post | ||
| 50 | + * @time :2025/4/17 16:18 | ||
| 51 | + */ | ||
| 52 | + public function info(){ | ||
| 53 | + $this->request->validate([ | ||
| 54 | + 'id'=>'required', | ||
| 55 | + ],[ | ||
| 56 | + 'id.required' => '主键不能为空', | ||
| 57 | + ]); | ||
| 58 | + $data = $this->model->read($this->map); | ||
| 42 | $this->response('success',Code::SUCCESS,$data); | 59 | $this->response('success',Code::SUCCESS,$data); |
| 43 | } | 60 | } |
| 44 | 61 |
| @@ -82,12 +82,8 @@ class CustomModuleContentController extends BaseController | @@ -82,12 +82,8 @@ class CustomModuleContentController extends BaseController | ||
| 82 | * @time :2024/1/31 15:48 | 82 | * @time :2024/1/31 15:48 |
| 83 | */ | 83 | */ |
| 84 | public function getHandleImageFile($v){ | 84 | public function getHandleImageFile($v){ |
| 85 | - if(!empty($v['image'])){ | ||
| 86 | - $v['image_link'] = getImageUrl($v['image'],$this->user['storage_type'] ?? 0,$this->user['project_location']); | ||
| 87 | - } | ||
| 88 | - if(!empty($v['og_image'])){ | ||
| 89 | - $v['og_image'] = getImageUrl($v['og_image'],$this->user['storage_type'] ?? 0,$this->user['project_location']); | ||
| 90 | - } | 85 | + $v['image_link'] = getImageUrl($v['image'] ?? '',$this->user['storage_type'] ?? 0,$this->user['project_location']); |
| 86 | + $v['og_image'] = getImageUrl(empty($v['og_image']) ? $v['image'] : $v['og_image'],$this->user['storage_type'],$this->user['project_location']); | ||
| 91 | if(!empty($v['video'])){ | 87 | if(!empty($v['video'])){ |
| 92 | $v['video']['url'] = getFileUrl($v['video']['url'],$this->user['storage_type'] ?? 0,$this->user['project_location'],$this->user['file_cdn'] ?? 0); | 88 | $v['video']['url'] = getFileUrl($v['video']['url'],$this->user['storage_type'] ?? 0,$this->user['project_location'],$this->user['file_cdn'] ?? 0); |
| 93 | $v['video']['video_image'] = getImageUrl($v['video']['video_image'],$this->user['storage_type'] ?? 0,$this->user['project_location']); | 89 | $v['video']['video_image'] = getImageUrl($v['video']['video_image'],$this->user['storage_type'] ?? 0,$this->user['project_location']); |
| @@ -100,7 +100,7 @@ class BlogLogic extends BaseLogic | @@ -100,7 +100,7 @@ class BlogLogic extends BaseLogic | ||
| 100 | $blogLabelLogic = new BlogLabelLogic(); | 100 | $blogLabelLogic = new BlogLabelLogic(); |
| 101 | $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']); | 101 | $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']); |
| 102 | $info['image_link'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']); | 102 | $info['image_link'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']); |
| 103 | - $info['og_image'] = getImageUrl($info['og_image'],$this->user['storage_type'],$this->user['project_location']); | 103 | + $info['og_image'] = getImageUrl(empty($info['og_image']) ? $info['image'] : $info['og_image'],$this->user['storage_type'],$this->user['project_location']); |
| 104 | return $this->success($info); | 104 | return $this->success($info); |
| 105 | } | 105 | } |
| 106 | 106 |
| @@ -147,6 +147,7 @@ class NewsLogic extends BaseLogic | @@ -147,6 +147,7 @@ class NewsLogic extends BaseLogic | ||
| 147 | } | 147 | } |
| 148 | $info['category_id'] = explode(',',trim($info['category_id'],',')); | 148 | $info['category_id'] = explode(',',trim($info['category_id'],',')); |
| 149 | $info['image_link'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']); | 149 | $info['image_link'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']); |
| 150 | + $info['og_image'] = getImageUrl(empty($info['og_image']) ? $info['image'] : $info['og_image'],$this->user['storage_type'],$this->user['project_location']); | ||
| 150 | return $this->success($info); | 151 | return $this->success($info); |
| 151 | } | 152 | } |
| 152 | 153 |
| @@ -306,6 +306,14 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -306,6 +306,14 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 306 | Route::any('/getAnchorLink', [Aside\Optimize\OptimizeController::class, 'getAnchorLink'])->name('admin.optimize_getAnchorLink');//设置robots开关 | 306 | Route::any('/getAnchorLink', [Aside\Optimize\OptimizeController::class, 'getAnchorLink'])->name('admin.optimize_getAnchorLink');//设置robots开关 |
| 307 | Route::any('/getAfterCount', [Aside\Optimize\AfterCountController::class, 'getAfterCount'])->name('admin.optimize_getAfterCount');//售后统计数据 | 307 | Route::any('/getAfterCount', [Aside\Optimize\AfterCountController::class, 'getAfterCount'])->name('admin.optimize_getAfterCount');//售后统计数据 |
| 308 | Route::any('/getAfterCountInfo', [Aside\Optimize\AfterCountController::class, 'getAfterCountInfo'])->name('admin.optimize_getAfterCountInfo');//售后统计数据详情 | 308 | Route::any('/getAfterCountInfo', [Aside\Optimize\AfterCountController::class, 'getAfterCountInfo'])->name('admin.optimize_getAfterCountInfo');//售后统计数据详情 |
| 309 | + | ||
| 310 | + //聚合页关键词设置 | ||
| 311 | + Route::prefix('check_list')->group(function () { | ||
| 312 | + Route::any('/', [Aside\Optimize\CheckListController::class, 'lists'])->name('admin.check_list'); | ||
| 313 | + Route::any('/info', [Aside\Optimize\CheckListController::class, 'info'])->name('admin.check_list_info'); | ||
| 314 | + Route::any('/save', [Aside\Optimize\CheckListController::class, 'save'])->name('admin.check_list_save'); | ||
| 315 | + Route::any('/del', [Aside\Optimize\CheckListController::class, 'del'])->name('admin.check_list_del'); | ||
| 316 | + }); | ||
| 309 | }); | 317 | }); |
| 310 | //生成关键字 | 318 | //生成关键字 |
| 311 | Route::prefix('create_keyword')->group(function () { | 319 | Route::prefix('create_keyword')->group(function () { |
| @@ -551,6 +559,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -551,6 +559,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 551 | Route::any('/save', [Aside\Project\AggregateKeywordController::class, 'save'])->name('admin.aggregateKeyword_save'); | 559 | Route::any('/save', [Aside\Project\AggregateKeywordController::class, 'save'])->name('admin.aggregateKeyword_save'); |
| 552 | Route::any('/del', [Aside\Project\AggregateKeywordController::class, 'del'])->name('admin.aggregateKeyword_del'); | 560 | Route::any('/del', [Aside\Project\AggregateKeywordController::class, 'del'])->name('admin.aggregateKeyword_del'); |
| 553 | }); | 561 | }); |
| 562 | + | ||
| 554 | }); | 563 | }); |
| 555 | 564 | ||
| 556 | //无需登录验证的路由组 | 565 | //无需登录验证的路由组 |
-
请 注册 或 登录 后发表评论