...
This commit is contained in:
parent
a7a0a9b5ff
commit
dd5d78003f
@ -711,7 +711,7 @@ class MarketController extends BaseAuthedController
|
|||||||
'item_id' => $item_id,
|
'item_id' => $item_id,
|
||||||
'item_num' => $item_count,
|
'item_num' => $item_count,
|
||||||
'order_type' => 1,
|
'order_type' => 1,
|
||||||
'price' => $goods['s_price'],
|
'price' => $this->Web3PriceLowFormat($goods['s_price']),
|
||||||
'ext_data' => json_encode(array(
|
'ext_data' => json_encode(array(
|
||||||
'mode' => MARKET_BUY_MODE_NORMAL,
|
'mode' => MARKET_BUY_MODE_NORMAL,
|
||||||
'idx' => $idx,
|
'idx' => $idx,
|
||||||
@ -723,6 +723,12 @@ class MarketController extends BaseAuthedController
|
|||||||
'block_chain' => $response,
|
'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()
|
private function sellMyNft()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -702,7 +702,7 @@ class ShopController extends BaseAuthedController
|
|||||||
$costs = mt\Parameter::getByName('daily_selection_refresh_cost');
|
$costs = mt\Parameter::getByName('daily_selection_refresh_cost');
|
||||||
$arrCosts = explode('|', $costs['param_value']);
|
$arrCosts = explode('|', $costs['param_value']);
|
||||||
$maxCount = count($arrCosts);
|
$maxCount = count($arrCosts);
|
||||||
|
|
||||||
$count = $this->countTodayRefreshTimes($address);
|
$count = $this->countTodayRefreshTimes($address);
|
||||||
if ($count >= $maxCount) {
|
if ($count >= $maxCount) {
|
||||||
$this->_rspErr(2, 'The maximum number of refreshes has been reached');
|
$this->_rspErr(2, 'The maximum number of refreshes has been reached');
|
||||||
@ -1993,6 +1993,12 @@ class ShopController extends BaseAuthedController
|
|||||||
return phpcommon\bnToStr($ret_price);
|
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)
|
private function countFreeBuyTimes($free_type, $id, $goods_id)
|
||||||
{
|
{
|
||||||
$conn = myself()->_getMysql('');
|
$conn = myself()->_getMysql('');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user