浏览代码

云中心

hangb 7 年之前
父节点
当前提交
1aa4b25b33
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 3 1
      middleware/authenticated.js
  2. 0 1
      pages/cloudcenter/index.vue

+ 3 - 1
middleware/authenticated.js

@@ -2,7 +2,9 @@
 export default function ({ isServer, store, req, redirect }) {
   if (isServer && !req) return
 
-  if (!store.state.option.isLogin.logged) {
+  // if (!store.state.option.isLogin.logged) {
+  if (!store.state.option.isLogin.data.content.isLogin) {
+    console.log(store.state.option.isLogin.data.content.isLogin + '111')
     return redirect('/')
   }
 }

+ 0 - 1
pages/cloudcenter/index.vue

@@ -184,7 +184,6 @@
               this.secretEmail = this.getEmailArr.join('')
             }
           }
-          console.log(this.$store.state.option.userInfo.data.content)
           return this.$store.state.option.userInfo.data.content
         }
       },