Merge https://github.com/wonderful60/py12306 into pr
This commit is contained in:
@@ -54,8 +54,9 @@ TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token'
|
||||
|
||||
# ServerChan和PushBear配置
|
||||
SERVERCHAN_ENABLED = 0
|
||||
PUSHBEAR_ENABLED = 0
|
||||
S_KEY = 'SCUdafadsfasfdafdf45234234234'
|
||||
PUSHBEAR_ENABLED = 0
|
||||
SC_KEY = '8474-ca071ADSFADSF'
|
||||
|
||||
# 输出日志到文件 (Docker 中不建议修改此组配置项)
|
||||
OUT_PUT_LOG_TO_FILE_ENABLED = 1
|
||||
|
||||
@@ -54,8 +54,9 @@ TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token'
|
||||
|
||||
# ServerChan和PushBear配置
|
||||
SERVERCHAN_ENABLED = 0
|
||||
PUSHBEAR_ENABLED = 0
|
||||
S_KEY = 'SCUdafadsfasfdafdf45234234234'
|
||||
PUSHBEAR_ENABLED = 0
|
||||
SC_KEY = '8474-ca071ADSFADSF'
|
||||
|
||||
# 输出日志到文件
|
||||
OUT_PUT_LOG_TO_FILE_ENABLED = 0
|
||||
|
||||
@@ -123,7 +123,7 @@ class App:
|
||||
|
||||
if Config().PUSHBEAR_ENABLED: # PushBear通知
|
||||
CommonLog.add_quick_log(CommonLog.MESSAGE_TEST_SEND_PUSH_BEAR).flush()
|
||||
Notification.push_bear(Config().S_KEY, '测试发送消息', 'By py12306')
|
||||
Notification.push_bear(Config().SC_KEY, '测试发送消息', 'By py12306')
|
||||
|
||||
@classmethod
|
||||
def run_check(cls):
|
||||
|
||||
@@ -64,8 +64,9 @@ class Config:
|
||||
|
||||
# ServerChan和PushBear配置
|
||||
SERVERCHAN_ENABLED = 0
|
||||
PUSHBEAR_ENABLED = 0
|
||||
S_KEY = ''
|
||||
PUSHBEAR_ENABLED = 0
|
||||
SC_KEY = ''
|
||||
|
||||
# 邮箱配置
|
||||
EMAIL_ENABLED = 0
|
||||
|
||||
@@ -91,7 +91,7 @@ class Order:
|
||||
Notification.server_chan(Config().S_KEY, OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE,
|
||||
OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT.format(self.order_id))
|
||||
if Config().PUSHBEAR_ENABLED: # PushBear通知
|
||||
Notification.push_bear(Config().S_KEY, OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE,
|
||||
Notification.push_bear(Config().SC_KEY, OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE,
|
||||
OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT.format(self.order_id))
|
||||
while sustain_time: # TODO 后面直接查询有没有待支付的订单就可以
|
||||
num += 1
|
||||
|
||||
Reference in New Issue
Block a user