|
|
@@ -101,40 +101,40 @@ class WithdrawService
|
|
|
->whereIn('status', [0, 1])
|
|
|
->count();
|
|
|
|
|
|
- $status = ['等待放行', '已到账', "失败"];
|
|
|
- $text = "👤 {$firstName}({$chatId}) 钱包提现记录\n\n";
|
|
|
+ $status = [lang('等待放行'), lang('已到账'), lang("失败")];
|
|
|
+ $text = "👤 {$firstName}({$chatId}) " . lalng("钱包提现记录") . "\n\n";
|
|
|
|
|
|
foreach ($list as $item) {
|
|
|
$amount = floatval($item->amount);
|
|
|
$balance = floatval($item->after_balance);
|
|
|
$text .= "-------------------------------------\n";
|
|
|
- $text .= "➖ {$amount} USDT\n余额:{$balance} \n";
|
|
|
- $text .= "类别:提现\n";
|
|
|
- $text .= "状态:{$status[$item->status]}\n";
|
|
|
+ $text .= "➖ {$amount} USDT\n" . lang("余额") . ":{$balance} \n";
|
|
|
+ $text .= lang("类别") . "类别:" . lang("提现") . "\n";
|
|
|
+ $text .= lang("状态") . ":{$status[$item->status]}\n";
|
|
|
if ($item->remark) {
|
|
|
- $text .= "说明:{$item->remark}\n";
|
|
|
+ $text .= lang("说明") . ":{$item->remark}\n";
|
|
|
}
|
|
|
- $text .= "日期:{$item->created_at}\n";
|
|
|
+ $text .= lang("日期") . ":{$item->created_at}\n";
|
|
|
}
|
|
|
|
|
|
if ($page > 1) {
|
|
|
$keyboard[] = [
|
|
|
- ['text' => "👆上一页", 'callback_data' => "withdrawBillNextPage@@" . ($page - 1)]
|
|
|
+ ['text' => lang("👆上一页"), 'callback_data' => "withdrawBillNextPage@@" . ($page - 1)]
|
|
|
];
|
|
|
}
|
|
|
$allPage = ceil($count / $limit);
|
|
|
if ($allPage > $page) {
|
|
|
if ($page > 1) {
|
|
|
- $keyboard[count($keyboard) - 1][] = ['text' => "👇下一页", 'callback_data' => "withdrawBillNextPage@@" . ($page + 1)];
|
|
|
+ $keyboard[count($keyboard) - 1][] = ['text' => lang("👇下一页"), 'callback_data' => "withdrawBillNextPage@@" . ($page + 1)];
|
|
|
} else {
|
|
|
$keyboard[] = [
|
|
|
- ['text' => "👇下一页", 'callback_data' => "withdrawBillNextPage@@" . ($page + 1)]
|
|
|
+ ['text' => lang("👇下一页"), 'callback_data' => "withdrawBillNextPage@@" . ($page + 1)]
|
|
|
];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$keyboard[] = [
|
|
|
- ['text' => "🔙返回", 'callback_data' => "withdraw@@home"]
|
|
|
+ ['text' => lang("↩️返回"), 'callback_data' => "withdraw@@home"]
|
|
|
];
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
@@ -156,15 +156,15 @@ class WithdrawService
|
|
|
//地址详情
|
|
|
public static function addressDetails($chatId, $messageId, $id)
|
|
|
{
|
|
|
- $text = "*TRC20 地址管理*\n\n";
|
|
|
+ $text = lang("*TRC20 地址管理*") . "\n\n";
|
|
|
$address = Address::where('id', $id)
|
|
|
->where('member_id', $chatId)->first();
|
|
|
- $text .= "地址:{$address->address}\n";
|
|
|
- $text .= "别名:{$address->alias}";
|
|
|
+ $text .= lang("地址") . ":{$address->address}\n";
|
|
|
+ $text .= lang("别名") . ":{$address->alias}";
|
|
|
|
|
|
$keyboard = [
|
|
|
- [['text' => '❌删除该地址', 'callback_data' => "withdrawAddress@@del{$id}"]],
|
|
|
- [['text' => '↩️返回列表', 'callback_data' => 'withdraw@@address']]
|
|
|
+ [['text' => lang('❌删除该地址'), 'callback_data' => "withdrawAddress@@del{$id}"]],
|
|
|
+ [['text' => lang('↩️返回列表'), 'callback_data' => 'withdraw@@address']]
|
|
|
];
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
@@ -182,7 +182,7 @@ class WithdrawService
|
|
|
if (mb_strlen($alias) > 20) {
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "别名不能超过20个字,请重新输入",
|
|
|
+ 'text' => lang("别名不能超过20个字,请重新输入"),
|
|
|
'reply_to_message_id' => $messageId,
|
|
|
];
|
|
|
}
|
|
|
@@ -203,7 +203,7 @@ class WithdrawService
|
|
|
if (!preg_match('/^T[a-zA-Z1-9]{33}$/', $address)) {
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "地址输入不正确,请重新输入TRC20地址",
|
|
|
+ 'text' => lang("地址输入不正确,请重新输入TRC20地址"),
|
|
|
'reply_to_message_id' => $messageId,
|
|
|
];
|
|
|
}
|
|
|
@@ -211,16 +211,16 @@ class WithdrawService
|
|
|
Cache::put(get_step_key($chatId), StepStatus::INPUT_ADDRESS_ALIAS);
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "请输入地址别名,便于区分多个地址",
|
|
|
+ 'text' => lang("请输入地址别名,便于区分多个地址"),
|
|
|
];
|
|
|
}
|
|
|
|
|
|
//添加地址
|
|
|
public static function addAddress($chatId, $messageId)
|
|
|
{
|
|
|
- $text = "请输入新的TRC20地址\n";
|
|
|
+ $text = lang('请输入新的TRC20地址') . "\n";
|
|
|
$keyboard = [[
|
|
|
- ['text' => '❌取消', 'callback_data' => "message@@close"],
|
|
|
+ ['text' => lang('❌取消'), 'callback_data' => "message@@close"],
|
|
|
]];
|
|
|
Cache::put(get_step_key($chatId), StepStatus::INPUT_ADDRESS_TRC20);
|
|
|
return [
|
|
|
@@ -235,8 +235,8 @@ class WithdrawService
|
|
|
//地址管理
|
|
|
public static function getAddress($chatId, $messageId)
|
|
|
{
|
|
|
- $text = "🏠 地址管理\n";
|
|
|
- $text .= "--------------------------\n";
|
|
|
+ $text = lang("🏠 地址管理");
|
|
|
+ $text .= "\n--------------------------\n";
|
|
|
|
|
|
$list = Address::where('member_id', $chatId)
|
|
|
->get();
|
|
|
@@ -476,14 +476,6 @@ class WithdrawService
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
//申请提现
|
|
|
public function apply($chatId, $messageId)
|
|
|
{
|