From 1ae489722b99dce5377ccdc878a3ecc8df20f741 Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Thu, 14 Feb 2019 10:38:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=A2=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=AD=9B=E9=80=89bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wap/controller/AuthApi.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/wap/controller/AuthApi.php b/application/wap/controller/AuthApi.php index ab036566..aed986d5 100644 --- a/application/wap/controller/AuthApi.php +++ b/application/wap/controller/AuthApi.php @@ -312,7 +312,7 @@ class AuthApi extends AuthController $order = StoreOrder::searchUserOrder($this->userInfo['uid'],$search)?:[]; $list = $order == false ? [] : [$order]; }else{ - if($type == 'first') $type = ''; + if(!is_numeric($type)) $type = ''; $list = StoreOrder::getUserOrderList($this->userInfo['uid'],$type,$first,$limit); } foreach ($list as $k=>$order){ @@ -484,7 +484,10 @@ class AuthApi extends AuthController public function get_product_list($keyword = '', $cId = 0,$sId = 0,$priceOrder = '', $salesOrder = '', $news = 0, $first = 0, $limit = 8) { - if(!empty($keyword)) $keyword = base64_decode(htmlspecialchars($keyword)); + if(!empty($keyword)){ + $encodedData = str_replace(' ','+',$keyword); + $keyword = base64_decode(htmlspecialchars($encodedData)); + } $model = StoreProduct::validWhere(); if($cId && $sId){ $model->where('cate_id',$sId);