From 00d5ea4be6ee6be07d156010bec418e401dd183c Mon Sep 17 00:00:00 2001 From: "littlefatty.wong" Date: Tue, 15 Jan 2019 11:35:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=8F=82=E6=95=B0SKEY=E4=BF=AE=E6=94=B9=E4=B8=BAS=5FKEY?= =?UTF-8?q?=E4=BB=A5=E7=AC=A6=E5=90=88=E5=8F=82=E6=95=B0=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env.docker.py.example | 2 +- env.py.example | 2 +- py12306/app.py | 4 ++-- py12306/config.py | 2 +- py12306/order/order.py | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/env.docker.py.example b/env.docker.py.example index d28f754..ff8b415 100644 --- a/env.docker.py.example +++ b/env.docker.py.example @@ -55,7 +55,7 @@ TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token' # ServerChan和PushBear配置 SERVERCHAN_ENABLED = 0 PUSHBEAR_ENABLED = 0 -SKEY = 'SCUdafadsfasfdafdf45234234234' +S_KEY = 'SCUdafadsfasfdafdf45234234234' # 输出日志到文件 (Docker 中不建议修改此组配置项) OUT_PUT_LOG_TO_FILE_ENABLED = 1 diff --git a/env.py.example b/env.py.example index 09939d9..8b3c77f 100644 --- a/env.py.example +++ b/env.py.example @@ -55,7 +55,7 @@ TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token' # ServerChan和PushBear配置 SERVERCHAN_ENABLED = 0 PUSHBEAR_ENABLED = 0 -SKEY = 'SCUdafadsfasfdafdf45234234234' +S_KEY = 'SCUdafadsfasfdafdf45234234234' # 输出日志到文件 OUT_PUT_LOG_TO_FILE_ENABLED = 0 diff --git a/py12306/app.py b/py12306/app.py index ddf1ccd..b235359 100644 --- a/py12306/app.py +++ b/py12306/app.py @@ -119,11 +119,11 @@ class App: if Config().SERVERCHAN_ENABLED: # ServerChan通知 CommonLog.add_quick_log(CommonLog.MESSAGE_TEST_SEND_SERVER_CHAN).flush() - Notification.server_chan(Config().SKEY, '测试发送消息', 'By py12306') + Notification.server_chan(Config().S_KEY, '测试发送消息', 'By py12306') if Config().PUSHBEAR_ENABLED: # PushBear通知 CommonLog.add_quick_log(CommonLog.MESSAGE_TEST_SEND_PUSH_BEAR).flush() - Notification.push_bear(Config().SKEY, '测试发送消息', 'By py12306') + Notification.push_bear(Config().S_KEY, '测试发送消息', 'By py12306') @classmethod def run_check(cls): diff --git a/py12306/config.py b/py12306/config.py index c3365bb..ac7a1f7 100644 --- a/py12306/config.py +++ b/py12306/config.py @@ -65,7 +65,7 @@ class Config: # ServerChan和PushBear配置 SERVERCHAN_ENABLED = 0 PUSHBEAR_ENABLED = 0 - SKEY = '' + S_KEY = '' # 邮箱配置 EMAIL_ENABLED = 0 diff --git a/py12306/order/order.py b/py12306/order/order.py index aeef212..8c837e2 100644 --- a/py12306/order/order.py +++ b/py12306/order/order.py @@ -88,10 +88,10 @@ class Order: Notification.send_to_telegram( OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT.format(self.order_id)) if Config().SERVERCHAN_ENABLED: # ServerChan通知 - Notification.server_chan(Config().SKEY, OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE, + 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().SKEY, OrderLog.MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE, + Notification.push_bear(Config().S_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