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

(小建议)API接口/user/userInfo 用户验证这块没登录直接访问会把后端的错误信息输出到前端来 #41

Open
guoChopper opened this issue Aug 26, 2018 · 0 comments

Comments

@guoChopper
Copy link

加个捕获或者
var userInfo=null;
userInfo=req.session?req.session.userInfo:userInfo;
if(userInfo){
responseClient(res,200,0,'用户验证通过',userInfo);
}else{
responseClient(res,200,1,'请重新登录');
}

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