yuedefeng %!s(int64=6) %!d(string=hai) anos
pai
achega
de1a4ef0a5

+ 12 - 0
src/dashoo.cn/frontend_web/src/pages/index.vue

@@ -196,6 +196,18 @@
       _this.user.id = _this.authUser.Profile.Id
     },
 
+    async beforeMount () {
+      // 暂时从本地取菜单
+      let {data: menus1} = await this.$axios.get('users/getusermoduletree')
+      for (let idx in menus1) {
+        if (menus1[idx].url === '/') {
+          break
+        } else if (menus1[idx].url === '/lims/secondcenter') {
+          this.$router.push('/lims/secondcenter')
+        }
+      }
+    },
+
     methods: {
       handleClick (tab) {
         if (tab.index === '0') {

+ 10 - 3
src/dashoo.cn/frontend_web/src/pages/login.vue

@@ -154,9 +154,16 @@
                 password: this.model.password.replace(/(^\s*)|(\s*$)/g, '')
               }
             })
-            if (process.env.appclient == 'lims') {
-              this.$router.push(this.$route.query.page || '/')
-            } else if (process.env.appclient == 'cellbank') {
+            if (process.env.appclient === 'lims') {
+              let {data: menus1} = await this.$axios.get('users/getusermoduletree')
+              for (let idx in menus1) {
+                if (menus1[idx].url === '/') {
+                  this.$router.push(this.$route.query.page || '/')
+                } else if (menus1[idx].url === '/lims/secondcenter') {
+                  this.$router.push('/lims/secondcenter')
+                }
+              }
+            } else if (process.env.appclient === 'cellbank') {
               this.$router.push(this.$route.query.page || '/indexdqm')
             } else {
               this.$router.push(this.$route.query.page || '/')