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