diff --git a/pages/miniClass/miniClassMan.vue b/pages/miniClass/miniClassMan.vue index 7ed7b6a..52690e2 100644 --- a/pages/miniClass/miniClassMan.vue +++ b/pages/miniClass/miniClassMan.vue @@ -6,6 +6,15 @@ + + + + + + + + + {{item.title}} - - + @@ -66,6 +62,23 @@ + + + + 请选择您要创建的班级类型 + + + + + + + @@ -82,9 +95,16 @@ data() { return { playData: {}, + addType:undefined, // 小班类型 + range:[ + { value: 0, text: "普通小班" }, + { value: 1, text: "联合班" }, + { value: 2, text: "精英班" }, + ], tagId: null, pid:null, fixed: false, + pupShow:false, fatherTabId: null, subTabId: null, // bgiStyle: { @@ -164,84 +184,64 @@ }, //方法 methods: { + selectChange(e){ + console.log("e:", e); + }, + closePup(){ + this.pupShow = false + }, surl(imageurl) { return `url(${imageurl})` }, - getCateList(id) { - $http.request({ - url: "medical/home/getChildCourseMedicalTree", - method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 - data: { - "id": id, - }, - header: { //默认 无 说明:请求头 - 'Content-Type': 'application/json' - }, + goCreateClass(){ + if(this.addType){ + + }else{ + uni.showToast({ + title:'请选择班级的类型', + icon:'none' }) - .then(res => { - if (res.code == 0) { - if (res.labels.length > 0) { - var list = [] - res.labels.forEach(item => { - item.name = item.title - }) - this.tabList = res.labels - // this.fatherTabId = this.tabList[0].id - // if (this.tabList[0].isLast == 1) { // 终极 - // this.subList = [] - // this.subTabId = this.tabList[0].id - // } else { //非终极 - // if (this.tabList[0].children.length > 0) { - // this.subList = this.tabList[0].children - // this.subTabId = this.subList[0].id - - // } else { - // this.subList = [] - // this.subTabId = null - // } - // } - // if (this.subTabId) { - // // console.log(this.subTabId, this.subList[0].title, '初始进入') - // this.courseList = [] - // this.status = 1 - // this.getData(this.subTabId) - // } - - - }else{ - // this.subList = [] - this.subTabId = id - this.getData(id) - } - console.log(this.curTagId, '当前高亮') - } - }).catch(e => { - console.log(e, '获取子分类报错') - }); + return + } + }, + getCateList(id) { + this.subTabId = this.subList[0].id + this.getData(id) + // $http.request({ + // url: "medical/home/getChildCourseMedicalTree", + // method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 + // data: { + // "id": id, + // }, + // header: { //默认 无 说明:请求头 + // 'Content-Type': 'application/json' + // }, + // }) + // .then(res => { + // if (res.code == 0) { + // if (res.labels.length > 0) { + // var list = [] + // res.labels.forEach(item => { + // item.name = item.title + // }) + // this.tabList = res.labels + // }else{ + // // this.subList = [] + // this.subTabId = id + // this.getData(id) + // } + // console.log(this.curTagId, '当前高亮') + // } + // }).catch(e => { + // console.log(e, '获取子分类报错') + // }); }, fatherClick(e) { // console.log(e, '点击') this.page = 1 var item = e - this.subTabId = this.subList[0].id - // if (item.isLast == 1) { // 终极 - // this.subList = [] - // this.subTabId = item.id - // } else { - // if (item.children.length > 0) { // 非终极 - // this.subList = item.children - // this.subTabId = item.children[0].id - // } else { - // this.subList = [] - // this.subTabId = null - // } - // } - // if (this.subTabId) { - // this.status = 1 - // this.courseList = [] - this.getData(this.subTabId); - // } - + this.subTabId = this.subList[0].id + this.getData(this.subTabId); }, curseClick(item) { this.subTabId = item.id @@ -315,9 +315,42 @@