This commit is contained in:
clay
2022-01-18 21:38:10 +08:00
parent fa8bc05879
commit 74a0130727
9 changed files with 334 additions and 155 deletions

View File

@@ -88,15 +88,26 @@ export default {
},
watch: {
$route(to, from) {
let arcId = this.$route.params && this.$route.query.id
console.log(arcId)
console.log(to)
this.secondId = this.$route.params && this.$route.params.secondId;
this.navId = this.$route.params && this.$route.params.navId;
let arcId = this.$route.query && this.$route.query.id
this.type = this.$route.query && this.$route.query.type
if (this.type != null&&this.type!=0){
let info = getParentNode(this.secondId);
if (arcId != undefined) {
this.getContext(arcId)
} else {
this.getContent(info.second)
}
return
}
if (arcId != undefined) {
this.getContext(arcId)
} else {
this.secondId = this.$route.params && this.$route.params.secondId;
this.navId = this.$route.params && this.$route.params.navId;
this.menuData = getParentNode(this.navId)
this.getContent()
this.getContent(this.menuData.three)
}
}
},
@@ -107,11 +118,23 @@ export default {
crumbs(this.secondId).then(res => {
this.crumbs = res.data
})
this.type = this.$route.query && this.$route.query.type
if (this.type != null&&this.type!=0){
//this.showSecond = false
let info = getParentNode(this.secondId);
let arcId = this.$route.query && this.$route.query.id
if (arcId != undefined) {
this.getContext(arcId)
} else {
this.getContent(info.second)
}
return
}
let arcId = this.$route.params && this.$route.query.id
if (arcId != undefined) {
this.getContext(arcId)
} else {
this.getContent()
this.getContent(this.menuData.three)
}
},
methods: {
@@ -122,8 +145,9 @@ export default {
this.type = null
})
},
getContent() {
let menu = this.menuData.three
getContent(menu) {
console.log(menu)
//let menu = this.menuData.three
this.type = menu.type
this.contextData = null
this.bgImage = menu.link