We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我当前页面里有一些参数,现在需要某些原因跳到别的页面再回来,比如第三方登录,登陆成功再重定向回来。我回来以后数据就没有了
如果还想保留住那些数据,前提是数据不敏感,可以加到当前的url里面,类似url?xxx=yyy这种。因为第三方登陆,有redirect_uri这个重定向回来的路径参数,那么我们就可以把当前的url,加上我们需要的参数,传给redirect_uri,我们跳回来的时候,就依然可以拿到跳转前的值了
url
url?xxx=yyy
redirect_uri
let redirectUrl = window.location.href + '&type=' + type + '&cb=' + ctime; redirectUrl = encodeURIComponent(redirectUrl) url = "https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=" + appId + "&redirect_uri=" + redirectUrl
The text was updated successfully, but these errors were encountered:
No branches or pull requests
背景
我当前页面里有一些参数,现在需要某些原因跳到别的页面再回来,比如第三方登录,登陆成功再重定向回来。我回来以后数据就没有了
方法
如果还想保留住那些数据,前提是数据不敏感,可以加到当前的
url
里面,类似url?xxx=yyy
这种。因为第三方登陆,有redirect_uri
这个重定向回来的路径参数,那么我们就可以把当前的url
,加上我们需要的参数,传给redirect_uri
,我们跳回来的时候,就依然可以拿到跳转前的值了伪代码
The text was updated successfully, but these errors were encountered: