Ken 1 ماه پیش
والد
کامیت
c736168c84
2فایلهای تغییر یافته به همراه31 افزوده شده و 1 حذف شده
  1. 29 0
      app/Services/QianBaoWithdrawService.php
  2. 2 1
      app/Services/WalletService.php

+ 29 - 0
app/Services/QianBaoWithdrawService.php

@@ -22,7 +22,15 @@ class QianBaoWithdrawService
      */
     public static function init(Api $telegram, $data, $chatId, $firstName, $messageId)
     {
+
+
         //点击钱宝提现按钮
+        if ($data === "withdraw@@qb_show_channel") {
+            $res = QianBaoWithdrawService::chooseType($chatId, $messageId);
+            $telegram->editMessageText($res);
+        }
+
+
         if ($data === "withdraw@@qb_apply") {
             $res = QianBaoWithdrawService::qbApply($chatId, $messageId);
             $telegram->editMessageText($res);
@@ -114,6 +122,27 @@ class QianBaoWithdrawService
         return null;
     }
 
+
+    private static function chooseType($chatId, $messageId)
+    {
+        $keyboard = [];
+        $keyboard[] = [
+            ['text' => "银行卡", 'callback_data' => "withdraw@@qb_choose_bank"],
+            ['text' => "支付宝", 'callback_data' => "withdraw@@qb_choose_aliPay"],
+            ['text' => "数字人民币", 'callback_data' => "withdraw@@qb_choose_digital_RMB"]
+        ];
+        $keyboard[] =[[
+            ['text' => "提现账户管理", 'callback_data' => "withdraw@@banks"],
+        ]];
+
+        return [
+            'chat_id' => $chatId,
+            'text' => "请选择提现方式",
+            'message_id' => $messageId,
+            'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
+        ];
+    }
+
     //钱宝账单
     private static function bill($chatId, $firstName, $messageId, $page = 1, $limit = 5)
     {

+ 2 - 1
app/Services/WalletService.php

@@ -257,7 +257,8 @@ class WalletService extends BaseService
         $three_payment_switch = Config::where('field', 'three_payment_switch')->first()->val;
         if ($three_payment_switch == 1) {
             $keyboard[] = [
-                ['text' => '➕ 钱宝提现', 'callback_data' => "withdraw@@qb_apply"],
+//                ['text' => '➕ 钱宝提现', 'callback_data' => "withdraw@@qb_apply"],
+                ['text' => '➕ 钱宝提现', 'callback_data' => "withdraw@@qb_show_channel"],
                 ['text' => '🧾 钱宝账单', 'callback_data' => "withdraw@@bank_bill_1"]
             ];
             $keyboard[] = [