diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index 40ae657..a5d91f8 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -73,9 +73,10 @@ export const transform: AxiosTransform = { switch (code) { case ResultEnum.TIMEOUT: timeoutMsg = t('sys.api.timeoutMessage'); - const userStore = useUserStoreWithOut(); - userStore.setToken(undefined); - userStore.logout(true); + //请求超时,不再退出登录。 + // const userStore = useUserStoreWithOut(); + // userStore.setToken(undefined); + // userStore.logout(true); break; default: if (message) { diff --git a/src/views/site/common/video/videojs/video.vue b/src/views/site/common/video/videojs/video.vue index 9aa596b..11235db 100644 --- a/src/views/site/common/video/videojs/video.vue +++ b/src/views/site/common/video/videojs/video.vue @@ -68,69 +68,69 @@ function init(){ player.value = playerMain; - playerMain.ready(function() { - // playerMain.controlBar.addChild('TitleBar', { - // // text: '快退', - // el: videojs.createEl('button', { - // title: '快退十秒', - // className: 'vjs-icon-previous-item vjs-fast-replay-button vjs-control vjs-button', - // innerHTML: '快退' - // }), - // clickHandler: function() { - // playerMain.currentTime(playerMain.currentTime() - 10); - // } - // }); + // playerMain.ready(function() { + // // playerMain.controlBar.addChild('TitleBar', { + // // // text: '快退', + // // el: videojs.createEl('button', { + // // title: '快退十秒', + // // className: 'vjs-icon-previous-item vjs-fast-replay-button vjs-control vjs-button', + // // innerHTML: '快退' + // // }), + // // clickHandler: function() { + // // playerMain.currentTime(playerMain.currentTime() - 10); + // // } + // // }); - // console.log('videojs ->',videojs); + // // console.log('videojs ->',videojs); - // let buttonList:Array = []; - let currentSources:any = playerMain.currentSources(); - // currentSources?.forEach(x => { - // buttonList.push(``); - // }) - let currentSource = currentSources[0]; + // // let buttonList:Array = []; + // let currentSources:any = playerMain.currentSources(); + // // currentSources?.forEach(x => { + // // buttonList.push(``); + // // }) + // let currentSource = currentSources[0]; - let _playerMain: any = playerMain; - let _videojs: any = videojs; + // let _playerMain: any = playerMain; + // let _videojs: any = videojs; - return; - _playerMain.controlBar.addChild('Button', { - text: '选择清晰度', - el: _videojs.createEl('button', { - title: '选择清晰度', - className: 'vjs-control', - innerHTML: ` - - ` - }), - clickHandler: function() { - let el:any = playerMain.el().querySelector('.changeDefinitionBtn'); - let currentSources:any = playerMain.currentSources(); - let oldUrl = currentSources[0]?.src; - if(el){ - let suffix = el.options[el.options.selectedIndex].value; - let url = el.dataset.url; - if(url){ - if(suffix){//空的情况下是原画 - url = url.replaceAll('.m3u8',''); - url += suffix + '.m3u8'; - } - if(oldUrl != url){//地址完全一样,别切了,, - playerMain.src([{ type: 'application/x-mpegURL', src: url}]); - playerMain.play(); - } - } - } - } - }); - }); + // return; + // _playerMain.controlBar.addChild('Button', { + // text: '选择清晰度', + // el: _videojs.createEl('button', { + // title: '选择清晰度', + // className: 'vjs-control', + // innerHTML: ` + // + // ` + // }), + // clickHandler: function() { + // let el:any = playerMain.el().querySelector('.changeDefinitionBtn'); + // let currentSources:any = playerMain.currentSources(); + // let oldUrl = currentSources[0]?.src; + // if(el){ + // let suffix = el.options[el.options.selectedIndex].value; + // let url = el.dataset.url; + // if(url){ + // if(suffix){//空的情况下是原画 + // url = url.replaceAll('.m3u8',''); + // url += suffix + '.m3u8'; + // } + // if(oldUrl != url){//地址完全一样,别切了,, + // playerMain.src([{ type: 'application/x-mpegURL', src: url}]); + // playerMain.play(); + // } + // } + // } + // } + // }); + // }); } diff --git a/src/views/site/common/video/videojs/viewPage.vue b/src/views/site/common/video/videojs/viewPage.vue index c249a0b..b133eb1 100644 --- a/src/views/site/common/video/videojs/viewPage.vue +++ b/src/views/site/common/video/videojs/viewPage.vue @@ -6,7 +6,7 @@ -
+
@@ -161,10 +161,9 @@ onMounted(() => { getSuibi(); getKcxx(); //记录播放日志 - - isError.value = true; - }else{ isError.value = false; + }else{ + isError.value = true; } }); @@ -203,13 +202,17 @@ function changeLive(item:any){ console.log(`🚀 --------------------------------------------------------------------------------🚀`); console.log(`🚀 ~ file: viewPage.vue:164 ~ changeLive ~ mainVideo?.player:`, mainVideo?.player); console.log(`🚀 --------------------------------------------------------------------------------🚀`); - let buttonEl = mainVideo?.player.el().querySelector('.changeDefinitionBtn'); + // let buttonEl = mainVideo?.player.el().querySelector('.changeDefinitionBtn'); //赋值原URL - if(buttonEl){ - buttonEl.dataset.url = url; - } + // if(buttonEl){ + // buttonEl.dataset.url = url; + // } curentPlayerVideo.value = item; + // nextTick(() => { + //增加自动播放功能 + //mainVideo?.player?.play(); + // }) } function mainVideoLoadEnd(player){ diff --git a/src/views/site/common/video/videojs/viewPage2.vue b/src/views/site/common/video/videojs/viewPage2.vue index 5feaff4..aef47c7 100644 --- a/src/views/site/common/video/videojs/viewPage2.vue +++ b/src/views/site/common/video/videojs/viewPage2.vue @@ -194,11 +194,11 @@ function changeLive(item:any){ console.log(`🚀 --------------------------------------------------------------------------------🚀`); console.log(`🚀 ~ file: viewPage.vue:164 ~ changeLive ~ mainVideo?.player:`, mainVideo?.player); console.log(`🚀 --------------------------------------------------------------------------------🚀`); - let buttonEl = mainVideo?.player.el().querySelector('.changeDefinitionBtn'); + // let buttonEl = mainVideo?.player.el().querySelector('.changeDefinitionBtn'); //赋值原URL - if(buttonEl){ - buttonEl.dataset.url = url; - } + // if(buttonEl){ + // buttonEl.dataset.url = url; + // } curentPlayerVideo.value = item; }