Compare commits

...

15 Commits

Author SHA1 Message Date
53d0cc6767 commission--yt-commit 2025-06-25 15:45:25 +08:00
1a8bcbec9f commission--yt-commit 2025-06-25 15:44:12 +08:00
0e20be0425 commission--yt-commit 2025-06-23 10:03:08 +08:00
2350346d95 commission--yt-commit 2025-06-19 14:13:59 +08:00
b360697a37 Merge branch 'feture-yt' into dev
# Conflicts:
#	pages/loginModule/register/register.js
2025-06-17 19:27:36 +08:00
9241e3bce3 Merge remote-tracking branch 'origin/dev' into dev 2025-06-17 19:26:09 +08:00
8c0a108e8f commission--yt-commit 2025-06-17 19:25:58 +08:00
ade53fa60f Merge pull request '测试分支合并请求333' (#11) from feature-xxx into dev
Reviewed-on: http://154.8.193.216:3030/admin1/qingcheng-xiaochengxu/pulls/11
2025-06-17 11:13:11 +00:00
9b8b40d2ed 测试分支合并请求333 2025-06-17 19:10:59 +08:00
5093eb3058 Merge branch 'feature-xxx' into dev
# Conflicts:
#	app.js
2025-06-17 18:59:05 +08:00
1e2593fd3b 测试分支合并请求 2025-06-17 18:17:05 +08:00
a5da14642b Merge branch 'dev' into feature-xxx 2025-06-17 01:10:09 +00:00
0de7e859c2 测试分支合并请求 2025-06-17 09:04:01 +08:00
bd98398c4e Merge branch 'feture-yt' into dev
# Conflicts:
#	app.json
2025-06-16 16:18:29 +08:00
a8d326cc5f commission--yt-commit 2025-06-16 16:17:00 +08:00
71 changed files with 2963 additions and 31 deletions

7
app.js
View File

@ -1,11 +1,6 @@
const { checkLogin, checkLogin2 } = require('./utils/logcheck'); const { checkLogin } = require('./utils/logcheck');
App({ App({
onLaunch: function () { onLaunch: function () {
checkLogin2()
checkLogin2()
checkLogin2()
checkLogin2()
checkLogin2()
} }
}); });

View File

@ -1,9 +1,9 @@
{ {
"pages": [ "pages": [
"pages/personCenter/mine/mine",
"pages/loginModule/pwdLogin/pwdLogin", "pages/loginModule/pwdLogin/pwdLogin",
"pages/loginModule/agreement/agreement", "pages/loginModule/agreement/agreement",
"pages/loginModule/privacyPolicy/privacyPolicy", "pages/loginModule/privacyPolicy/privacyPolicy",
"pages/personCenter/mine/mine",
"pages/personCenter/subCommissionSetting/subCommissionSetting", "pages/personCenter/subCommissionSetting/subCommissionSetting",
"pages/test/testVideo/testVideo", "pages/test/testVideo/testVideo",
"pages/personCenter/withdrawal/withdrawal", "pages/personCenter/withdrawal/withdrawal",
@ -24,7 +24,17 @@
"pages/personCenter/resetPwd/resetPwd", "pages/personCenter/resetPwd/resetPwd",
"pages/personCenter/bindBankCard/bindBankCard", "pages/personCenter/bindBankCard/bindBankCard",
"pages/projectModule/settlement/settlement", "pages/projectModule/settlement/settlement",
"pages/projectModule/subSettlement/subSettlement" "pages/projectModule/subSettlement/subSettlement",
"pages/course/homepage/homepage",
"pages/course/searchCourses/searchCourses",
"pages/course/courseList/courseList",
"pages/course/courseDetail/courseDetail",
"pages/course/createCourseOrder/createCourseOrder",
"pages/course/waitPayOrder/waitPayOrder",
"pages/course/applyPromotion/applyPromotion",
"pages/course/recommendUser/recommendUser",
"pages/course/courseOrderList/courseOrderList",
"pages/course/courseSettlementRecord/courseSettlementRecord"
], ],
"window": { "window": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
@ -47,6 +57,12 @@
"iconPath": "/static/jd1.png", "iconPath": "/static/jd1.png",
"selectedIconPath": "/static/jd2.png" "selectedIconPath": "/static/jd2.png"
}, },
{
"pagePath": "pages/course/homepage/homepage",
"text": "课程",
"iconPath": "/static/course.png",
"selectedIconPath": "/static/courseselected.png"
},
{ {
"pagePath": "pages/personCenter/mine/mine", "pagePath": "pages/personCenter/mine/mine",
"text": "我的", "text": "我的",

View File

@ -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() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,36 @@
<!-- pages/course/applyPromotion/applyPromotion.wxml -->
<view class="flex-col page">
<view class="flex-col items-center group">
<!-- 生成推广码按钮,文字垂直居中,点击触发 handleGenerate -->
<view class="flex-col justify-center items-center text-wrapper" bindtap="handleGenerate">
<text class="font text">{{buttonText}}</text>
</view>
<!-- 只有当 showCode 为 true 时才显示推广码图片 -->
<image
wx:if="{{showCode}}"
class="mt-12 image"
src="{{codeImageUrl}}"
/>
<!-- 只有当 showCode 为 true 时才显示保存图片按钮,且垂直居中 -->
<view
wx:if="{{showCode}}"
class="mt-12 flex-col justify-center items-center text-wrapper_2"
bindtap="saveImage"
>
<text class="font">保存图片</text>
</view>
</view>
<view class="flex-col section">
<view class="flex-row items-center group_2">
<image
class="image_2"
src="./image/wenhao.png"
/>
<text class="ml-6 font text_2">推广码说明</text>
</view>
<view class="section_2"></view>
</view>
</view>

View File

@ -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;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

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() {}
});

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,89 @@
<view class="flex-col page">
<view class="flex-col">
<!-- 背景 + 支付信息 -->
<view class="flex-col justify-start section">
<view class="flex-col section_2">
<view class="flex-row items-baseline self-start no-wrap">
<text class="shrink-0 font">券后支付</text>
<text class="shrink-0 font_2 text text_2 mx-15">168元</text>
<text class="flex-1 font">即可观看所有视频</text>
</view>
<view class="mt-18 flex-col justify-start items-center self-center text-wrapper" bind:tap="gotoCourseOrder" data-id="{{ '1' }}">
<text class="font_3 text_3">立即购买</text>
</view>
</view>
</view>
<!-- 选项卡 -->
<view class="flex-col section_3">
<view class="flex-row justify-center group_2">
<text bindtap="selectTab" data-tab="intro" class="text-tab {{activeTab==='intro'?'tab-active':'tab-inactive'}}">课程简介</text>
<text bindtap="selectTab" data-tab="catalog" class="text-tab {{activeTab==='catalog'?'tab-active':'tab-inactive'}}">课程目录</text>
</view>
</view>
<!-- 标题+价格 -->
<view class="flex-col section_4">
<view class="flex-row items-center group_4">
<view class="shrink-0 group_5">
<text class="text_6">168</text>
<text class="font_3 text_7">元券后价</text>
</view>
<view class="ml-4 flex-col justify-start items-start shrink-0 relative group_6">
<text class="font_2 text text_8">268元</text>
<view class="divider pos"></view>
</view>
</view>
<text class="group_4 text_9 mt-9">【早鸟42折】掌握CAD技能+++++++实战工作训练营</text>
</view>
<!-- 课程概述(仅当 activeTab==='intro' -->
<view wx:if="{{activeTab==='intro'}}" class="flex-col section_5">
<view class="flex-row items-center group_7">
<image class="image" src="./image/cal.png" />
<text class="ml-6 font_2 text_10">课程概述</text>
</view>
<view class="section_6"></view>
</view>
<!-- 课程目录(仅当 activeTab==='catalog' -->
<view wx:if="{{activeTab==='catalog'}}" class="flex-col mt-35">
<view class="flex-col section_7">
<view class="flex-col list">
<view class="flex-col list-item mt-15" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="flex-col justify-start self-end text-wrapper_2">
<text class="font_4 text_11">全集试看</text>
</view>
<view class="flex-row self-start group_8 mt-1">
<text class="shrink-0 self-start font_5 text_12">{{ index + 1}}</text>
<text class="ml-16 flex-1 font_2 {{activeIndex === index ? 'active-title' : ''}}" bindtap="selectCourse" data-index="{{index}}">
推荐片:带你透视中国基层干部的生态图景推荐片:带你透视中国基层干部的生态图景
</text>
</view>
<view class="flex-row justify-between self-stretch group_9 mt-1">
<text class="self-start font_6 text_13" style="margin-top: 10rpx;">视频课·27分59秒</text>
<image class="image_2" src="./image/lock.png" />
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 底部固定按钮栏 -->
<view class="flex-row items-center section_8 section_8_fixed">
<view class="flex-col items-center shrink-0" style="margin-left: 30rpx;">
<image class="image_3" src="./image/messge.png" />
<text class="font_6 text_16 mt-1">咨询</text>
</view>
<view class="ml-44 flex-row flex-1">
<view class="flex-col justify-start items-center text-wrapper_3" bind:tap="gotoApplyPromotion" data-id="{{ '1' }}">
<text class="font_7 text_14">申请推广</text>
</view>
<view class="flex-col justify-start items-center text-wrapper_4 ml-15" bind:tap="gotoCourseOrder" data-id="{{ '1' }}">
<text class="font_7 text_15">立即购买</text>
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,336 @@
/* pages/course/courseDetail/courseDetail.wxss */
/* 通用间距 */
.mt-9 {
margin-top: 16.88rpx;
}
/* .mt-35 {
margin-top: 65.63rpx;
} */
.mt-15 {
margin-top: 28.13rpx;
}
.mt-7 {
margin-top: 13.13rpx;
}
.mt-1 {
margin-top: 1.88rpx;
}
.ml-15 {
margin-left: 28.13rpx;
}
/* 页面容器 */
.page {
background-color: #f6f7f9;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
padding-bottom: 100rpx; /* 为底部固定栏预留空间 */
}
/* 背景图 */
.section {
background-image: url('https://ide.code.fun/api/image?token=6858ee4b4ae84d0012334127&name=1f211c9a259577e8af923158ce6e4ab6.png');
background-size: 100% 100%;
background-repeat: no-repeat;
}
/* 顶部遮罩 */
.section_2 {
padding: 131.25rpx 176.25rpx 101.25rpx;
background-color: #00000063;
backdrop-filter: blur(9.38rpx);
}
/* 宽度组 */
.group {
width: 344.34rpx;
}
/* 白色文字 */
.font {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 31.88rpx;
color: #ffffff;
}
/* 橙色按钮 */
.text-wrapper {
padding: 15rpx 0;
background-color: #ff8d1a;
border-radius: 187.5rpx;
width: 208.13rpx;
}
/* 橙色小字体 */
.font_3 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.6rpx;
color: #ff8d1a;
}
.text_3 {
color: #ffffff;
}
/* 选项卡容器 */
.section_3 {
padding: 0 135rpx 7.5rpx 142.5rpx;
background-color: #ffffff;
border-bottom: solid 1.88rpx #9c9c9c;
}
.group_2 {
padding: 22.5rpx 0 11.25rpx;
display: flex;
justify-content: center; /* 增加选项卡间隔 */
}
/* 标题+价格 */
.section_4 {
padding: 37.5rpx 7.5rpx 30rpx 22.5rpx;
background-color: #ffffff;
}
.group_4 {
padding: 0 3.75rpx;
}
.group_5 {
line-height: 28.8rpx;
height: 30.58rpx;
}
.text_6 {
color: #f84947;
font-size: 37.5rpx;
font-family: SourceHanSansCN;
font-weight: 700;
line-height: 28.8rpx;
}
.text_7 {
color: #f84947;
line-height: 24.43rpx;
}
.group_6 {
margin-right: 453.75rpx;
width: 75.02rpx;
}
.divider {
background-color: #8c8c8c;
width: 75.02rpx;
height: 1.88rpx;
}
.pos {
position: absolute;
left: 0;
right: 0;
top: 50%;
transform: translateY(-50%);
}
.text_9 {
color: #000000;
font-size: 33.75rpx;
font-family: SourceHanSansCN;
line-height: 41.25rpx;
}
/* 课程概述 */
.section_5 {
margin-top: 28.13rpx;
padding: 0 30rpx 52.5rpx;
background-color: #ffffff;
}
.group_7 {
padding: 26.25rpx 0;
}
.image {
width: 39.38rpx;
height: 39.38rpx;
}
/* 概述内容区 */
.section_6 {
background-color: #ffffff00;
height: 791.25rpx;
border-left: solid 1.88rpx #000000;
border-right: solid 1.88rpx #000000;
border-top: solid 1.88rpx #000000;
border-bottom: solid 1.88rpx #000000;
}
/* 目录列表 */
.section_7 {
padding: 31.88rpx 0;
background-color: #ffffff;
}
.list {
margin: 0 22.5rpx;
}
.group_8 {
width: 590.81rpx;
display: flex;
align-items: center; /* 序号垂直居中 */
margin-top: 3rpx !important; /* 视频标题与上方内容的间距 */
}
.list-item {
padding-left: 37.5rpx;
padding-bottom: 18.75rpx;
background-color: #f6f7f9;
border-radius: 10.63rpx;
}
.list-item:first-child {
margin-top: 0;
}
/* 全局试看按钮 */
.text-wrapper_2 {
padding: 3.75rpx 0;
background-color: #ff8d1a;
border-radius: 0rpx 9.38rpx 0rpx 9.38rpx;
}
.font_4 {
font-size: 24rpx; /* 放大字体 */
font-family: SourceHanSansCN;
line-height: 28rpx; /* 放大行高 */
color: #ffffff;
}
.text_11 {
margin: 0 7.5rpx;
line-height: 28rpx; /* 放大行高 */
}
/* 列表文本 */
.font_5 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 19.24rpx;
color: #8f8f8f;
}
.text_12 {
margin-top: 0; /* 垂直居中序号 */
align-self: center !important;
}
.font_2 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 31.88rpx;
color: #000000;
}
/* 其他文本 */
.text {
word-break: break-all;
}
.text_8 {
color: #8c8c8c;
}
.text_2 {
color: #ff8d1a;
}
.group_9 {
padding-left: 41.25rpx;
padding-right: 20.63rpx;
}
.font_6 {
font-size: 22.5rpx;
font-family: SourceHanSansCN;
line-height: 19.24rpx;
color: #8f8f8f;
}
.text_13 {
line-height: 20.79rpx;
}
.image_2 {
width: 30rpx;
height: 30rpx;
}
/* 底部原有按钮组 */
.section_8 {
padding: 15rpx 26.25rpx;
background-color: #ffffff;
}
.image_3 {
width: 52.5rpx;
height: 52.5rpx;
}
.text_16 {
color: #000000;
line-height: 20.94rpx;
}
.text-wrapper_3 {
padding: 22.5rpx 0;
flex: 1 1 268.13rpx;
background-color: #a5d63f;
border-radius: 75rpx;
height: 71.25rpx;
}
.font_7 {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 28.8rpx;
color: #ffffff;
}
.text_14 {
line-height: 28.29rpx;
}
.text-wrapper_4 {
padding: 22.5rpx 0;
flex: 1 1 268.13rpx;
background-color: #ff8d1a;
border-radius: 75rpx;
height: 71.25rpx;
}
.text_15 {
line-height: 28.11rpx;
}
/* 新增:选项卡文字基础样式 */
.text-tab {
font-size: 32rpx;
font-family: SourceHanSansCN;
line-height: 38rpx;
padding-bottom: 8rpx; /* 文字与下划线之间留白 */
margin: 0 80rpx; /* 增大间距 */
}
/* 新增:选中/未选中状态 */
.tab-active {
color: #ff8d1a;
border-bottom: 2rpx solid #ff8d1a;
}
.tab-inactive {
color: #000000;
border-bottom: none;
}
/* 覆盖:让 .group_2 居中其子元素,增强间距控制 */
.group_2 {
justify-content: center !important;
}
/* 新增:底部固定按钮栏 */
.section_8_fixed {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 999;
background-color: #ffffff;
}
/* 禁止容器内元素换行 */
.no-wrap {
flex-wrap: nowrap !important;
}
/* 强制所有 text 不换行 */
.no-wrap text {
white-space: nowrap;
}
.mx-15 {
margin-left: 15rpx;
margin-right: 15rpx;
}
/* 课程目录的点击状态 */
.active-title {
color: #ff8d1a; /* 点击后的颜色:橙色 */
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,80 @@
// pages/course/courseList/courseList.js
Page({
/**
* 页面的初始数据
*/
data: {
items:[null,null,null,null,null,null,null,null,null],
courseType: '', // 课程类别
},
// 跳转课程详情页面
gotoCourseDetail(e) {
const courseId = e.currentTarget.dataset.id;
wx.navigateTo({
url: `/pages/course/courseDetail/courseDetail?id=${courseId}` ,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// console.log('option--->',options);
this.setData({
courseType: options.type
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,35 @@
<!--pages/course/courseList/courseList.wxml-->
<view class="flex-col page">
<text class="self-center text">{{ courseType }}</text>
<image
class="shrink-0 self-start image image_2"
src="./image/line.png"
/>
<image
class="shrink-0 self-end image image_3"
src="./image/line.png"
/>
<view class="flex-col self-stretch list">
<view
class="flex-col justify-start list-item"
wx:for="{{items}}"
wx:for-item="item"
wx:for-index="index"
wx:key="index"
>
<view class="flex-row items-center relative group" bind:tap="gotoCourseDetail" data-id="{{ '1' }}">
<image
class="shrink-0 image_4"
src="https://ide.code.fun/api/image?token=6858ee4b4ae84d0012334127&name=9c2a22f14e2bd768cbd40d939693e4a8.png"
/>
<view class="flex-col flex-1 ml-12">
<text class="font">区块链和加密数字货币(随报随学认证班)</text>
<view class="flex-row justify-between items-baseline mt-17">
<text class="font_2">券后99元起</text>
<text class="font_3">18523人学习</text>
</view>
</view>
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,63 @@
/* pages/course/courseList/courseList.wxss */
.mt-17 {
margin-top: 31.88rpx;
}
.page {
/* padding: 38.53rpx 0 ; */
background-color: #ffffff;
height: 100%;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
}
.text {
color: #000000;
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.64rpx;
}
.image {
width: 255rpx;
height: 1.88rpx;
}
.image_2 {
margin-left: 40.78rpx;
margin-top: -14.7rpx;
}
.image_3 {
margin-right: 37.97rpx;
}
.list {
padding-top: 20.21rpx;
}
.list-item {
height: 178.13rpx;
}
.group {
margin: -18.24rpx 29.46rpx 0 35.63rpx;
padding: 57.19rpx 0 26.27rpx;
border-bottom: solid 1.88rpx #d6d6d6;
}
.image_4 {
border-radius: 9.38rpx;
width: 208.13rpx;
height: 133.13rpx;
}
.font {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 31.88rpx;
color: #000000;
}
.font_2 {
font-size: 26.25rpx;
font-family: AlibabaPuHuiTi;
line-height: 24.15rpx;
color: #ff5733;
}
.font_3 {
font-size: 22.5rpx;
font-family: AlibabaPuHuiTi;
line-height: 20.34rpx;
color: #a6a6a6;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

View File

@ -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() {}
});

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,25 @@
<!-- pages/course/courseOrderList/courseOrderList.wxml -->
<view class="flex-col justify-start page">
<view class="flex-col group_1">
<view class="flex-col list-item mt-17" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="flex-row self-stretch group">
<text class="font text">订单号202506191307440406460485418</text>
<text class="font_2 ml-37">待支付</text>
</view>
<text class="self-stretch font_3 text_2">区块链和加密数字货币(随报随学认证班)(随报随学认证班)</text>
<text class="self-end font_4 text_3">¥999.00</text>
<text class="self-end font_5 text_4">请在 {{countDownStr}} 内完成支付</text>
<view class="flex-row justify-between items-center self-stretch group_2">
<text class="font_6 text_5">2025-06-17 13:00:33</text>
<view class="flex-row">
<view class="flex-col justify-start items-center text-wrapper">
<text class="font_7">取消订单</text>
</view>
<view class="flex-col justify-start items-center text-wrapper_2 ml-11">
<text class="font_8">支付</text>
</view>
</view>
</view>
</view>
</view>
</view>

View File

@ -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;
}

View File

@ -0,0 +1,66 @@
// pages/course/courseSettlementRecord/courseSettlementRecord.js
Page({
/**
* 页面的初始数据
*/
data: {
items: [null,null,null]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,55 @@
<!-- pages/course/courseSettlementRecord/courseSettlementRecord.wxml -->
<view class="flex-col page">
<text class="self-center text">结算记录</text>
<view class="mt-14 flex-col self-stretch">
<view class="flex-row items-center section">
<image
class="image"
src="https://ide.code.fun/api/image?token=685b63c64ae84d0012336c74&name=1e77401cdad84f355f02111ca86729e8.png"
/>
<text class="text_2 ml-3">请输入下单用户</text>
</view>
<view class="flex-col list">
<view class="flex-col list-item mt-13" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 课程标题区保持不变 -->
<view class="flex-row group">
<image
class="shrink-0 image_2"
src="https://ide.code.fun/api/image?token=685b63c64ae84d0012336c74&name=6ea8ffd561d2d1408e5cbb4f5ee10374.png"
/>
<text class="flex-1 self-start font text_3 ml-11">【早鸟42折】掌握CAD技能实战技能实战技能实战工作训练营</text>
</view>
<!-- 重新拆分为单行对齐 -->
<view class="flex-row justify-between group_row">
<text class="font_2">下单用户</text>
<text class="font text_5">{{item.user || 'user_cxz'}}</text>
</view>
<view class="flex-row justify-between group_row">
<text class="font_2">课程价格</text>
<text class="font_3">{{item.price || '¥168'}}</text>
</view>
<view class="flex-row justify-between group_row">
<text class="font_2">下单数量</text>
<text class="font_4">{{item.count || '×1'}}</text>
</view>
<view class="flex-row justify-between group_row">
<text class="font_2">下单时间</text>
<text class="font text_11 nowrap">{{item.orderTime || '2025-06-14 18:30:00'}}</text>
</view>
<view class="flex-row justify-between group_row">
<text class="font_2">抽成比例</text>
<text class="font_5 text_13">{{item.rate || '%10'}}</text>
</view>
<view class="flex-row justify-between group_row">
<text class="font_2">抽成补贴</text>
<text class="font text_14">{{item.subsidy || '¥16.8'}}</text>
</view>
<view class="flex-row justify-between group_row">
<text class="font_2">结算时间</text>
<text class="font text_11 nowrap">{{item.settlementTime || '2025-06-20 18:30:00'}}</text>
</view>
</view>
</view>
</view>
</view>

View File

@ -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;
}

View File

@ -0,0 +1,77 @@
// pages/course/createCourseOrder/createCourseOrder.js
Page({
/**
* 页面的初始数据
*/
data: {
courseId: 0, // 课程id
},
// 创建订单方法
createOrder(e) {
const courseId = e.currentTarget.dataset.id;
wx.navigateTo({
url: `/pages/course/waitPayOrder/waitPayOrder?id=${courseId}`,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log('课程id--->',options.id);
this.setData({
courseId: options.id,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,46 @@
<!-- pages/course/createCourseOrder/createCourseOrder.wxml -->
<view class="flex-col page">
<view class="flex-col content">
<view class="flex-row items-center section">
<image
class="shrink-0 image"
src="https://ide.code.fun/api/image?token=6859f7a14ae84d0012334fa9&name=9c2a22f14e2bd768cbd40d939693e4a8.png"
/>
<view class="flex-col flex-1 ml-11">
<text class="self-start text">区块链和加密数字货币(随报随学认证班)(随报随学认证班)</text>
<view class="flex-row items-center self-stretch group mt-15">
<text class="text_2">¥999</text>
<view class="flex-col justify-start relative ml-1">
<text class="text_3">¥999</text>
<view class="divider pos"></view>
</view>
</view>
</view>
</view>
<view class="flex-row justify-between items-center section_2 mt-14">
<text class="font">商品价格</text>
<text class="font text_4">¥999</text>
</view>
<view class="flex-row justify-between items-center section_3 mt-14">
<view class="flex-row items-center">
<image
class="shrink-0 image_2"
src="./image/wxpay.png"
/>
<text class="font ml-12">微信支付</text>
</view>
<radio-group class="image_3">
<radio checked="true"></radio>
</radio-group>
</view>
</view>
<!-- 固定在底部的区域 -->
<view class="footer">
<view class="flex-row justify-between items-center section_4">
<text class="font text_5">应付¥999</text>
<view class="flex-col justify-center items-center text-wrapper" bind:tap="createOrder" data-id="{{ '1' }}">
<text class="font text_6">立即支付</text>
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,118 @@
.ml-11 {
margin-left: 20.63rpx;
}
.mt-15 {
margin-top: 28.13rpx;
}
.ml-1 {
margin-left: 1.88rpx;
}
.page {
background-color: #f7f7f7;
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
}
.content {
flex: 1;
overflow-y: auto;
}
.section {
padding: 20.63rpx 22.5rpx 27.58rpx;
background-color: #ffffff;
border-radius: 3.94rpx;
}
.image {
border-radius: 9.38rpx;
width: 208.13rpx;
height: 133.13rpx;
}
.text {
color: #000000;
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 35.63rpx;
width: 429.38rpx;
}
.group {
padding: 0 4.29rpx;
}
.text_2 {
color: #f84947;
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 22.76rpx;
}
.text_3 {
color: #8c8c8c;
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 19.93rpx;
}
.divider {
background-color: #8c8c8c;
width: 69.56rpx;
height: 1.88rpx;
}
.pos {
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
.section_2 {
padding: 48.69rpx 29.21rpx 43.35rpx 44.96rpx;
background-color: #ffffff;
}
.font {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.96rpx;
color: #323232;
}
.text_4 {
line-height: 22.91rpx;
}
.section_3 {
padding: 39.38rpx 46.88rpx 897.38rpx 48.75rpx;
background-color: #ffffff;
}
.image_2 {
width: 52.5rpx;
height: 52.5rpx;
}
.image_3 {
width: 41.25rpx;
height: 41.25rpx;
}
.section_4 {
padding: 16.88rpx 24.38rpx 16.88rpx 31.09rpx;
background-color: #ffffff;
}
.text_5 {
color: #000000;
line-height: 28.05rpx;
}
.text-wrapper {
padding: 14.07rpx 0 19.07rpx;
background-color: #ff8d1a;
border-radius: 75rpx;
width: 268.13rpx;
height: 71.25rpx;
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
}
.text_6 {
color: #ffffff;
line-height: 28.11rpx;
}
.footer {
margin-top: auto;
width: 100%;
position: fixed;
bottom: 0;
left: 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,115 @@
import { baseUrl } from "../../../request";
// pages/course/homepage/homepage.js
Page({
data: {
// 初始时置空,待接口返回后再渲染
courseList: []
},
// 跳转课程列表页
gotoCourseList(e) {
const courseType = e.currentTarget.dataset.type;
wx.navigateTo({
url: `/pages/course/courseList/courseList?type=${courseType}`,
});
},
// 跳转课程详情
gotoCourseDetail(e) {
const courseId = e.currentTarget.dataset.id;
wx.navigateTo({
url: `/pages/course/courseDetail/courseDetail?id=${courseId}`,
});
},
// 跳转课程搜索页面
gotoSearch() {
wx.navigateTo({
url: '/pages/course/searchCourses/searchCourses',
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// 请求后端接口
wx.request({
url: baseUrl + '/course/query/hot', // ← 替换为真实接口
method: 'POST',
header: {
Authorization: wx.getStorageSync('token')
},
success: (res) => {
if (res.data.code === 1) {
// 将后端的 data 数组绑定到 items
this.setData({
courseList: res.data.data
});
} else {
wx.showToast({
title: res.data.message || '获取课程数据失败',
icon: 'none'
});
}
},
fail: () => {
wx.showToast({
title: '网络异常,请稍后重试',
icon: 'none'
});
}
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,62 @@
<view class="flex-col page">
<view class="flex-col self-stretch group">
<view class="flex-row justify-center items-center section" bind:tap="gotoSearch">
<image
class="image"
src="./image/sousuo.png"
/>
<text class="text ml-3">搜索更多好课</text>
</view>
<swiper class="swiper" autoplay="true" circular="true"></swiper>
</view>
<view class="flex-row equal-division">
<view class="flex-col items-center group_2 group_1" bind:tap="gotoCourseList" data-type="{{ '考公考研' }}">
<image
class="image_3"
src="./image/kgky.png"
/>
<text class="font text_1 mt-12">考公考研</text>
</view>
<view class="flex-col items-center group_2 group_3" bind:tap="gotoCourseList" data-type="{{ '自媒体' }}">
<image
class="image_3"
src="./image/zmt.png"
/>
<text class="font text_3 mt-12">自媒体</text>
</view>
<view class="flex-col items-center group_2 group_4" bind:tap="gotoCourseList" data-type="{{ '财经' }}">
<image
class="image_3"
src="./image/cj.png"
/>
<text class="font text_4 mt-12">财经</text>
</view>
</view>
<text class="self-start text_2">热门课程</text>
<view class="flex-col self-stretch list">
<!-- items 数组循环 -->
<view
class="flex-row relative group_5"
wx:for="{{courseList}}"
wx:for-item="item"
wx:for-index="index"
wx:key="item.id"
>
<view bind:tap="gotoCourseDetail" data-id="{{item.id}}">
<view class="list-divider pos_3"></view>
<!-- 绑定课程封面图 -->
<image class="image_4 pos" src="{{ globalImgUrl + item.image}}" />
<view class="flex-col group_6 pos_2">
<!-- 绑定课程名称 -->
<text class="font_2">{{item.name}}</text>
<view class="flex-row justify-between items-baseline mt-17">
<!-- 绑定卷后价格 -->
<text class="font_3">券后{{item.discountPrice}}元起</text>
<!-- 绑定下单/学习人数 -->
<text class="font_4">{{item.orderCount}}人学习</text>
</view>
</view>
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,137 @@
.ml-3 {
margin-left: 5.63rpx;
}
.mt-17 {
margin-top: 31.88rpx;
}
.page {
padding: 0rpx 0 10.88rpx;
background-color: #ffffff;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
}
.group {
padding-left: 30rpx;
padding-right: 28.13rpx;
}
.section {
padding: 11.25rpx 0;
background-color: #f2f2f2;
border-radius: 93.75rpx;
}
.image {
width: 35.63rpx;
height: 35.63rpx;
}
.text {
color: #a8a8a8;
font-size: 22.5rpx;
font-family: SourceHanSerifCN;
line-height: 20.83rpx;
}
.equal-division {
align-self: stretch;
margin: 21.88rpx 31.46rpx 0 29.48rpx;
}
.group_2 {
flex: 1 1 229.69rpx;
}
.group_1 {
padding: 13.56rpx 0 9.99rpx;
}
.image_3 {
width: 96rpx;
height: 96rpx;
}
.font {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.15rpx;
color: #000000;
}
.text_1 {
line-height: 24.26rpx;
}
.group_3 {
padding: 13.56rpx 0 10.09rpx;
}
.text_3 {
line-height: 24.23rpx;
}
.group_4 {
padding: 13.56rpx 0 10.13rpx;
}
.text_4 {
line-height: 24.13rpx;
}
.text_2 {
margin-left: 35.04rpx;
margin-top: 38.16rpx;
color: #000000;
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.75rpx;
}
.list {
margin-top: 9.56rpx;
}
.group_5 {
padding: 18.75rpx 29.46rpx 0 35.63rpx;
height: 180rpx;
}
.list-divider {
background-color: #d6d6d6;
height: 1.88rpx;
}
.pos_3 {
position: absolute;
left: 35.63rpx;
right: 33.81rpx;
top: 178.13rpx;
}
.image_4 {
border-radius: 9.38rpx;
width: 208.13rpx;
height: 133.13rpx;
}
.pos {
position: absolute;
left: 35.63rpx;
top: 50%;
transform: translateY(-50%);
}
.group_6 {
width: 453.49rpx;
}
.pos_2 {
position: absolute;
right: 29.46rpx;
top: 50%;
transform: translateY(-50%);
}
.font_2 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 31.88rpx;
color: #000000;
}
.font_3 {
font-size: 26.25rpx;
font-family: AlibabaPuHuiTi;
line-height: 24.15rpx;
color: #ff5733;
}
.font_4 {
font-size: 22.5rpx;
font-family: AlibabaPuHuiTi;
line-height: 20.34rpx;
color: #a6a6a6;
}
.swiper {
border-radius: 9.38rpx;
width: 691.88rpx;
height: 324.38rpx;
margin-top: 22.5rpx;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

View File

@ -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() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,78 @@
<view class="flex-col page">
<view class="flex-col">
<text class="self-center text">我推荐的用户</text>
<!-- 直推用户 -->
<text class="self-start font text_2">直推用户</text>
<view class="flex-col self-stretch section view">
<!-- 表头 -->
<view class="flex-row justify-between group">
<text class="font_2 text_3">用户名</text>
<text class="font_2">给我创造的收益</text>
<text class="font_2 text_4">绑定时间</text>
<text class="font_2 text_5">联系</text>
</view>
<!-- 列表项 -->
<view class="flex-col mt-13">
<view
class="list-item mt-13"
wx:for="{{items}}"
wx:for-item="item"
wx:for-index="index"
wx:key="index"
>
<view class="flex-row justify-between">
<!-- 用户名:固定宽度、任意字符处断行 -->
<text class="font_3 name">{{item.userName || 'user_cxzsdfdfs'}}</text>
<view class="flex-row items-center">
<text class="font_4">¥{{item.revenue || '160.00'}}</text>
<view class="flex-row items-center shrink-0 ml-35">
<text class="font_4">{{item.bindTime || '2025-06-20'}}</text>
<image
class="shrink-0 image ml-27"
src="./image/right.png"
/>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 间推用户 -->
<view class="mt-36 flex-col">
<text class="self-start font text_6">间推用户</text>
<view class="mt-14 flex-col self-stretch section">
<view class="flex-row justify-between group">
<text class="font_2 text_3">用户名</text>
<text class="font_2">给我创造的收益</text>
<text class="font_2 text_4">绑定时间</text>
<text class="font_2 text_5">联系</text>
</view>
<view class="flex-col mt-13">
<view
class="list-item_2 mt-13"
wx:for="{{items_1}}"
wx:for-item="item"
wx:for-index="index"
wx:key="index"
>
<view class="flex-row justify-between">
<text class="font_3 name">{{item.userName || 'user_cxzsdfdfs'}}</text>
<view class="flex-row items-center">
<text class="font_4">¥{{item.revenue || '160.00'}}</text>
<view class="flex-row items-center shrink-0 ml-35">
<text class="font_4">{{item.bindTime || '2025-06-20'}}</text>
<image
class="shrink-0 image ml-27"
src="./image/right.png"
/>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>

View File

@ -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;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

View File

@ -0,0 +1,66 @@
// pages/course/searchCourses/searchCourses.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,26 @@
<!--pages/course/searchCourses/searchCourses.wxml-->
<view class="flex-col page">
<view class="flex-row items-center section">
<image
class="image"
src="https://ide.code.fun/api/image?token=6854f3c94ae84d0012332367&name=f2d91149603a9b9bbd30ffd5a77c2043.png"
/>
<input class="text ml-3" placeholder="搜索更多好课" />
</view>
<view class="flex-col list mt-17">
<view class="flex-row relative list-item" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="list-divider pos_3"></view>
<image
class="image_2 pos"
src="https://ide.code.fun/api/image?token=6854f3c94ae84d0012332367&name=9c2a22f14e2bd768cbd40d939693e4a8.png"
/>
<view class="flex-col group_2 pos_2">
<text class="font">区块链和加密数字货币(随报随学认证班)</text>
<view class="flex-row justify-between items-baseline mt-17">
<text class="font_2">券后99元起</text>
<text class="font_3">18523人学习</text>
</view>
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,89 @@
/* pages/course/searchCourses/searchCourses.wxss */
.ml-3 {
margin-left: 5.63rpx;
}
.mt-17 {
margin-top: 31.88rpx;
}
.page {
padding: 26.25rpx 0 918.73rpx;
background-color: #ffffff;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
}
.section {
margin-left: 28.13rpx;
margin-right: 26.27rpx;
padding: 11.25rpx 24.38rpx;
background-color: #f2f2f2;
border-radius: 93.75rpx;
}
.image {
width: 35.63rpx;
height: 35.63rpx;
}
.text {
color: #a8a8a8;
font-size: 22.5rpx;
font-family: SourceHanSerifCN;
line-height: 20.83rpx;
}
.list {
padding-top: 11.25rpx;
border-top: solid 1.88rpx #d1d1d1;
}
.list-item {
padding: 28.13rpx 29.46rpx 0 35.63rpx;
height: 189.39rpx;
}
.list-divider {
background-color: #d6d6d6;
height: 1.88rpx;
}
.pos_3 {
position: absolute;
left: 35.63rpx;
right: 33.81rpx;
top: 187.52rpx;
}
.image_2 {
border-radius: 9.38rpx;
width: 208.13rpx;
height: 133.13rpx;
}
.pos {
position: absolute;
left: 35.63rpx;
top: 50%;
transform: translateY(-50%);
}
.group_2 {
width: 453.49rpx;
}
.pos_2 {
position: absolute;
right: 29.46rpx;
top: 50%;
transform: translateY(-50%);
}
.font {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 31.88rpx;
color: #000000;
}
.font_2 {
font-size: 26.25rpx;
font-family: AlibabaPuHuiTi;
line-height: 24.15rpx;
color: #ff5733;
}
.font_3 {
font-size: 22.5rpx;
font-family: AlibabaPuHuiTi;
line-height: 20.34rpx;
color: #a6a6a6;
}

View File

@ -0,0 +1,38 @@
Page({
data: {
// 初始倒计时字符串
countdown: '30分00秒'
},
onLoad(options) {
// 启动倒计时(总秒数 = 29*60 + 17
this.initCountdown(30 * 60 );
},
/**
* 初始化倒计时
* @param {number} totalSeconds 初始总秒数
*/
initCountdown(totalSeconds) {
this.countdownTimer = setInterval(() => {
if (totalSeconds <= 0) {
clearInterval(this.countdownTimer);
this.setData({ countdown: '00分00秒' });
return;
}
totalSeconds--;
const m = Math.floor(totalSeconds / 60);
const s = totalSeconds % 60;
const mm = m < 10 ? '0' + m : '' + m;
const ss = s < 10 ? '0' + s : '' + s;
this.setData({ countdown: `${mm}${ss}` });
}, 1000);
},
onUnload() {
// 页面卸载时清除定时器
clearInterval(this.countdownTimer);
}
});

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,79 @@
<view class="flex-col page">
<view class="flex-col group">
<view class="flex-col section">
<!-- 订单状态 + 倒计时 -->
<view class="flex-row justify-between self-stretch group_2">
<text class="font">订单状态</text>
<view class="flex-row group_3">
<text class="font_2 text">请在{{countdown}}内完成支付</text>
<text class="font_2 text_2 ml-37">待支付</text>
</view>
</view>
<!-- 课程信息 -->
<view class="flex-row self-stretch group_4 mt-15">
<image
class="shrink-0 image"
src="https://ide.code.fun/api/image?token=6859f7a14ae84d0012334fa9&name=9c2a22f14e2bd768cbd40d939693e4a8.png"
/>
<text class="flex-1 self-start font_3 text_3 ml-7">
区块链和加密数字货币(随报随学认证班)(随报随学认证班)
</text>
</view>
<!-- 课程价格 -->
<text class="self-end font_3 text_4 mt-15">¥999.00</text>
</view>
<!-- 订单详情 -->
<view class="mt-16 flex-col section_2">
<view class="self-start group_5">
<text class="font text_5">订单编号:</text>
<text class="font_4">202506191307440406460485418</text>
</view>
<view class="flex-row items-baseline self-start group_6">
<text class="shrink-0 font text_6">下单时间:</text>
<text class="flex-1 font_5 ml-3">2025-06-19 16:08:15</text>
</view>
<view class="flex-col justify-start self-stretch relative group_7">
<view class="flex-col section_3">
<view class="self-stretch divider"></view>
<view class="flex-row self-stretch group_8 mt-17">
<text class="font text_7">支付方式:</text>
<text class="ml-8 font text_8">微信支付</text>
</view>
<view class="flex-row items-center self-stretch mt-17">
<text class="font text_9">交易号:</text>
<text class="font_4 ml-23">4002506191307440406460485418</text>
</view>
<text class="self-start font text_10 mt-17">交付时间:</text>
</view>
<text class="font_5 text_11 pos">2025-06-19 08:48:35</text>
</view>
</view>
<!-- 价格明细 -->
<view class="mt-16 flex-col section_4">
<view class="flex-row justify-between items-center">
<text class="font text_12">课程价格</text>
<text class="font_4">¥1999.9</text>
</view>
<view class="flex-row justify-between items-center mt-11">
<text class="font text_13">价格折扣</text>
<text class="font_4 text_14">-¥10</text>
</view>
<view class="flex-row justify-between items-center group_9 mt-11">
<text class="font_2 text_15">订单金额</text>
<text class="font_4 text_16">¥999</text>
</view>
</view>
</view>
<!-- 底部按钮 -->
<view class="flex-row mt-389">
<view class="flex-col justify-start items-center text-wrapper">
<text class="font_3 text_17">取消</text>
</view>
<view class="flex-col justify-start items-center text-wrapper_2">
<text class="font_3 text_18">立即支付</text>
</view>
</view>
</view>

View File

@ -0,0 +1,208 @@
.ml-37 {
margin-left: 69.38rpx;
}
.ml-7 {
margin-left: 13.13rpx;
}
.mt-15 {
margin-top: 28.13rpx;
}
.ml-3 {
margin-left: 5.63rpx;
}
.ml-23 {
margin-left: 40.13rpx;
}
.mt-17 {
margin-top: 31.88rpx;
}
.mt-11 {
margin-top: 20.63rpx;
}
.mt-389 {
margin-top: 729.38rpx;
}
/* 整体布局 */
.page {
padding-top: 26.25rpx;
background-color: #f8f8f8;
width: 100%;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
}
.group {
padding: 0 18.75rpx;
}
/* 调整首屏 section 右边内边距,不让价格太贴边 */
.section {
padding: 0 22.5rpx 33.75rpx 22.5rpx;
filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040);
background-color: #ffffff;
border-radius: 7.22rpx;
}
/* 订单详情区 */
.group_2 {
padding: 33.75rpx 0 26.25rpx;
border-bottom: solid 1.88rpx #e3e3e3;
}
.group_3 {
margin-right: 18.75rpx;
}
.font_2 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.23rpx;
color: #f84947;
}
.text {
line-height: 24.56rpx;
}
.text_2 {
line-height: 24.17rpx;
}
.group_4 {
margin-right: 33.75rpx;
}
.image {
border-radius: 9.38rpx;
width: 208.13rpx;
height: 133.13rpx;
}
.font_3 {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.64rpx;
}
.text_3 {
color: #000000;
line-height: 35.63rpx;
}
.text_4 {
color: #3d3d3d;
line-height: 22.76rpx;
}
/* 订单详情二级区 */
.section_2 {
padding: 33.75rpx 22.5rpx 0;
background-color: #ffffff;
border-radius: 7.39rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
}
.group_5 {
line-height: 24.28rpx;
}
.font_4 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 19.93rpx;
color: #323232;
}
.group_6 {
margin-top: 30rpx;
width: 369.94rpx;
}
.font_5 {
font-size: 26.25rpx;
line-height: 31.88rpx;
color: #323232;
}
.group_7 {
margin-top: 11.25rpx;
padding-bottom: 26.25rpx;
}
.section_3 {
padding-top: 9.38rpx;
background-color: #ffffff;
}
.divider {
background-color: #cccccc;
height: 1.88rpx;
}
.group_8 {
padding: 0 3.75rpx;
}
.font {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.23rpx;
color: #696969;
}
.text_7 {
line-height: 24.36rpx;
}
.text_6 {
line-height: 31.88rpx;
}
.text_5 {
line-height: 24.28rpx;
}
.text_8 {
color: #323232;
}
.text_9 {
line-height: 24.52rpx;
}
.text_10 {
line-height: 24.43rpx;
}
.text_11 {
width: 270rpx;
}
.pos {
position: absolute;
left: 141.05rpx;
top: 142.92rpx;
}
/* 调整价格明细区右边内边距 */
.section_4 {
padding: 22.5rpx 22.5rpx 0 22.5rpx;
background-color: #ffffff;
border-radius: 4.01rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
}
.text_12 {
line-height: 24.41rpx;
}
.text_13 {
line-height: 24.41rpx;
}
.text_14 {
margin-right: 15rpx;
}
.group_9 {
padding: 22.5rpx 0 18.75rpx;
border-top: solid 1.88rpx #e3e3e3;
}
.text_15 {
line-height: 24.49rpx;
}
.text_16 {
color: #f84947;
}
/* 底部按钮 */
.text-wrapper {
padding: 37.5rpx 0;
flex: 1 1 375rpx;
background-color: #ffffff;
height: 105rpx;
}
.text-wrapper_2 {
padding: 37.5rpx 0;
flex: 1 1 375rpx;
background-color: #ff8d1a;
height: 105rpx;
}
.text_17 {
color: #323232;
}
.text_18 {
color: #ffffff;
line-height: 27.81rpx;
}

View File

@ -89,6 +89,29 @@ Page({
agree: e.detail.value.length > 0 agree: e.detail.value.length > 0
}); });
}, },
validatePassword(password) {
// 校验密码长度
if (password.length < 6 || password.length > 10) {
wx.showToast({
title: '密码长度应在6到10个字符之间',
icon: 'none',
duration: 1000
});
return false;
}
// 校验是否包含字母、数字和下划线
const regex = /^(?=.*[a-zA-Z])(?=.*\d)[a-zA-Z0-9]+$/;
if (!regex.test(password)) {
wx.showToast({
title: '密码必须包含字母和数字,且不包含特殊字符',
icon: 'none',
duration: 1000
});
return false;
}
return true;
},
// 注册按钮点击 // 注册按钮点击
async onRegister() { async onRegister() {
@ -102,12 +125,13 @@ Page({
})) { })) {
return; return;
} }
const { nickname, phone, captcha, inviteCode, password } = this.data;
if (!this.validatePassword(password)) return ;
// 2. 再单独校验协议勾选 // 2. 再单独校验协议勾选
if (!this.data.agree) { if (!this.data.agree) {
wx.showToast({ title: '请先同意用户协议', icon: 'none' }); wx.showToast({ title: '请先同意用户协议', icon: 'none' });
return; return;
} }
const { nickname, phone, captcha, inviteCode, password } = this.data;
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
mask: true mask: true

View File

@ -12,6 +12,7 @@
<view class="flex-col justify-start relative section"> <view class="flex-col justify-start relative section">
<input class="flex-col justify-start items-start text-wrapper_5 view input" <input class="flex-col justify-start items-start text-wrapper_5 view input"
placeholder="请输入昵称" placeholder="请输入昵称"
maxlength="6"
bindinput="onInput" data-field="nickname" value="{{nickname}}" bindinput="onInput" data-field="nickname" value="{{nickname}}"
/> />
</view> </view>

View File

@ -154,11 +154,11 @@ Page({
return false; return false;
} }
// 检查银行卡号是否为 16 位且只包含数字 // 检查银行卡号是否为 16 - 19 位且只包含数字
const bankCardPattern = /^[0-9]{16}$/; const bankCardPattern = /^[0-9]{16,19}$/;
if (!bankCardPattern.test(bankCardNumber)) { if (!bankCardPattern.test(bankCardNumber)) {
wx.showToast({ wx.showToast({
title: '银行卡号必须是 16 位数字', title: '银行卡号必须是 16 - 19 位数字',
icon: 'none', icon: 'none',
}); });
return false; return false;
@ -217,8 +217,11 @@ Page({
icon: 'success', icon: 'success',
}); });
// 这里可以跳转到其他页面 // 这里可以跳转到其他页面
wx.navigateTo({ let pages = getCurrentPages(); // 获取小程序页面栈
url: '/pages/personCenter/withdrawal/withdrawal', let beforePage = pages[pages.length - 2]; // 获取上个页面的实例对象
beforePage.getAccountInfo();
wx.navigateBack({
delta:1
}); });
}, },
fail(err) { fail(err) {
@ -251,7 +254,9 @@ Page({
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() {
this.getAccountInfo()
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏

View File

@ -30,6 +30,7 @@
placeholder="请输入持卡人身份证号" placeholder="请输入持卡人身份证号"
data-field="idCardNumber" data-field="idCardNumber"
bindinput="handleInputChange" bindinput="handleInputChange"
type="idcard"
value="{{ idCardNumber }}" value="{{ idCardNumber }}"
/> />
</view> </view>

View File

@ -16,7 +16,7 @@
width: 100%; width: 100%;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
height: 100%; height: calc(100vh - 1rpx);
} }
.section { .section {
padding: 28.13rpx 26.25rpx; padding: 28.13rpx 26.25rpx;

View File

@ -21,6 +21,21 @@ Page({
showPopup: false, // 控制弹窗显示与否 showPopup: false, // 控制弹窗显示与否
qrcode: "https://img.picui.cn/free/2025/05/29/6837c53582068.gif", // 设置二维码图片的路径 qrcode: "https://img.picui.cn/free/2025/05/29/6837c53582068.gif", // 设置二维码图片的路径
}, },
// 跳转课程订单页面
courseOrder() {
wx.navigateTo({
url: '/pages/course/courseOrderList/courseOrderList',
})
},
// 跳转结算记录页面
gotoSettlementRecord() {
wx.navigateTo({
url: '/pages/course/courseSettlementRecord/courseSettlementRecord',
})
},
// 点击二维码时,显示弹窗 // 点击二维码时,显示弹窗
showPromoPopup() { showPromoPopup() {
this.setData({ this.setData({

View File

@ -90,6 +90,7 @@
<text class="font text_13 mt-6">提现记录</text> <text class="font text_13 mt-6">提现记录</text>
</view> </view>
</view> </view>
<!-- 接单相关 -->
<view class="flex-col list"> <view class="flex-col list">
<view <view
class="flex-row equal-division equal-division_3 mt-15" class="flex-row equal-division equal-division_3 mt-15"
@ -131,6 +132,47 @@
<text class="font mt-11">联系上级</text> <text class="font mt-11">联系上级</text>
</view> </view>
</view> </view>
<!-- 课程相关 -->
<view
class="flex-row equal-division equal-division_3 mt-15"
wx:for="{{items}}"
wx:for-item="item"
wx:for-index="index"
wx:key="index"
>
<view class="flex-col items-center equal-division-item_3" bind:tap="courseOrder">
<image
class="image_8"
src="./images/wodxiangmu.png"
mode="aspectFill"
/>
<text class="font text_14 mt-10">课程订单</text>
</view>
<view class="flex-col items-center group_15 equal-division-item_6" bind:tap="gotoSettlementRecord">
<image
class="image_8"
src="./images/tuanduiguanli.png"
mode="aspectFill"
/>
<text class="font text_15 mt-10">结算记录</text>
</view>
<view class="flex-col items-center group_11 equal-division-item_3" bind:tap="szcy">
<image
class="image_8"
src="./images/choucheng.png"
mode="aspectFill"
/>
<text class="font text_16 mt-11">我的课程</text>
</view>
<view class="flex-col items-center group_12 equal-division-item_7" bind:tap="">
<image
class="image_8"
src="./images/shangji.png"
mode="aspectFill"
/>
<text class="font mt-11">联系上级</text>
</view>
</view>
</view> </view>
<view class="flex-col list_2"> <view class="flex-col list_2">
<view class="flex-row justify-between items-center self-stretch group_13" bind:tap="zhshezhi"> <view class="flex-row justify-between items-center self-stretch group_13" bind:tap="zhshezhi">

View File

@ -18,7 +18,9 @@ Page({
resetPwd() { resetPwd() {
const { phone, verificationCode, password, currentPwd } = this.data; const { phone, verificationCode, password, currentPwd } = this.data;
formatPassword(password,currentPwd); if( !formatPassword(password,currentPwd) ) {
return;
}
wx.request({ wx.request({
url: baseUrl + '/userInfo/mini/in/reset/pwd', url: baseUrl + '/userInfo/mini/in/reset/pwd',
method: 'POST', method: 'POST',

View File

@ -19,7 +19,7 @@
width: 100%; width: 100%;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
height: 100%; height: calc(100vh - 1rpx);
} }
.font { .font {
font-size: 30rpx; font-size: 30rpx;

View File

@ -74,7 +74,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getAccountInfo()
}, },
/** /**

View File

@ -1,4 +1,5 @@
const { baseUrl } = require('../../../request'); const { baseUrl } = require('../../../request');
import { decodeBase64 } from '../../../utils/decodebase64'
Page({ Page({
data: { data: {
@ -12,7 +13,7 @@ Page({
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
projectId: options.id || '', projectId: options.id || '',
promoCodeDesc: decodeURIComponent(options.desc || ''), promoCodeDesc: decodeBase64(options.desc),
mode: options.mode || 'add', mode: options.mode || 'add',
salespersonName: options.name ? decodeURIComponent(options.name) : '', salespersonName: options.name ? decodeURIComponent(options.name) : '',
salespersonPhone: options.phone ? decodeURIComponent(options.phone) : '' salespersonPhone: options.phone ? decodeURIComponent(options.phone) : ''
@ -34,6 +35,7 @@ Page({
// 申请资料报备 // 申请资料报备
onApply() { onApply() {
console.log('---->',this.data.promoCodeDesc);
// 如果是查看模式,阻止提交 // 如果是查看模式,阻止提交
if (this.data.mode === 'view') return; if (this.data.mode === 'view') return;

View File

@ -1,5 +1,6 @@
const { baseUrl } = require('../../../request'); const { baseUrl } = require('../../../request');
import { globalImgUrl } from '../../../request'; import { globalImgUrl } from '../../../request';
import { decodeBase64 } from '../../../utils/decodebase64'
Page({ Page({
data: { data: {
@ -13,6 +14,10 @@ Page({
currentQrcode: '', currentQrcode: '',
currentPromoLink: '', currentPromoLink: '',
globalImgUrl, globalImgUrl,
settlementDesc: '',
projectDesc: '',
projectFlow: '',
projectDescription: '',
}, },
onLoad(options) { onLoad(options) {
@ -50,7 +55,11 @@ Page({
projectDetail: detail, projectDetail: detail,
notificationList: detail.projectNotificationVOList || [], notificationList: detail.projectNotificationVOList || [],
settlementDetailList: detail.projectAllDetailVOList || [], settlementDetailList: detail.projectAllDetailVOList || [],
promoCodeList: detail.promoCodeApplyVOList || [] promoCodeList: detail.promoCodeApplyVOList || [],
settlementDesc: decodeBase64(detail.settlementDesc),
projectDesc: decodeBase64(detail.projectDesc),
projectFlow: decodeBase64(detail.projectFlow),
projectDescription: decodeBase64(detail.projectDescription)
}); });
} else { } else {
wx.showToast({ wx.showToast({

View File

@ -8,7 +8,7 @@
<view class="flex-col flex-1 group_1 ml-20"> <view class="flex-col flex-1 group_1 ml-20">
<text class="self-start font text">{{projectDetail.projectName}}</text> <text class="self-start font text">{{projectDetail.projectName}}</text>
<view class="flex-row items-center self-stretch mt-7"> <view class="flex-row items-center self-stretch mt-7">
<text class="flex-1 font_2 text_2">{{projectDetail.projectDescription}}</text> <text class="flex-1 font_2 text_2">{{ projectDescription }}</text>
<view class="flex-row items-center shrink-0 section ml-13" bindtap="gotoSettlement" data-id="{{ projectDetail.id }}" data-url="{{ projectDetail.projectImage }}" data-name="{{ projectDetail.projectName }}"> <view class="flex-row items-center shrink-0 section ml-13" bindtap="gotoSettlement" data-id="{{ projectDetail.id }}" data-url="{{ projectDetail.projectImage }}" data-name="{{ projectDetail.projectName }}">
<image <image
class="shrink-0 image_2" class="shrink-0 image_2"
@ -97,7 +97,7 @@
class="image_5 pos_4" class="image_5 pos_4"
src="./images/sm.png" src="./images/sm.png"
/> />
<rich-text class="self-stretch section_8 view_2" nodes="{{projectDetail.settlementDesc}}"></rich-text> <rich-text class="self-stretch section_8 view_2" nodes="{{ settlementDesc }}"></rich-text>
</view> </view>
<view class="flex-col relative section_1 mt-21"> <view class="flex-col relative section_1 mt-21">
<text class="self-start font_5 text_1">项目说明</text> <text class="self-start font_5 text_1">项目说明</text>
@ -105,7 +105,7 @@
class="image_5 pos_5" class="image_5 pos_5"
src="./images/sm.png" src="./images/sm.png"
/> />
<rich-text class="self-stretch section_8" nodes="{{projectDetail.projectDesc}}"></rich-text> <rich-text class="self-stretch section_8" nodes="{{ projectDesc }}"></rich-text>
</view> </view>
<view class="flex-col relative section_1 mt-21"> <view class="flex-col relative section_1 mt-21">
<text class="self-start font_5 text_1">项目流程</text> <text class="self-start font_5 text_1">项目流程</text>
@ -113,7 +113,7 @@
class="image_5 pos_6" class="image_5 pos_6"
src="./images/sm.png" src="./images/sm.png"
/> />
<rich-text class="self-stretch section_8" nodes="{{projectDetail.projectFlow}}"></rich-text> <rich-text class="self-stretch section_8" nodes="{{ projectFlow }}"></rich-text>
</view> </view>
</view> </view>
<!-- 我的推广码tab --> <!-- 我的推广码tab -->

BIN
static/course.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
static/courseselected.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

58
utils/decodebase64.js Normal file
View File

@ -0,0 +1,58 @@
function decodeBase64(base64Str) {
try {
// 第一步:先 URL 解码(解决 %2B、%3D 等问题)
const urlDecoded = decodeURIComponent(base64Str);
// 第二步:处理 Base64 字符(替换 URL 安全字符)
let safeBase64 = urlDecoded
.replace(/-/g, "+")
.replace(/_/g, "/")
.replace(/\s/g, "");
// 补全等号
const pad = safeBase64.length % 4;
safeBase64 = safeBase64.padEnd(
safeBase64.length + (pad ? 4 - pad : 0),
"="
);
// 第三步:使用微信小程序提供的 base64 解码函数
const arrayBuffer = wx.base64ToArrayBuffer(safeBase64);
const bytes = new Uint8Array(arrayBuffer);
// 第四步:手动 UTF-8 解码
let utf8Str = "";
let i = 0;
while (i < bytes.length) {
const byte = bytes[i];
if (byte < 0x80) {
utf8Str += String.fromCharCode(byte);
i++;
} else if (byte < 0xe0) {
utf8Str += String.fromCharCode(
((byte & 0x1f) << 6) | (bytes[i + 1] & 0x3f)
);
i += 2;
} else if (byte < 0xf0) {
utf8Str += String.fromCharCode(
((byte & 0x0f) << 12) |
((bytes[i + 1] & 0x3f) << 6) |
(bytes[i + 2] & 0x3f)
);
i += 3;
} else {
// 四字节字符跳过
i += 4;
}
}
return utf8Str;
} catch (e) {
console.error("Base64解码失败:", e);
return "<p>内容解析错误</p>";
}
}
module.exports = {
decodeBase64
};

View File

@ -20,29 +20,40 @@ const formatPassword = (pwd , currentPwd) => {
title: '密码不能为空', title: '密码不能为空',
icon: 'error' icon: 'error'
}) })
return; return false;
} }
if (pwd.length < 6) { if (pwd.length < 6 || pwd.length > 10) {
wx.showToast({ wx.showToast({
title: '密码不能小于6位', title: '密码长度必须在6-10位',
icon: 'error' icon: 'error'
}) })
return; return false;
} }
if (currentPwd === '') { if (currentPwd === '') {
wx.showToast({ wx.showToast({
title: '请输入二次确认密码', title: '请输入二次确认密码',
icon: 'error' icon: 'error'
}) })
return; return false;
} }
if (currentPwd !== pwd) { if (currentPwd !== pwd) {
wx.showToast({ wx.showToast({
title: '两次密码不一致', title: '两次密码不一致',
icon: 'error' icon: 'error'
}) })
return; return false;
} }
// 纪文昊写的 密码必须包含字母和数字
const hasLetter = /[a-zA-z]/.test(pwd);
const hasNumber = /[0-9]/.test(pwd);
if (!hasLetter || !hasNumber) {
wx.showToast({
title: '密码必须包含字母和数字',
icon: 'none'
})
return false;
}
return true;
} }
module.exports = { module.exports = {