调用以下接口出现:Uncaught TypeError: wx.openCustomerServiceChat is not a function
wx.openCustomerServiceChat({
corpid: '', // 企业微信客服需填企业ID,普通公众号客服留空
url: '', // 可选:客服会话的欢迎语页面链接(需在公众号域名下)
success: function(res) {
console.log('唤起客服会话成功', res);
},
fail: function(res) {
console.error('唤起客服会话失败', res);
// 兼容处理:失败时引导用户手动进入客服
alert('唤起客服失败,请点击公众号菜单【联系客服】');
}
});

你好,公众号有openCustomerServiceChat接口吗?提供下文档地址