大修改

This commit is contained in:
Yeomai committed 2026-09-30 03:38:10 +08:00
1 parent a1cbc9404a
commit e81481623c
47 files changed
+1453 -285

No files matched your search

+2 -14
View File
@@ -10,7 +10,6 @@ Page({
staticBase: config.STATIC_BASE_URL,
hasCourse: false,
ownedCourses: [],
otherCourses: [],
tipsHtml: '',
},
@@ -21,6 +20,8 @@ Page({
onShow() {
if (store.isLoggedIn()) this.refresh();
// 未登录(含刚退出登录)不能留着一份别人的课程列表
else this.setData({ ownedCourses: [], hasCourse: false });
},
refresh() {
@@ -33,13 +34,6 @@ Page({
this.setData({ ownedCourses: list || [], hasCourse: (list || []).length > 0 });
})
.catch((err) => console.warn('[kecheng] 已购课程加载失败', err));
api
.getCourses()
.then((list) => {
this.setData({ otherCourses: (list || []).filter((c) => !c.owned) });
})
.catch((err) => console.warn('[kecheng] 课程列表加载失败', err));
},
loadTips() {
@@ -56,12 +50,6 @@ Page({
});
},
toStoreCourse(e) {
wx.navigateTo({
url: '/pages/VideoDetails/VideoDetails?code=' + e.currentTarget.dataset.code,
});
},
onShareAppMessage() {
return { title: '叶雷讲数学', path: '/pages/index/index' };
},
-13
View File
@@ -20,18 +20,5 @@
</view>
</block>
<block wx:if="{{otherCourses.length > 0}}">
<view wx:for="{{otherCourses}}" wx:for-item="item" wx:for-index="index" wx:key="code"
class="kecheng" bind:tap="toStoreCourse" data-code="{{item.code}}">
<view class="kecheng_video_up">
<image class="kecheng_img" src="{{item.coverUrl}}" mode="aspectFit" />
</view>
<view class="kecheng_video_right">
<text class="kecheng_title">{{item.title}}</text>
<text class="kecheng_details">{{item.intro}}</text>
</view>
<text style="position: absolute; right: 24rpx; bottom: 24rpx; font-size: 24rpx; color: #ff6b00;">未开通</text>
</view>
</block>
</scroll-view>