作者 lyh

gx

@@ -45,12 +45,10 @@ class UpdateController extends BaseController @@ -45,12 +45,10 @@ class UpdateController extends BaseController
45 public function updateProduct(){ 45 public function updateProduct(){
46 $productModel = new Product(); 46 $productModel = new Product();
47 $list = $productModel->list(['status'=>Product::STATUS_ON,'project_id'=>$this->user['project_id']],'id',['id','seo_mate']); 47 $list = $productModel->list(['status'=>Product::STATUS_ON,'project_id'=>$this->user['project_id']],'id',['id','seo_mate']);
48 - var_dump($list);  
49 - die();  
50 if(!empty($list)){ 48 if(!empty($list)){
51 foreach ($list as $k => $v){ 49 foreach ($list as $k => $v){
52 if(!empty($v['seo_mate'])){ 50 if(!empty($v['seo_mate'])){
53 - $seo_arr = json_decode($v['seo_mate']); 51 + $seo_arr = $v['seo_mate'];
54 //更新seo_title 52 //更新seo_title
55 if(!isset($seo_arr['title'])){ 53 if(!isset($seo_arr['title'])){
56 //生成seo_title 54 //生成seo_title