From da38621d1d306776ecd2cb9b9122f0982dbd6557 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 29 Oct 2024 19:22:20 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/util/field_message.py | 2 +- .../component/XPackDisplaySettingDialog.vue | 6 +++--- ui/src/views/authentication/component/SCAN.vue | 2 +- ui/src/views/login/components/dingtalkQrCode.vue | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/common/util/field_message.py b/apps/common/util/field_message.py index eec028048..61eca2aaa 100644 --- a/apps/common/util/field_message.py +++ b/apps/common/util/field_message.py @@ -101,7 +101,7 @@ class ErrMessage: return { 'required': gettext_lazy('【%s】此字段必填。' % field), 'null': gettext_lazy('【%s】此字段不能为null。' % field), - 'invalid_image': gettext_lazy('【%s】上载有效的图像,您上载的文件不是图像或图像已损坏。' % field), + 'invalid_image': gettext_lazy('您上载的【%s】文件不是图像或图像已损坏,请上载有效的图像。' % field), 'max_length': gettext_lazy('【%s】请确保此文件名最多包含 {max_length} 个字符(长度为 {length})。' % field), 'invalid': gettext_lazy('【%s】提交的数据不是文件,请检查表单上的编码类型。' % field) } diff --git a/ui/src/views/application-overview/component/XPackDisplaySettingDialog.vue b/ui/src/views/application-overview/component/XPackDisplaySettingDialog.vue index 8d91b9d02..1af74181d 100644 --- a/ui/src/views/application-overview/component/XPackDisplaySettingDialog.vue +++ b/ui/src/views/application-overview/component/XPackDisplaySettingDialog.vue @@ -431,11 +431,11 @@ const submit = async (formEl: FormInstance | undefined) => { await formEl.validate((valid, fields) => { if (valid) { let fd = new FormData() - Object.keys(form.value).map((item) => { + Object.keys(xpackForm.value).map((item) => { if (['custom_theme', 'float_location'].includes(item)) { - fd.append(item, JSON.stringify(form.value[item])) + fd.append(item, JSON.stringify(xpackForm.value[item])) } else { - fd.append(item, form.value[item]) + fd.append(item, xpackForm.value[item]) } }) applicationXpackApi.putAccessToken(id as string, fd, loading).then((res) => { diff --git a/ui/src/views/authentication/component/SCAN.vue b/ui/src/views/authentication/component/SCAN.vue index 4794bccf7..29e3fc82e 100644 --- a/ui/src/views/authentication/component/SCAN.vue +++ b/ui/src/views/authentication/component/SCAN.vue @@ -148,9 +148,9 @@ function createPlatform(key: string, name: string): Platform { function 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 5254886c1..9e2912a71 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 - agent_id?: string + corp_id?: string } }>() @@ -85,7 +85,7 @@ const initActive = async () => { const data = { appKey: props.config.app_key, appSecret: props.config.app_secret, - agent_id: props.config.agent_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: 'ding7fd29779c8cf3e0224f2f5cc6abecb85' + exclusiveCorpId: data.corp_id }, (loginResult) => { const authCode = loginResult.authCode