瀏覽代碼

提交语音通话

wangming 2 月之前
父節點
當前提交
c4a0d6a77d
共有 1 個文件被更改,包括 12 次插入11 次删除
  1. 12 11
      src/components/component/alarModel.vue

+ 12 - 11
src/components/component/alarModel.vue

@@ -152,11 +152,12 @@ export default {
                     //         status: 1,
                     //     },
                     // });
-                    that.voipDevices.push({
+                    that.voipDevices[voipDevices.length] = {
                         sn,
                         modelId,
                         status: 1,
-                    });
+                    };
+
                     that.sn = sn;
                     that.modelId = modelId;
                     that.status = 1;
@@ -227,18 +228,16 @@ export default {
                         icon: "none",
                     });
                     const key = `voipDevices[${voipDevices.length}]`;
-                    // that.setData({
-                    //     [key]: {
-                    //         sn,
-                    //         modelId,
-                    //         status: 1,
-                    //     },
-                    // });
-                    that.voipDevices.push({
+                    // that.key = {
+                    //     sn,
+                    //     modelId,
+                    //     status: 1,
+                    // };
+                    that.voipDevices[voipDevices.length] = {
                         sn,
                         modelId,
                         status: 1,
-                    });
+                    };
                     that.gotoCallPage();
                 },
                 fail(err) {
@@ -367,7 +366,9 @@ export default {
             wx.hideLoading();
         },
         async call(e) {
+            console.log(`call`, "走到了call方法");
             const { sn, idx, type: roomtype } = e;
+            console.log(e, this.contactList, 888870);
             const target = this.contactList.find((item) => item.id === sn);
             // const target = this.contactList[idx];
             const apiTypeName = this.apiTypesValid[this.apiTypeIndex];