This commit is contained in:
clay
2022-01-19 20:38:16 +08:00
parent d0b9848102
commit d6374440d2
5 changed files with 118 additions and 64 deletions

View File

@@ -114,30 +114,41 @@ export default {
created() {
this.secondId = this.$route.params && this.$route.params.secondId;
this.navId = this.$route.params && this.$route.params.navId;
this.menuData = getParentNode(this.navId)
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
setTimeout(() => {
this.init()
}, 200);
},
methods: {
init(){
this.menuData = getParentNode(this.navId)
crumbs(this.secondId).then(res => {
this.crumbs = res.data
})
if (this.type != null&&this.type!=0){
//this.showSecond = false
let info =null
info = getParentNode(this.secondId);
if (info == null){
location.reload();
}
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(info.second)
this.getContent(this.menuData.three)
}
return
}
let arcId = this.$route.params && this.$route.query.id
if (arcId != undefined) {
this.getContext(arcId)
} else {
this.getContent(this.menuData.three)
}
},
methods: {
},
getContext(arcId) {
article(arcId).then(res => {
console.log(res);