天天看點

微信掃描二維碼,實作自動登入

https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe49318eb604cf00b&redirect_uri=

http://hichinamobile.xicp.net/security/wx/record/toAddPage.do&

response_type=code&scope=snsapi_base&state=STATE#wechat_redirect

将上面的URL,生成二維碼,然後微信掃描,即可實作自動登入,登入後,根據使用者資訊展示頁面。

1. 如果直接将http://hichinamobile.xicp.net/security/wx/record/toAddPage.do 生成二維碼,無法知道掃描的使用者資訊。但是微信開發中要求的路徑生成二維碼,可以實作Userid的傳遞。

繼續閱讀