要设置微信IP白名单
配置服务器地址
配置授权回调域名
获取code:
https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
![](https://img2018.cnblogs.com/blog/1136726/201911/1136726-20191115214830842-1337381441.png)
https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=
snsapi_userinfo
&state=STATE#wechat_redirect