From 63f212d4783028fcd6506f7fc12394ac74dc8bb1 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 31 Jul 2023 10:45:44 +0800 Subject: [PATCH] 1 --- webapp/controller/ShopController.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index a9906dde..396fa340 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -88,11 +88,12 @@ class ShopController extends BaseAuthedController public function getGoodsList() { - $shop_id = getReqVal('shop_id', 0); - if ($shop_id == 0) { + $shopId = getReqVal('shop_id', 0); + $goodsMetaList = array(); + if ($shopId == 0) { $goodsMetaList = mt\ShopGoods::all(); } else { - $goodsMetaList = mt\ShopGoods::getGoodsList($shop_id); + $goodsMetaList = mt\ShopGoods::getGoodsList($shopId); } $goodsMetaList = $goodsMetaList ? $goodsMetaList : array(); @@ -150,7 +151,6 @@ class ShopController extends BaseAuthedController $goodsMeta['id'], $goodsMeta['goods_id']); $goods['free_num'] = $goods['free_num'] - $count; - // error_log('free_num:' . $goods['free_num']); } }