|
@@ -138,18 +138,19 @@ export default {
|
|
|
this.aside = temp
|
|
|
|
|
|
// let curi = ''
|
|
|
- let pp = ''
|
|
|
- this.aside.forEach(item => {
|
|
|
- item.subItem.forEach(sub => {
|
|
|
- if (this.$route.path === sub.url) {
|
|
|
- pp = item
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- // (curi && pp) && this.getAsideItem(curi.name, pp)
|
|
|
- window.localStorage.setItem('currentItem', JSON.stringify(pp))
|
|
|
+
|
|
|
let initPage = this.aside[0]
|
|
|
if (initPage.subItem && !initPage.id) {
|
|
|
+ let pp = ''
|
|
|
+ this.aside.forEach(item => {
|
|
|
+ item.subItem.forEach(sub => {
|
|
|
+ if (initPage.subItem[0].url === sub.url) {
|
|
|
+ pp = item
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ // (curi && pp) && this.getAsideItem(curi.name, pp)
|
|
|
+ window.localStorage.setItem('currentItem', JSON.stringify(pp))
|
|
|
this.$router.replace({path: initPage.subItem[0].url})
|
|
|
}
|
|
|
}
|