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