接入公众号,需要配置的信息:

参数获取地址:

https://mp.weixin.qq.com/cgi-bin/loginpage?url=%2Fadvanced%2Fadvanced%3Faction%3Ddev%26t%3Dadvanced%2Fdev%26token%3D319847332%26lang%3Dzh_CN


公众号配置:

1.获取公众号原始id:gh_2************

2.获取开发者ID(AppID):wx36f2e6b************

3.获取开发者密码(AppSecret):b67480feabbd*************

4.设置IP白名单:47.1***********

5.拼接和添加公众号菜单(URL):https://open.weixin.qq.com/connect/oauth2/authorize?appid={填写公众号appid}&redirect_uri=https%3A%2F%2F{网页的域名}%2Fweixin%2Foauth%3Fid%3D1%26gzh%3D{填写公众号原始ID}9%26type%3Duser_center&response_type=code&scope=snsapi_userinfo&state=#wechat_redirect


6.公众号功能设置

 添加业务域名:***.cdrkt.com   

 添加JS接口安全域名:***.cdrkt.com   

 添加网页授权域名:***.cdrkt.com   


项目参数定义:

3333333.png

define('GZH_ACCESS_TOKEN',true);//是否使用公众号access_token接口访问令牌---snsapi_userinfo=>false,true=>base

&scope=snsapi_base===公众号之前未使用过define('GZH_ACCESS_TOKEN',true);

&scope=snsapi_userinfo====公众号之前已使用过,不知道access_token的情况下define('GZH_ACCESS_TOKEN',false);


数据表:**_vx_gzh===id设置为1,配置前4个参数

333.png