diff --git a/public/js/xyDemoCommon.js b/public/js/xyDemoCommon.js index 5e023b5..eeb6766 100644 --- a/public/js/xyDemoCommon.js +++ b/public/js/xyDemoCommon.js @@ -43,6 +43,7 @@ client.registStateChange.on((para) => { default: break; } + alert("注册状态:" + stateStr); mylog("onRegitStateChange: " + stateStr); }); diff --git a/src/views/dispatch/index.vue b/src/views/dispatch/index.vue index 62b3402..ee92e7c 100644 --- a/src/views/dispatch/index.vue +++ b/src/views/dispatch/index.vue @@ -1109,6 +1109,7 @@ export default { // }, getGroupPeo(data){ + let arr = [] getGroupUser({ curPage:1, pageRows:100, @@ -1127,9 +1128,17 @@ export default { } }) }) - let tmp = dataList.find(item => item.online) - console.log('tmp ==================>', tmp) - if(tmp){ + dataList.map(item => { + if(item.online){ + console.log(item) + arr.push({ + id:item.id, + name:item.name + }) + } + }) + + if(arr.length !== 0){ this.$confirm('确定要邀请该群组吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -1152,6 +1161,7 @@ export default { client.startIntercom(groupNumber,mediaControl).then((conf) => { //发起群组对讲 this._intercom = conf; setListener(); + this.inviteList = arr mylog("startintercom success"); }).catch((error) => { mylog("startIntercom fail: " + JSON.stringify(error));