diff --git a/pages/course/index.vue b/pages/course/index.vue
index 02d4685..9135bb8 100644
--- a/pages/course/index.vue
+++ b/pages/course/index.vue
@@ -3,7 +3,7 @@
-
@@ -77,6 +77,7 @@
name: 111,
id: 1
}],
+ curTagId:0,
courseList: [],
status: 0, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据
page: 1,
@@ -148,14 +149,15 @@
}
}
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)
}
- }
+ }
+ console.log(this.curTagId, '当前高亮')
}
}).catch(e => {
console.log(e, '获取子分类报错')
diff --git a/pages/peanut/home.vue b/pages/peanut/home.vue
index aae9d26..8c5ffa8 100644
--- a/pages/peanut/home.vue
+++ b/pages/peanut/home.vue
@@ -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}`
});
},