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({