diff --git a/pages.json b/pages.json index dbaee0d..eca371e 100644 --- a/pages.json +++ b/pages.json @@ -90,8 +90,8 @@ "style": { "navigationBarTitleText": "课时详情", "navigationStyle": "default", - "navigationBarBackgroundColor": "#fff", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#292929", + "navigationBarTextStyle": "white" } } diff --git a/pages/coach/course/info.vue b/pages/coach/course/info.vue index e862b56..16861ea 100644 --- a/pages/coach/course/info.vue +++ b/pages/coach/course/info.vue @@ -1,169 +1,57 @@ @@ -178,296 +66,162 @@ export default { }, data() { return { - list: [], - likes: 0, - type: 1, - type1: 1, - activity_id: 0, - um_id: 0, - urls: 'http://medication.zeyan.wang/' + formData:{}, + + //课程下拉菜单相关 + show_course:false,//是否显示下拉菜单 + //课程下拉菜单 + course_name:'课程',//选中的下拉菜单名称 + options_course: [ + { + text: '请选择课程', + value: '', + checked: true + }, { + text: '羽毛球课程1', + value: '1' + }, { + text: '篮球课程2', + value: '2' + } + ], + + //课室下拉菜单相关 + show_classroom:false,//是否显示下拉菜单 + //课程下拉菜单 + classroom_name:'课室',//选中的下拉菜单名称 + options_classroom: [ + { + text: '请选择课室', + value: '', + checked: true + }, { + text: '羽毛球201', + value: '1' + }, { + text: '篮球室101', + value: '2' + } + ], } }, onLoad() { - const um_id = uni.getStorageSync('um_id'); - this.um_id = um_id - if (um_id == '') { - uni.navigateTo({ - url: '/pages/login/login' - }) - } - this.fetchData(this.um_id) }, methods: { - - //打开-发布作业页 - openObjListView(){ - uni.navigateTo({ - url: '/pages/coach/job/add' - }) + //选中课程下拉菜单点击事件 + clickCourse(e){ + console.log(e) + this.course_name = e.text + this.show_course = true }, - - //打开作业列表页 - openObjListView(){ - uni.navigateTo({ - url: '/pages/coach/job/list' - }) + //显示下拉菜单 + filterTapCourse() { + //显示下拉框 + this.$refs.ref_course.show() + this.show_course = true; }, - fetchData(um_id) { - user.activity_index({ - um_id: um_id - }).then(res => { - console.log(res) - if (res.status == 200) { - if (res.data == null) { - this.list = [] - } else { - this.list = res.data - } - } else { - uni.showToast({ - title: res.msg, - icon: 'none' - }) - } - }); - }, - onPullDownRefresh() { - this.fetchData(this.um_id) - }, - publishing() { - uni.navigateTo({ - url: '/pages/index/publishing' - }) - }, - like(id, um_id) { - user.activity_like({um_id: um_id, activity_id: id, type: 1}).then(res => { - if (res.status == 200) { - user.activity_index({ - um_id: um_id - }).then(res => { - console.log(res) - if (res.status == 200) { - this.list = res.data - } - }); - this.type = res.data.type - this.activity_id = res.data.activity_id - } else { - uni.showToast({ - title: res.msg, - icon: 'none' - }) - } - }); + + + //选中课室 + clickClassroom(e){ + console.log(e) + this.classroom_name = e.text + this.show_classroom = true }, - collection(id, um_id) { - user.activity_like({um_id: um_id, activity_id: id, type: 2}).then(res => { - if (res.status == 200) { - console.log(res) - this.fetchData(this.um_id) - this.type1 = res.data.type - this.activity_id = res.data.activity_id - } else { - uni.showToast({ - title: res.msg, - icon: 'none' - }) - } - }); + //显示课室下拉菜单 + filterTapClassroom() { + //显示下拉框 + this.$refs.ref_classroom.show() + this.show_classroom = true; }, - coninfo(item) { - // user.coninfo({id:id}).then(res => { - // if(res.status == 200){ - uni.setStorageSync('coninfo', item); + + //打开课时详情页 + openViewCourseInfo(item){ uni.navigateTo({ - url: '/pages/index/coninfo' + url: '/pages/coach/course/info' }) - // }else{ - // uni.showToast({ - // title: res.msg, - // icon: 'none' - // }) - // } - // }); }, - Comment(id) { - uni.setStorageSync('actid', id); - uni.navigateTo({ - url: '/pages/index/Comment' - }) - } } }