作者 lyh

更新产品

@@ -395,7 +395,11 @@ class ProductLogic extends BaseLogic @@ -395,7 +395,11 @@ class ProductLogic extends BaseLogic
395 foreach ($data as $k => $v){ 395 foreach ($data as $k => $v){
396 $map = []; 396 $map = [];
397 $cateModel = new Category(); 397 $cateModel = new Category();
398 - $cateList = $cateModel->list(['status'=>$v],'id',['id','pid']); 398 + $status = [];
  399 + if($v != 3){
  400 + $status = ['status'=>$v];
  401 + }
  402 + $cateList = $cateModel->list($status,'id',['id','pid']);
399 $this->param['featured_status'] = $this->param['featured_status'] ?? 0; 403 $this->param['featured_status'] = $this->param['featured_status'] ?? 0;
400 if(!empty($cateList) && ($this->param['featured_status'] != $cateModel::STATUS_ACTIVE)){ 404 if(!empty($cateList) && ($this->param['featured_status'] != $cateModel::STATUS_ACTIVE)){
401 $featured_ids = $cateModel->where('title', 'like', 'Featured%')->pluck('id')->toArray(); 405 $featured_ids = $cateModel->where('title', 'like', 'Featured%')->pluck('id')->toArray();