修改对讲功能

main
jinna 2 years ago
parent d7862fcfdc
commit 673048db33
  1. 1
      public/js/xyDemoCommon.js
  2. 16
      src/views/dispatch/index.vue

@ -43,6 +43,7 @@ client.registStateChange.on((para) => {
default: default:
break; break;
} }
alert("注册状态:" + stateStr);
mylog("onRegitStateChange: " + stateStr); mylog("onRegitStateChange: " + stateStr);
}); });

@ -1109,6 +1109,7 @@ export default {
// }, // },
getGroupPeo(data){ getGroupPeo(data){
let arr = []
getGroupUser({ getGroupUser({
curPage:1, curPage:1,
pageRows:100, pageRows:100,
@ -1127,9 +1128,17 @@ export default {
} }
}) })
}) })
let tmp = dataList.find(item => item.online) dataList.map(item => {
console.log('tmp ==================>', tmp) if(item.online){
if(tmp){ console.log(item)
arr.push({
id:item.id,
name:item.name
})
}
})
if(arr.length !== 0){
this.$confirm('确定要邀请该群组吗?', '提示', { this.$confirm('确定要邀请该群组吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -1152,6 +1161,7 @@ export default {
client.startIntercom(groupNumber,mediaControl).then((conf) => { // client.startIntercom(groupNumber,mediaControl).then((conf) => { //
this._intercom = conf; this._intercom = conf;
setListener(); setListener();
this.inviteList = arr
mylog("startintercom success"); mylog("startintercom success");
}).catch((error) => { }).catch((error) => {
mylog("startIntercom fail: " + JSON.stringify(error)); mylog("startIntercom fail: " + JSON.stringify(error));

Loading…
Cancel
Save