作者 lyh

gx

@@ -427,8 +427,9 @@ if (!function_exists('getImageUrl')) { @@ -427,8 +427,9 @@ if (!function_exists('getImageUrl')) {
427 $info = $imageModel->read(['hash'=>$hash]); 427 $info = $imageModel->read(['hash'=>$hash]);
428 if(!empty($info)){ 428 if(!empty($info)){
429 if($info['is_cos'] == 1){ 429 if($info['is_cos'] == 1){
430 - $cos = new CosService();  
431 - $url = $cos->getImageUrl($info['path']); 430 + $cos = config('filesystems.disks.cos');
  431 + $cosCdn = $cos['COS_CDN'];
  432 + $url = $cosCdn.$info['path'];
432 }else{ 433 }else{
433 $url = url('a/image/'.$info['hash']); 434 $url = url('a/image/'.$info['hash']);
434 } 435 }
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 namespace App\Http\Controllers\Bside\BCom; 10 namespace App\Http\Controllers\Bside\BCom;
11 11
12 use App\Http\Controllers\Bside\BaseController; 12 use App\Http\Controllers\Bside\BaseController;
  13 +use App\Models\Product\Product;
13 14
14 /** 15 /**
15 * @remark :b端网站更新相关 16 * @remark :b端网站更新相关
@@ -20,5 +21,44 @@ use App\Http\Controllers\Bside\BaseController; @@ -20,5 +21,44 @@ use App\Http\Controllers\Bside\BaseController;
20 */ 21 */
21 class UpdateController extends BaseController 22 class UpdateController extends BaseController
22 { 23 {
  24 + /**
  25 + * @remark :一键更新所有tdk
  26 + * @name :updateSeoTdk
  27 + * @author :lyh
  28 + * @method :post
  29 + * @time :2023/8/19 9:25
  30 + */
  31 + public function updateSeoTdk(){
23 32
  33 + }
  34 +
  35 + /**
  36 + * @remark :更新产品tdk
  37 + * @name :updateProduct
  38 + * @author :lyh
  39 + * @method :post
  40 + * @time :2023/8/19 9:25
  41 + */
  42 + public function updateProduct(){
  43 + $productModel = new Product();
  44 + $list = $productModel->list(['status'=>Product::STATUS_ON,'project_id'=>$this->user['project_id'],'deleted_at'=>null]);
  45 + foreach ($list as $k => $v){
  46 + if(!empty($v['seo_mate'])){
  47 + $seo_arr = json_decode($v['seo_mate']);
  48 + //更新seo_title
  49 + if(!isset($seo_arr['title']) || empty($seo_arr['title'])){
  50 +
  51 + }
  52 + //更新seo_keyword
  53 + if(!isset($seo_arr['keyword']) || empty($seo_arr['keyword'])){
  54 +
  55 + }
  56 +
  57 + //更新seo_keyword
  58 + if(!isset($seo_arr['keyword']) || empty($seo_arr['keyword'])){
  59 +
  60 + }
  61 + }
  62 + }
  63 + }
24 } 64 }