This commit is contained in:
songliang 2023-06-26 15:46:15 +08:00
parent 4cfba4764f
commit 96fe7b9062

View File

@ -1090,6 +1090,7 @@ class ShopController extends BaseAuthedController
'idx' => $idx,
'grid' => $grid,
'count' => $count,
'goodPrice' => $goods['price'],
'price' => $price,
'item_id' => $item_id,
'item_count' => $item_count,
@ -1570,9 +1571,10 @@ class ShopController extends BaseAuthedController
{
$bn1 = phpcommon\bnInit($price * pow(10, 8));
$bn2 = phpcommon\bnInit('1000000000000000000');
$price = phpcommon\bnDiv(phpcommon\bnMul($bn1, $bn2), pow(10, 8));
$ret_price = phpcommon\bnDiv(phpcommon\bnMul($bn1, $bn2), pow(10, 8));
return $price;
error_log('normalizeWeb3Price: ' . $ret_price . ' ' . $price * pow(10, 8));
return $ret_price;
}
private function countFreeBuyTimes($goods) {