wesmiler hace 2 años
padre
commit
48f315d2c9
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      app/Services/Api/AcceptorService.php

+ 3 - 3
app/Services/Api/AcceptorService.php

@@ -113,7 +113,7 @@ class AcceptorService extends BaseService
 
             foreach ($datas['data'] as &$item) {
                 $item['avatar'] = $item['avatar'] ? get_image_url($item['avatar']) : '';
-                $item['currency_price'] = $this->getRealPrice(1, 'CNY',0);
+                $item['currency_price'] = $this->getRealPrice(1, $currency,0);
                 $item['currency_quota'] = $this->getRealPrice(floatval($item['quota']), $currency, 3);
                 $item['currency_rate'] = $currency=='CNY'? 1 : WalletService::make()->getRateByCNY($currency);
                 $item['usdt_price'] = moneyFormat(1 / $xdPrice, 2);
@@ -157,13 +157,13 @@ class AcceptorService extends BaseService
             $xdBuyPriceRate = ConfigService::make()->getConfigByCode('trade_buy_price_rate', 0);
             $xdBuyPriceRate = $xdBuyPriceRate>0 && $xdBuyPriceRate<100? $xdBuyPriceRate : 0;
 
-            $cnyBuyPrice = moneyFormat($cnyPrice + ($cnyPrice * $xdBuyPriceRate/100), 2); // 上浮价格
+            $cnyBuyPrice = moneyFormat($cnyPrice + ($cnyPrice * $xdBuyPriceRate/100), 4); // 上浮价格
             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); // 下浮价格
+            $cnyBuyPrice = moneyFormat($cnyPrice - ($cnyPrice * $xdSellPriceRate/100), 4); // 下浮价格
             return moneyFormat($cnyBuyPrice * $currencyPrice, 4); // 汇率价格
         }