seven 2 days ago
parent
commit
e887754f2a
1 changed files with 6 additions and 1 deletions
  1. 6 1
      app/Services/WithdrawService.php

+ 6 - 1
app/Services/WithdrawService.php

@@ -467,9 +467,14 @@ class WithdrawService
     public function apply($chatId, $messageId)
     {
         $wallet = Wallet::where('member_id', $chatId)->first();
+        // 汇率
+        $rate = Config::where('field', 'exchange_rate_rmb')->first()->val??1;
         $temp = floatval($wallet->available_balance);
+        $amount = bcmul($temp, $rate, 2);
         $text = "请发送提现金额\n";
-        $text .= "💰 当前可用USDT余额:{$temp}\n";
+        $text .= "💰 当前余额{$temp} RMB\n";
+        $text .= "⚠️汇率:1 USDT = {$rate} RMB\n";
+        $text .= "💰 当前可用USDT余额:{$amount}\n";
         $text .= "⚠️ 提现将收取{$this->serviceCharge}U作为手续费\n";
 //        $keyboard = [[
 //            ['text' => "🔙返回", 'callback_data' => "withdraw@@home"],