From 354a388d9d64550a997b7ac19413e75930ba79c1 Mon Sep 17 00:00:00 2001 From: songliang Date: Tue, 27 Jun 2023 10:46:04 +0800 Subject: [PATCH] ... --- webapp/controller/ShopController.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index a31091f5..60578e59 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -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;