提交 d147c07f authored 作者: 王拯's avatar 王拯

在字段为0的情况下隐藏特定导航条

上级 4b2436cc
...@@ -133,6 +133,7 @@ export default { ...@@ -133,6 +133,7 @@ export default {
var obj var obj
if (Number(isOpenExamination) === 0 && Number(isOpenExaminationNotes) === 0) { if (Number(isOpenExamination) === 0 && Number(isOpenExaminationNotes) === 0) {
this.headerData = this.arrHeader(this.headerData).filter(k => k.index !== '1') this.headerData = this.arrHeader(this.headerData).filter(k => k.index !== '1')
this.defaultActive = '2'
} else if (Number(isOpenExamination) === 0) { } else if (Number(isOpenExamination) === 0) {
obj = { name: '考前须知', index: '1-2' } obj = { name: '考前须知', index: '1-2' }
arrList = this.arrHeader(this.headerData) arrList = this.arrHeader(this.headerData)
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<ul> <ul>
<template v-for="(item1, index1) in item.arrItem"> <template v-for="(item1, index1) in item.arrItem">
<li :class="['tab', (item.selectIndex == index1 ? 'active' : '')]" @click="selFindSelect" :key="index1" :data-index='index1' :data-i="index" :data-key='item.key' :data-val='item1.val' v-if="Number(item1.show) === 1">{{item1.name}}</li> <li :class="['tab', (item.selectIndex == index1 ? 'active' : '')]" @click="selFindSelect" :key="index1" :data-index='index1' :data-i="index" :data-key='item.key' :data-val='item1.val'>{{item1.name}}</li>
</template> </template>
</ul> </ul>
</div> </div>
...@@ -107,7 +107,8 @@ export default { ...@@ -107,7 +107,8 @@ export default {
order_type: 'begin_date' order_type: 'begin_date'
}, },
timeInterval: null, timeInterval: null,
newLiveMsg: {} newLiveMsg: {},
oneParamYype: 1
} }
}, },
mounted () { mounted () {
...@@ -122,7 +123,9 @@ export default { ...@@ -122,7 +123,9 @@ export default {
} }
}) })
}, 3000) }, 3000)
this.find.forEach(k => {
k.arrItem = k.arrItem.filter(l => Number(l.show) === 1)
})
// const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' }) // const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
// cAction.Course.getLearnFind().then(data => { // cAction.Course.getLearnFind().then(data => {
// this.find[0].arrItem = data // this.find[0].arrItem = data
...@@ -144,6 +147,16 @@ export default { ...@@ -144,6 +147,16 @@ export default {
this.$router.push({ path: `/app/learn/course-detail/${cid}?v=${this.homeList[0].course_type}` }) this.$router.push({ path: `/app/learn/course-detail/${cid}?v=${this.homeList[0].course_type}` })
}, },
getAjaxList (bool, str) { getAjaxList (bool, str) {
if (this.oneParamYype === 1) {
if (Number(UserInfo.is_open_textbook_learning) === 1) {
this.param.course_type = 1
} else if (Number(UserInfo.is_open_required_course) === 1) {
this.param.course_type = 2
} else {
this.param.course_type = 3
}
this.oneParamYype++
}
cAction.Course.getCourseList(bool, this.param).then(json => { cAction.Course.getCourseList(bool, this.param).then(json => {
this.homeList = json this.homeList = json
if (!json.length) { if (!json.length) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论