From 0c0d0b8d29e9aef360ccde4f2128afff971e5fbd Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Thu, 25 Mar 2021 17:06:40 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/page/index/logo.vue |   66 ++++++++++++++++++++++----------
 1 files changed, 45 insertions(+), 21 deletions(-)

diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue
index 7e1c2a3..8d2cb22 100644
--- a/src/page/index/logo.vue
+++ b/src/page/index/logo.vue
@@ -269,6 +269,14 @@
 import Hls from "hls.js";
 import Recorder from "js-audio-recorder";
 
+var newAxios = axios.create({
+  baseURL: "https://web.byisf.com:18000",
+  withCredentials: false,
+  headers: {
+    "Content-type": "application/x-www-form-urlencoded",
+  },
+});
+
 export default {
   name: "logo",
   data() {
@@ -366,7 +374,6 @@
           url: "/api/blade-jfpts/alarm/alarm/selecttx?id=" + that.deviceId,
           method: "post",
         }).then(function (response) {
-          console.log(response, 11111111);
           var userId = JSON.parse(
             window.localStorage.getItem("物联网安保云服务平台-userInfo")
           ).content.user_id;
@@ -387,7 +394,37 @@
               that.peopleName = that.form.oneContacts;
               that.peoplePhone = that.form.onePhone;
               that.dialogTableVisible = true;
-              Recorder.getPermiRecorderssion().then(() => {});
+              // Recorder.getPermiRecorderssion().then(() => {});
+
+              newAxios
+                .post(
+                  "/api_control",
+                  {},
+                  {
+                    params: {
+                      param: JSON.stringify({ PktType: "GetAccessToken" }),
+                    },
+                  }
+                )
+                .then((res) => {
+                  newAxios
+                    .get(
+                      `https://web.byisf.com:18000/GetPlayUrl?deviceCode=${that.form.serialNumber}&chl=${that.form.channelNumber}`
+                    )
+                    .then((result) => {
+                      axios({
+                        method: "post",
+                        url: `/api/blade-jfpts/rvideo/rVoid`,
+                        timeout: 600000,
+                        params: {
+                            sourcePath: result.data.data.flv,
+                            jid: that.form.id,
+                        },
+                      }).then((resdata) => {
+                      });
+                    });
+                });
+
               that.ofX = null;
               that.ofY = null;
 
@@ -604,14 +641,6 @@
 
     // 视频通话打开关闭事件
     openRealVideoBox() {
-      var newAxios = axios.create({
-        baseURL: "https://web.byisf.com:18000",
-        withCredentials: false,
-        headers: {
-          "Content-type": "application/x-www-form-urlencoded",
-        },
-      });
-
       newAxios
         .post(
           "/api_control",
@@ -767,7 +796,7 @@
     },
 
     //启动websocket
-    websocketStart(){
+    websocketStart() {
       if (!window.WebSocket) {
         window.WebSocket = window.MozWebSocket;
       }
@@ -778,27 +807,22 @@
         //http
         // window.socket = new WebSocket("ws://localhost:9034/websocket");
 
-        window.socket.onmessage = function (event) {
-        };
+        window.socket.onmessage = function (event) {};
 
-        window.socket.onopen = function (event) {
-        };
+        window.socket.onopen = function (event) {};
 
-        window.socket.onclose = function (event) {
-        };
+        window.socket.onclose = function (event) {};
       } else {
         console.log("WebSocket连接没有建立成功!!");
       }
 
       setTimeout(function () {
-
         window.clearTimeout(window.websockPing);
 
-        if(!window.WebSocket){
+        if (!window.WebSocket) {
           return;
         }
-        if(window.socket.readyState == WebSocket.OPEN){
-
+        if (window.socket.readyState == WebSocket.OPEN) {
           var userId = JSON.parse(
             window.localStorage.getItem("物联网安保云服务平台-userInfo")
           ).content.user_id;

--
Gitblit v1.9.3