非微信环境网页如何拉起微信登录
前言:微信网页登录文档 A https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html B https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html 1、 检测网页环境 https://www.cnblogs.com/wangtz/p/12538850.html 2、 若pc调用 上面B的API即可实现 3 、若h5调用 则需要调以下的链接格式 https://open.weixin.qq.com/sns/explorer_broker?appid=wx62ba64796e13f092&redirect_uri=https%3A%2F%2Faccount.xiaomi.com%2Fpass%2Fsns%2Flogin%2Fload&response_type=code&scope=snsapi_userinfo&state=STATE_685333#wechat_redirect 4、小米案例 a、登录链接 https://account.xiaomi.com/pass/serviceLogin?callback=https%3A%2F%2Fsupport.kefu.mi.com%2Fsts%3Fsign%3DjorTe2AgW3OD2juZGL2HJC73mjQ%253D%26followup%3Dhttp%253A%252F%252Fsupport.kefu.mi.com%252Fpage%252Findex%252Fv2%253Ftag%253Dcn%2526token%253DY24ud2ViLm1pLmh0dHBzLm1vYmlsZSNyZWZlcmVy%2526productId%253D9452%2526goodsId%253D2191000003&sid=mcc_chat_fe b、pc拦截 https://open.weixin.qq.com/connect/qrconnect?appid=wxa21de3acc0d5e79b&redirect_uri=https%3A%2F%2Fsns.account.xiaomi.com%2Fpass%2Fsns%2Flogin%2Fload&response_type=code&scope=snsapi_login&state=STATE_889829#wechat_redirect c、h5的拦截链接 https://open.weixin.qq.com/sns/explorer_broker?appid=wx62ba64796e13f092&redirect_uri=https%3A%2F%2Faccount.xiaomi.com%2Fpass%2Fsns%2Flogin%2Fload&response_type=code&scope=snsapi_userinfo&state=STATE_685333#wechat_redirect 附:参考案例博客 https://blog.csdn.net/tiantian082054/article/details/90711900 https://www.jianshu.com/p/a1f357152dca 备注:主来自一位社区开发者的问题解决的整理:https://developers.weixin.qq.com/community/develop/doc/0004caea6a836871524a7402156000