正在显示
1 个修改的文件
包含
8 行增加
和
8 行删除
| @@ -125,8 +125,8 @@ class ProductController extends BaseController | @@ -125,8 +125,8 @@ class ProductController extends BaseController | ||
| 125 | * @time :2023/9/14 13:56 | 125 | * @time :2023/9/14 13:56 |
| 126 | */ | 126 | */ |
| 127 | public function getCategoryList(){ | 127 | public function getCategoryList(){ |
| 128 | -// $data = Common::get_user_cache('product_category',$this->user['project_id']); | ||
| 129 | -// if(empty($data)){ | 128 | + $data = Common::get_user_cache('product_category',$this->user['project_id']); |
| 129 | + if(empty($data)){ | ||
| 130 | $categoryModel = new Category(); | 130 | $categoryModel = new Category(); |
| 131 | $data = []; | 131 | $data = []; |
| 132 | $cateList = $categoryModel->list(['project_id'=>$this->user['project_id']],['id','title']); | 132 | $cateList = $categoryModel->list(['project_id'=>$this->user['project_id']],['id','title']); |
| @@ -135,8 +135,8 @@ class ProductController extends BaseController | @@ -135,8 +135,8 @@ class ProductController extends BaseController | ||
| 135 | $data[$value['id']] = $value['title']; | 135 | $data[$value['id']] = $value['title']; |
| 136 | } | 136 | } |
| 137 | } | 137 | } |
| 138 | -// Common::set_user_cache($data,'product_category',$this->user['project_id']); | ||
| 139 | -// } | 138 | + Common::set_user_cache($data,'product_category',$this->user['project_id']); |
| 139 | + } | ||
| 140 | return $data; | 140 | return $data; |
| 141 | } | 141 | } |
| 142 | 142 | ||
| @@ -148,8 +148,8 @@ class ProductController extends BaseController | @@ -148,8 +148,8 @@ class ProductController extends BaseController | ||
| 148 | * @time :2023/9/14 13:56 | 148 | * @time :2023/9/14 13:56 |
| 149 | */ | 149 | */ |
| 150 | public function getKeywordsList(){ | 150 | public function getKeywordsList(){ |
| 151 | -// $data = Common::get_user_cache('product_keyword',$this->user['project_id']); | ||
| 152 | -// if(empty($data)) { | 151 | + $data = Common::get_user_cache('product_keyword',$this->user['project_id']); |
| 152 | + if(empty($data)) { | ||
| 153 | $keywordModel = new Keyword(); | 153 | $keywordModel = new Keyword(); |
| 154 | $data = []; | 154 | $data = []; |
| 155 | $cateList = $keywordModel->list(['project_id' => $this->user['project_id']], ['id', 'title']); | 155 | $cateList = $keywordModel->list(['project_id' => $this->user['project_id']], ['id', 'title']); |
| @@ -158,8 +158,8 @@ class ProductController extends BaseController | @@ -158,8 +158,8 @@ class ProductController extends BaseController | ||
| 158 | $data[$value['id']] = $value['title']; | 158 | $data[$value['id']] = $value['title']; |
| 159 | } | 159 | } |
| 160 | } | 160 | } |
| 161 | -// Common::set_user_cache($data,'product_keyword',$this->user['project_id']); | ||
| 162 | -// } | 161 | + Common::set_user_cache($data,'product_keyword',$this->user['project_id']); |
| 162 | + } | ||
| 163 | return $data; | 163 | return $data; |
| 164 | } | 164 | } |
| 165 | 165 |
-
请 注册 或 登录 后发表评论