Commit f53fcc72 by liang ce

router 判断

parent d1e0add7
...@@ -81,6 +81,7 @@ const $http = { ...@@ -81,6 +81,7 @@ const $http = {
'Content-Type': 'application/json; charset=UTF-8' 'Content-Type': 'application/json; charset=UTF-8'
} }
}).then((res) => { }).then((res) => {
console.log(res)
if (res.data.code === 0 || res.data.resultCode === 0) { if (res.data.code === 0 || res.data.resultCode === 0) {
store.dispatch('setSpinning', false) store.dispatch('setSpinning', false)
return Promise.resolve(res) return Promise.resolve(res)
......
...@@ -36,21 +36,21 @@ export default { ...@@ -36,21 +36,21 @@ export default {
data () { data () {
return { return {
defaultSelectedKeys: 'defaultSelectedKeys', defaultSelectedKeys: 'defaultSelectedKeys',
chooseMenuList: 'classificationOfDishes' chooseMenuList: ''
} }
}, },
created () { created () {
this.defaultSelectedKeys = this.$route.name this.defaultSelectedKeys = this.$route.name
this.chooseMenuList = this.$route.name this.chooseMenuList = this.$route.name
// if (this.$store.state.menuList.indexOf('4100') > -1) { if (this.$store.state.menuList.indexOf('4100') > -1) {
// this.chooseMenuList = 'classificationOfDishes' this.chooseMenuList = 'classificationOfDishes'
// } else if (this.$store.state.menuList.indexOf('4200') > -1) { } else if (this.$store.state.menuList.indexOf('4200') > -1) {
// this.chooseMenuList = 'menuManagement' this.chooseMenuList = 'menuManagement'
// } else if (this.$store.state.menuList.indexOf('4300') > -1) { } else if (this.$store.state.menuList.indexOf('4300') > -1) {
// this.chooseMenuList = 'consumptionOrder' this.chooseMenuList = 'consumptionOrder'
// } else if (this.$store.state.menuList.indexOf('4400') > -1) { } else if (this.$store.state.menuList.indexOf('4400') > -1) {
// this.chooseMenuList = 'consumptionStatistics' this.chooseMenuList = 'consumptionStatistics'
// } }
}, },
watch: { watch: {
$route (to, from) { $route (to, from) {
......
...@@ -37,21 +37,21 @@ export default { ...@@ -37,21 +37,21 @@ export default {
created () { created () {
this.defaultSelectedKeys = this.$route.name this.defaultSelectedKeys = this.$route.name
this.chooseMenuList = this.$route.name this.chooseMenuList = this.$route.name
// if (this.$store.state.menuList.indexOf('3100') > -1) { if (this.$store.state.menuList.indexOf('3100') > -1) {
// this.chooseMenuList = 'accountManagement' this.chooseMenuList = 'accountManagement'
// } else if (this.$store.state.menuList.indexOf('3200') > -1) { } else if (this.$store.state.menuList.indexOf('3200') > -1) {
// this.chooseMenuList = 'rechargeRecord' this.chooseMenuList = 'rechargeRecord'
// } else if (this.$store.state.menuList.indexOf('3300') > -1) { } else if (this.$store.state.menuList.indexOf('3300') > -1) {
// this.chooseMenuList = 'allowancePayment' this.chooseMenuList = 'allowancePayment'
// } else if (this.$store.state.menuList.indexOf('3400') > -1) { } else if (this.$store.state.menuList.indexOf('3400') > -1) {
// this.chooseMenuList = 'recordsOfConsumption' this.chooseMenuList = 'recordsOfConsumption'
// } else if (this.$store.state.menuList.indexOf('3500') > -1) { } else if (this.$store.state.menuList.indexOf('3500') > -1) {
// this.chooseMenuList = 'systemReconciliation' this.chooseMenuList = 'systemReconciliation'
// } else if (this.$store.state.menuList.indexOf('3600') > -1) { } else if (this.$store.state.menuList.indexOf('3600') > -1) {
// this.chooseMenuList = 'paymentManagementSetting' this.chooseMenuList = 'paymentManagementSetting'
// } else if (this.$store.state.menuList.indexOf('3700') > -1) { } else if (this.$store.state.menuList.indexOf('3700') > -1) {
// this.chooseMenuList = 'operationLog' this.chooseMenuList = 'operationLog'
// } }
}, },
watch: { watch: {
$route (to, from) { $route (to, from) {
......
...@@ -33,9 +33,9 @@ export default { ...@@ -33,9 +33,9 @@ export default {
created () { created () {
this.defaultSelectedKeys = this.$route.name this.defaultSelectedKeys = this.$route.name
this.chooseMenuList = this.$route.name this.chooseMenuList = this.$route.name
// if (this.$store.state.menuList.indexOf('9100') > -1) { if (this.$store.state.menuList.indexOf('9100') > -1) {
// this.chooseMenuList = 'rightsManagement' this.chooseMenuList = 'rightsManagement'
// } }
}, },
watch: { watch: {
$route (to, from) { $route (to, from) {
......
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