提交 3262c991 authored 作者: 王鹏飞's avatar 王鹏飞

fix: 修复登录状态检测错误的问题

上级 6e2b5054
...@@ -26,7 +26,11 @@ export const useUserStore = defineStore({ ...@@ -26,7 +26,11 @@ export const useUserStore = defineStore({
actions: { actions: {
async getUser() { async getUser() {
const res = await getUser() const res = await getUser()
await this.getCourse() try {
await this.getCourse()
} catch (error) {
console.log(error)
}
this.user = res.data this.user = res.data
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论