|
|
@@ -150,24 +150,24 @@ class AcceptorService extends BaseService
|
|
|
|
|
|
// 买价
|
|
|
$xdPrice = ConfigService::make()->getConfigByCode('xd_price', 100);
|
|
|
- $buyPrice = moneyFormat($money/$xdPrice,2); // 星豆价格
|
|
|
- $cnyPrice = moneyFormat($buyPrice * $usdtPrice,2); // 币种价格
|
|
|
+ $buyPrice = moneyFormat($money/$xdPrice,4); // 星豆价格
|
|
|
+ $cnyPrice = moneyFormat($buyPrice * $usdtPrice,4); // 币种价格
|
|
|
|
|
|
if($tradeType == 1){
|
|
|
$xdBuyPriceRate = ConfigService::make()->getConfigByCode('trade_buy_price_rate', 0);
|
|
|
$xdBuyPriceRate = $xdBuyPriceRate>0 && $xdBuyPriceRate<100? $xdBuyPriceRate : 0;
|
|
|
|
|
|
$cnyBuyPrice = moneyFormat($cnyPrice + ($cnyPrice * $xdBuyPriceRate/100), 2); // 上浮价格
|
|
|
- return moneyFormat($cnyBuyPrice * $currencyPrice, 2); // 汇率价格
|
|
|
+ return moneyFormat($cnyBuyPrice * $currencyPrice, 4); // 汇率价格
|
|
|
}else if($tradeType == 2){
|
|
|
$xdSellPriceRate = ConfigService::make()->getConfigByCode('trade_sell_price_rate', 0);
|
|
|
$xdSellPriceRate = $xdSellPriceRate>0 && $xdSellPriceRate<100? $xdSellPriceRate : 0;
|
|
|
|
|
|
$cnyBuyPrice = moneyFormat($cnyPrice - ($cnyPrice * $xdSellPriceRate/100), 2); // 下浮价格
|
|
|
- return moneyFormat($cnyBuyPrice * $currencyPrice, 2); // 汇率价格
|
|
|
+ return moneyFormat($cnyBuyPrice * $currencyPrice, 4); // 汇率价格
|
|
|
}
|
|
|
|
|
|
- return moneyFormat($cnyPrice * $currencyPrice, 2); // 汇率价格
|
|
|
+ return moneyFormat($cnyPrice * $currencyPrice, 4); // 汇率价格
|
|
|
}
|
|
|
|
|
|
/**
|