作者 lyh

gx

@@ -46,7 +46,7 @@ class UpdateController extends BaseController @@ -46,7 +46,7 @@ class UpdateController extends BaseController
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','title']); 47 $list = $productModel->list(['status'=>Product::STATUS_ON,'project_id'=>$this->user['project_id']],'id',['id','seo_mate','title']);
48 if(!empty($list)){ 48 if(!empty($list)){
49 - foreach ($list as $k => $v){ 49 + foreach ($list as $v){
50 if(!empty($v['seo_mate'])){ 50 if(!empty($v['seo_mate'])){
51 $seo_arr = $v['seo_mate']; 51 $seo_arr = $v['seo_mate'];
52 //更新seo_title 52 //更新seo_title
@@ -82,7 +82,15 @@ class UpdateController extends BaseController @@ -82,7 +82,15 @@ class UpdateController extends BaseController
82 $list = $newsModel->list(['status'=>$newsModel::STATUS_ONE]); 82 $list = $newsModel->list(['status'=>$newsModel::STATUS_ONE]);
83 if(!empty($list)){ 83 if(!empty($list)){
84 foreach ($list as $k => $v){ 84 foreach ($list as $k => $v){
  85 + if(!empty($v['seo_title'])){
  86 +
  87 + }
  88 + if(!empty($v['seo_keywords'])){
85 89
  90 + }
  91 + if(!empty($v['seo_description'])){
  92 +
  93 + }
86 } 94 }
87 } 95 }
88 } 96 }
@@ -33,7 +33,7 @@ class ProductController extends BaseController @@ -33,7 +33,7 @@ class ProductController extends BaseController
33 $this->map['title'] = ['like','%'.$this->map['title'].'%']; 33 $this->map['title'] = ['like','%'.$this->map['title'].'%'];
34 } 34 }
35 $this->map['project_id'] = $this->user['project_id']; 35 $this->map['project_id'] = $this->user['project_id'];
36 - $filed = ['id', 'project_id', 'title', 'thumb', 'product_type' , 'route' ,'category_id', 'keyword_id', 'status', 'created_uid', 'created_at', 'updated_at']; 36 + $filed = ['id', 'project_id', 'title', 'sort' ,'thumb', 'product_type' , 'route' ,'category_id', 'keyword_id', 'status', 'created_uid', 'created_at', 'updated_at'];
37 $lists = $product->lists($this->map,$this->page,$this->row,$this->order,$filed); 37 $lists = $product->lists($this->map,$this->page,$this->row,$this->order,$filed);
38 if(!empty($lists['list'])){ 38 if(!empty($lists['list'])){
39 foreach ($lists['list'] as $k=>$v){ 39 foreach ($lists['list'] as $k=>$v){