作者 王智

222

@@ -468,7 +468,7 @@ class Index extends Api @@ -468,7 +468,7 @@ class Index extends Api
468 } 468 }
469 if (!empty($param['keywords']) || $param['keywords'] != null || $param['keywords'] != '') { 469 if (!empty($param['keywords']) || $param['keywords'] != null || $param['keywords'] != '') {
470 //搜索逻辑 470 //搜索逻辑
471 - $map4['a.name|a.con'] = array('LIKE', '%' . $param['keywords'] . '%'); 471 + $map4['a.name|a.con'] = array('in', $param['keywords']);
472 $product_title = Db::name('product')->where('name|con', 'LIKE', '%' . $param['keywords'] . '%')->find(); 472 $product_title = Db::name('product')->where('name|con', 'LIKE', '%' . $param['keywords'] . '%')->find();
473 if (!empty($product_title)) { 473 if (!empty($product_title)) {
474 Db::name('so_level_num')->insert(['product_id' => $product_title['id'], 'keywords' => $param['keywords'], 'createtime' => time()]); 474 Db::name('so_level_num')->insert(['product_id' => $product_title['id'], 'keywords' => $param['keywords'], 'createtime' => time()]);
@@ -1011,7 +1011,7 @@ class Index extends Api @@ -1011,7 +1011,7 @@ class Index extends Api
1011 $fitst4[$k1] = Db::name('classa')->where(['id' => $v1['class_id']])->select(); 1011 $fitst4[$k1] = Db::name('classa')->where(['id' => $v1['class_id']])->select();
1012 $fitst5 = $this->three_arr($fitst4); 1012 $fitst5 = $this->three_arr($fitst4);
1013 } 1013 }
1014 - $fitst5=$this->second_array_unique_bykey($fitst5,'id'); 1014 + $fitst5 = $this->second_array_unique_bykey($fitst5, 'id');
1015 foreach ($fitst5 as $k3 => $v3) { 1015 foreach ($fitst5 as $k3 => $v3) {
1016 $LG_list[$k]['IsList'][$k3]['xid'] = $v3['id']; 1016 $LG_list[$k]['IsList'][$k3]['xid'] = $v3['id'];
1017 $LG_list[$k]['IsList'][$k3]['title'] = $v3['class']; 1017 $LG_list[$k]['IsList'][$k3]['title'] = $v3['class'];