|
@@ -58,6 +58,14 @@ export default {
|
|
userName: ''
|
|
userName: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ $route : {
|
|
|
|
+ immediate: true,
|
|
|
|
+ handler: function (route) {
|
|
|
|
+ sessionStorage.setItem('currentPath', route.path)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
mounted() {
|
|
mounted() {
|
|
const currentPath = sessionStorage.getItem('currentPath')
|
|
const currentPath = sessionStorage.getItem('currentPath')
|
|
const userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
|
|
const userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
|
|
@@ -68,7 +76,7 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
menuSelect (index) {
|
|
menuSelect (index) {
|
|
- sessionStorage.setItem('currentPath', index)
|
|
|
|
|
|
+ console.log(index);
|
|
},
|
|
},
|
|
handleLogout () {
|
|
handleLogout () {
|
|
this.$confirm('确定退出吗?').then( _=> {
|
|
this.$confirm('确定退出吗?').then( _=> {
|