1.小程序调用wx.login()获取code(可以同时传输获取手机号的code)
2.调用后端登录接口,将code作为参数传给后端(传输获取手机号的code)
3.后端通过code调用微信后端登录接口换取openid(通过电话code获取用户手机号)
4.后端通过Openid查询数据库,若查询到用户数据则返回完成登录流程,若查询不到则走注册流程,完成后再返回用户数据
小程序登录
https://juejin.cn/post/7126553599445827621
https://blog.csdn.net/irisMoon06/article/details/128527706
https://blog.csdn.net/haidong55/article/details/124559209
https://blog.csdn.net/qq_42625428/article/details/116263032
https://www.cnblogs.com/dashucoding/p/9917371.html
标签:code,登录,微信,流程,blog,csdn,details,net From: https://www.cnblogs.com/On1on/p/17449964.html