|
|
@@ -66,12 +66,12 @@
|
|
|
<image class="date-icon" src="@/static/images/new/time.png"></image>
|
|
|
<text class="date-text">{{ group.date }}</text>
|
|
|
</view>
|
|
|
- <view v-for="(item, i) in group.list" :key="i" class="recent-card" @click="onCourseClick(item)">
|
|
|
+ <view v-for="(item, i) in group.courses" :key="i" class="recent-card" @click="onCourseClick(item)">
|
|
|
<view class="recent-thumb">
|
|
|
- <image :src="item.cover || '/static/logo.jpg'" mode="aspectFill" class="thumb-img"></image>
|
|
|
+ <image :src="item.imgUrl || '/static/logo.jpg'" mode="aspectFill" class="thumb-img"></image>
|
|
|
</view>
|
|
|
<view class="recent-info">
|
|
|
- <text class="recent-title">{{ item.title }}</text>
|
|
|
+ <text class="recent-title">{{ item.courseName }}</text>
|
|
|
<text class="recent-progress">已学: {{ item.progress }}%</text>
|
|
|
<view class="y-end">
|
|
|
<view class="btn-watch" @click.stop="onCourseClick(item)">立即观看</view>
|
|
|
@@ -139,21 +139,7 @@ export default {
|
|
|
pageSize: 10,
|
|
|
total: 0,
|
|
|
},
|
|
|
- recentList: [
|
|
|
- // {
|
|
|
- // date: '2026-02-08',
|
|
|
- // list: [
|
|
|
- // { title: '歌唱家刘金的《0基础金曲演唱速练课》', progress: 87, cover: '' },
|
|
|
- // { title: '资深编辑邹方斌讲《毛笔书法修心课》', progress: 56, cover: '' }
|
|
|
- // ]
|
|
|
- // },
|
|
|
- // {
|
|
|
- // date: '2026-02-01',
|
|
|
- // list: [
|
|
|
- // { title: '张斌《元气八段锦》系列课', progress: 56, cover: '' }
|
|
|
- // ]
|
|
|
- // }
|
|
|
- ],
|
|
|
+ recentList: [],
|
|
|
recentPage: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
@@ -173,8 +159,12 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
onCourseClick(e) {
|
|
|
+ let newUrl = `/pages/course/info?courseId=${e.courseId}`
|
|
|
+ if (e.videoId) {
|
|
|
+ newUrl = `${newUrl}&videoId=${e.videoId}`
|
|
|
+ }
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages/course/info?courseId=${e.courseId}`
|
|
|
+ url: newUrl
|
|
|
})
|
|
|
},
|
|
|
// 切换顶部 Tab
|
|
|
@@ -187,7 +177,10 @@ export default {
|
|
|
|
|
|
// 获取学习记录课程列表
|
|
|
async getCourseStudyListMethos() {
|
|
|
- const res = await getCourseStudyList({});
|
|
|
+ const res = await getCourseStudyList({},
|
|
|
+ this.recentPage.pageNum,
|
|
|
+ this.recentPage.pageSize,
|
|
|
+ );
|
|
|
if (res.code === 200 && res.data.list.length > 0) {
|
|
|
this.recentPage.total = res.data.total;
|
|
|
this.recentList = [...this.recentList, ...res.data.list];
|
|
|
@@ -259,12 +252,7 @@ export default {
|
|
|
cateType: 1,
|
|
|
yxxTag: 0
|
|
|
};
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中...",
|
|
|
- mask: true,
|
|
|
- })
|
|
|
const res = await courseTypeDataApi(params);
|
|
|
- uni.hideLoading()
|
|
|
if (res.code === 200) {
|
|
|
this.categories = [...this.categories, ...res.data.list];
|
|
|
}
|
|
|
@@ -280,7 +268,12 @@ export default {
|
|
|
if (params.subCateId === 0) {
|
|
|
delete params.subCateId;
|
|
|
}
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中...",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
const res = await courseListDataApi(params);
|
|
|
+ uni.hideLoading()
|
|
|
if (res.code === 200 && res.data.list.length > 0) {
|
|
|
this.jpPage.total = res.data.total;
|
|
|
this.courseList = [...this.courseList, ...res.data.list];
|