Browse Source

refactor(student): 优化课表详情页面功能

- 修改详情按钮点击事件,添加跳转到课表详情页的功能
- 更新课表详情页布局,移除不必要的下拉菜单相关代码
- 添加课程ID参数传递,以便在详情页显示对应课程信息
-优化样式,使用 scoped 属性限制样式范围
master
liutong 1 year ago
parent
commit
ae9f961ea4
  1. 8
      pages/student/timetable/index.vue
  2. 77
      pages/student/timetable/info.vue

8
pages/student/timetable/index.vue

@ -64,7 +64,7 @@
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image> <image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view> </view>
</view> </view>
<view class="btn"> <view class="btn" @click="openViewTimetableInfo(v)">
详情 详情
</view> </view>
</view> </view>
@ -249,10 +249,10 @@ export default {
// //
openViewCourseInfo(item){ openViewTimetableInfo(item){
uni.navigateTo({ uni.navigateTo({
url: '/pages/student/timetable/info' url: `/pages/student/timetable/info?id=${item.id}`
}) })
}, },
// //

77
pages/student/timetable/info.vue

@ -49,7 +49,6 @@
<view>已上</view> <view>已上</view>
</view> </view>
</view> </view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -67,75 +66,25 @@ export default {
data() { data() {
return { return {
formData:{}, formData:{},
//
// filteredData: {
show_course:false,// id: '',//id
// },
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() { onLoad(options) {
this.filteredData.id = options.id//id
},
onShow(){
this.init()
}, },
methods: { methods: {
// //
clickCourse(e){ async init(){
console.log(e)
this.course_name = e.text
this.show_course = true
},
//
filterTapCourse() {
//
this.$refs.ref_course.show()
this.show_course = true;
},
//
clickClassroom(e){
console.log(e)
this.classroom_name = e.text
this.show_classroom = true
},
//
filterTapClassroom() {
//
this.$refs.ref_classroom.show()
this.show_classroom = true;
}, },
// //
openViewCourseInfo(item){ openViewCourseInfo(item){
uni.navigateTo({ uni.navigateTo({
@ -146,7 +95,7 @@ export default {
} }
</script> </script>
<style lang="less" > <style lang="less" scoped>
.main_box{ .main_box{
background: #292929 ; background: #292929 ;

Loading…
Cancel
Save