methods:{
// 创建电话组件
createCallComponent(phoneNum) {
if (window.callComp && !window.callComp.isDestroyed) {
return;
};
window.callComp = new UdeskCallcenterComponent({
container: document.body,
token: this.agentToken,
subDomain: this.subDomain,
showManualScreenPop: false,
onHangup: function(conversation) { // 电话挂断时执行
getCallId(conversation.call_id); // 这里调用绑定后的方法,并传入callid
window.callComp.destroy(); // 销毁电话组件
window.callComp = null; // 销毁电话组件</
Vue丨将组件 methods 内的方法绑定到 window 来调用
最新推荐文章于 2023-01-28 22:12:38 发布