diff --git a/manifest.json b/manifest.json index 75cecfb..8ae9ef1 100644 --- a/manifest.json +++ b/manifest.json @@ -12,8 +12,8 @@ "src" : "图片路径" } ], - "versionName" : "1.0.12", - "versionCode" : 1012, + "versionName" : "1.0.13", + "versionCode" : 1013, "app-plus" : { "nvueCompiler" : "weex", "compatible" : { diff --git a/pages.json b/pages.json index aa424ec..bf82692 100644 --- a/pages.json +++ b/pages.json @@ -562,6 +562,27 @@ { "navigationBarTitleText" : "主任教学" } + }, + { + "path" : "pages/miniClass/addClass", + "style" : + { + "navigationBarTitleText" : "添加课程" + } + }, + { + "path" : "pages/miniClass/classInfo", + "style" : + { + "navigationBarTitleText" : "班级详情页66" + } + }, + { + "path" : "pages/miniClass/classList", + "style" : + { + "navigationBarTitleText" : "班级列表" + } } ], "globalStyle": { diff --git a/pages/component/commonComponents/list.vue b/pages/component/commonComponents/list.vue index fd08c90..5e8ff52 100644 --- a/pages/component/commonComponents/list.vue +++ b/pages/component/commonComponents/list.vue @@ -9,6 +9,7 @@ > - - + @@ -56,7 +53,7 @@ - + - + + + + + + + 50 + 个班级正在学习本门课程 + + + 前往查看 >> + + + 0) { - // this.goodsList = res.productList; - // this.selectGoodsData = this.goodsList[0]; - // this.$refs.commonSelectGoods.open(); - // this.show = true; - // } else { - // this.$commonJS.showToast("此课程暂无购买方式"); - // } + } this.$forceUpdate(); }); @@ -1376,12 +1378,24 @@ url: `${url}?id=${id}`, }); }, + goClassLIst(url, id,title){ + uni.navigateTo({ + url: `${url}?courseId=${id}&courseTitle=${title}`, + }); + }, }, }; \ No newline at end of file diff --git a/pages/miniClass/classInfo.vue b/pages/miniClass/classInfo.vue new file mode 100644 index 0000000..7babfd7 --- /dev/null +++ b/pages/miniClass/classInfo.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/pages/miniClass/classList.vue b/pages/miniClass/classList.vue new file mode 100644 index 0000000..448aff2 --- /dev/null +++ b/pages/miniClass/classList.vue @@ -0,0 +1,451 @@ + + + + \ No newline at end of file diff --git a/pages/miniClass/miniClassMan.vue b/pages/miniClass/miniClassMan.vue index 52690e2..c0cce7c 100644 --- a/pages/miniClass/miniClassMan.vue +++ b/pages/miniClass/miniClassMan.vue @@ -27,40 +27,39 @@ - + - - + + + + + - + {{item.title}} - - + + 目标学员人数:{{item.number}} 人 - - - - + + + 一键加入 + 查看班内情况 - - 了解课程 - - - + - + - - + @@ -97,9 +96,9 @@ playData: {}, addType:undefined, // 小班类型 range:[ - { value: 0, text: "普通小班" }, - { value: 1, text: "联合班" }, - { value: 2, text: "精英班" }, + { value: '0', text: "普通小班",name:"普通小班"}, + { value: '1', text: "联合班" ,name:"普通小班"}, + { value: '2', text: "精英班" ,name:"普通小班"}, ], tagId: null, pid:null, @@ -127,23 +126,27 @@ scrollable: false, pageTitle: '', tabList: [ - {name:'普通小班'},{name:'联合班'},{name:'精英班'}], + {name:'普通小班', id:'0'},{name:'联合班', id:'1'},{name:'精英班',id:'2'}], curTagId: 0, courseList: [], status: 3, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据 page: 1, flag: true, // 函数是否执行完 + }; }, //第一次加载 onLoad(e) { // 隐藏原生的tabbar uni.hideTabBar(); - this.tagId = e.id + // this.tagId = e.id + this.curTagId = this.range[0].value + this.subTabId = this.subList[0].id this.pageTitle = e.title this.pid = e.pid console.log(e, '传入分类id') - this.getCateList(this.tagId) + this.getData() + // this.getCateList(this.tagId) }, onPageScroll(e) { this.scrollTop = e.scrollTop; @@ -156,17 +159,17 @@ }, onPullDownRefresh() { console.log('下拉刷新') - this.status = 3 - this.page = 1 + // this.status = 3 + // this.page = 1 this.courseList = [] - this.getData(this.subTabId) + this.getData() uni.stopPullDownRefresh() }, onReachBottom() { - if (this.status != 2 && this.flag) { - this.page++ - this.getData(this.subTabId) - } + // if (this.status != 2 && this.flag) { + // this.page++ + // this.getData(this.subTabId) + // } console.log('触底加载', this.page) }, computed: { @@ -175,15 +178,17 @@ //页面显示 onShow() { // 隐藏原生的tabbar - uni.hideTabBar(); - - + // uni.hideTabBar(); }, components: { musicPlay }, //方法 methods: { + // 加入班级 + enterClass(){ + + }, selectChange(e){ console.log("e:", e); }, @@ -194,8 +199,11 @@ return `url(${imageurl})` }, goCreateClass(){ - if(this.addType){ - + console.log('this.addType',this.addType); + if(this.addType != undefined){ + uni.navigateTo({ + url:`/pages/miniClass/addClass?type=${this.addType}&name=add` + }) }else{ uni.showToast({ title:'请选择班级的类型', @@ -203,43 +211,12 @@ }) 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, '点击') + console.log('点击', e) this.page = 1 - var item = e + // var item = e + this.curTagId = e.id this.subTabId = this.subList[0].id this.getData(this.subTabId); }, @@ -254,15 +231,18 @@ // console.log('正在执行,未完成') // return // } + this.status = 1 this.flag = false + uni.showLoading({ + title:'正在加载' + }) $http.request({ - url: "medical/home/getMedicalCourseList", + url: "common/class/getClassByDirectorid", method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 data: { - "id": id, - "limit": 12, - "page": this.page + "state": this.subTabId, //小班状态0待开班1已开班2完成 + "type": this.curTagId // 班类型 0小班 1联合班 2精英班 }, header: { //默认 无 说明:请求头 'Content-Type': 'application/json' @@ -270,28 +250,33 @@ }) .then(res => { if (res.code == 0) { - if (res.courses.records.length > 0) { - var list = res.courses.records - this.courseList = this.courseList.concat(list) - if (res.courses.pages > this.page) { - this.status = 0 - } else { - this.status = 2 - } - } else if (this.page > 1) { - this.status = 2 // 加载完成 + if (res.classEntityList.length > 0) { + this.courseList = res.classEntityList + // var list = res.classEntityList + // this.courseList = this.courseList.concat(list) + // if (res.courses.pages > this.page) { + // this.status = 0 + // } else { + // this.status = 2 + // } + }else{ + this.courseList = [] + } + // else if (this.page > 1) { + // this.status = 2 // 加载完成 - } else { - this.status = 3 // 暂无数据 - } - console.log('status', this.status) + // } else { + // this.status = 3 // 暂无数据 + // } + // console.log('status', this.status) this.flag = true } - + uni.hideLoading() }).catch(e => { + uni.hideLoading() this.flag = true console.log(e, '数据报错') - this.status = 3 + // this.status = 3 uni.showToast({ title:`获取数据失败`, icon:'error' @@ -300,6 +285,7 @@ }, // 跳转 onPageJump(url,id) { + // console.log('进来了',url,id); uni.navigateTo({ url: `${url}?id=${id}` }); @@ -339,9 +325,12 @@ top:0 } .addType{width: 100%; margin-top: 40rpx;margin-bottom: 40rpx; border: 1px solid #eee;} - .classNewBtn{text-align: center; height: 300rpx; padding: 30rpx; background-color: $themeColor; margin-bottom: 80rpx; + .classNewBtn{text-align: center; height:200rpx; padding: 30rpx; + background-image: linear-gradient(-60deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%, #bfe3f0 80%, #fdf0ed 100%); + border-radius: 0 0 40rpx 40rpx; - .box88{background-color: #fff; border-radius: 40rpx; height: 300rpx; justify-content: center; align-items: center; box-shadow: 0 10rpx 8rpx #eee; + .box88{ border-radius: 40rpx; padding: 30rpx; justify-content: center; align-items: center; + // box-shadow: 0 10rpx 8rpx #eee; button{border-radius: 40rpx;} } } @@ -392,6 +381,7 @@ padding: 3px 5px; @include theme("btn_bg"); font-size: 28rpx; color: #fff; } + .seeInfo{background-color:#fff; background-image: none; border: 1px solid #666; color: #333; margin-left: 20rpx;} } .buyItems { width: 60%; @@ -452,7 +442,7 @@ .imgcontainer { background-color: $imgBg; } - + .box { // background-color: #fff; min-height: calc(100vh - 270rpx); diff --git a/static/icon/class.png b/static/icon/class.png new file mode 100644 index 0000000..7fe342b Binary files /dev/null and b/static/icon/class.png differ