声明:本站文章均为作者个人原创,图片均为实际截图。如有需要请收藏网站,禁止转载,谢谢配合!!!

企业管理员可在“企业微信管理后台->客户联系->加客户->加入群聊”中完成「加入群聊」二维码和「加入群聊」按钮两种入群方式的创建和配置,其中「加入群聊」按钮需要开发者做简单的开发配置,开发者可按照以下文档将按钮配置到企业的小程序中。
微信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"
            }
        }
    },

如图

八点博客 badianboke.com

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": {}
}

如图

八点博客 badianboke.com

3.在页面中放入组件

<cell :startmessage='startmessage' :completemessage="completemessage"
    url='https://work.weixin.qq.com/gm/123456'  />

如图

八点博客 badianboke.com