-
Notifications
You must be signed in to change notification settings - Fork 179
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
页面跳转 #6
Comments
不太明白你说的意思哦。 |
本来是想问如果我有多个页面,怎么能checkLogin(demo里是没cookie跳login有cookie跳info)。现在用的笨办法是每个页面判断没cookie跳login。不知道有没有更好的解决方法~ |
另一个问题是,cookie里面设置的token是怎么获取的呢...之前用php的话session是后端自己处理完毕。
|
@fisherwise 一个域名下的所有页面的cookie是共享的,多个页面也没关系吧。 |
就是说后端api自己维护一个表? |
我说的token只是打个比方,简单的登录的话就是后端验证账号密码没问题后,就给客户端设置一个cookie就行了(这个cookie就是token)。客户端来判断是否存在这个cookie就ok,在登录后调用api都要带上这个token和user_id等,否则别人手动加了个cookie就可以免登录调到用户信息了。 |
get~谢谢大佬w |
如果有多余两个页面的话要怎么操作跳转...?
The text was updated successfully, but these errors were encountered: