diff --git a/webapp/controller/MarketController.class.php b/webapp/controller/MarketController.class.php index 83c6ca94..82ac33cf 100644 --- a/webapp/controller/MarketController.class.php +++ b/webapp/controller/MarketController.class.php @@ -711,7 +711,7 @@ class MarketController extends BaseAuthedController 'item_id' => $item_id, 'item_num' => $item_count, 'order_type' => 1, - 'price' => $goods['s_price'], + 'price' => $this->Web3PriceLowFormat($goods['s_price']), 'ext_data' => json_encode(array( 'mode' => MARKET_BUY_MODE_NORMAL, 'idx' => $idx, @@ -723,6 +723,12 @@ class MarketController extends BaseAuthedController 'block_chain' => $response, )); } + private function Web3PriceLowFormat($price) { + $bn2 = phpcommon\bnInit('1000000000000000000'); + $ret_price = phpcommon\bnDiv($price, $bn2); + return phpcommon\bnToStr($ret_price); + } + private function sellMyNft() { diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 295ae851..7fc430d8 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -702,7 +702,7 @@ class ShopController extends BaseAuthedController $costs = mt\Parameter::getByName('daily_selection_refresh_cost'); $arrCosts = explode('|', $costs['param_value']); $maxCount = count($arrCosts); - + $count = $this->countTodayRefreshTimes($address); if ($count >= $maxCount) { $this->_rspErr(2, 'The maximum number of refreshes has been reached'); @@ -1993,6 +1993,12 @@ class ShopController extends BaseAuthedController return phpcommon\bnToStr($ret_price); } + private function Web3PriceLowFormat($price) { + $bn2 = phpcommon\bnInit('1000000000000000000'); + $ret_price = phpcommon\bnDiv($price, $bn2); + return phpcommon\bnToStr($ret_price); + } + private function countFreeBuyTimes($free_type, $id, $goods_id) { $conn = myself()->_getMysql('');