Explorar el Código

Merge branch 'master' of http://git.cc-lotus.info/service-platform/web-test

guhongwei hace 5 años
padre
commit
7b6e160acd
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      src/layout/live/head.vue

+ 3 - 2
src/layout/live/head.vue

@@ -11,7 +11,8 @@
           </p>
           <p class="username">
             <span v-if="user.uid">
-              <button type="text" style="color:blue" @click="stnmae">
+              {{ user.name }}
+              <button type="text" style="color:blue" @click="stnmae" v-if="user.role == '2' || user.role == '3'">
                 个人中心
               </button>
               <button type="button" class="logininfo" @click="zhuxiao">注销</button>
@@ -111,7 +112,7 @@ export default {
       this.toLogin();
     },
     async toLogin() {
-      this.$router.push({ path: '/' });
+      this.$router.go(0);
     },
   },
   computed: {