Merge branch 'main' of http://122.51.230.86:3000/dianliang/school_website
This commit is contained in:
commit
a60a469a38
@ -36,7 +36,13 @@
|
||||
<div v-for="(item, index) in nav " :key=index>
|
||||
|
||||
<div class="about-conts-item1" v-if="currentActive == 2">
|
||||
<div class="neirong" v-html="pageContextList[index]"></div>
|
||||
<div class="noticeRsr" v-for="(item,index) in twolist" @click="goDeatail(item)" >
|
||||
<div >{{item.contentTitle}}</div>
|
||||
<div >{{item.publishDate}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="currentActive == 2">
|
||||
<page-util :category-id="categoryId" @event-message="handleDataFromPage" />
|
||||
</div>
|
||||
<div class="about-conts-item1" v-if="currentActive == 1">
|
||||
<div class="dataClass">
|
||||
@ -75,6 +81,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
onelist:[],
|
||||
twolist:[],
|
||||
dataList: [],
|
||||
categoryId:'',
|
||||
pageContextList: [],
|
||||
@ -98,9 +105,12 @@ export default {
|
||||
|
||||
methods: {
|
||||
handleDataFromPage(data){
|
||||
if (this.currentActive === 0){
|
||||
if (this.currentActive == 0){
|
||||
this.onelist = data
|
||||
}
|
||||
if (this.currentActive == 2){
|
||||
this.twolist = data
|
||||
}
|
||||
|
||||
},
|
||||
goDeatail(data){
|
||||
@ -122,6 +132,12 @@ export default {
|
||||
},
|
||||
// 触发导航
|
||||
getCurrentActive(value) {
|
||||
if (this.currentActive === 0){
|
||||
this.categoryId = this.oneid
|
||||
}
|
||||
if (this.currentActive === 1){
|
||||
this.categoryId = this.twoid
|
||||
}
|
||||
if (this.currentActive == value) {
|
||||
return
|
||||
}
|
||||
@ -141,6 +157,9 @@ export default {
|
||||
|
||||
console.log('routeParam',response)
|
||||
this.onelist = response.data[0].children.list
|
||||
this.oneid = response.data[0].id
|
||||
this.twolist = response.data[2].children.list
|
||||
this.twoid = response.data[2].id
|
||||
this.categoryId = response.data[0].id
|
||||
response.data.forEach(cloumnItem => {
|
||||
this.nav.push(cloumnItem);
|
||||
|
Loading…
Reference in New Issue
Block a user