fix: 修复前端报错的缺陷

--bug=1048335 --user=王孝刚 【系统设置】扫描登录页面弹出错误信息:Missing parameters https://www.tapd.cn/57709429/s/1601519
This commit is contained in:
wxg0103 2024-10-30 10:47:06 +08:00
parent 7e45cd54d2
commit c79660747a
4 changed files with 23 additions and 20 deletions

View File

@ -11,7 +11,7 @@ export default {
embedThirdParty: '嵌入第三方',
accessRestrictions: '访问限制',
displaySetting: '显示设置',
apiAccessCredentials: 'API访问凭据',
apiAccessCredentials: 'API 访问凭据',
apiKey: 'API Key',
refreshToken: {
msgConfirm1: '是否重新生成公开访问链接?',

View File

@ -171,7 +171,7 @@
action="#"
:auto-upload="false"
:show-file-list="false"
accept="image/*"
accept="image/jpeg, image/png, image/gif"
:on-change="(file: any, fileList: any) => onChange(file, fileList, 'user_avatar')"
>
<el-button size="small"> 替换 </el-button>
@ -190,7 +190,7 @@
action="#"
:auto-upload="false"
:show-file-list="false"
accept="image/*"
accept="image/jpeg, image/png, image/gif"
:on-change="(file: any, fileList: any) => onChange(file, fileList, 'avatar')"
>
<el-button size="small"> 替换 </el-button>
@ -208,7 +208,7 @@
action="#"
:auto-upload="false"
:show-file-list="false"
accept="image/*"
accept="image/jpeg, image/png, image/gif"
:on-change="(file: any, fileList: any) => onChange(file, fileList, 'float_icon')"
>
<el-button size="small"> 替换 </el-button>

View File

@ -11,7 +11,7 @@
<script lang="ts" setup>
import { useRouter } from 'vue-router'
import { useScriptTag } from '@vueuse/core'
import { defineProps, onMounted, ref } from 'vue'
import { defineProps, ref, watch } from 'vue'
import useStore from '@/stores'
import { MsgError } from '@/utils/message'
@ -121,13 +121,16 @@ const initActive = async () => {
}
}
onMounted(() => {
// Simulate config loading completion
setTimeout(() => {
isConfigReady.value = true
initActive()
}, 1000)
})
watch(
() => props.config,
(newConfig) => {
if (newConfig.app_secret && newConfig.app_key && newConfig.crop_id) {
isConfigReady.value = true
initActive()
}
},
{ immediate: true }
)
</script>
<style lang="scss">

View File

@ -43,7 +43,7 @@
action="#"
:auto-upload="false"
:show-file-list="false"
accept="image/*"
accept="image/jpeg, image/png, image/gif"
:on-change="
(file: any, fileList: any) => onChange(file, fileList, 'icon')
"
@ -52,8 +52,8 @@
</el-upload>
</div>
<el-text type="info" size="small"
>顶部网站显示的 Logo建议尺寸 48*48支持 JPGPNGSVG大小不超过
200KB</el-text
>顶部网站显示的 Logo建议尺寸 48*48支持 JPGPNGGIF大小不超过 10
MB</el-text
>
</el-card>
<el-card shadow="never" class="mb-8">
@ -64,7 +64,7 @@
action="#"
:auto-upload="false"
:show-file-list="false"
accept="image/*"
accept="image/jpeg, image/png, image/gif"
:on-change="
(file: any, fileList: any) => onChange(file, fileList, 'loginLogo')
"
@ -73,8 +73,8 @@
</el-upload>
</div>
<el-text type="info" size="small"
>登录页面右侧 Logo建议尺寸 204*52支持 JPGPNGSVG大小不超过
200KB</el-text
>登录页面右侧 Logo建议尺寸 204*52支持 JPGPNGGIF大小不超过 10
MB</el-text
>
</el-card>
<el-card shadow="never" class="mb-8">
@ -85,7 +85,7 @@
action="#"
:auto-upload="false"
:show-file-list="false"
accept="image/*"
accept="image/jpeg, image/png, image/gif"
:on-change="
(file: any, fileList: any) => onChange(file, fileList, 'loginImage')
"
@ -95,7 +95,7 @@
</div>
<el-text type="info" size="small">
左侧背景图矢量图建议尺寸 576*900位图建议尺寸 1152*1800支持
JPGPNGSVG大小不超过 5M
JPGPNGGIF大小不超过 10 MB
</el-text>
</el-card>