Browse Source

fix:bug修复

liyangbin 2 years ago
parent
commit
9fc4415510
4 changed files with 16 additions and 6 deletions
  1. 11 2
      src/components/sideMenu.vue
  2. 1 1
      src/router/index.js
  3. 3 2
      src/views/Create.vue
  4. 1 1
      src/views/Login.vue

+ 11 - 2
src/components/sideMenu.vue

@@ -54,7 +54,7 @@ export default {
       if (userStore().user.userName) {
         return userStore().user.userName.substr(0, 1).toUpperCase()
       }
-    }
+    }  
   },
   computed:{
     path () {
@@ -69,6 +69,15 @@ export default {
       }  else {
         return this.$route.path
       }
+    },
+    roles(){
+      if (parseInt(this.role) === 1) {
+        return 'Super admin'
+      } else if (parseInt(this.role) === 2){
+        return 'Team admin'
+      } else {
+        return 'Team member'
+      }
     }
   }
 }
@@ -83,7 +92,7 @@ export default {
           <p>{{ userName }}</p>
           <p>{{ email }}</p>
         </div>
-        <div class="type">{{ parseInt(role) === 1 ? 'Super admin' : 'Team admin' }}</div>
+        <div class="type">{{ roles }}</div>
       </div>
       <el-menu :default-active="path" active-text-color="#1460F3" text-color="#232A40" router>
         <el-menu-item index="/dashboard">

+ 1 - 1
src/router/index.js

@@ -9,7 +9,7 @@ const router = new VueRouter({
   routes: [
     {
       path: "/",
-      redirect: '/dashboard'
+      redirect: '/login'
     },
     {
       path: "/login",

+ 3 - 2
src/views/Create.vue

@@ -84,12 +84,13 @@ export default {
       this.passwordError = false
       this.passwordConfirmError = false
       if (this.checked) {
-        this.loading = true
         this.$refs['ruleForm'].validate((valid) => {
           if (valid) {
+            this.loading = true
             if (this.$route.query.teamIds) {
               this.teamIds = this.$route.query.teamIds.split(',')
             }
+            let teamIds = this.teamIds || null
             post('/pdf-tech/vppMember/create', {
               email: this.ruleForm.email,
               verifyCode: this.ruleForm.verificationCode,
@@ -99,7 +100,7 @@ export default {
               industry: this.ruleForm.industry,
               company: this.ruleForm.company,
               code: this.$route.query.code,
-              teamIds: this.teamIds
+              teamIds: teamIds
             }).then((res) => {
               this.loading = false
               if (

+ 1 - 1
src/views/Login.vue

@@ -221,7 +221,7 @@ export default {
           </button>
         </el-form-item>
         <div class="flex justify-end">
-          <router-link to="/create" class="text-12px text-[#1460F3]">
+          <router-link to="/Create" class="text-12px text-[#1460F3]">
             Create account
           </router-link>
         </div>