fix: 修复钉钉扫码
This commit is contained in:
parent
31a6a528d6
commit
5d278ee3ea
@ -79,9 +79,9 @@ const currentPlatform = reactive<Platform>({
|
||||
|
||||
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: '回调地址'
|
||||
}
|
||||
|
||||
@ -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()
|
||||
}
|
||||
|
||||
@ -265,24 +265,13 @@ const rules = reactive<FormRules>({
|
||||
})
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user