reghao 2 سال پیش
والد
کامیت
6896d5bc56
3فایلهای تغییر یافته به همراه8 افزوده شده و 8 حذف شده
  1. 1 1
      src/utils/request.js
  2. 1 1
      src/views/home/Video.vue
  3. 6 6
      src/views/sso/login.vue

+ 1 - 1
src/utils/request.js

@@ -94,7 +94,7 @@ instance.interceptors.response.use(
         case 401:
           // 返回401 清除token信息并跳转到登陆页面
           console.log('401 错误...')
-          store.commit('delToken')
+          // store.commit('delToken')
           router.replace({
             path: '/sso/login',
             query: {

+ 1 - 1
src/views/home/Video.vue

@@ -17,7 +17,7 @@
       </el-col>
       <el-col :md="12">
         <!--猜您喜欢-->
-        <recommend />
+<!--        <recommend />-->
       </el-col>
     </el-row>
     <el-row>

+ 6 - 6
src/views/sso/login.vue

@@ -160,17 +160,17 @@ export default {
     const token = Vue.$cookies.get('token')
     if (token !== null) {
       this.$router.push('/')
-      return
-    }
-
-    const user = getUserInfo()
-    if (user === null) {
+    } else {
       this.getCaptcha()
       this.getPubkey()
       this.smsLockObj = new SmsLock('LOGIN_SMS', 60)
+    }
+
+    /*const user = getUserInfo()
+    if (user !== null) {
     } else {
       this.$router.push('/')
-    }
+    }*/
   },
   destroyed() {
     this.smsLockObj.clearInterval()