|
@@ -339,13 +339,15 @@ class WithdrawService
|
|
|
$user->save();
|
|
$user->save();
|
|
|
$wallet = Wallet::where('member_id', $chatId)->first();
|
|
$wallet = Wallet::where('member_id', $chatId)->first();
|
|
|
$temp = floatval($wallet->available_balance);
|
|
$temp = floatval($wallet->available_balance);
|
|
|
|
|
+
|
|
|
|
|
+ $rate = Config::where('field', 'exchange_rate_rmb')->first()->val ?? 1;
|
|
|
|
|
+ $exchange_rate_difference = Config::where('field', 'exchange_rate_difference')->first()->val ?? 0;
|
|
|
|
|
+ $rate = bcadd($rate, $exchange_rate_difference, 2);
|
|
|
|
|
+ $amount = bcdiv($temp, $rate, 2);
|
|
|
$text = "✅ " . lang('提现地址已设置') . "\n\n";
|
|
$text = "✅ " . lang('提现地址已设置') . "\n\n";
|
|
|
$text .= lang("请发送提现金额") . "(USDT) \n";
|
|
$text .= lang("请发送提现金额") . "(USDT) \n";
|
|
|
- $text .= "💰 " . lang("当前可用余额") . ":{$temp}\n";
|
|
|
|
|
|
|
+ $text .= "💰 " . lang("当前余额") . ":{$temp} RMB ({$amount} USDT)\n";
|
|
|
$text .= "⚠️ " . lang('提现将收取') . "{$this->serviceCharge}" . lang("U作为手续费") . "\n";
|
|
$text .= "⚠️ " . lang('提现将收取') . "{$this->serviceCharge}" . lang("U作为手续费") . "\n";
|
|
|
- $text .= "------------------------------------\n";
|
|
|
|
|
- $text .= lang("例如您要提现100 USDT") . "\n";
|
|
|
|
|
- $text .= lang("那么请发送:【提现】100") . "\n";
|
|
|
|
|
return [['chat_id' => $chatId, 'text' => $text]];
|
|
return [['chat_id' => $chatId, 'text' => $text]];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -474,7 +476,7 @@ class WithdrawService
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- //用户输入提现金额
|
|
|
|
|
|
|
+ //用户输入提现金额(USDT)
|
|
|
public function inputAmount($chatId, $amount, $messageId)
|
|
public function inputAmount($chatId, $amount, $messageId)
|
|
|
{
|
|
{
|
|
|
if (!preg_match('/^-?\d+(\.\d+)?$/', $amount)) {
|
|
if (!preg_match('/^-?\d+(\.\d+)?$/', $amount)) {
|