微信公众号接口
域名:https://ewshy.cn/app/index.php?i=43&c=entry&m=ai_huanlian78542_web
前端要抓取一下,i,c,m参数,作为全局变量给后续接口用
前端用户登录获取微信code
访问接口:
https://ewshy.cn/app/index.php?i=43&c=entry&do=login&m=ai_huanlian78542_web
返回:https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf58bfde06824348e&redirect_uri=&response_type=code&scope=snsapi_userinfo&state=we7sid-3746aa61a0875e22f322f9a0fa12d9bd#wechat_redirect
把返回的参数中,redirect_uri传递你要跳转的页面url,记得转码。
然后直接访问跳转这个链接
根据上个数据,你能获取到code
然后把code参数,传递到“用户注册/用户登录”接口。
只有微信公众号需要传递获取的微信code参数,用户名称和头像参数不需要传。
这是微信公众号接口
其他接口发送参数和接受参数和小程序一样,就是把url的值放到链接
https://ewshy.cn/app/index.php?i=43&c=entry&m=ai_huanlian78542_web&do=index&inc=放到这里来