作者 lyh

gx

@@ -34,4 +34,21 @@ class EnterpriseProductController extends BaseController @@ -34,4 +34,21 @@ class EnterpriseProductController extends BaseController
34 $data = $enterpriseProduct->lists($this->map,$this->page,$this->row); 34 $data = $enterpriseProduct->lists($this->map,$this->page,$this->row);
35 $this->response('success',Code::SUCCESS,$data); 35 $this->response('success',Code::SUCCESS,$data);
36 } 36 }
  37 +
  38 + /**
  39 + * @remark :删除产品库产品
  40 + * @name :del
  41 + * @author :lyh
  42 + * @method :post
  43 + * @time :2025/3/27 9:59
  44 + */
  45 + public function del(EnterpriseProduct $enterpriseProduct){
  46 + $this->request->validate([
  47 + 'ids'=>['required'],
  48 + ],[
  49 + 'ids.required' => 'id不能为空',
  50 + ]);
  51 + $result = $enterpriseProduct->del(['id'=>['in',$this->param['ids']]]);
  52 + $this->response('success',Code::SUCCESS,$result);
  53 + }
37 } 54 }
@@ -48,7 +48,8 @@ class GoogleKeywordInsightService @@ -48,7 +48,8 @@ class GoogleKeywordInsightService
48 $err = curl_error($curl); 48 $err = curl_error($curl);
49 curl_close($curl); 49 curl_close($curl);
50 if ($err) { 50 if ($err) {
51 - return "cURL Error #:" . $err; 51 + errorLog("关键词扩展cURL Error #:", $url, $err);
  52 + return false;
52 } else { 53 } else {
53 return json_decode($response,true); 54 return json_decode($response,true);
54 } 55 }
@@ -704,6 +704,7 @@ Route::middleware(['bloginauth'])->group(function () { @@ -704,6 +704,7 @@ Route::middleware(['bloginauth'])->group(function () {
704 //企业产品库 704 //企业产品库
705 Route::prefix('enterprise_product')->group(function () { 705 Route::prefix('enterprise_product')->group(function () {
706 Route::any('/getEnterProduct', [\App\Http\Controllers\Bside\SeoSetting\EnterpriseProductController::class, 'getEnterProduct'])->name('enterprise_product_getEnterProduct'); 706 Route::any('/getEnterProduct', [\App\Http\Controllers\Bside\SeoSetting\EnterpriseProductController::class, 'getEnterProduct'])->name('enterprise_product_getEnterProduct');
  707 + Route::any('/del', [\App\Http\Controllers\Bside\SeoSetting\EnterpriseProductController::class, 'del'])->name('enterprise_product_del');
707 }); 708 });
708 }); 709 });
709 //无需登录验证的路由组 710 //无需登录验证的路由组