From 5f31bcd84db52c97a1da51e63ad62caa24d5119a Mon Sep 17 00:00:00 2001 From: azw Date: Sun, 30 Jul 2023 09:12:49 +0800 Subject: [PATCH] 1 --- webapp/controller/ShopController.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 5b868568..a5f63723 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -70,7 +70,7 @@ class ShopController extends BaseAuthedController { return; } - $goodsMeta = mt\ShopGoods::getByGoodsUuid($id); + $goodsMeta = mt\ShopGoods::getByGoodsUuid($goodsUuid); if (!$goodsMeta) { $this->_rspErr(1, 'goods not found'); return; @@ -97,9 +97,9 @@ class ShopController extends BaseAuthedController { return; } - $desired_token_type = $goodsMeta['token_type']; - $check_token_type = splitStr1($desired_token_type); - $token_pos = array_search($tokenType, $check_token_type, true); + $desiredTokenType = $goodsMeta['token_type']; + $checkTokenType = splitStr1($desiredTokenType); + $tokenPos = array_search($tokenType, $checkTokenType, true); $isFreeBuy = false; if (!empty($goodsMeta['free_type'])) { $count = $this->countFreeBuyTimes($goodsMeta['free_type'], $goodsMeta['id'], $goodsMeta['goods_id']); @@ -108,8 +108,8 @@ class ShopController extends BaseAuthedController { } } if (!$isFreeBuy) { - if (!in_array($tokenType, $check_token_type)) { - $this->_rspErr(1, "token_type parameter error, desired_token_type: {$desired_token_type}"); + if (!in_array($tokenType, $checkTokenType)) { + $this->_rspErr(1, "token_type parameter error, desired_token_type: {$desiredTokenType}"); return; } }