This commit is contained in:
azw 2023-07-29 09:29:51 +08:00
parent eb88b61bfa
commit 5e7088b4d7

View File

@ -84,6 +84,14 @@ class ShopController extends BaseAuthedController {
$this->_rspErr(1, 'goods not found, goods_id: ' . $goodsMeta['goods_id']);
return;
}
if ($itemMeta['type'] == mt\Item::HERO_SKIN_TYPE) {
$errCode = 0;
$errMsg = '';
if (!$this->canBuy($itemMeta, $errCode, $errMsg)) {
$this->_rspErr($errCode, $errMsg);
return;
}
}
$goodsId = $goodsMeta['goods_id'];
@ -109,15 +117,6 @@ class ShopController extends BaseAuthedController {
$buyRecordHash = ShopBuyRecord::allToHash();
$boughtTimes = 1;
if ($itemMeta['type'] == mt\Item::HERO_SKIN_TYPE) {
$errCode = 0;
$errMsg = '';
if (!$this->canBuy($itemMeta, $errCode, $errMsg)) {
$this->_rspErr($errCode, $errMsg);
return;
}
}
{
switch ($goodsMeta['limit_type']) {
case ShopController::DAILY_BUY_LIMIT: {