fix: login error

This commit is contained in:
xingyu
2023-07-10 11:16:42 +08:00
parent ba1254f397
commit 44efb13c0e
3 changed files with 14 additions and 4 deletions

View File

@ -55,7 +55,14 @@ const client = ref({
name: '',
logo: ''
})
const queryParams = reactive({
interface queryType {
responseType: string
clientId: string
redirectUri: string
state: string
scopes: string[]
}
const queryParams = reactive<queryType>({
// URL 上的 client_id、scope 等参数
responseType: '',
clientId: '',
@ -64,7 +71,10 @@ const queryParams = reactive({
scopes: [] // 优先从 query 参数获取;如果未传递,从后端获取
})
const ssoVisible = computed(() => unref(getLoginState) === LoginStateEnum.SSO) // 是否展示 SSO 登录的表单
const formData = reactive({
interface formType {
scopes: string[]
}
const formData = reactive<formType>({
scopes: [] // 已选中的 scope 数组
})
const formLoading = ref(false) // 表单是否提交中