正在显示
5 个修改的文件
包含
160 行增加
和
3 行删除
| @@ -264,9 +264,6 @@ class WeekProject extends Command | @@ -264,9 +264,6 @@ class WeekProject extends Command | ||
| 264 | if(!empty($data['aggregation_update_num'])){ | 264 | if(!empty($data['aggregation_update_num'])){ |
| 265 | $content4 .= '聚合页主站页面更新'.$data['aggregation_update_num'].'次。'; | 265 | $content4 .= '聚合页主站页面更新'.$data['aggregation_update_num'].'次。'; |
| 266 | } | 266 | } |
| 267 | - if(!empty($data['aggregation_update_num'])){ | ||
| 268 | - $content4 .= '聚合页主站页面更新'.$data['aggregation_update_num'].'次。'; | ||
| 269 | - } | ||
| 270 | if(!empty($data['minor_update_num'])){ | 267 | if(!empty($data['minor_update_num'])){ |
| 271 | $content4 .= '小语种站页面更新'.$data['minor_update_num'].'次。'; | 268 | $content4 .= '小语种站页面更新'.$data['minor_update_num'].'次。'; |
| 272 | } | 269 | } |
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :KeywordUrlController.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2025/3/12 17:01 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Http\Controllers\Bside\Product; | ||
| 11 | + | ||
| 12 | +use App\Enums\Common\Code; | ||
| 13 | +use App\Http\Controllers\Bside\BaseController; | ||
| 14 | +use App\Http\Logic\Bside\Product\KeywordUrlLogic; | ||
| 15 | +use App\Models\Product\KeywordUrl; | ||
| 16 | + | ||
| 17 | +/** | ||
| 18 | + * @remark :关键词设置 | ||
| 19 | + * @name :KeywordUrlController | ||
| 20 | + * @author :lyh | ||
| 21 | + * @method :post | ||
| 22 | + * @time :2025/3/12 17:01 | ||
| 23 | + */ | ||
| 24 | +class KeywordUrlController extends BaseController | ||
| 25 | +{ | ||
| 26 | + /** | ||
| 27 | + * @remark :关键词设置列表 | ||
| 28 | + * @name :lists | ||
| 29 | + * @author :lyh | ||
| 30 | + * @method :post | ||
| 31 | + * @time :2025/3/12 17:01 | ||
| 32 | + */ | ||
| 33 | + public function lists(KeywordUrl $keywordUrl){ | ||
| 34 | + if(isset($this->map['keyword']) && !empty($this->map['keyword'])){ | ||
| 35 | + $this->map['keyword'] = ['like','%'.$this->map['keyword'].'%']; | ||
| 36 | + } | ||
| 37 | + $filed = ['id','keyword','url','created_at','updated_at']; | ||
| 38 | + $lists = $keywordUrl->lists($this->map,$this->page,$this->row,$this->order,$filed); | ||
| 39 | + $this->response('success',Code::SUCCESS,$lists); | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + /** | ||
| 43 | + * @remark :保存数据 | ||
| 44 | + * @name :save | ||
| 45 | + * @author :lyh | ||
| 46 | + * @method :post | ||
| 47 | + * @time :2025/3/12 17:02 | ||
| 48 | + */ | ||
| 49 | + public function save(KeywordUrlLogic $keywordUrlLogic){ | ||
| 50 | + $this->request->validate([ | ||
| 51 | + 'keyword'=>['required'], | ||
| 52 | + 'url'=>['required'], | ||
| 53 | + ],[ | ||
| 54 | + 'keyword.required' => 'keyword不能为空', | ||
| 55 | + 'url.required' => 'url不能为空', | ||
| 56 | + ]); | ||
| 57 | + $result = $keywordUrlLogic->saveKeywordUrl(); | ||
| 58 | + $this->response('success',Code::SUCCESS,$result); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * @remark :删除数据 | ||
| 63 | + * @name :del | ||
| 64 | + * @author :lyh | ||
| 65 | + * @method :post | ||
| 66 | + * @time :2025/3/12 17:02 | ||
| 67 | + */ | ||
| 68 | + public function del(KeywordUrl $keywordUrl){ | ||
| 69 | + $this->request->validate([ | ||
| 70 | + 'id'=>['required'], | ||
| 71 | + ],[ | ||
| 72 | + 'id.required' => 'id不能为空', | ||
| 73 | + ]); | ||
| 74 | + $result = $keywordUrl->del($this->param); | ||
| 75 | + $this->response('success',Code::SUCCESS,$result); | ||
| 76 | + } | ||
| 77 | +} |
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :KeywordUrlLogic.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2025/3/12 17:06 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Http\Logic\Bside\Product; | ||
| 11 | + | ||
| 12 | +use App\Http\Logic\Bside\BaseLogic; | ||
| 13 | +use App\Models\Product\KeywordUrl; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * @remark :关键词设置 | ||
| 17 | + * @name :KeywordUrlLogic | ||
| 18 | + * @author :lyh | ||
| 19 | + * @method :post | ||
| 20 | + * @time :2025/3/12 17:07 | ||
| 21 | + */ | ||
| 22 | +class KeywordUrlLogic extends BaseLogic | ||
| 23 | +{ | ||
| 24 | + public function __construct() | ||
| 25 | + { | ||
| 26 | + parent::__construct(); | ||
| 27 | + $this->param = $this->requestAll; | ||
| 28 | + $this->model = new KeywordUrl(); | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * @remark :保存数据 | ||
| 33 | + * @name :saveKeywordUrl | ||
| 34 | + * @author :lyh | ||
| 35 | + * @method :post | ||
| 36 | + * @time :2025/3/12 17:08 | ||
| 37 | + */ | ||
| 38 | + public function saveKeywordUrl(){ | ||
| 39 | + if(isset($this->param['id']) && !empty($this->param['id'])){ | ||
| 40 | + $id = $this->param['id']; | ||
| 41 | + $this->model->edit($this->param,['id'=>$this->param['id']]); | ||
| 42 | + }else{ | ||
| 43 | + $id = $this->model->addReturnId($this->param); | ||
| 44 | + } | ||
| 45 | + return $this->success(['id'=>$id]); | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + | ||
| 49 | +} |
app/Models/Product/KeywordUrl.php
0 → 100644
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :KeywordUrl.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2025/3/12 16:59 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Models\Product; | ||
| 11 | + | ||
| 12 | +use App\Models\Base; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * @remark :关键词设置 | ||
| 16 | + * @name :KeywordUrl | ||
| 17 | + * @author :lyh | ||
| 18 | + * @method :post | ||
| 19 | + * @time :2025/3/12 17:00 | ||
| 20 | + */ | ||
| 21 | +class KeywordUrl extends Base | ||
| 22 | +{ | ||
| 23 | + //设置关联表名 | ||
| 24 | + protected $table = 'gl_keyword_url'; | ||
| 25 | + //连接数据库 | ||
| 26 | + protected $connection = 'custom_mysql'; | ||
| 27 | +} |
| @@ -673,6 +673,13 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -673,6 +673,13 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 673 | Route::any('/info', [\App\Http\Controllers\Bside\Setting\WebSettingYoutubeController::class, 'getYoutubeInfo'])->name('youtube_getYoutubeInfo'); | 673 | Route::any('/info', [\App\Http\Controllers\Bside\Setting\WebSettingYoutubeController::class, 'getYoutubeInfo'])->name('youtube_getYoutubeInfo'); |
| 674 | Route::any('/save', [\App\Http\Controllers\Bside\Setting\WebSettingYoutubeController::class, 'saveYoutube'])->name('youtube_saveYoutube'); | 674 | Route::any('/save', [\App\Http\Controllers\Bside\Setting\WebSettingYoutubeController::class, 'saveYoutube'])->name('youtube_saveYoutube'); |
| 675 | }); | 675 | }); |
| 676 | + | ||
| 677 | + //seo白帽 关键词设置 | ||
| 678 | + Route::prefix('keyword_url')->group(function () { | ||
| 679 | + Route::any('/', [\App\Http\Controllers\Bside\Product\KeywordUrlController::class, 'lists'])->name('keyword_url_lists'); | ||
| 680 | + Route::any('/save', [\App\Http\Controllers\Bside\Product\KeywordUrlController::class, 'save'])->name('keyword_url_save'); | ||
| 681 | + Route::any('/del', [\App\Http\Controllers\Bside\Product\KeywordUrlController::class, 'del'])->name('keyword_url_del'); | ||
| 682 | + }); | ||
| 676 | }); | 683 | }); |
| 677 | //无需登录验证的路由组 | 684 | //无需登录验证的路由组 |
| 678 | Route::group([], function () { | 685 | Route::group([], function () { |
-
请 注册 或 登录 后发表评论