Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

home.vue反复跳转至登录界面,求解? #26

Open
blackflagking opened this issue Nov 21, 2019 · 1 comment
Open

home.vue反复跳转至登录界面,求解? #26

blackflagking opened this issue Nov 21, 2019 · 1 comment

Comments

@blackflagking
Copy link

觉得您的逻辑写的没错啊!可是为什么在订单页面(order.vue)中已经登录,且使用Chrome查看localstorage也已经存储进入了username的值,但是当从订单页面跳转至home页面时仍然反复出现,重复提示登录现象!!!!求解?????

@blackflagking
Copy link
Author

问题已经解决了!
async userInfo中
// let user_info = await AdminModel.findOne({id: req.session.admin_id}, 'username id avatar status create_time');
let user_info = await AdminModel.findOne({id: req.session.user_id}, 'username id avatar status

之前赋值一直是user_id,我pull的时候,猜测可能是博主正在调试后端,更改成了admin_id。忘记改了回来,导致无法获取数据库信息,一直反复登录!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant