|
|
@@ -79,7 +79,7 @@ class SecretService
|
|
|
|
|
|
|
|
|
if ($user->secret_pass !== $password) {
|
|
|
- $text = "密码错误";
|
|
|
+ $text = lang("密码错误");
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
'text' => $text,
|
|
|
@@ -87,8 +87,8 @@ class SecretService
|
|
|
];
|
|
|
}
|
|
|
|
|
|
- $text = "秘钥:{$user->secret_key}\n\n";
|
|
|
- $text .= "请保管好你的秘钥";
|
|
|
+ $text = lang("秘钥").":{$user->secret_key}\n\n";
|
|
|
+ $text .= lang("请保管好你的秘钥");
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
'text' => $text,
|
|
|
@@ -99,7 +99,7 @@ class SecretService
|
|
|
|
|
|
private static function view($chatId, $messageId): array
|
|
|
{
|
|
|
- $text = "请输入查看密码";
|
|
|
+ $text = lang("请输入查看密码");
|
|
|
$user = User::where('member_id', $chatId)->first();
|
|
|
if ($user->secret_pass == '') {
|
|
|
$secretKey = SecretService::generateRandomString(22);
|
|
|
@@ -175,13 +175,13 @@ class SecretService
|
|
|
if ($res) {
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => '已完成迁移',
|
|
|
+ 'text' => lang('已完成迁移'),
|
|
|
'message_id' => $messageId,
|
|
|
];
|
|
|
} else {
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => '迁移失败',
|
|
|
+ 'text' => lang('迁移失败'),
|
|
|
'message_id' => $messageId,
|
|
|
];
|
|
|
}
|
|
|
@@ -196,7 +196,7 @@ class SecretService
|
|
|
if (!$user) {
|
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
|
- 'text' => "输入错误,请重新输入",
|
|
|
+ 'text' => lang("输入错误,请重新输入"),
|
|
|
'reply_to_message_id' => $messageId
|
|
|
];
|
|
|
}
|
|
|
@@ -204,17 +204,17 @@ class SecretService
|
|
|
|
|
|
$keyboard = [
|
|
|
[
|
|
|
- ['text' => '取消', 'callback_data' => 'topUp@@home'],
|
|
|
- ['text' => '确认', 'callback_data' => 'secret@@confirm'],
|
|
|
+ ['text' => lang('取消'), 'callback_data' => 'topUp@@home'],
|
|
|
+ ['text' => lang('确认'), 'callback_data' => 'secret@@confirm'],
|
|
|
]
|
|
|
];
|
|
|
$wallet->available_balance = bcadd($wallet->available_balance, 0, 2);
|
|
|
$available_balance = $wallet->available_balance;
|
|
|
- $text = "原账号信息:\n";
|
|
|
- $text .= "用户ID:{$user->getMemberId()}\n";
|
|
|
- $text .= "用户名:{$user->getUsername()}\n";
|
|
|
- $text .= "昵称:{$user->getFirstName()}\n";
|
|
|
- $text .= "余额:{$wallet->available_balance} RMB\n";
|
|
|
+ $text = lang("原账号信息").":\n";
|
|
|
+ $text .= lang("用户ID").":{$user->getMemberId()}\n";
|
|
|
+ $text .= lang("用户名").":{$user->getUsername()}\n";
|
|
|
+ $text .= lang("昵称").":{$user->getFirstName()}\n";
|
|
|
+ $text .= lang("余额").":{$wallet->available_balance} RMB\n";
|
|
|
$text .= "-------------------------------\n";
|
|
|
$user = User::where('member_id', $chatId)->first();
|
|
|
$wallet = Wallet::where('member_id', $user->getMemberId())->first();
|