企业管理员可在“企业微信管理后台->客户联系->加客户->加入群聊”中完成「加入群聊」二维码和「加入群聊」按钮两种入群方式的创建和配置,其中「加入群聊」按钮需要开发者做简单的开发配置,开发者可按照以下文档将按钮配置到企业的小程序中。
微信iOS系统V8.0.6和安卓系统V8.0.3及以上版本的用户,可直接在小程序内长按识别入群二维码,之前版本的用户仍需通过接收服务通知获取入群方式。
点击查看官方文档 - 在小程序中加入群聊 https://developer.work.weixin.qq.com/document/path/93884
1.在mainfest.jso中引入插件
"plugins" : {
"materialPlugin" : {
"version" : "1.0.5",
"provider" : "wx4d2deeab3aed6e5a"
}
}
位置如下
"mp-weixin" : {
"appid" : "wx123456789",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true,
"plugins" : {
"materialPlugin" : {
"version" : "1.0.5",
"provider" : "wx4d2deeab3aed6e5a"
}
}
},
如图
2.在pages.json中引入组件
"usingComponents": {
"cell":"plugin://materialPlugin/cell"
}
位置如下
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app",
"usingComponents": {
"cell":"plugin://materialPlugin/cell"
}
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
}
如图
3.在页面中放入组件
<cell :startmessage='startmessage' :completemessage="completemessage"
url='https://work.weixin.qq.com/gm/123456' />
如图