Skip to content

Commit

Permalink
refactor: 钉钉扫码认证设置优化
Browse files Browse the repository at this point in the history
--bug=1048604 --user=王孝刚 【系统管理】钉钉扫码认证设置优化 https://www.tapd.cn/57709429/s/1622777
  • Loading branch information
wxg0103 committed Dec 2, 2024
1 parent 3675567 commit be0b407
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/common/job/clean_chat_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
7 changes: 6 additions & 1 deletion ui/src/views/authentication/component/EditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
10 changes: 9 additions & 1 deletion ui/src/views/authentication/component/SCAN.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit be0b407

Please sign in to comment.