This commit is contained in:
songliang 2023-07-04 10:53:54 +08:00
parent 1a50c0af8a
commit 66150f7047
2 changed files with 9 additions and 2 deletions

View File

@ -60,6 +60,7 @@ class Shop(object):
'url': 'webapp/index.php?c=Shop&a=getGoodsList', 'url': 'webapp/index.php?c=Shop&a=getGoodsList',
'params': [ 'params': [
_common.ReqHead(), _common.ReqHead(),
['shop_id', 0, '商店id 0: 所有商店(较慢)'],
], ],
'response': [ 'response': [
_common.RspHead(), _common.RspHead(),

View File

@ -113,7 +113,13 @@ class ShopController extends BaseAuthedController
public function getGoodsList() public function getGoodsList()
{ {
$goodsList = mt\ShopGoods::all(); $shop_id = getReqVal('shop_id', 0);
if ($shop_id == 0) {
$goodsList = mt\ShopGoods::all();
} else {
$goodsList = mt\ShopGoods::getGoodsList($shop_id);
}
$goodsList = $goodsList ? $goodsList : array(); $goodsList = $goodsList ? $goodsList : array();
$buyRecordHash = ShopBuyRecord::allToHash(); $buyRecordHash = ShopBuyRecord::allToHash();
@ -757,7 +763,7 @@ class ShopController extends BaseAuthedController
) )
); );
} }
public function openBlindBox() public function openBlindBox()
{ {
$account = $this->_getAccountId(); $account = $this->_getAccountId();