|
|
@@ -116,7 +116,7 @@ export default {
|
|
|
console.log(name, sn, voipDevices, 88888888888);
|
|
|
if (!name || name.length === 0 || !sn || sn.length === 0) {
|
|
|
wx.showToast({
|
|
|
- title: "请输入授权人名称和设备dev_id",
|
|
|
+ title: "请输入授权人名称和设备clientId",
|
|
|
icon: "none",
|
|
|
});
|
|
|
return;
|
|
|
@@ -180,9 +180,9 @@ export default {
|
|
|
const { list } = await getDeviceVoIPList();
|
|
|
if (list && list.length > 0) {
|
|
|
const authorizeFlag = list.some(
|
|
|
- (item) => item.sn === this.dev_id
|
|
|
+ (item) => item.sn === this.clientId
|
|
|
);
|
|
|
- console.log("authorizeFlag:", authorizeFlag);
|
|
|
+ console.log("authorizeFlag:", list, authorizeFlag);
|
|
|
this.authorizeFlag = authorizeFlag;
|
|
|
}
|
|
|
if (typeof list === "object") {
|
|
|
@@ -369,6 +369,7 @@ export default {
|
|
|
console.log(`call`, "走到了call方法");
|
|
|
const { sn, idx, type: roomtype } = e;
|
|
|
console.log(e, this.contactList, 888870);
|
|
|
+ console.log("走到了这里了。。。。1", target);
|
|
|
const target = this.contactList.find((item) => item.id === sn);
|
|
|
// const target = this.contactList[idx];
|
|
|
const apiTypeName = this.apiTypesValid[this.apiTypeIndex];
|
|
|
@@ -381,6 +382,7 @@ export default {
|
|
|
});
|
|
|
throw Error("target can not call");
|
|
|
}
|
|
|
+ console.log("走到了这里了。。。。2");
|
|
|
const _caller = await this._caller.get();
|
|
|
console.log(`caller: `, _caller);
|
|
|
console.log(`listener: `, target);
|
|
|
@@ -490,14 +492,14 @@ export default {
|
|
|
const minutes = now.getMinutes().toString().padStart(2, "0");
|
|
|
const formattedTime = `${year}-${month}-${day} ${hours}:${minutes}`;
|
|
|
this.nowTime = formattedTime;
|
|
|
+ if (!isWmpf) {
|
|
|
+ this.getVoipDevices();
|
|
|
+ }
|
|
|
console.log("接收到消息:", topic, data);
|
|
|
});
|
|
|
},
|
|
|
},
|
|
|
beforeMount() {
|
|
|
- if (!isWmpf) {
|
|
|
- this.getVoipDevices();
|
|
|
- }
|
|
|
this.connectMQTT();
|
|
|
},
|
|
|
onHide() {
|