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']); } }