Skip to content

Commit da38621

Browse files
committed
refactor: 优化代码
1 parent 6ebeeaf commit da38621

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

apps/common/util/field_message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def image(field: str):
101101
return {
102102
'required': gettext_lazy('【%s】此字段必填。' % field),
103103
'null': gettext_lazy('【%s】此字段不能为null。' % field),
104-
'invalid_image': gettext_lazy('【%s】上载有效的图像,您上载的文件不是图像或图像已损坏。' % field),
104+
'invalid_image': gettext_lazy('您上载的【%s】文件不是图像或图像已损坏,请上载有效的图像。' % field),
105105
'max_length': gettext_lazy('【%s】请确保此文件名最多包含 {max_length} 个字符(长度为 {length})。' % field),
106106
'invalid': gettext_lazy('【%s】提交的数据不是文件,请检查表单上的编码类型。' % field)
107107
}

ui/src/views/application-overview/component/XPackDisplaySettingDialog.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,11 @@ const submit = async (formEl: FormInstance | undefined) => {
431431
await formEl.validate((valid, fields) => {
432432
if (valid) {
433433
let fd = new FormData()
434-
Object.keys(form.value).map((item) => {
434+
Object.keys(xpackForm.value).map((item) => {
435435
if (['custom_theme', 'float_location'].includes(item)) {
436-
fd.append(item, JSON.stringify(form.value[item]))
436+
fd.append(item, JSON.stringify(xpackForm.value[item]))
437437
} else {
438-
fd.append(item, form.value[item])
438+
fd.append(item, xpackForm.value[item])
439439
}
440440
})
441441
applicationXpackApi.putAccessToken(id as string, fd, loading).then((res) => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ function createPlatform(key: string, name: string): Platform {
148148
149149
function formatFieldName(key?: any): string {
150150
const fieldNames: { [key: string]: string } = {
151+
corp_id: 'Corp ID',
151152
app_key: 'APP Key',
152153
app_secret: 'APP Secret',
153-
corp_id: 'Corp ID',
154154
agent_id: 'Agent ID',
155155
callback_url: '回调地址'
156156
}

ui/src/views/login/components/dingtalkQrCode.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const props = defineProps<{
6666
config: {
6767
app_secret: string
6868
app_key: string
69-
agent_id?: string
69+
corp_id?: string
7070
}
7171
}>()
7272
@@ -85,7 +85,7 @@ const initActive = async () => {
8585
const data = {
8686
appKey: props.config.app_key,
8787
appSecret: props.config.app_secret,
88-
agent_id: props.config.agent_id
88+
corp_id: props.config.corp_id
8989
}
9090
9191
const redirectUri = encodeURIComponent(window.location.origin)
@@ -104,7 +104,7 @@ const initActive = async () => {
104104
state: 'fit2cloud-ding-qr',
105105
prompt: 'consent',
106106
exclusiveLogin: 'true',
107-
exclusiveCorpId: 'ding7fd29779c8cf3e0224f2f5cc6abecb85'
107+
exclusiveCorpId: data.corp_id
108108
},
109109
(loginResult) => {
110110
const authCode = loginResult.authCode

0 commit comments

Comments
 (0)