...
This commit is contained in:
parent
1200480a64
commit
d7e8d22e2a
@ -855,13 +855,13 @@ class ShopController extends BaseAuthedController
|
|||||||
$count = $this->countFreeBuyTimes($row);
|
$count = $this->countFreeBuyTimes($row);
|
||||||
if ($count < $row['free_num']) {
|
if ($count < $row['free_num']) {
|
||||||
$isFreeBuy = true;
|
$isFreeBuy = true;
|
||||||
} else {
|
}
|
||||||
$this->_rspErr(1, "free_num parameter error, free_num: {$row['free_num']}");
|
}
|
||||||
|
if (!$isFreeBuy) {
|
||||||
|
if (!in_array($token_type, $check_token_type)) {
|
||||||
|
$this->_rspErr(1, "token_type parameter error, desired_token_type: {$desired_token_type}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (!in_array($token_type, $check_token_type)) {
|
|
||||||
$this->_rspErr(1, "token_type parameter error, desired_token_type: {$desired_token_type}");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($goods_num > $row['max_amount']) {
|
if ($goods_num > $row['max_amount']) {
|
||||||
@ -1164,6 +1164,7 @@ class ShopController extends BaseAuthedController
|
|||||||
$this->_rspErr(2, 'id is invalid');
|
$this->_rspErr(2, 'id is invalid');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$meta = mt\Item::get($shop['goods_id']);
|
||||||
$cost = $shop['price'] * $num;
|
$cost = $shop['price'] * $num;
|
||||||
$isFreeBuy = false;
|
$isFreeBuy = false;
|
||||||
if (!empty($shop['free_type'])) {
|
if (!empty($shop['free_type'])) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user