合并分支 'master-server' 到 'master'
Master server 查看合并请求 !772
正在显示
5 个修改的文件
包含
50 行增加
和
7 行删除
| @@ -36,13 +36,23 @@ class ProjectKeywordController extends BaseController | @@ -36,13 +36,23 @@ class ProjectKeywordController extends BaseController | ||
| 36 | if($keywordInfo === false){ | 36 | if($keywordInfo === false){ |
| 37 | $data['search_keywords'] = ''; | 37 | $data['search_keywords'] = ''; |
| 38 | $data['customer_keywords'] = ''; | 38 | $data['customer_keywords'] = ''; |
| 39 | - $this->response('success',Code::SUCCESS,$data); | 39 | + }else{ |
| 40 | + $data['search_keywords'] = $keywordInfo['search_keywords']; | ||
| 41 | + $data['customer_keywords'] = $keywordInfo['customer_keywords']; | ||
| 40 | } | 42 | } |
| 41 | - $data['search_keywords'] = $keywordInfo['search_keywords']; | ||
| 42 | - $data['customer_keywords'] = $keywordInfo['customer_keywords']; | ||
| 43 | - $minorLanguageModel = new MinorLanguages(); | ||
| 44 | - $data['minor_language'] = $minorLanguageModel->list(['project_id'=>$this->user['project_id']]); | ||
| 45 | $this->response('success',Code::SUCCESS,$data); | 43 | $this->response('success',Code::SUCCESS,$data); |
| 46 | } | 44 | } |
| 47 | 45 | ||
| 46 | + /** | ||
| 47 | + * @remark :获取小语种关键词 | ||
| 48 | + * @name :minorKeyword | ||
| 49 | + * @author :lyh | ||
| 50 | + * @method :post | ||
| 51 | + * @time :2024/9/20 17:49 | ||
| 52 | + */ | ||
| 53 | + public function minorKeyword(){ | ||
| 54 | + $minorLanguageModel = new MinorLanguages(); | ||
| 55 | + $data = $minorLanguageModel->list(['project_id'=>$this->user['project_id']]); | ||
| 56 | + $this->response('success',Code::SUCCESS,$data); | ||
| 57 | + } | ||
| 48 | } | 58 | } |
| @@ -774,4 +774,23 @@ class ProductController extends BaseController | @@ -774,4 +774,23 @@ class ProductController extends BaseController | ||
| 774 | ]; | 774 | ]; |
| 775 | $this->response('success',Code::SUCCESS,$data); | 775 | $this->response('success',Code::SUCCESS,$data); |
| 776 | } | 776 | } |
| 777 | + | ||
| 778 | + /** | ||
| 779 | + * @remark :批量设置产品 | ||
| 780 | + * @name :batchSetKeyword | ||
| 781 | + * @author :lyh | ||
| 782 | + * @method :post | ||
| 783 | + * @time :2024/9/20 16:46 | ||
| 784 | + */ | ||
| 785 | + public function batchSetKeyword(ProductLogic $logic){ | ||
| 786 | + $this->request->validate([ | ||
| 787 | + 'id'=>'required|array', | ||
| 788 | + 'keyword_id'=>'required|array', | ||
| 789 | + ],[ | ||
| 790 | + 'id.required' => '产品ID不能为空', | ||
| 791 | + 'category_id.required' => '关键词ID不能为空', | ||
| 792 | + ]); | ||
| 793 | + $logic->batchSetKeyword(); | ||
| 794 | + $this->response('success'); | ||
| 795 | + } | ||
| 777 | } | 796 | } |
| @@ -937,4 +937,17 @@ class ProductLogic extends BaseLogic | @@ -937,4 +937,17 @@ class ProductLogic extends BaseLogic | ||
| 937 | $this->model->edit(['keyword_id'=>null],['id'=>$this->param['id']]); | 937 | $this->model->edit(['keyword_id'=>null],['id'=>$this->param['id']]); |
| 938 | return $this->success(['id'=>$this->param['id']]); | 938 | return $this->success(['id'=>$this->param['id']]); |
| 939 | } | 939 | } |
| 940 | + | ||
| 941 | + /** | ||
| 942 | + * @remark :批量设置产品关键词 | ||
| 943 | + * @name :batchSetKeyword | ||
| 944 | + * @author :lyh | ||
| 945 | + * @method :post | ||
| 946 | + * @time :2024/9/20 16:48 | ||
| 947 | + */ | ||
| 948 | + public function batchSetKeyword(){ | ||
| 949 | + $this->param['keyword_id'] = ','.implode(',',$this->param['keyword_id']).','; | ||
| 950 | + $this->edit(['keyword_id'=>$this->param['keyword_id']],['id'=>['in',$this->param['id']]]); | ||
| 951 | + return $this->success(); | ||
| 952 | + } | ||
| 940 | } | 953 | } |
| @@ -262,7 +262,8 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -262,7 +262,8 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 262 | Route::any('/saveType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'saveType'])->name('product_saveType'); | 262 | Route::any('/saveType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'saveType'])->name('product_saveType'); |
| 263 | Route::any('/delProductType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'delProductType'])->name('product_delProductType'); | 263 | Route::any('/delProductType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'delProductType'])->name('product_delProductType'); |
| 264 | Route::any('/getButton', [\App\Http\Controllers\Bside\Product\ProductController::class, 'getButton'])->name('product_getButton'); | 264 | Route::any('/getButton', [\App\Http\Controllers\Bside\Product\ProductController::class, 'getButton'])->name('product_getButton'); |
| 265 | - //产品分类 | 265 | + Route::any('/batchSetKeyword', [\App\Http\Controllers\Bside\Product\ProductController::class, 'batchSetKeyword'])->name('product_batchSetKeyword'); |
| 266 | + //产品分类batchSetKeyword | ||
| 266 | Route::get('category', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'index'])->name('product_category'); | 267 | Route::get('category', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'index'])->name('product_category'); |
| 267 | Route::get('category/info', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'info'])->name('product_category_info'); | 268 | Route::get('category/info', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'info'])->name('product_category_info'); |
| 268 | Route::any('category/categoryTopList', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'categoryTopList'])->name('product_category_categoryTopList'); | 269 | Route::any('category/categoryTopList', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'categoryTopList'])->name('product_category_categoryTopList'); |
| @@ -506,6 +507,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -506,6 +507,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 506 | //优化关键词,检索关键词 | 507 | //优化关键词,检索关键词 |
| 507 | Route::prefix('project_keyword')->group(function () { | 508 | Route::prefix('project_keyword')->group(function () { |
| 508 | Route::any('/', [\App\Http\Controllers\Bside\Keyword\ProjectKeywordController::class, 'searchKeywords'])->name('searchKeywords'); | 509 | Route::any('/', [\App\Http\Controllers\Bside\Keyword\ProjectKeywordController::class, 'searchKeywords'])->name('searchKeywords'); |
| 510 | + Route::any('/minorKeyword', [\App\Http\Controllers\Bside\Keyword\ProjectKeywordController::class, 'minorKeyword'])->name('searchKeywords'); | ||
| 509 | }); | 511 | }); |
| 510 | //自定义模板 | 512 | //自定义模板 |
| 511 | Route::prefix('custom_module')->group(function () { | 513 | Route::prefix('custom_module')->group(function () { |
-
请 注册 或 登录 后发表评论