commission--yt-commit

This commit is contained in:
2025-06-25 15:44:12 +08:00
parent 0e20be0425
commit 1a8bcbec9f
26 changed files with 1381 additions and 24 deletions

View File

@ -0,0 +1,58 @@
// pages/course/courseDetail/courseDetail.js
Page({
data: {
items: [null, null, null,null, null, null],
activeTab: 'intro', // 默认选中“课程简介”
activeIndex: null, // 默认没有任何标题被选中
},
/** 切换选项卡 */
selectTab(e) {
const tab = e.currentTarget.dataset.tab;
this.setData({ activeTab: tab });
},
/** 选择课程标题 */
selectCourse(e) {
const index = e.currentTarget.dataset.index;
this.setData({
activeIndex: index // 设置选中的课程标题索引
});
},
// 跳转课程订单创建页面
gotoCourseOrder(e) {
const courseId = e.currentTarget.dataset.id;
wx.navigateTo({
url: `/pages/course/createCourseOrder/createCourseOrder?id=${courseId}`,
})
},
// 跳转申请推广页面
gotoApplyPromotion(e) {
const courseId = e.currentTarget.dataset.id;
wx.navigateTo({
url: `/pages/course/applyPromotion/applyPromotion?id=${courseId}`,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {},
onReady() {},
onShow() {},
onHide() {},
onUnload() {},
onPullDownRefresh() {},
onReachBottom() {},
onShareAppMessage() {}
});