Ken 2 周之前
父节点
当前提交
5149aeaff3
共有 4 个文件被更改,包括 147 次插入48 次删除
  1. 53 46
      app/Services/QianBaoWithdrawService.php
  2. 32 1
      lang/en/messages.php
  3. 32 1
      lang/vi/messages.php
  4. 30 0
      lang/zh-CN/messages.php

+ 53 - 46
app/Services/QianBaoWithdrawService.php

@@ -231,7 +231,7 @@ class QianBaoWithdrawService
             if ($item->remark) {
                 $text .= lang("说明") . ":{$item->remark}\n";
             }
-            $text .= lang('日期').":{$item->created_at}\n";
+            $text .= lang('日期') . ":{$item->created_at}\n";
         }
 
         if ($page > 1) {
@@ -272,8 +272,8 @@ class QianBaoWithdrawService
 
         $wallet = Wallet::where('member_id', $chatId)->first();
         $temp = floatval($wallet->available_balance);
-        $text = "请发送提现金额\n";
-        $text .= "💰 当前余额{$temp} RMB\n";
+        $text = lang("请发送提现金额") . "\n";
+        $text .= "💰 " . lang("当前余额") . "{$temp} RMB\n";
 
 
 //        Cache::put(get_step_key($chatId), StepStatus::INPUT_WITHDRAW_QB_MONEY);
@@ -291,7 +291,7 @@ class QianBaoWithdrawService
         Cache::put("{$chatId}_QB_BANK_ID", $id);
         return [
             'chat_id' => $chatId,
-            'text' => "请输入提现的金额",
+            'text' => lang("请输入提现的金额"),
         ];
     }
 
@@ -301,7 +301,7 @@ class QianBaoWithdrawService
         if (!preg_match('/^\d+(\.\d{1,2})?$/', $amount)) {
             return [
                 'chat_id' => $chatId,
-                'text' => "金额输入不正确,请发送提现数字",
+                'text' => lang('金额输入不正确,请发送提现数字'),
                 'reply_to_message_id' => $messageId
             ];
         }
@@ -339,28 +339,28 @@ class QianBaoWithdrawService
         $text = "";
         switch ($bank->getChannel()) {
             case "DF001":
-                $text = "银行卡提现确认\n";
-                $text .= "开户行:{$bank->getBankName()}\n";
-                $text .= "姓名:{$bank->getAccount()}\n";
-                $text .= "提现账号:{$bank->getCardNo()}\n";
-                $text .= "提现金额:{$amount}\n";
+                $text = lang('银行卡提现确认') . "\n";
+                $text .= lang('开户行') . ":{$bank->getBankName()}\n";
+                $text .= lang('姓名') . ":{$bank->getAccount()}\n";
+                $text .= lang('提现账号') . ":{$bank->getCardNo()}\n";
+                $text .= lang('提现金额') . ":{$amount}\n";
                 break;
             case "DF002":
-                $text = "支付宝提现确认\n";
-                $text .= "姓名:{$bank->getAccount()}\n";
-                $text .= "提现账号:{$bank->getCardNo()}\n";
-                $text .= "提现金额:{$amount}\n";
+                $text = lang("支付宝提现确认") . "\n";
+                $text .= lang('姓名') . ":{$bank->getAccount()}\n";
+                $text .= lang('提现账号') . ":{$bank->getCardNo()}\n";
+                $text .= lang('提现金额') . ":{$amount}\n";
                 break;
             case "DF005":
-                $text = "数字人民币提现确认\n";
-                $text .= "姓名:{$bank->getAccount()}\n";
-                $text .= "提现账号:{$bank->getCardNo()}\n";
-                $text .= "提现金额:{$amount}\n";
+                $text = lang('数字人民币提现确认') . "\n";
+                $text .= lang('姓名') . ":{$bank->getAccount()}\n";
+                $text .= lang('提现账号') . ":{$bank->getCardNo()}\n";
+                $text .= lang('提现金额') . ":{$amount}\n";
                 break;
         }
         $keyboard = [
             [
-                ['text' => "确认", 'callback_data' => 'withdraw@@qb_confirm']
+                ['text' => lang("确认"), 'callback_data' => 'withdraw@@qb_confirm']
             ],
             [
                 ['text' => '❌取消', 'callback_data' => "message@@close"]
@@ -387,15 +387,16 @@ class QianBaoWithdrawService
     //银行卡管理
     private static function banks($chatId, $messageId, $channel = ""): array
     {
+        $text = '';
         switch ($channel) {
             case "DF001":
-                $text = "银行卡列表\n";
+                $text = lang("银行卡列表") . "\n";
                 break;
             case "DF002":
-                $text = "支付宝账户列表\n";
+                $text = lang('支付宝账户列表') . "\n";
                 break;
             case "DF005":
-                $text = "数字人民币账户列表\n";
+                $text = lang('数字人民币账户列表') . "\n";
                 break;
         }
 
@@ -409,9 +410,12 @@ class QianBaoWithdrawService
             $keyboard[] = [['text' => $item->getAlias(), 'callback_data' => "withdrawAddress@@bank_detail{$item->getId()}"]];
         }
         if (count($list) < 5) {
-            $keyboard[] = [['text' => "➕ 添加", 'callback_data' => "withdrawAddress@@bank_choose_channel_{$channel}"], ['text' => "↩️返回", 'callback_data' => "topUp@@home"]];
+            $keyboard[] = [
+                ['text' => lang("➕ 添加"), 'callback_data' => "withdrawAddress@@bank_choose_channel_{$channel}"],
+                ['text' => lang("↩️返回"), 'callback_data' => "topUp@@home"]
+            ];
         } else {
-            $keyboard[] = [['text' => "↩️返回", 'callback_data' => "topUp@@home"]];
+            $keyboard[] = [['text' => lang("↩️返回"), 'callback_data' => "topUp@@home"]];
         }
 
         return [
@@ -429,28 +433,31 @@ class QianBaoWithdrawService
             ->where('member_id', $chatId)->first();
         switch ($bank->getChannel()) {
             case "DF001":
-                $text = "*银行卡管理*\n\n";
-                $text .= "姓名:{$bank->getAccount()}\n";
-                $text .= "银行:{$bank->getAccount()}\n";
-                $text .= "卡号:{$bank->getCardNo()}\n";
+                $text = "*" . lang('银行卡管理') . "*\n\n";
+                $text .= lang('姓名') . ":{$bank->getAccount()}\n";
+                $text .= lang('银行') . ":{$bank->getAccount()}\n";
+                $text .= lang('卡号') . ":{$bank->getCardNo()}\n";
                 break;
             case "DF002":
-                $text = "*支付宝管理*\n\n";
-                $text .= "姓名:{$bank->getAccount()}\n";
-                $text .= "银行:{$bank->getBankName()}\n";
-                $text .= "账号:{$bank->getCardNo()}\n";
+                $text = "*" . lang('支付宝管理') . "*\n\n";
+                $text .= lang('姓名') . ":{$bank->getAccount()}\n";
+                $text .= lang('银行') . ":{$bank->getBankName()}\n";
+                $text .= lang('账号') . ":{$bank->getCardNo()}\n";
                 break;
             default:
-                $text = "*银行卡管理*\n\n";
-                $text .= "姓名:{$bank->getAccount()}\n";
-                $text .= "银行:{$bank->getBankName()}\n";
-                $text .= "卡号:{$bank->getCardNo()}\n";
+                $text = "*" . lang('银行卡管理') . "*\n\n";
+                $text .= lang('姓名') . ":{$bank->getAccount()}\n";
+                $text .= lang('银行') . ":{$bank->getBankName()}\n";
+                $text .= lang('卡号') . ":{$bank->getCardNo()}\n";
                 break;
         }
 
 
         $keyboard = [
-            [['text' => '❌删除', 'callback_data' => "withdraw@@bank_del_{$id}"], ['text' => '↩️返回列表', 'callback_data' => "withdraw@@management_{$bank->getChannel()}"]],
+            [
+                ['text' => lang('❌删除'), 'callback_data' => "withdraw@@bank_del_{$id}"],
+                ['text' => lang('↩️返回列表'), 'callback_data' => "withdraw@@management_{$bank->getChannel()}"]
+            ],
         ];
         return [
             'chat_id' => $chatId,
@@ -480,7 +487,7 @@ class QianBaoWithdrawService
                 Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_BANK_NAME);
                 return [
                     'chat_id' => $chatId,
-                    'text' => "请输入开户银行卡开户名称",
+                    'text' => lang("请输入开户银行卡开户名称"),
                     'message_id' => $messageId,
                 ];
             case "DF002"://支付宝
@@ -488,7 +495,7 @@ class QianBaoWithdrawService
                 Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_CARD_NO);
                 return [
                     'chat_id' => $chatId,
-                    'text' => "请输入支付宝账号",
+                    'text' => lang("请输入支付宝账号"),
                     'message_id' => $messageId,
                 ];
             case "DF005"://数字人民币
@@ -496,14 +503,14 @@ class QianBaoWithdrawService
                 Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_CARD_NO);
                 return [
                     'chat_id' => $chatId,
-                    'text' => "请输入数字人民币账号",
+                    'text' => lang("请输入数字人民币账号"),
                     'message_id' => $messageId,
                 ];
 
             default:
                 return [
                     'chat_id' => $chatId,
-                    'text' => "选择通道错误",
+                    'text' => lang("选择通道错误"),
                     'message_id' => $messageId,
                 ];
         }
@@ -516,7 +523,7 @@ class QianBaoWithdrawService
         Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_CARD_NO);
         return [
             'chat_id' => $chatId,
-            'text' => "请输入银行卡号",
+            'text' => lang("请输入银行卡号"),
             'message_id' => $messageId,
         ];
     }
@@ -528,7 +535,7 @@ class QianBaoWithdrawService
         if ($channel === 'DF001' && !preg_match('/^\d+$/', $cardNo)) {
             return [
                 'chat_id' => $chatId,
-                'text' => "输入的银行卡号有误,请重新输入",
+                'text' => lang("输入的银行卡号有误,请重新输入"),
                 'reply_to_message_id' => $messageId,
             ];
         }
@@ -539,7 +546,7 @@ class QianBaoWithdrawService
 
         return [
             'chat_id' => $chatId,
-            'text' => "请输入姓名",
+            'text' =>lang("请输入姓名"),
             'message_id' => $messageId,
         ];
     }
@@ -550,11 +557,11 @@ class QianBaoWithdrawService
         Cache::put("{$chatId}_QB_ACCOUNT", $account);
         Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_ALIAS);
         $channel = Cache::get("{$chatId}_QB_WITHDRAW_CHANNEL");
-        $text = "请输入别名";
+        $text = lang("请输入别名");
         switch ($channel) {
             case "DF005":
             case "DF001":
-                $text = "请输入账号别名";
+                $text = lang('请输入账号别名');
                 break;
         }
         return [

+ 32 - 1
lang/en/messages.php

@@ -90,7 +90,38 @@ return [
     "说明" => "Description",
     "日期" => "Date",
     "👆上一页" => "👆Previous page",
-    "👇下一页" => "👇Next page"
+    "👇下一页" => "👇Next page",
+    "请发送提现金额" => "Please enter the withdrawal amount",
+    "当前余额" => "Current balance",
+    "请输入提现的金额" => "Please enter the withdrawal amount",
+    "金额输入不正确,请发送提现数字" => "Invalid amount entered, please enter a numeric withdrawal amount",
+    "银行卡提现确认" => "Bank card withdrawal confirmation",
+    "开户行" => "Bank of account",
+    "提现账号" => "Withdrawal account",
+    "提现金额" => "Withdrawal amount",
+    "支付宝提现确认" => "Alipay withdrawal confirmation",
+    "数字人民币提现确认" => "Digital RMB withdrawal confirmation",
+    "❌取消" => "❌Cancel",
+    "银行卡列表" => "Bank card list",
+    "支付宝账户列表" => "Alipay account list",
+    "数字人民币账户列表" => "Digital RMB account list",
+    "➕ 添加" => "➕ Add",
+    "↩️返回" => "↩️Return",
+    "银行卡管理" => "Bank card management",
+    "支付宝管理" => "Alipay management",
+    "账号" => "Account",
+    "❌删除" => "❌Delete",
+    "↩️返回列表" => "↩️Return to list",
+    "请输入开户银行卡开户名称" => "Please enter the bank account name",
+    "请输入支付宝账号" => "Please enter Alipay account",
+    "请输入数字人民币账号" => "Please enter Digital RMB account",
+    "选择通道错误" => "Channel selection error",
+    "请输入银行卡号" => "Please enter bank card number",
+    "输入的银行卡号有误,请重新输入" => "Invalid bank card number entered, please re-enter",
+    "请输入姓名" => "Please enter your name",
+    "请输入别名" => "Please enter a nickname",
+    "请输入账号别名" => "Please enter account nickname"
+
 
 
 

+ 32 - 1
lang/vi/messages.php

@@ -90,7 +90,38 @@ return [
     "说明" => "Mô tả",
     "日期" => "Ngày",
     "👆上一页" => "👆Trang trước",
-    "👇下一页" => "👇Trang sau"
+    "👇下一页" => "👇Trang sau",
+    "请发送提现金额" => "Vui lòng nhập số tiền rút",
+    "当前余额" => "Số dư hiện tại",
+    "请输入提现的金额" => "Vui lòng nhập số tiền rút",
+    "金额输入不正确,请发送提现数字" => "Số tiền nhập không đúng, vui lòng nhập số tiền rút",
+    "银行卡提现确认" => "Xác nhận rút tiền qua thẻ ngân hàng",
+    "开户行" => "Ngân hàng mở tài khoản",
+    "提现账号" => "Tài khoản rút tiền",
+    "提现金额" => "Số tiền rút",
+    "支付宝提现确认" => "Xác nhận rút tiền qua Alipay",
+    "数字人民币提现确认" => "Xác nhận rút tiền qua Nhân dân tệ kỹ thuật số",
+    "❌取消" => "❌Hủy bỏ",
+    "银行卡列表" => "Danh sách thẻ ngân hàng",
+    "支付宝账户列表" => "Danh sách tài khoản Alipay",
+    "数字人民币账户列表" => "Danh sách tài khoản Nhân dân tệ kỹ thuật số",
+    "➕ 添加" => "➕ Thêm",
+    "↩️返回" => "↩️ Quay lại",
+    "银行卡管理" => "Quản lý thẻ ngân hàng",
+    "支付宝管理" => "Quản lý Alipay",
+    "账号" => "Tài khoản",
+    "❌删除" => "❌ Xóa",
+    "↩️返回列表" => "↩️ Quay lại danh sách",
+    "请输入开户银行卡开户名称" => "Vui lòng nhập tên ngân hàng mở tài khoản thẻ",
+    "请输入支付宝账号" => "Vui lòng nhập tài khoản Alipay",
+    "请输入数字人民币账号" => "Vui lòng nhập tài khoản Nhân dân tệ kỹ thuật số",
+    "选择通道错误" => "Lựa chọn kênh sai",
+    "请输入银行卡号" => "Vui lòng nhập số thẻ ngân hàng",
+    "输入的银行卡号有误,请重新输入" => "Số thẻ ngân hàng nhập sai, vui lòng nhập lại",
+    "请输入姓名" => "Vui lòng nhập tên",
+    "请输入别名" => "Vui lòng nhập biệt danh",
+    "请输入账号别名" => "Vui lòng nhập biệt danh tài khoản"
+
 
 
 

+ 30 - 0
lang/zh-CN/messages.php

@@ -91,5 +91,35 @@ return [
     "日期" => "日期",
     "👆上一页" => "👆上一页",
     "👇下一页" => "👇下一页",
+    "请发送提现金额" => "请发送提现金额",
+    "当前余额" => "当前余额",
+    "请输入提现的金额" => "请输入提现的金额",
+    "金额输入不正确,请发送提现数字" => "金额输入不正确,请发送提现数字",
+    "银行卡提现确认" => "银行卡提现确认",
+    "开户行" => "开户行",
+    "提现账号" => "提现账号",
+    "提现金额" => "提现金额",
+    "支付宝提现确认" => "支付宝提现确认",
+    "数字人民币提现确认" => "数字人民币提现确认",
+    "❌取消" => "❌取消",
+    "银行卡列表" => "银行卡列表",
+    "支付宝账户列表" => "支付宝账户列表",
+    "数字人民币账户列表" => "数字人民币账户列表",
+    "➕ 添加" => "➕ 添加",
+    "↩️返回" => "↩️返回",
+    "银行卡管理" => "银行卡管理",
+    "支付宝管理" => "支付宝管理",
+    "账号" => "账号",
+    "❌删除" => "❌删除",
+    "↩️返回列表" => "↩️返回列表",
+    "请输入开户银行卡开户名称" => "请输入开户银行卡开户名称",
+    "请输入支付宝账号" => "请输入支付宝账号",
+    "请输入数字人民币账号" => "请输入数字人民币账号",
+    "选择通道错误" => "选择通道错误",
+    "请输入银行卡号" => "请输入银行卡号",
+    "输入的银行卡号有误,请重新输入" => "输入的银行卡号有误,请重新输入",
+    "请输入姓名" => "请输入姓名",
+    "请输入别名" => "请输入别名",
+    "请输入账号别名" => "请输入账号别名",
 
 ];