From 5d278ee3ea24f64c6af61fba9a0ee12c1e6f80c1 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 30 Oct 2024 12:03:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=92=89=E9=92=89?= =?UTF-8?q?=E6=89=AB=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../authentication/component/EditModal.vue | 2 +- .../views/login/components/dingtalkQrCode.vue | 8 +++---- ui/src/views/theme/index.vue | 23 +++++-------------- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/ui/src/views/authentication/component/EditModal.vue b/ui/src/views/authentication/component/EditModal.vue index 5966f6eca..415c90ad6 100644 --- a/ui/src/views/authentication/component/EditModal.vue +++ b/ui/src/views/authentication/component/EditModal.vue @@ -79,9 +79,9 @@ const currentPlatform = reactive({ const formatFieldName = (key?: any): string => { const fieldNames: { [key: string]: string } = { + corp_id: 'Corp ID', app_key: 'APP Key', app_secret: 'APP Secret', - corp_id: 'Corp ID', agent_id: 'Agent ID', callback_url: '回调地址' } diff --git a/ui/src/views/login/components/dingtalkQrCode.vue b/ui/src/views/login/components/dingtalkQrCode.vue index 63387507c..062840b19 100644 --- a/ui/src/views/login/components/dingtalkQrCode.vue +++ b/ui/src/views/login/components/dingtalkQrCode.vue @@ -66,7 +66,7 @@ const props = defineProps<{ config: { app_secret: string app_key: string - crop_id: string + corp_id: string } }>() @@ -86,7 +86,7 @@ const initActive = async () => { const data = { appKey: props.config.app_key, appSecret: props.config.app_secret, - crop_id: props.config.crop_id + corp_id: props.config.corp_id } const redirectUri = encodeURIComponent(window.location.origin) @@ -104,7 +104,7 @@ const initActive = async () => { state: 'fit2cloud-ding-qr', prompt: 'consent', exclusiveLogin: 'true', - exclusiveCorpId: data.crop_id + exclusiveCorpId: data.corp_id }, (loginResult) => { const authCode = loginResult.authCode @@ -124,7 +124,7 @@ const initActive = async () => { watch( () => props.config, (newConfig) => { - if (newConfig.app_secret && newConfig.app_key && newConfig.crop_id) { + if (newConfig.app_secret && newConfig.app_key && newConfig.corp_id) { isConfigReady.value = true initActive() } diff --git a/ui/src/views/theme/index.vue b/ui/src/views/theme/index.vue index 6bb017570..df25ff419 100644 --- a/ui/src/views/theme/index.vue +++ b/ui/src/views/theme/index.vue @@ -265,24 +265,13 @@ const rules = reactive({ }) const onChange = (file: any, fileList: UploadFiles, attr: string) => { - if (attr === 'loginImage') { - const isLimit = file?.size / 1024 / 1024 < 5 - if (!isLimit) { - // @ts-ignore - MsgError(`文件大小超过 5M`) - return false - } else { - themeForm.value[attr] = file.raw - } + const isLimit = file?.size / 1024 / 1024 < 10 + if (!isLimit) { + // @ts-ignore + MsgError(`文件大小超过 10M`) + return false } else { - const isLimit = file?.size / 1024 < 200 - if (!isLimit) { - // @ts-ignore - MsgError(`文件大小超过 200KB`) - return false - } else { - themeForm.value[attr] = file.raw - } + themeForm.value[attr] = file.raw } user.setTheme(themeForm.value) }