1
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar :title="pageTitle"></z-nav-bar>
|
||||
<u-tabs v-if="tabList.length > 0" class="tabList" @click="fatherClick" :activeStyle="activeStyle"
|
||||
<u-tabs v-if="tabList.length > 0" class="tabList" @click="fatherClick" :current="curTagId" :activeStyle="activeStyle"
|
||||
:scrollable="scrollable" :list="tabList"
|
||||
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
|
||||
<view class="containerBg">
|
||||
@@ -77,6 +77,7 @@
|
||||
name: 111,
|
||||
id: 1
|
||||
}],
|
||||
curTagId:0,
|
||||
courseList: [],
|
||||
status: 0, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据
|
||||
page: 1,
|
||||
@@ -148,7 +149,7 @@
|
||||
}
|
||||
}
|
||||
if (this.subTabId) {
|
||||
console.log(this.subTabId, this.subList[0].title, '初始进入')
|
||||
// console.log(this.subTabId, this.subList[0].title, '初始进入')
|
||||
this.courseList = []
|
||||
this.status = 1
|
||||
this.getData(this.subTabId)
|
||||
@@ -156,6 +157,7 @@
|
||||
|
||||
|
||||
}
|
||||
console.log(this.curTagId, '当前高亮')
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, '获取子分类报错')
|
||||
|
||||
@@ -333,22 +333,22 @@
|
||||
getMedicalTags(id) {
|
||||
var ftag = null
|
||||
id ? ftag = id : ftag = 0
|
||||
|
||||
$http.request({
|
||||
url: "curseTagList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
// data: {
|
||||
// 'id': ftag
|
||||
// },
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
}).then(res => {
|
||||
this.$http
|
||||
.post('medical/home/getCourseMedicalTree')
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 0) {
|
||||
if (res.labels.length > 0) {
|
||||
this.curseTagList = res.labels
|
||||
this.tabsid = res.labels[0].id
|
||||
this.curseClick(res.labels[0])
|
||||
// this.curseClick(res.labels[0])
|
||||
if (res.labels[0].isLast == 0) { // 非终极
|
||||
if (res.labels[0].children && res.labels[0].children.length > 0) {
|
||||
this.sbuMedicalTagsList = res.labels[0].children
|
||||
} else {
|
||||
this.sbuMedicalTagsList = []
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.tabsid = null
|
||||
this.curseTagList = []
|
||||
@@ -497,7 +497,7 @@
|
||||
},
|
||||
curseClick(item) {
|
||||
this.tabsid = item.id
|
||||
if (item.isLast == 1) { // 非终极
|
||||
if (item.isLast == 0) { // 终极
|
||||
if (item.children && item.children.length > 0) {
|
||||
this.sbuMedicalTagsList = item.children
|
||||
} else {
|
||||
@@ -511,7 +511,7 @@
|
||||
},
|
||||
curseClickJump(item){
|
||||
uni.navigateTo({
|
||||
url: `/pages/course/index?id=33&title=中医学`
|
||||
url: `/pages/course/index?id=${item.id}&title=中医学`
|
||||
// url: `/pages/course/index?id=${item.id}&title=${item.title}`
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user