diff --git a/mixins/config.js b/mixins/config.js index bec5ec0..bace23c 100644 --- a/mixins/config.js +++ b/mixins/config.js @@ -35,7 +35,7 @@ export default { title: this.configParamContent('app_name'), desc: this.configParamContent('share_desc'), imageUrl: this.configParamContent('login_logo'), - path: '/pages/index/index' + path: this.configParamContent('xcxSharePage'), } } }, diff --git a/pages/index/user.vue b/pages/index/user.vue index 9dbf66b..3a68797 100644 --- a/pages/index/user.vue +++ b/pages/index/user.vue @@ -127,7 +127,7 @@ 联系我们 - 0731-599327-8899 + {{ configParamContent('contact_us') }} @@ -171,7 +171,7 @@ export default { // 拨打电话 callPhone() { uni.makePhoneCall({ - phoneNumber: '0731-599327-8899' + phoneNumber: this.configParamContent('contact_us'), }) }, // 跳转登录页面 diff --git a/subPages/home/directory.vue b/subPages/home/directory.vue index 2adad73..d35f912 100644 --- a/subPages/home/directory.vue +++ b/subPages/home/directory.vue @@ -40,8 +40,9 @@ 课程 + - 全部课程 · {{ courseList.total }}节 + 全部课程 · {{ courseList.total }}节 @@ -110,6 +111,40 @@ + + + + + + + + 全部课程 + + 倒序 + + + + + {{ String(course.index || index + 1).padStart(2, '0') }} + + {{ course.english }} + {{ course.chinese }} + + + + + + @@ -128,7 +163,16 @@ export default { id: '', courseList: [ - ] + ], + allCourseList: [], // 全部課程列表 + isCourseSortReversed: false, // 課程排序是否倒序 + } + }, + computed: { + // 顯示的全部課程列表(支持倒序) + displayAllCourseList() { + const list = this.allCourseList.length > 0 ? this.allCourseList : this.courseList.records || []; + return this.isCourseSortReversed ? [...list].reverse() : list; } }, methods: { @@ -173,8 +217,20 @@ export default { }) if (courseRes.code === 200){ this.courseList = courseRes.result + // 同時設置全部課程列表 + this.allCourseList = courseRes.result.records || [] } }, + + // 顯示全部課程彈出窗 + showAllCoursePopup() { + this.$refs.allCoursePopup.open() + }, + + // 切換課程排序 + toggleCourseSort() { + this.isCourseSortReversed = !this.isCourseSortReversed + }, }, onLoad(options) { if (options.id){ @@ -380,6 +436,91 @@ export default { .course-total { font-size: 24rpx; color: #999; + cursor: pointer; +} + +/* 课程弹出窗样式 */ +.course-popup { + padding: 0 32rpx; + max-height: 80vh; + + +.popup-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 20rpx 0; + border-bottom: 2rpx solid #EEEEEE + // margin-bottom: 40rpx; +} + +.popup-title { + font-family: PingFang SC; + font-weight: 500; + font-size: 34rpx; + color: #181818; +} + + +.course-list { + max-height: 60vh; + overflow-y: auto; +} + +.course-item { + display: flex; + align-items: center; + gap: 24rpx; + padding-top: 24rpx; + padding-right: 8rpx; + padding-bottom: 24rpx; + padding-left: 8rpx; + + border-bottom: 1px solid #EEEEEE; + cursor: pointer; + + &:last-child { + border-bottom: none; + } +} + +.course-number { + width: 80rpx; + font-family: PingFang SC; + // font-weight: 400; + font-size: 36rpx; + color: #999; + &.highlight { + color: $primary-color; + } + // margin-right: 24rpx; +} + +.course-content { + flex: 1; +} + +.course-english { + font-family: PingFang SC; + font-weight: 600; + font-size: 36rpx; + line-height: 44rpx; + color: #252545; + margin-bottom: 8rpx; + + &.highlight { + color: $primary-color; + } +} + +.course-chinese { + font-size: 28rpx; + line-height: 48rpx; + color: #3B3D3D; + &.highlight { + color: $primary-color; + } +} } /* 简介部分 */ diff --git a/subPages/user/policy.vue b/subPages/user/policy.vue index e7827e4..c764192 100644 --- a/subPages/user/policy.vue +++ b/subPages/user/policy.vue @@ -1,7 +1,7 @@ @@ -10,7 +10,7 @@ export default { data() { return { - htmlContent: '

这是一个标题

这是一个段落

' + } } }