Skip to content

Commit be0b407

Browse files
committed
refactor: 钉钉扫码认证设置优化
--bug=1048604 --user=王孝刚 【系统管理】钉钉扫码认证设置优化 https://www.tapd.cn/57709429/s/1622777
1 parent 3675567 commit be0b407

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

apps/common/job/clean_chat_job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ def run():
5858
existing_job = scheduler.get_job(job_id='clean_chat_log')
5959
if existing_job is not None:
6060
existing_job.remove()
61-
scheduler.add_job(clean_chat_log_job, 'cron', minute='*/5', id='clean_chat_log')
61+
scheduler.add_job(clean_chat_log_job, 'cron', hour='0', minute='5', id='clean_chat_log')
6262
finally:
6363
lock.un_lock('clean_chat_log_job')

ui/src/views/authentication/component/EditModal.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ const open = async (platform: Platform) => {
125125
currentPlatform.config.corp_id = currentPlatform.config.agent_id
126126
delete currentPlatform.config.agent_id
127127
}
128-
currentPlatform.config.callback_url = defaultCallbackUrl
128+
currentPlatform.config = {
129+
corp_id: currentPlatform.config.corp_id,
130+
app_key: currentPlatform.config.app_key,
131+
app_secret: currentPlatform.config.app_secret,
132+
callback_url: defaultCallbackUrl
133+
}
129134
break
130135
case 'lark':
131136
currentPlatform.config.callback_url = `${defaultCallbackUrl}/api/feishu`

ui/src/views/authentication/component/SCAN.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ function createPlatform(key: string, name: string): Platform {
131131
132132
const config = {
133133
...(key === 'wecom' ? { corp_id: '', agent_id: '' } : { app_key: '' }),
134-
...(key === 'dingtalk' ? { corp_id: '' } : {}),
135134
app_secret: '',
136135
callback_url: ''
137136
}
@@ -172,6 +171,15 @@ function getPlatformInfo() {
172171
isActive: data.is_active,
173172
config: data.config
174173
})
174+
if (platform.key === 'dingtalk') {
175+
const { corp_id, app_key, app_secret } = platform.config
176+
platform.config = {
177+
corp_id,
178+
app_key,
179+
app_secret,
180+
callback_url: platform.config.callback_url
181+
}
182+
}
175183
showPassword[platform.key] = {}
176184
showPassword[platform.key]['app_secret'] = false
177185
}

0 commit comments

Comments
 (0)