QQ小程序加群聊代码教程

文章前言

QQ小程序中添加群聊方法,以下具体功能页面为例 样式可自行更改。PS:需要注意的是QQ小程序中添加群最多为十个

所需代码

qml页面代码:

<button class="qun-button" bindtap="Setting" open-type="openGroupProfile" group-id="765145855"> <text>官方群聊</text> </button>

qss页面代码:

.qun-button{ display: flex; align-items: center; justify-content: center; width:476rpx; height:86rpx; font-size:32Rpx; font-family:PingFang SC; font-weight:bold; color:rgba(102,70,0,1); background:linear-gradient(0deg,rgba(55, 211, 165),rgba(122, 225, 225)); border-radius:43rpx; margin-bottom: 35rpx; }

添加完这些具体页面我们还需要全局的app.json添加以下代码:

"groupIdList":["765145855"]
© 版权声明
THE END
觉得文章还不错?那就点个赞呗!
点赞1赞赏 分享
评论 共2条

请登录后发表评论