...
This commit is contained in:
parent
6dee87fd97
commit
354a388d9d
@ -828,10 +828,10 @@ class ShopController extends BaseAuthedController
|
||||
public function buyGoodsNormal()
|
||||
{
|
||||
$address = $this->_getAddress();
|
||||
if (empty($address)) {
|
||||
$this->_rspErr(2, 'address is empty');
|
||||
return;
|
||||
}
|
||||
// if (empty($address)) {
|
||||
// $this->_rspErr(2, 'address is empty');
|
||||
// return;
|
||||
// }
|
||||
$id = getReqVal('id', 0);
|
||||
$token_type = getReqVal('token_type', '');
|
||||
$goods_num = getReqVal('goods_num', 0);
|
||||
@ -867,6 +867,7 @@ class ShopController extends BaseAuthedController
|
||||
|
||||
$buyRecordHash = ShopBuyRecord::allToHash();
|
||||
$boughtTimes = 1;
|
||||
$row['limit_type'] = 1;
|
||||
switch ($row['limit_type']) {
|
||||
case ShopController::DAILY_BUY_LIMIT: {
|
||||
$buyRecord = getXVal($buyRecordHash, $id);
|
||||
@ -989,7 +990,9 @@ class ShopController extends BaseAuthedController
|
||||
$this->internalAddItem($propertyChgService, $itemMeta, $goods_count);
|
||||
$this->_rspOk();
|
||||
} else {
|
||||
error_log("buy normal 1, need_price = ". $need_price . " goods_num = " . $goods_num);
|
||||
$price = $this->normalizeWeb3Price($goods_num * $need_price);
|
||||
error_log("buy normal 2, price = " . $price);
|
||||
$item_id = $row['goods_id'];
|
||||
$item_count = $goods_num;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user