From be0b407cf1ab55754c328711c0494d19e0565053 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 2 Dec 2024 18:18:13 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=92=89=E9=92=89=E6=89=AB?= =?UTF-8?q?=E7=A0=81=E8=AE=A4=E8=AF=81=E8=AE=BE=E7=BD=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1048604 --user=王孝刚 【系统管理】钉钉扫码认证设置优化 https://www.tapd.cn/57709429/s/1622777 --- apps/common/job/clean_chat_job.py | 2 +- ui/src/views/authentication/component/EditModal.vue | 7 ++++++- ui/src/views/authentication/component/SCAN.vue | 10 +++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/apps/common/job/clean_chat_job.py b/apps/common/job/clean_chat_job.py index 778b8a8dc..347f1a8a8 100644 --- a/apps/common/job/clean_chat_job.py +++ b/apps/common/job/clean_chat_job.py @@ -58,6 +58,6 @@ def run(): existing_job = scheduler.get_job(job_id='clean_chat_log') if existing_job is not None: existing_job.remove() - scheduler.add_job(clean_chat_log_job, 'cron', minute='*/5', id='clean_chat_log') + scheduler.add_job(clean_chat_log_job, 'cron', hour='0', minute='5', id='clean_chat_log') finally: lock.un_lock('clean_chat_log_job') diff --git a/ui/src/views/authentication/component/EditModal.vue b/ui/src/views/authentication/component/EditModal.vue index 8ea3afaa1..01259e6ab 100644 --- a/ui/src/views/authentication/component/EditModal.vue +++ b/ui/src/views/authentication/component/EditModal.vue @@ -125,7 +125,12 @@ const open = async (platform: Platform) => { currentPlatform.config.corp_id = currentPlatform.config.agent_id delete currentPlatform.config.agent_id } - currentPlatform.config.callback_url = defaultCallbackUrl + currentPlatform.config = { + corp_id: currentPlatform.config.corp_id, + app_key: currentPlatform.config.app_key, + app_secret: currentPlatform.config.app_secret, + callback_url: defaultCallbackUrl + } break case 'lark': currentPlatform.config.callback_url = `${defaultCallbackUrl}/api/feishu` diff --git a/ui/src/views/authentication/component/SCAN.vue b/ui/src/views/authentication/component/SCAN.vue index d0ccead29..f4a48f157 100644 --- a/ui/src/views/authentication/component/SCAN.vue +++ b/ui/src/views/authentication/component/SCAN.vue @@ -131,7 +131,6 @@ function createPlatform(key: string, name: string): Platform { const config = { ...(key === 'wecom' ? { corp_id: '', agent_id: '' } : { app_key: '' }), - ...(key === 'dingtalk' ? { corp_id: '' } : {}), app_secret: '', callback_url: '' } @@ -172,6 +171,15 @@ function getPlatformInfo() { isActive: data.is_active, config: data.config }) + if (platform.key === 'dingtalk') { + const { corp_id, app_key, app_secret } = platform.config + platform.config = { + corp_id, + app_key, + app_secret, + callback_url: platform.config.callback_url + } + } showPassword[platform.key] = {} showPassword[platform.key]['app_secret'] = false }