로그인 시 메인페이지로 가지는데 화면은 안바뀌는거 해결
This commit is contained in:
parent
9087d605e2
commit
37c335fc12
@ -32,7 +32,7 @@
|
||||
<script setup>
|
||||
import $api from '@api';
|
||||
import router from '@/router';
|
||||
import { ref } from 'vue';
|
||||
import { nextTick, ref } from 'vue';
|
||||
import UserFormInput from '@c/input/UserFormInput.vue';
|
||||
import { useUserInfoStore } from '@/stores/useUserInfoStore';
|
||||
|
||||
@ -70,10 +70,11 @@
|
||||
password: password.value,
|
||||
remember: remember.value,
|
||||
}, { headers: { isLogin: true } })
|
||||
.then(res => {
|
||||
.then(async res => {
|
||||
if (res.status === 200) {
|
||||
userStore.userInfo();
|
||||
router.push('/');
|
||||
await nextTick();
|
||||
router.push('/')
|
||||
}
|
||||
}).catch(error => {
|
||||
if (error.response) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user