作者 lyh

gx

@@ -778,6 +778,14 @@ class BTemplateLogic extends BaseLogic @@ -778,6 +778,14 @@ class BTemplateLogic extends BaseLogic
778 $productCategory = $this->getCategoryList((new Category()),1); 778 $productCategory = $this->getCategoryList((new Category()),1);
779 $newCategory = $this->getCategoryList((new NewsCategory())); 779 $newCategory = $this->getCategoryList((new NewsCategory()));
780 $blogCategory = $this->getCategoryList((new BlogCategory())); 780 $blogCategory = $this->getCategoryList((new BlogCategory()));
  781 + $productTypeModel = new ProductType();
  782 + $productTypeList = $productTypeModel->list(['project_id'=>$this->user['project_id']],'id',['id','name']);
  783 + if(!empty($productTypeList)){
  784 + foreach ($productTypeList as $items){
  785 + $items['id'] = 'product_type_'.$items['id'];
  786 + $data["products"]["category"][] =$items;
  787 + }
  788 + }
781 if (!empty($productCategory)){ 789 if (!empty($productCategory)){
782 foreach ($productCategory as $item){$data["products"]["category"][] =$item;} 790 foreach ($productCategory as $item){$data["products"]["category"][] =$item;}
783 } 791 }