guhongwei 4 năm trước cách đây
mục cha
commit
0baea10d39
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      src/components/common/top.vue

+ 4 - 2
src/components/common/top.vue

@@ -9,7 +9,7 @@
             </el-col>
             <el-col :span="12" class="right">
               <el-col :span="24" v-if="user ? user.id : ''">
-                <span>{{ user.name }}</span>
+                <span>{{ user.name || user.adminuser || user.user || user.title || '游客' }}</span>
                 <el-button type="primary" size="mini" @click="$router.push({ path: '/userCenter' })">个人中心</el-button>
                 <el-button type="danger" size="mini" @click="logout">退出登录</el-button>
               </el-col>
@@ -65,7 +65,9 @@ export default {
       logo: require('../../assets/logo.png'),
     };
   },
-  created() {},
+  created() {
+    console.log(this.user);
+  },
   methods: {
     turnTo(type) {
       this.$router.push({ path: `/${type}/index` });