This commit is contained in:
azw 2023-07-30 08:41:07 +08:00
parent 13852c7719
commit 2307d68d6b

View File

@ -114,9 +114,6 @@ class ShopController extends BaseAuthedController {
}
}
// 这里命名混乱了, 购买个数,一捆个数命名冲突
$goods_count = $goodsMeta['goods_num'];
$price_array = splitStr1($goodsMeta['price']);
$discount_array = splitStr1($goodsMeta['discount']);
@ -133,20 +130,15 @@ class ShopController extends BaseAuthedController {
$costItemId = $this->getCostItemIdByTokenType($tokenType);
$costItems = $this->makeCostItems($costItemId, $goodsNum * $need_price);
switch ($tokenType) {
case ShopController::TOKEN_TYPE_GOLD:
{
}
break;
case ShopController::TOKEN_TYPE_DIAMOND:
{
}
break;
default:
{
if (!in_array(
$tokenType,
array(
mt\Shop::TOKEN_TYPE_GOLD,
mt\Shop::TOKEN_TYPE_DIAMOND
)
)) {
$this->_rspErr(1, "token_type is unsupport, {$tokenType}");
}
break;
return;
}
$lackItem = null;
if (!$this->_hasEnoughItems($costItems, $lackItem)) {