1.注冊并認(rèn)證企業(yè)微信
多平臺(tái)開發(fā)企業(yè)微信客服是最好的解決方案
企業(yè)微信
2.打開微信客服
3.啟用微信客服,并添加客服賬號(hào)
4.接入場景
如果多平臺(tái)開發(fā)可以都接入
里面有步驟,按照步驟走即可(看完官方教程一定回來繼續(xù)看代碼??!)
4.1微信小程序接入
客服連接有用復(fù)制一下,然后
看教程即可
附上代碼:
wx.openCustomerServiceChat({
//企業(yè)微信的企業(yè)id
corpId: 'xxx',
extInfo: {
//客服鏈接
url: 'https://xxx'
},
success: (e) => {
console.log('e', e)
},
fail: (err) => {
console.log('err', err)
}
})
4.2app接入
接入流程和小程序類似,直接上代碼文章來源:http://www.zghlxwxcb.cn/news/detail-504887.html
let sweixin = null
plus.share.getServices(res => {
sweixin = res.find(i => i.id === 'weixin')
if (sweixin) {
sweixin.openCustomerServiceChat({
corpid: 'xxx',
url:'https://xxx'
})
} else {
// plus.nativeUI.alert('當(dāng)前環(huán)境不支持微信操作')
uni.showToast({
title: "當(dāng)前環(huán)境不支持微信操作",
icon: 'error'
})
}
}, function() {
uni.showToast({
title: "獲取服務(wù)失敗,不支持該操作。" + JSON.stringify(e),
icon: 'error'
})
})
uniapp接入客服到此結(jié)束
接下來就是繁瑣的調(diào)試調(diào)試。。。。。文章來源地址http://www.zghlxwxcb.cn/news/detail-504887.html
到了這里,關(guān)于uniapp接入微信客服聊天流程(企業(yè)微信)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!