1.使用wx.login(Object object)获取调用接口获取登录凭证(code)
2.使用获取到的code 发送给auth.code2Session获取openid和session_key
3.<button>设置open-type="getUserInfo" bindgetuserinfo="getUserInfo" 点击询问用户授权
4.使用wx.checkSession 判断登陆状态是否过期
1.使用wx.login(Object object)获取调用接口获取登录凭证(code)
2.使用获取到的code 发送给auth.code2Session获取openid和session_key
3.<button>设置open-type="getUserInfo" bindgetuserinfo="getUserInfo" 点击询问用户授权
4.使用wx.checkSession 判断登陆状态是否过期
本文标题:微信小程序登陆授权
本文链接:https://www.haomeiwen.com/subject/nnehyctx.html
网友评论