y595705120 il y a 2 semaines
Parent
commit
eeac19c1f7

+ 6 - 0
src/components/httpServer/request.js

@@ -44,6 +44,12 @@ service.interceptors.response.use(
     } else if( res.code == 401){
       localStorage.removeItem('token')
       localStorage.removeItem('uid')
+      Message({
+        message: '用户被踢下线,请重新登入',
+        type: 'error',
+        duration:  5000
+      })
+      window.location.href  = '/'
       // return Promise.reject( res )
       return Promise.resolve( res )
     }else {

+ 5 - 5
src/containers/center/play/components/media.vue

@@ -59,7 +59,7 @@ import { config } from "shelljs";
     },
     created() {
       this.timer = setInterval(this.tick, 5 * 1000);
-      this.startMonitor();
+      // this.startMonitor();
       this.updateBlurtime()
     },
     methods: {
@@ -163,10 +163,10 @@ import { config } from "shelljs";
         if( this.media.isFinish )  return;
 
         if( !force && !this.onPlay ) return;
-        if( this.onblurTime < Date.now() ){
-          this.tickWait();
-          return
-        }
+        // if( this.onblurTime < Date.now() ){
+        //   this.tickWait();
+        //   return
+        // }
         // 主动暂停
         let myPlayer = this.$refs.videoPlayer.player;
         let curTimes = parseInt(myPlayer.currentTime());