tanyanfei il y a 5 ans
Parent
commit
55a99af529
3 fichiers modifiés avec 13 ajouts et 4 suppressions
  1. 1 0
      src/views/Home.vue
  2. 6 2
      src/views/Index.vue
  3. 6 2
      src/views/Index1.vue

+ 1 - 0
src/views/Home.vue

@@ -77,6 +77,7 @@ export default {
 			this.now=(new Date()).toLocaleDateString()+" "+(new Date()).toLocaleTimeString()
 		},
 		logout(){
+			localStorage.setItem('token','')
 			this.$api.logout().then(res=>{
 				this.$router.push({path:'/login'})
 			})

+ 6 - 2
src/views/Index.vue

@@ -162,7 +162,7 @@
         <img @click="min" class="min" src="../images/min.png" alt="">
         <h1 class="title">
           <img height="90px" width="100%" src="../images/bg_1.jpg" alt="">
-          <span>监测系统</span>
+          <span>{{info.realname}}可视化系统</span>
         </h1>
         <ul class="datas">
           <li style="width:30%;">
@@ -244,7 +244,8 @@ import echarts from 'echarts';
 export default {
   data(){
     return{
-      fullscreen:''
+      fullscreen:'',
+      info:{}
     }
   },
   methods:{
@@ -551,6 +552,9 @@ export default {
      this.getData()
   },
   created(){
+    this.$api.getInfo().then(res=>{
+				this.info=res.data.data
+		})
   }
 }
 </script>

+ 6 - 2
src/views/Index1.vue

@@ -160,7 +160,7 @@
         <img @click="min" class="min" src="../images/min.png" alt="">
         <h1 class="title">
           <img height="90px" width="100%" src="../images/bg_2.jpg" alt="">
-          <span>监测系统</span>
+          <span>{{info.realname}}可视化系统</span>
         </h1>
         <ul class="datas">
           <li style="width:30%;">
@@ -239,7 +239,8 @@ import echarts from 'echarts';
 export default {
   data(){
     return{
-      fullscreen:''
+      fullscreen:'',
+      info:{}
     }
   },
   methods:{
@@ -560,6 +561,9 @@ export default {
      this.getData()
   },
   created(){
+    this.$api.getInfo().then(res=>{
+				this.info=res.data.data
+		})
   }
 }
 </script>