合并分支 'master-lyh-edit' 到 'master'
剩余服务天数统一设置 查看合并请求 !530
正在显示
3 个修改的文件
包含
26 行增加
和
4 行删除
| @@ -549,13 +549,34 @@ class ProductController extends BaseController | @@ -549,13 +549,34 @@ class ProductController extends BaseController | ||
| 549 | * @method :post | 549 | * @method :post |
| 550 | * @time :2024/1/26 15:33 | 550 | * @time :2024/1/26 15:33 |
| 551 | */ | 551 | */ |
| 552 | - public function sendAiProduct(){ | 552 | + public function sendAiProduct(Product $product){ |
| 553 | $this->request->validate([ | 553 | $this->request->validate([ |
| 554 | 'keyword'=>'required', | 554 | 'keyword'=>'required', |
| 555 | + 'product_id'=>'required' | ||
| 555 | ],[ | 556 | ],[ |
| 556 | 'keyword.required' => 'keyword不能为空', | 557 | 'keyword.required' => 'keyword不能为空', |
| 558 | + 'product_id.required' => 'product_id不能为空', | ||
| 557 | ]); | 559 | ]); |
| 558 | - $data = curl_c('http://title.globalso.com/ajax_data_for_web.php?keyword='.$this->param['keyword'],false); | ||
| 559 | - $this->response('success',Code::SUCCESS,$data); | 560 | + $productInfo = $product->read(['id' => $this->param['product_id']]); |
| 561 | + if (empty($productInfo)) { | ||
| 562 | + $this->fail('请选择有效产品信息!'); | ||
| 563 | + } | ||
| 564 | + $productInfo = $this->handleParam($productInfo); | ||
| 565 | + $keyword = generateRoute($this->param['keyword']); | ||
| 566 | + $pre_suf = file_get_contents("http://www.quanqiusou.cn/get_prefix_suffix_api.php"); | ||
| 567 | + $pre_suf_array = json_decode($pre_suf,JSON_OBJECT_AS_ARRAY); | ||
| 568 | + $search_info = file_get_contents("http://title.globalso.com/ajax_data_for_web.php?keyword=".$keyword); | ||
| 569 | + if ($search_info) { | ||
| 570 | + $new_info = explode(" - ",trim($search_info)); | ||
| 571 | + $new_title = str_replace(' ',' ',$pre_suf_array['prefix_title'][0].' '.$new_info[0]); | ||
| 572 | + $tm_ky = explode(',',$new_info[1]); | ||
| 573 | + $contents = $pre_suf_array['prefix'][0].' '.$new_title.', '.$pre_suf_array['suffix_s'][0]."\r\n"; | ||
| 574 | + $contents .= $pre_suf_array['prefix_title'][0].' '.implode(', ',$tm_ky).', '.$pre_suf_array['suffix_l'][0]."\r\n"; | ||
| 575 | + $new_content = htmlentities($contents); | ||
| 576 | + } | ||
| 577 | + if (FALSE == empty($data['new_content'])){ | ||
| 578 | + $productInfo['describe'] = $new_content . $productInfo['$data']; | ||
| 579 | + } | ||
| 580 | + $this->response('success',Code::SUCCESS,$productInfo); | ||
| 560 | } | 581 | } |
| 561 | } | 582 | } |
| @@ -76,7 +76,7 @@ class RankDataLogic extends BaseLogic | @@ -76,7 +76,7 @@ class RankDataLogic extends BaseLogic | ||
| 76 | 'plan' => Project::planMap()[$project['deploy_build']['plan']], | 76 | 'plan' => Project::planMap()[$project['deploy_build']['plan']], |
| 77 | 'keyword_num' => $project['deploy_build']['keyword_num'], | 77 | 'keyword_num' => $project['deploy_build']['keyword_num'], |
| 78 | 'compliance_day' => $project['finish_remain_day'] ?? 0, | 78 | 'compliance_day' => $project['finish_remain_day'] ?? 0, |
| 79 | - 'remain_day' => $project['deploy_build']['service_duration'] - ($project['finish_remain_day'] ?? 0), | 79 | + 'remain_day' => $project['remain_day'], |
| 80 | 'g_top_plan' => $project['deploy_optimize']['g_top_plan'] ?? [], | 80 | 'g_top_plan' => $project['deploy_optimize']['g_top_plan'] ?? [], |
| 81 | ]; | 81 | ]; |
| 82 | //小语种列表 | 82 | //小语种列表 |
| @@ -258,6 +258,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -258,6 +258,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 258 | Route::post('category/sort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'sort'])->name('product_category_sort'); | 258 | Route::post('category/sort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'sort'])->name('product_category_sort'); |
| 259 | Route::any('category/delete', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'delete'])->name('product_category_delete'); | 259 | Route::any('category/delete', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'delete'])->name('product_category_delete'); |
| 260 | Route::any('category/allSort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'allSort'])->name('product_category_allSort'); | 260 | Route::any('category/allSort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'allSort'])->name('product_category_allSort'); |
| 261 | + Route::any('category/copyCategory', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'copyCategory'])->name('product_category_copyCategory'); | ||
| 261 | //产品关键词 | 262 | //产品关键词 |
| 262 | Route::get('keyword', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'index'])->name('product_keyword'); | 263 | Route::get('keyword', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'index'])->name('product_keyword'); |
| 263 | Route::get('keyword/info', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'info'])->name('product_keyword_info'); | 264 | Route::get('keyword/info', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'info'])->name('product_keyword_info'); |
-
请 注册 或 登录 后发表评论