From bab72ac2526af1116e1f3af25b5b635141317699 Mon Sep 17 00:00:00 2001 From: liujun Date: Fri, 19 Jan 2024 20:44:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4debugger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/map/index.vue | 98 ++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 96c7677..fa61f10 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -1108,58 +1108,58 @@ export default { }, keepalive(token) { // 第二套方案 - requestFN( - '/map/loginOrKeepAlive', - { - } - ).then((data) => { - - }) + // requestFN( + // '/map/loginOrKeepAlive', + // { + // } + // ).then((data) => { + // + // }) }, ysVideoInit() { // 第二套方案 - var _this = this - requestFN( - '/map/loginOrKeepAlive', - { - } - ).then((data) => { - const token = data.token - var nbsp = String.fromCharCode(160) - var arr = [] - arr.length = 40 - const str = arr.fill(nbsp).join('') - const voidPath = imosPlayer.getUniqueID() - window.voidPath = voidPath - document.title = document.title + str + new Date().getTime() - _this.keepalive(token) - setInterval(_this.keepalive, 30000, token) - - window.videoWindow = 0 - imosPlayer.setLinkPort('8093') - imosPlayer - .init({ - ip: '172.14.0.54', - token: token, - title: document.title, - voidListenerPath: '\\' + voidPath - }) - .then(async(resr) => { - if (resr.ErrCode === 0) { - // imosPlayer.setLiveNetLinkMode(liveNetProtocol, liveByMS) - // imosPlayer.setReplayNetLinkMode(replayNetProtocol, replayByMS) - - // eslint-disable-next-line no-alert - console.info('登录成功') - } else { - // eslint-disable-next-line no-alert - console.info(resr.ErrMsg) - } - }) - .catch((err) => { - console.error(err) - }) - }) + // var _this = this + // requestFN( + // '/map/loginOrKeepAlive', + // { + // } + // ).then((data) => { + // const token = data.token + // var nbsp = String.fromCharCode(160) + // var arr = [] + // arr.length = 40 + // const str = arr.fill(nbsp).join('') + // const voidPath = imosPlayer.getUniqueID() + // window.voidPath = voidPath + // document.title = document.title + str + new Date().getTime() + // _this.keepalive(token) + // setInterval(_this.keepalive, 30000, token) + // + // window.videoWindow = 0 + // imosPlayer.setLinkPort('8093') + // imosPlayer + // .init({ + // ip: '172.14.0.54', + // token: token, + // title: document.title, + // voidListenerPath: '\\' + voidPath + // }) + // .then(async(resr) => { + // if (resr.ErrCode === 0) { + // // imosPlayer.setLiveNetLinkMode(liveNetProtocol, liveByMS) + // // imosPlayer.setReplayNetLinkMode(replayNetProtocol, replayByMS) + // + // // eslint-disable-next-line no-alert + // console.info('登录成功') + // } else { + // // eslint-disable-next-line no-alert + // console.info(resr.ErrMsg) + // } + // }) + // .catch((err) => { + // console.error(err) + // }) + // }) }, // keepalive(token) { // axios({