Commit 90410952 authored by wxk's avatar wxk

bugfix

parent 0d90e068
...@@ -32,19 +32,13 @@ ...@@ -32,19 +32,13 @@
export default { export default {
data(){ data(){
return{ return{
platInfo: [],
active: '' active: ''
} }
}, },
props: ['platInfo'],
created() { created() {
Bus.$on('getPlatInfo', val =>{
this.platInfo = val;
})
this.active = this.$route.params.name || this.$route.path; this.active = this.$route.params.name || this.$route.path;
}, },
beforeDestroy() {
Bus.$off('getPlatInfo');
},
methods: { methods: {
navClick(index) { navClick(index) {
this.active = index; this.active = index;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
import NavLeft from '../components/navLeft' import NavLeft from '../components/navLeft'
import axios from 'axios'; import axios from 'axios';
import ApiConfig from "../config/api-config"; import ApiConfig from "../config/api-config";
import Bus from '../assets/js/bus'
export default { export default {
data() { data() {
...@@ -43,7 +42,6 @@ ...@@ -43,7 +42,6 @@
axios.post(ApiConfig.GetPlatformInfo).then( res =>{ axios.post(ApiConfig.GetPlatformInfo).then( res =>{
if (res.data.code === 200) { if (res.data.code === 200) {
this.platInfo = res.data.data; this.platInfo = res.data.data;
Bus.$emit('getPlatInfo', this.platInfo);
sessionStorage.setItem('platInfo', JSON.stringify(this.platInfo)) sessionStorage.setItem('platInfo', JSON.stringify(this.platInfo))
// console.log(this.platInfo) // console.log(this.platInfo)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment