Ken 1 週間 前
コミット
fe49cbad2c
1 ファイル変更17 行追加2 行削除
  1. 17 2
      app/Services/WithdrawService.php

+ 17 - 2
app/Services/WithdrawService.php

@@ -516,10 +516,25 @@ class WithdrawService
 
         Cache::put("{$chatId}_WITHDRAW_MONEY", $amount);
 
+
+        $list = Address::where('member_id', $chatId)->get();
+        $keyboard = [];
+        foreach ($list as $item) {
+            $keyboard[] = [['text' => $item->alias, 'callback_data' => "withdrawAddress@@choose{$item->id}"]];
+        }
+        $keyboard[] = [
+            ['text' => '🏠 地址管理', 'callback_data' => "withdraw@@address"],
+            ['text' => '❌取消', 'callback_data' => "message@@close"]
+        ];
+
+        $text = "请直接选择下面的地址\n";
+        $text .= "⚠️提示:请务必确认提现地址正确无误,\n否则资金丢失将无法找回请自负!";
+        Cache::put("{$chatId}_WITHDRAW_MONEY", $amount);
         return [
             'chat_id' => $chatId,
-            'text' => "ttttttt",
-            'reply_to_message_id' => $messageId
+            'text' => $text,
+            'reply_to_message_id' => $messageId,
+            'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
         ];
     }