修正 Telegram 控制器與帳戶服務相關邏輯
This commit is contained in:
+14
-5
@@ -5,13 +5,13 @@ class TgMsg
|
||||
{
|
||||
|
||||
public static function MakeMsg($data){
|
||||
$url = "https://api.telegram.org/bot" . $data['token'] . "/sendMessage";
|
||||
$MsgTxt['url'] = "https://api.telegram.org/bot" . $data['token'] . "/sendMessage";
|
||||
// $keyb['inline_keyboard'][0][0]['text'] = '点击查询账单';
|
||||
// $keyb['inline_keyboard'][0][0]['url'] = 'https://'.$BotUrl.'/bill/' . $data['message_from_id'] . '/' . $data['message_chat_id'] . '/T/Inquiry';
|
||||
// $keyb = json_encode($keyb);
|
||||
$MsgTxt['chat_id'] = $data['chat_id'];
|
||||
// $MsgTxt['reply_markup'] = $keyb;
|
||||
$MsgTxt['text'] = self::{'comm_' . $data['comm']}($data);
|
||||
|
||||
$MsgTxt['text']= self::{'comm_' . $data['comm']}($data);
|
||||
return $MsgTxt;
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,16 @@ public static function Comm_1($data) {
|
||||
}
|
||||
|
||||
public static function Comm_2($data) {
|
||||
$Msg = $data['username'].'-你已经成功充值 '.$data['amount'].',当前余额为'.$data['balance'];
|
||||
$Msg['chat_id'] = $data['chat_id'];
|
||||
$Msg['text'] = $data['username'].'-你已经成功充值 '.$data['amount'];
|
||||
|
||||
$Msg['reply_markup'] = json_encode([
|
||||
'inline_keyboard' => [[[
|
||||
'text' => '查看余额及详情',
|
||||
'url' => 'https://test.com'
|
||||
]]]
|
||||
]);
|
||||
;
|
||||
return $Msg;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user