diff --git a/front/src/views/personalCenter/components/asideMenu.vue b/front/src/views/personalCenter/components/asideMenu.vue index 3a5883a7..46aef41e 100644 --- a/front/src/views/personalCenter/components/asideMenu.vue +++ b/front/src/views/personalCenter/components/asideMenu.vue @@ -29,9 +29,9 @@ export default defineComponent({ } const apply = { title: '我的申请', - img: require('@/assets/personalCenter/apply.png'), - imgActive: require('@/assets/personalCenter/applyactive.png'), - key: 'apply', + img: require('@/assets/personalCenter/apply.png'), + imgActive: require('@/assets/personalCenter/applyactive.png'), + key: 'apply', } let menuList = [ car, @@ -76,6 +76,8 @@ export default defineComponent({ const type = JSON.parse(window.sessionStorage.getItem('type')) if (type) { selectedKeys.value = [type] + console.log('selectedKeys------------>', selectedKeys); + } const handleClick = (item) => { console.log('click', item) @@ -83,10 +85,20 @@ export default defineComponent({ } onMounted(() => { - if (menuList[1]) { - handleClick(menuList[1]) - } else { + if (itShowXiHaiAn) { handleClick(menuList[0]) + } else { + if (type) { + console.log('type---------->', type) + let _obj = menuList.find(v => v.key == type) + handleClick(_obj) + } else { + if (menuList[1]) { + handleClick(menuList[1]) + }else { + handleClick(menuList[0]) + } + } } })