文章目录
- 1. 获取code
- 2. 返回报文解析
- 3. 源码
1. 获取code
前端请求微信获取code
回调信息
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd1f5b7f23b72428a&redirect_uri=http%3A%2F%2F192.168.43.122%3A80&response_type=code&scope=snsapi_userinfo&state=STATE&uin=MjYwNDQ1OTc2Mg%3D%3D&key=fe1a5aa8d5ddb85fc4c56f8901050718b971af1413d2eb6d63288cb6ae121f8016b4e41276ab17e6475f22696e1a3660&pass_ticket=DZtiJYi0/pL4eyJiS3bk/daNoj4vtkxJy4cdlN50ApgLWmpeMSSFoG0/xBOo6gNi+wy/7CnZFjYBMt+xfeCevQ==
2. 返回报文解析
返回结果: {data: {…},status: 200, data: content: headimgurl: "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJXE3Zz0U5edVRhmckrE2q5Nw1lGQia5fAbU0UecgPx4DBwAaobibNYVAo9hjgUxxT75xLEDVoAibHeA/132"nickname: "gblfy"openid: "oD8nF5jpNF9KXU_j49uvqOPVdiEU"privilege: []headers: {content-type: "application/json;charset=UTF-8"}request: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 50000, withCredentials: false, disableHttp2: false, …}status: 200statusText: ""__proto__: Object
Home.vue?76f2:72 openid->oD8nF5jpNF9KXU_j49uvqOPVdiEU
3. 源码
- 前端
- 后端