...
|
...
|
@@ -234,8 +234,24 @@ class IndexController extends WeChatBaseController |
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 首页搜索结果页 综合
|
|
|
*/
|
|
|
public function search_synthesis_order(){
|
|
|
|
|
|
$book_name = $_POST['search_content'];
|
|
|
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where("type =2 ") -> where('book_name','like',"%".$book_name."%") -> select() -> toArray();
|
|
|
if(!empty($data_salesman_goods)){
|
|
|
foreach ($data_salesman_goods as $key => $val){
|
|
|
$price = explode('.',$data_salesman_goods[$key]['price']);
|
|
|
$data_salesman_goods[$key]['price0'] = $price[0];
|
|
|
$data_salesman_goods[$key]['price1'] = $price[1];
|
|
|
$data_salesman_goods[$key]['show_img'] = cmf_get_image_url($data_salesman_goods[$key]['show_img']);
|
|
|
}
|
|
|
}
|
|
|
return json_encode($data_salesman_goods);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
...
|
...
|
|