1
This commit is contained in:
parent
4c195789ae
commit
5f31bcd84d
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user