Skip to content

Commit 5d278ee

Browse files
committed
fix: 修复钉钉扫码
1 parent 31a6a52 commit 5d278ee

File tree

3 files changed

+11
-22
lines changed

3 files changed

+11
-22
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ const currentPlatform = reactive<Platform>({
7979
8080
const formatFieldName = (key?: any): string => {
8181
const fieldNames: { [key: string]: string } = {
82+
corp_id: 'Corp ID',
8283
app_key: 'APP Key',
8384
app_secret: 'APP Secret',
84-
corp_id: 'Corp ID',
8585
agent_id: 'Agent ID',
8686
callback_url: '回调地址'
8787
}

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

Lines changed: 4 additions & 4 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-
crop_id: string
69+
corp_id: string
7070
}
7171
}>()
7272
@@ -86,7 +86,7 @@ const initActive = async () => {
8686
const data = {
8787
appKey: props.config.app_key,
8888
appSecret: props.config.app_secret,
89-
crop_id: props.config.crop_id
89+
corp_id: props.config.corp_id
9090
}
9191
9292
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: data.crop_id
107+
exclusiveCorpId: data.corp_id
108108
},
109109
(loginResult) => {
110110
const authCode = loginResult.authCode
@@ -124,7 +124,7 @@ const initActive = async () => {
124124
watch(
125125
() => props.config,
126126
(newConfig) => {
127-
if (newConfig.app_secret && newConfig.app_key && newConfig.crop_id) {
127+
if (newConfig.app_secret && newConfig.app_key && newConfig.corp_id) {
128128
isConfigReady.value = true
129129
initActive()
130130
}

ui/src/views/theme/index.vue

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -265,24 +265,13 @@ const rules = reactive<FormRules>({
265265
})
266266
267267
const onChange = (file: any, fileList: UploadFiles, attr: string) => {
268-
if (attr === 'loginImage') {
269-
const isLimit = file?.size / 1024 / 1024 < 5
270-
if (!isLimit) {
271-
// @ts-ignore
272-
MsgError(`文件大小超过 5M`)
273-
return false
274-
} else {
275-
themeForm.value[attr] = file.raw
276-
}
268+
const isLimit = file?.size / 1024 / 1024 < 10
269+
if (!isLimit) {
270+
// @ts-ignore
271+
MsgError(`文件大小超过 10M`)
272+
return false
277273
} else {
278-
const isLimit = file?.size / 1024 < 200
279-
if (!isLimit) {
280-
// @ts-ignore
281-
MsgError(`文件大小超过 200KB`)
282-
return false
283-
} else {
284-
themeForm.value[attr] = file.raw
285-
}
274+
themeForm.value[attr] = file.raw
286275
}
287276
user.setTheme(themeForm.value)
288277
}

0 commit comments

Comments
 (0)