diff --git a/pages/course/applyPromotion/applyPromotion.js b/pages/course/applyPromotion/applyPromotion.js new file mode 100644 index 0000000..268d218 --- /dev/null +++ b/pages/course/applyPromotion/applyPromotion.js @@ -0,0 +1,160 @@ +// pages/course/applyPromotion/applyPromotion.js +Page({ + + data: { + showCode: false, + buttonText: '生成推广码', + codeImageUrl: 'https://img.picui.cn/free/2025/06/24/685a8953cae83.png' + }, + + // 点击“生成推广码”或“查看推荐的用户” + handleGenerate() { + if (!this.data.showCode) { + // 1. 显示带遮罩的 loading,防止用户点击其他地方 + wx.showLoading({ + title: '生成中...', + mask: true + }); + + // 2. 调用后端接口生成推广码图片 + wx.request({ + url: 'https://your-backend.com/api/generatePromotionCode', // TODO: 替换成你真实的接口地址 + method: 'POST', + data: { + // 如果需要传用户信息或参数,在这里补充 + }, + success: res => { + if (1) { + // 3. 接口返回正确,更新图片地址并显示 + this.setData({ + codeImageUrl: res.data.imageUrl, + showCode: true, + buttonText: '查看推荐的用户' + }); + } else { + wx.showToast({ + title: '生成失败,请重试', + icon: 'none' + }); + } + }, + fail: () => { + wx.showToast({ + title: '网络错误,请检查连接', + icon: 'none' + }); + }, + complete: () => { + // 4. 隐藏 loading + wx.hideLoading(); + } + }); + + } else { + // 已生成时,跳转到查看推荐用户页(如有) + wx.navigateTo({ + url: '/pages/course/recommendUser/recommendUser', + }) + } + }, + + // 保存图片到相册(与之前一致) + saveImage() { + const { + codeImageUrl + } = this.data; + wx.showLoading({ + title: '保存中...', + mask: true + }); + wx.downloadFile({ + url: codeImageUrl, + success: res => { + if (res.statusCode === 200) { + wx.saveImageToPhotosAlbum({ + filePath: res.tempFilePath, + success: () => { + wx.hideLoading(); + wx.showToast({ + title: '保存成功', + icon: 'success' + }); + }, + fail: err => { + wx.hideLoading(); + wx.showToast({ + title: '保存失败', + icon: 'none' + }); + console.error('saveImageToPhotosAlbum 失败', err); + } + }); + } + }, + fail: err => { + wx.hideLoading(); + wx.showToast({ + title: '下载失败', + icon: 'none' + }); + console.error('downloadFile 失败', err); + } + }); + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/course/applyPromotion/applyPromotion.json b/pages/course/applyPromotion/applyPromotion.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/course/applyPromotion/applyPromotion.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/course/applyPromotion/applyPromotion.wxml b/pages/course/applyPromotion/applyPromotion.wxml new file mode 100644 index 0000000..14717f4 --- /dev/null +++ b/pages/course/applyPromotion/applyPromotion.wxml @@ -0,0 +1,36 @@ + + + + + + {{buttonText}} + + + + + + + + 保存图片 + + + + + + + 推广码说明 + + + + diff --git a/pages/course/applyPromotion/applyPromotion.wxss b/pages/course/applyPromotion/applyPromotion.wxss new file mode 100644 index 0000000..838decb --- /dev/null +++ b/pages/course/applyPromotion/applyPromotion.wxss @@ -0,0 +1,61 @@ +/* pages/course/applyPromotion/applyPromotion.wxss */ +.page { + background-color: #f6f7f9; + width: 100%; + overflow-y: auto; + overflow-x: hidden; + height: 100%; +} +.group { + padding: 69.38rpx 0 52.5rpx; +} +/* 上下居中改由 justify-center 控制,无需修改原有 padding */ +.text-wrapper { + padding: 30rpx 0 30rpx; + background-color: #a5d63f; + border-radius: 46.07rpx; + width: 395.63rpx; +} +.image { + width: 667.5rpx; + height: 763.13rpx; +} +.text-wrapper_2 { + padding: 30rpx 0 30rpx; + background-color: #ff8d1a; + border-radius: 46.07rpx; + width: 395.63rpx; +} +.section { + padding: 0 30rpx 60rpx; + background-color: #ffffff; +} +.group_2 { + padding: 35.63rpx 0 30rpx; +} +.image_2 { + width: 45rpx; + height: 45rpx; +} +.font { + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 27.99rpx; + color: #ffffff; +} +.text { + line-height: 28.29rpx; +} +.text_2 { + color: #000000; + font-size: 28.13rpx; + line-height: 26.19rpx; +} +.section_2 { + background-color: #ffffff00; + height: 813.75rpx; + border-left: solid 1.88rpx #000000; + border-right: solid 1.88rpx #000000; + border-top: solid 1.88rpx #000000; + border-bottom: solid 1.88rpx #000000; +} diff --git a/pages/course/applyPromotion/image/wenhao.png b/pages/course/applyPromotion/image/wenhao.png new file mode 100644 index 0000000..dd67389 Binary files /dev/null and b/pages/course/applyPromotion/image/wenhao.png differ diff --git a/pages/course/courseOrderList/courseOrderList.js b/pages/course/courseOrderList/courseOrderList.js new file mode 100644 index 0000000..abec682 --- /dev/null +++ b/pages/course/courseOrderList/courseOrderList.js @@ -0,0 +1,88 @@ +// pages/course/courseOrderList/courseOrderList.js +Page({ + /** + * 页面的初始数据 + */ + data: { + items: [null, null, null], + countDown: 30 * 60 , // 初始倒计时 + countDownStr: '' // 用于在视图中渲染的倒计时文本 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.startCountDown(); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() {}, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() {}, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + clearInterval(this.intervalId); + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + clearInterval(this.intervalId); + }, + + /** + * 启动倒计时 + */ + startCountDown() { + this.updateCountDownStr(); + this.intervalId = setInterval(() => { + let cd = this.data.countDown; + if (cd <= 1) { + clearInterval(this.intervalId); + this.setData({ + countDown: 0, + countDownStr: '00分00秒' + }); + } else { + cd--; + this.setData({ countDown: cd }); + this.updateCountDownStr(); + } + }, 1000); + }, + + /** + * 更新倒计时显示字符串 + */ + updateCountDownStr() { + const minutes = Math.floor(this.data.countDown / 60); + const seconds = this.data.countDown % 60; + const str = `${minutes}分${seconds < 10 ? '0' + seconds : seconds}秒`; + this.setData({ countDownStr: str }); + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() {}, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() {}, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() {} +}); diff --git a/pages/course/courseOrderList/courseOrderList.json b/pages/course/courseOrderList/courseOrderList.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/course/courseOrderList/courseOrderList.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/course/courseOrderList/courseOrderList.wxml b/pages/course/courseOrderList/courseOrderList.wxml new file mode 100644 index 0000000..8c9ceb1 --- /dev/null +++ b/pages/course/courseOrderList/courseOrderList.wxml @@ -0,0 +1,25 @@ + + + + + + 订单号:202506191307440406460485418 + 待支付 + + 区块链和加密数字货币(随报随学认证班)(随报随学认证班) + ¥999.00 + 请在 {{countDownStr}} 内完成支付 + + 2025-06-17 13:00:33 + + + 取消订单 + + + 支付 + + + + + + \ No newline at end of file diff --git a/pages/course/courseOrderList/courseOrderList.wxss b/pages/course/courseOrderList/courseOrderList.wxss new file mode 100644 index 0000000..54b2a3c --- /dev/null +++ b/pages/course/courseOrderList/courseOrderList.wxss @@ -0,0 +1,125 @@ +/* pages/course/courseOrderList/courseOrderList.wxss */ + +.mt-17 { + margin-top: 31.88rpx; +} +.ml-37 { + margin-left: 69.38rpx; +} +.ml-11 { + margin-left: 20.63rpx; +} +.page { + padding: 26.25rpx 0 350.63rpx; + background-color: #f8f8f8; + width: 100%; + overflow-y: auto; + overflow-x: hidden; + height: 100%; +} +.group_1 { + margin-left: 20.63rpx; + margin-right: 18.77rpx; +} +.list-item { + padding-left: 22.5rpx; + padding-right: 3.51rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.66rpx; +} +.list-item:first-child { + margin-top: 0; +} +.group { + padding: 32.51rpx 0 25.82rpx; + border-bottom: solid 1.88rpx #e3e3e3; +} +.font { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 24.17rpx; + color: #696969; +} +.text { + line-height: 24.02rpx; +} +.font_2 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 24.17rpx; + color: #f84947; +} +.font_3 { + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 35.63rpx; + color: #000000; +} +.text_2 { + margin-top: 25.69rpx; +} +.font_4 { + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 24.17rpx; + color: #3d3d3d; +} +.text_3 { + margin-top: 58.09rpx; + line-height: 22.76rpx; + margin-right: 50rpx; /* 向左移动:增加右侧间距 */ +} +.font_5 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 26.32rpx; + color: #f84947; +} +.text_4 { + margin-right: 7.13rpx; + margin-top: 34.91rpx; + font-size: 28.13rpx; +} +.group_2 { + margin-right: 20.87rpx; + margin-top: 30.30rpx; + padding: 15.94rpx 0 17.81rpx; + border-top: solid 1.88rpx #e3e3e3; +} +.font_6 { + font-size: 22.5rpx; + font-family: SourceHanSansCN; + line-height: 26.25rpx; + color: #a1a1a1; +} +.text_5 { + width: 206.25rpx; +} +.text-wrapper { + padding: 10.8rpx 0 8.16rpx; + background-color: #ffffff; + border-radius: 9.38rpx; + width: 142.5rpx; + height: 46.88rpx; + border: solid 1.88rpx #ff8d1a; +} +.font_7 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 24.17rpx; + color: #ff8d1a; +} +.text-wrapper_2 { + padding: 11.89rpx 0 8.94rpx; + background-color: #ff8d1a; + border-radius: 9.38rpx; + width: 140.63rpx; + height: 45rpx; +} +.font_8 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 24.17rpx; + color: #ffffff; +} diff --git a/pages/course/courseSettlementRecord/courseSettlementRecord.js b/pages/course/courseSettlementRecord/courseSettlementRecord.js new file mode 100644 index 0000000..088a0bb --- /dev/null +++ b/pages/course/courseSettlementRecord/courseSettlementRecord.js @@ -0,0 +1,66 @@ +// pages/course/courseSettlementRecord/courseSettlementRecord.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + items: [null,null,null] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/course/courseSettlementRecord/courseSettlementRecord.json b/pages/course/courseSettlementRecord/courseSettlementRecord.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/course/courseSettlementRecord/courseSettlementRecord.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/course/courseSettlementRecord/courseSettlementRecord.wxml b/pages/course/courseSettlementRecord/courseSettlementRecord.wxml new file mode 100644 index 0000000..cd21cc9 --- /dev/null +++ b/pages/course/courseSettlementRecord/courseSettlementRecord.wxml @@ -0,0 +1,55 @@ + + + 结算记录 + + + + 请输入下单用户 + + + + + + + 【早鸟42折】掌握CAD技能实战技能实战技能实战工作训练营 + + + + + 下单用户 + {{item.user || 'user_cxz'}} + + + 课程价格 + {{item.price || '¥168'}} + + + 下单数量 + {{item.count || '×1'}} + + + 下单时间 + {{item.orderTime || '2025-06-14 18:30:00'}} + + + 抽成比例 + {{item.rate || '%10'}} + + + 抽成补贴 + {{item.subsidy || '¥16.8'}} + + + 结算时间 + {{item.settlementTime || '2025-06-20 18:30:00'}} + + + + + diff --git a/pages/course/courseSettlementRecord/courseSettlementRecord.wxss b/pages/course/courseSettlementRecord/courseSettlementRecord.wxss new file mode 100644 index 0000000..4acd1a1 --- /dev/null +++ b/pages/course/courseSettlementRecord/courseSettlementRecord.wxss @@ -0,0 +1,117 @@ +/* pages/course/courseSettlementRecord/courseSettlementRecord.wxss */ +/* 新增统一行样式 */ +.group_row { + margin-top: 22.5rpx; + /* 左右对齐 */ + padding: 0 3.75rpx; +} + +/* 取消 time 文本的宽度限制并防止换行 */ +.text_11 { + /* 去掉原先 width: 240rpx; */ + width: auto !important; +} +/* 防止文本换行 */ +.nowrap { + white-space: nowrap; +} + +/* 以下为原样式,未作改动 */ +.ml-3 { + margin-left: 5.63rpx; +} +.mt-13 { + margin-top: 24.38rpx; +} +.ml-11 { + margin-left: 20.63rpx; +} +.page { + padding: 30rpx 37.5rpx 785.63rpx; + background-image: linear-gradient(180deg, #ff8d1a 0%, #ff8d1a00 31.5%); + width: 100%; + overflow-y: auto; + overflow-x: hidden; + height: 100%; +} +.text { + color: #ffffff; + font-size: 33.75rpx; + font-family: SourceHanSansCN; + line-height: 31.29rpx; +} +.section { + padding: 15rpx 18.75rpx; + background-color: #ffffff; + border-radius: 9.38rpx; +} +.image { + width: 35.63rpx; + height: 35.63rpx; +} +.text_2 { + color: #b0b0b0; + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 27.94rpx; +} +.list { + padding-top: 22.5rpx; +} +.list-item { + padding: 22.5rpx 7.5rpx 22.5rpx 18.75rpx; + background-color: #ffffff; + border-radius: 9.38rpx; +} +.list-item:first-child { + margin-top: 0; +} +.group { + margin-left: 3.75rpx; + margin-right: 22.5rpx; +} +.image_2 { + border-radius: 9.38rpx; + width: 196.88rpx; + height: 125.63rpx; +} +.font { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 31.88rpx; + color: #000000; +} +.text_3 { + margin-top: 3.75rpx; +} +.font_2 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 24.34rpx; + color: #000000; +} +.font_3 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 21.49rpx; + color: #fc2f35; +} +.font_4 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 19.24rpx; + color: #000000; +} +.font_5 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 21.49rpx; + color: #0ed062; +} +.text_13 { + /* margin-right: 15rpx; */ + font-size: 28.13rpx; +} +.text_14 { + font-size: 28.13rpx; +} diff --git a/pages/course/recommendUser/image/right.png b/pages/course/recommendUser/image/right.png new file mode 100644 index 0000000..fedc222 Binary files /dev/null and b/pages/course/recommendUser/image/right.png differ diff --git a/pages/course/recommendUser/recommendUser.js b/pages/course/recommendUser/recommendUser.js new file mode 100644 index 0000000..e0db4fd --- /dev/null +++ b/pages/course/recommendUser/recommendUser.js @@ -0,0 +1,67 @@ +// pages/course/recommendUser/recommendUser.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + items: [null, null, null], + items_1: [null, null, null], + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/course/recommendUser/recommendUser.json b/pages/course/recommendUser/recommendUser.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/course/recommendUser/recommendUser.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/course/recommendUser/recommendUser.wxml b/pages/course/recommendUser/recommendUser.wxml new file mode 100644 index 0000000..64512dd --- /dev/null +++ b/pages/course/recommendUser/recommendUser.wxml @@ -0,0 +1,78 @@ + + + 我推荐的用户 + + + 直推用户 + + + + 用户名 + 给我创造的收益 + 绑定时间 + 联系 + + + + + + + {{item.userName || 'user_cxzsdfdfs'}} + + ¥{{item.revenue || '160.00'}} + + {{item.bindTime || '2025-06-20'}} + + + + + + + + + + + 间推用户 + + + 用户名 + 给我创造的收益 + 绑定时间 + 联系 + + + + + {{item.userName || 'user_cxzsdfdfs'}} + + ¥{{item.revenue || '160.00'}} + + {{item.bindTime || '2025-06-20'}} + + + + + + + + + + diff --git a/pages/course/recommendUser/recommendUser.wxss b/pages/course/recommendUser/recommendUser.wxss new file mode 100644 index 0000000..4b87fb4 --- /dev/null +++ b/pages/course/recommendUser/recommendUser.wxss @@ -0,0 +1,122 @@ +/*=========== 公共间距 ===========*/ +.ml-35 { + margin-left: 65.63rpx; +} +.ml-27 { + margin-left: 50.63rpx; +} +.mt-13 { + margin-top: 24.38rpx; +} + +/*=========== 页面整体 ===========*/ +.page { + padding: 37.76rpx 41.25rpx 980.63rpx; + background-image: linear-gradient(180deg, #ff8d1a 0%, #ff8d1a00 27%); + width: 100%; + overflow-y: auto; + overflow-x: hidden; + height: 100%; +} + +/*=========== 文本样式,均放大一号 ===========*/ +/* 主标题 “我推荐的用户” */ +.text { + color: #ffffff; + font-size: 36rpx; /* 原 33.75rpx → 36rpx */ + line-height: 34rpx; /* 对应行高 */ + font-family: SourceHanSansCN; +} + +/* 次级标题 “直推用户”/“间推用户” */ +.text_2 { + margin-top: 40.42rpx; + color: #ffffff; + font-size: 36rpx; /* 新增字号 */ + line-height: 34rpx; + font-family: SourceHanSansCN; +} + +/* 通用白字 */ +.font { + font-size: 33rpx; /* 原 30rpx → 33rpx */ + line-height: 30rpx; + color: #ffffff; + font-family: SourceHanSansCN; +} + +/* 卡片容器 */ +.section { + padding: 27.66rpx 27.09rpx 22.67rpx; + background-color: #ffffff; + border-radius: 9.38rpx; +} +.view { + margin-top: 25.58rpx; +} +.group { + padding-left: 14.06rpx; +} + +/* 表头文字 */ +.font_2 { + font-size: 30rpx; /* 原 26.25rpx → 30rpx */ + line-height: 28rpx; + color: #323232; + font-family: SourceHanSansCN; +} + +/* 表格内容:收益、时间 */ +.font_4 { + font-size: 30rpx; /* 原 26.25rpx → 30rpx */ + line-height: 23rpx; + color: #323232; + font-family: SourceHanSansCN; +} + +/* 小图标 */ +.image { + width: 30rpx; + height: 30rpx; +} + +/* “间推用户”前缀 */ +.text_6 { + margin-left: 2.74rpx; + color: #323232; + font-size: 30rpx; /* 新增字号 */ + line-height: 28rpx; + font-family: SourceHanSansCN; +} + +/* 用户名文字,放大一号 */ +.font_3 { + font-size: 30rpx; /* 原 26.25rpx → 30rpx */ + line-height: 36rpx; /* 支持两行 */ + color: #323232; + font-family: SourceHanSansCN; +} + +/*=========== 新增:用户名自动换行 ===========*/ +/* 固定宽度,在“sdfdfs”处自动断行 */ +.name { + flex: none; /* 关闭 flex 自动拉伸 */ + width: 127rpx; /* 根据字符长度微调,200rpx 在 “user_cxz” 后换行 */ + word-break: break-all; /* 任意字符处断行 */ + white-space: normal; /* 允许多行 */ + margin-right: 50rpx; +} + +/* 列表条目顶部对齐,支持多行用户名 */ +.list-item, +.list-item_2 { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: flex-start; + margin-right: 12.28rpx; +} +.list-item:first-child, +.list-item_2:first-child { + margin-top: 0; +} diff --git a/static/course.png b/static/course.png new file mode 100644 index 0000000..58c8fc2 Binary files /dev/null and b/static/course.png differ diff --git a/static/courseselected.png b/static/courseselected.png new file mode 100644 index 0000000..3362644 Binary files /dev/null and b/static/courseselected.png differ