ソースを参照

Merge branch 'master' of 47.76.126.2:seven/bot-28

seven 1 週間 前
コミット
f88319ae8b

+ 8 - 0
app/Http/Controllers/api/TelegramWebHook.php

@@ -284,6 +284,14 @@ class TelegramWebHook extends Controller
                     $telegram->sendMessage($returnMsg);
                 }
 
+                //选择提现地址
+                $pattern = "/^withdrawAddress@@choose_qb_\d+$/";
+                if (preg_match($pattern, $data)) {
+                    $id = preg_replace('/^withdrawAddress@@choose_qb_/', '', $data);
+                    $res = WithdrawService::chooseBank($chatId, $firstName, $messageId, $id);
+                    $telegram->editMessageText($res);
+                }
+
                 //选择提现地址
                 $pattern = "/^withdrawAddress@@choose\d+$/";
                 if (preg_match($pattern, $data)) {

+ 6 - 0
app/Services/WithdrawService.php

@@ -475,6 +475,12 @@ class WithdrawService
         ]];
     }
 
+    //选择银行卡号
+    static function chooseBank($chatId, $firstName, $messageId, $id)
+    {
+        $amount = Cache::get("{$chatId}_WITHDRAW_QB_MONEY", '');
+        if ($amount) return WithdrawService::index($chatId, $firstName, $messageId);
+    }
 
     //输入钱宝提现金额
     static function inputQbAmount($chatId, $amount, $messageId)