对接后端
This commit is contained in:
parent
b6718315db
commit
0fab567259
|
@ -51,6 +51,7 @@ const userStore = useUserStore()
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const token = localStorage.getItem('token')
|
const token = localStorage.getItem('token')
|
||||||
if (token && !userStore.userInfo) {
|
if (token && !userStore.userInfo) {
|
||||||
|
userStore.setToken(token)
|
||||||
await userStore.getUserInfo()
|
await userStore.getUserInfo()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -294,14 +294,15 @@ const handleLogin = async () => {
|
||||||
switch (activeTab.value) {
|
switch (activeTab.value) {
|
||||||
case 'account':
|
case 'account':
|
||||||
formRef = accountFormRef.value
|
formRef = accountFormRef.value
|
||||||
formData = { ...accountForm, activeTab: activeTab.value };
|
formData = { ...accountForm, activeTab: activeTab.value }
|
||||||
break
|
break
|
||||||
case 'phone':
|
case 'phone':
|
||||||
formRef = phoneFormRef.value
|
formRef = phoneFormRef.value
|
||||||
formData = { ...phoneForm, activeTab: activeTab.value };
|
formData = { ...phoneForm, activeTab: activeTab.value }
|
||||||
|
break
|
||||||
case 'email':
|
case 'email':
|
||||||
formRef = emailFormRef.value
|
formRef = emailFormRef.value
|
||||||
formData = { ...emailForm, activeTab: activeTab.value };
|
formData = { ...emailForm, activeTab: activeTab.value }
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue