作者 lyh

修改产品分类保存

@@ -213,29 +213,6 @@ class ProductController extends BaseController @@ -213,29 +213,6 @@ class ProductController extends BaseController
213 } 213 }
214 214
215 /** 215 /**
216 - * @remark :获取所有关键词  
217 - * @name :getCategoryList  
218 - * @author :lyh  
219 - * @method :post  
220 - * @time :2023/9/14 13:56  
221 - */  
222 - public function getKeywordsList(){  
223 - $data = Common::get_user_cache('product_keyword',$this->user['project_id']);  
224 - if(empty($data)) {  
225 - $keywordModel = new Keyword();  
226 - $data = [];  
227 - $cateList = $keywordModel->list(['project_id' => $this->user['project_id']], ['id', 'title']);  
228 - if (!empty($cateList)) {  
229 - foreach ($cateList as $value) {  
230 - $data[$value['id']] = $value['title'];  
231 - }  
232 - }  
233 - Common::set_user_cache($data,'product_keyword',$this->user['project_id']);  
234 - }  
235 - return $data;  
236 - }  
237 -  
238 - /**  
239 * @remark :获取分类名称 216 * @remark :获取分类名称
240 * @name :categoryName 217 * @name :categoryName
241 * @author :lyh 218 * @author :lyh
@@ -326,13 +326,10 @@ class ProductLogic extends BaseLogic @@ -326,13 +326,10 @@ class ProductLogic extends BaseLogic
326 * @time :2023/10/20 9:02 326 * @time :2023/10/20 9:02
327 */ 327 */
328 public function handleListCategory($category){ 328 public function handleListCategory($category){
329 - $str = '';  
330 if(isset($category) && !empty($category)){ 329 if(isset($category) && !empty($category)){
331 - foreach ($category as $v){  
332 - $str .= $v.',';  
333 - } 330 + return ','.implode(',',$category).',';
334 } 331 }
335 - return !empty(trim($str,',')) ? ','.$str.',' : ''; 332 + return '';
336 } 333 }
337 334
338 335