/user/current 404
来源:8-4 登录第三部分 持久化登录状态
ling7ling
2023-09-20
使用 getAndCommit 方法请求 /user/current
报以下错误
http://localhost:7000/user/current 404 (Not Found)
自查了很久没找到问题,请老师帮忙解答下
写回答
1回答
-
同学你好
问题出在 main.ts 中的代码位置,要先设置 axios,然后再初始化项目才可以。
将
const app = createApp(App) app.use(router).use(store).mount('#app')挪到文件的最下方就可以了
032023-09-21
相似问题