seimin 1 year ago
parent
commit
dfdfd778ab
2 changed files with 9 additions and 1 deletions
  1. 1 1
      public/index.html
  2. 8 0
      src/App.vue

+ 1 - 1
public/index.html

@@ -6,7 +6,7 @@
6
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
6
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
     <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
7
     <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
8
     <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
8
     <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
9
-    <title>首页</title>
9
+    <title></title>
10
   </head>
10
   </head>
11
   <body>
11
   <body>
12
     <noscript>
12
     <noscript>

+ 8 - 0
src/App.vue

@@ -18,6 +18,13 @@ export default {
18
     };
18
     };
19
   },
19
   },
20
   methods: {
20
   methods: {
21
+    getSysNameAndLogo(){
22
+      this.$http.get("service/auth/getSysNameAndLogo", {})
23
+        .then((result) => {
24
+          result = result.data;
25
+          document.title = result.sysName || '';
26
+        })
27
+    },
21
     // 判断角色
28
     // 判断角色
22
     roleHandler(user,requester){
29
     roleHandler(user,requester){
23
       let userRoles = user.role.map(v=>({id:v.id,rolecode:v.rolecode}));
30
       let userRoles = user.role.map(v=>({id:v.id,rolecode:v.rolecode}));
@@ -93,6 +100,7 @@ export default {
93
   },
100
   },
94
   created() {
101
   created() {
95
     this.getCode();
102
     this.getCode();
103
+    this.getSysNameAndLogo();
96
   },
104
   },
97
 };
105
 };
98
 </script>
106
 </script>