每次進入頁面會進行兩次跳轉(zhuǎn)加載,體驗非常差
在做微信公眾平臺網(wǎng)頁授權(quán)時,發(fā)現(xiàn)每次請求授權(quán)鏈接
https://open.weixin.qq.com/connect/oauth2/authorize?appid=xxx&redirect_uri=xxx&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect
時都會重定向鏈接redirect_uri都會自動請求兩次,由于并發(fā)導(dǎo)致了一些問題,
后來發(fā)現(xiàn)只要加個屬性就不會有這個問題了。&connect_redirect=1
https://open.weixin.qq.com/connect/oauth2/authorize?appid=xxx&redirect_uri=xxx&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect
主要是微信開發(fā)者文檔里沒提到這個參數(shù) 自己加上就好了 &connect_redirect=1