From bed2e78c7c8053d0a4115bbf897fb8271f881cdd Mon Sep 17 00:00:00 2001 From: thsrite Date: Wed, 29 Nov 2023 14:07:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=20=E8=8D=AF=E4=B8=B8=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E5=8F=91=E9=80=81=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- plugins/invitessignin/__init__.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 496b7f9..c4e4ba9 100644 --- a/package.json +++ b/package.json @@ -263,7 +263,7 @@ "InvitesSignin": { "name": "药丸签到", "description": "药丸论坛签到。", - "version": "1.1", + "version": "1.2", "icon": "invites.png", "color": "#FFFFFF", "author": "thsrite", diff --git a/plugins/invitessignin/__init__.py b/plugins/invitessignin/__init__.py index 903d54f..2a906b5 100644 --- a/plugins/invitessignin/__init__.py +++ b/plugins/invitessignin/__init__.py @@ -22,7 +22,7 @@ class InvitesSignin(_PluginBase): # 插件图标 plugin_icon = "invites.png" # 插件版本 - plugin_version = "1.1" + plugin_version = "1.2" # 插件作者 plugin_author = "thsrite" # 作者主页 @@ -141,6 +141,13 @@ class InvitesSignin(_PluginBase): if not res or res.status_code != 200: logger.error("药丸签到失败") + + # 发送通知 + if self._notify: + self.post_message( + mtype=NotificationType.SiteMessage, + title="【药丸签到任务完成】", + text="签到失败,请检查cookie是否失效") return sign_dict = json.loads(res.text) From 6b998704917b2bc933962a6f846d5029b1256a4c Mon Sep 17 00:00:00 2001 From: thsrite Date: Wed, 29 Nov 2023 14:16:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=20=E6=B6=88=E6=81=AF=E8=BD=AC=E5=8F=91?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E9=85=8D=E7=BD=AE=E5=8F=AF=E5=8A=A0=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- plugins/messageforward/__init__.py | 30 +++++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c4e4ba9..80b1131 100644 --- a/package.json +++ b/package.json @@ -182,7 +182,7 @@ "MessageForward": { "name": "消息转发", "description": "根据正则转发通知到其他WeChat应用。", - "version": "1.0", + "version": "1.1", "icon": "forward.png", "color": "#32ABD1", "author": "thsrite", diff --git a/plugins/messageforward/__init__.py b/plugins/messageforward/__init__.py index 333d0da..7a6b940 100644 --- a/plugins/messageforward/__init__.py +++ b/plugins/messageforward/__init__.py @@ -19,7 +19,7 @@ class MessageForward(_PluginBase): # 插件图标 plugin_icon = "forward.png" # 插件版本 - plugin_version = "1.0" + plugin_version = "1.1" # 插件作者 plugin_author = "thsrite" # 作者主页 @@ -104,7 +104,7 @@ class MessageForward(_PluginBase): 'component': 'VTextarea', 'props': { 'model': 'wechat', - 'rows': '3', + 'rows': '5', 'label': '应用配置', 'placeholder': 'appid:corpid:appsecret(一行一个配置)' } @@ -126,7 +126,7 @@ class MessageForward(_PluginBase): 'component': 'VTextarea', 'props': { 'model': 'pattern', - 'rows': '3', + 'rows': '6', 'label': '正则配置', 'placeholder': '对应上方应用配置,一行一个,一一对应' } @@ -155,6 +155,28 @@ class MessageForward(_PluginBase): ] } ] + }, + { + 'component': 'VRow', + 'content': [ + { + 'component': 'VCol', + 'props': { + 'cols': 12, + }, + 'content': [ + { + 'component': 'VAlert', + 'props': { + 'type': 'info', + 'variant': 'tonal', + 'text': '应用配置可加注释:' + 'appid:corpid:appsecret#站点通知' + } + } + ] + } + ] } ] } @@ -209,6 +231,8 @@ class MessageForward(_PluginBase): # 解析配置 wechats = self._wechat.split("\n") for index, wechat in enumerate(wechats): + # 排除注释 + wechat = wechat.split("#")[0] wechat_config = wechat.split(":") if len(wechat_config) != 3: logger.error(f"{wechat} 应用配置不正确")