|
...
|
...
|
@@ -781,8 +781,9 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$productTypeModel = new ProductType();
|
|
|
|
$productTypeList = $productTypeModel->list(['project_id'=>$this->user['project_id']],'id',['id','name']);
|
|
|
|
if(!empty($productTypeList)){
|
|
|
|
foreach ($productTypeList as $items){
|
|
|
|
$items['id'] = 'product_type_'.$items['id'];
|
|
|
|
foreach ($productTypeList as $item){
|
|
|
|
$items['id'] = 'product_type_'.$item['id'];
|
|
|
|
$items['title'] = $item['name'];
|
|
|
|
$data["products"]["category"][] =$items;
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -840,20 +841,21 @@ class BTemplateLogic extends BaseLogic |
|
|
|
foreach ($data as $key => $values){
|
|
|
|
switch ($values['name']){
|
|
|
|
case '产品':
|
|
|
|
$productCategory = $this->getCategoryList((new Category()),1,['id','title','pid']);
|
|
|
|
if(!empty($productCategory)){
|
|
|
|
foreach ($productCategory as $item){
|
|
|
|
$values['category'][] = $item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$productTypeModel = new ProductType();
|
|
|
|
$productTypeList = $productTypeModel->list(['project_id'=>$this->user['project_id']],'id',['id','name']);
|
|
|
|
if(!empty($productTypeList)){
|
|
|
|
foreach ($productTypeList as $items){
|
|
|
|
$items['id'] = 'product_type_'.$items['id'];
|
|
|
|
foreach ($productTypeList as $item){
|
|
|
|
$items['id'] = 'product_type_'.$item['id'];
|
|
|
|
$items['title'] = $item['name'];
|
|
|
|
$values['category'][] = $items;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$productCategory = $this->getCategoryList((new Category()),1,['id','title','pid']);
|
|
|
|
if(!empty($productCategory)){
|
|
|
|
foreach ($productCategory as $item){
|
|
|
|
$values['category'][] = $item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case '新闻':
|
|
|
|
$newCategory = $this->getCategoryList((new NewsCategory()),0,['id','name','pid']);
|
...
|
...
|
|