不管对接企业微信客服还是对接小程序客服,都需要在小程序后台先配置
1.企业微信相比较来麻烦一点,需要在后台绑定企业微信的公司id,来获取对接的客服链接
openCustomer(){//触发客服
wx.openCustomerServiceChat({
//企业微信的企业id
corpId: '',
extInfo: {
//客服链接
url:''
},
success: (e) => {
console.log('e', e)
},
fail: (err) => {
console.log('err', err)
}
})
}
2.小程序客服就在后台绑定下客服微信.并微信关注公众号客服小助手来回复信息
通过下方button按钮就可以跳转到小程序客服
<button open-type="contact" style="width: 110px;height: 60rpx;
line-height: 60rpx;margin: 0;text-align: left;padding: 0;background: #fff;color: #3085ee;">联系客服</button>