1. 公众号配置接入

1.1. 账号绑定

image-20200424140740784

1.2. 系统访问

1.2.1. 菜单式

通过系统配置后同步

image-20200424140916262

客户绑定

  • 菜单链接配置
url?cctag=4&ctid=13

例:

image-20200424151346192

  • 访问时

image-20200424151637020

员工登陆系统

  • 菜单

同上,不要cctag和ctid即可。

  • 访问

image-20200424151752296

1.2.2. URI链接式

  • 格式
# 1.固定内容
https://open.weixin.qq.com/connect/oauth2/authorize?appid=你的微信管理后台ID&redirect_uri=
# 2.redirect_uri根据系统确定,内容为JavaScript的
encodeURIComponent("http://域名/wxmain")
# 3.固定内容
&response_type=code&scope=snsapi_userinfo&state=gzh.菜单state[可选自定义透明参数]
# 3.1 state=gzh.菜单state[可选自定义透明参数]
如:可用于门店类二维码,确定门店,最好不要太长,限制20个字符以内最好。格式:"~键1=值1[&键2=值2]" ,由于需要对等号转码,所以实际上要如下书写:
"&state=gzh.菜单state~键1%3D值1[&键2=值2]"
# 4.固定内容 
&connect_redirect=1#wechat_redirect
  • 举例:
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx1a04d23034f87se&redirect_uri=http%3A%2F%2Fwww.baidu.com%2Fwxmain&response_type=code&scope=snsapi_userinfo&state=gzh.autostate69~dpid%3D5&connect_redirect=1#wechat_redirect

1.3. 客户消息处理

格式: [https://www.domain.cn/wechat/portal?appid=[你的微信ID](https://www.domain.cn/wechat/portal?appid=[你的微信ID)\]

注意需要带appid

image-20200424141239219

1.4. 附

需要说明的是,"菜单state"是通过SQL查询的wxs_code值,你的微信ID 可以通过下面SQL 查询

-- 查你的微信ID
select wx_id [你的微信ID],wx_title,wx_code from ebs_kernel.dbo.pub_weixin
-- 根据微信ID,查找菜单对应的state
select wxs_id,wxs_code [菜单state],wxs_caption,wxs_value,wxs_sub 
from ebs2java.dbo.mps_weixinstate 
where wxs_cmpid=1 and wxs_auto=1 and wxs_wxid=[你的微信ID]

results matching ""

    No results matching ""