添加云仓关键词搜索
This commit is contained in:
parent
908968961c
commit
8890972390
@ -46,6 +46,7 @@ class CloudWarehouse extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function index($street_code, $page = 1, $category_id = 0, $cate_pid = 0,$cate_id = 0,$location = '')
|
public function index($street_code, $page = 1, $category_id = 0, $cate_pid = 0,$cate_id = 0,$location = '')
|
||||||
{
|
{
|
||||||
|
$keyword = $this->request->get('keyword');
|
||||||
if (!empty($location) && $location != ',') {
|
if (!empty($location) && $location != ',') {
|
||||||
[$lat, $lng] = explode(',', $location);
|
[$lat, $lng] = explode(',', $location);
|
||||||
} elseif (!empty($street_code)) {
|
} elseif (!empty($street_code)) {
|
||||||
@ -69,6 +70,9 @@ class CloudWarehouse extends BaseController
|
|||||||
if($cate_id>0){
|
if($cate_id>0){
|
||||||
$query->whereIn('cate_id', $cate_id);
|
$query->whereIn('cate_id', $cate_id);
|
||||||
}
|
}
|
||||||
|
if (!empty($keyword)) {
|
||||||
|
$query->where('store_name', 'like', '%'. $keyword . '%');
|
||||||
|
}
|
||||||
$cloud_product_arr = $query->where(function($query){
|
$cloud_product_arr = $query->where(function($query){
|
||||||
$query->where('mer_labels', '')
|
$query->where('mer_labels', '')
|
||||||
->whereOr('mer_labels',',5,');
|
->whereOr('mer_labels',',5,');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user