Compare commits

..

42 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
3ce43e880d 测试分支合并请求2222 2025-06-17 18:43:08 +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
152b4995ca Merge pull request 'feature-xxx' (#7) from feature-xxx into dev 2025-06-17 00:42:07 +00:00
a797150e3e 测试分支合并请求 2025-06-17 08:39:16 +08:00
3d1e60edc5 测试分支合并请求 2025-06-17 08:38:14 +08:00
c93b471625 测试分支合并请求 2025-06-17 08:26:41 +08:00
e608c02f8b Merge remote-tracking branch 'origin/feature-xxx' into feature-xxx 2025-06-16 23:33:12 +08:00
2399168f8e Merge pull request 'Merge pull request '测试分支合并请求' (#4) from feature-xxx into dev' (#5) from dev into feature-xxx
Reviewed-on: http://154.8.193.216:3030/admin1/qingcheng-xiaochengxu/pulls/5
2025-06-16 15:31:59 +00:00
949d39b1b9 测试分支合并请求 2025-06-16 23:30:02 +08:00
1ef99032ec Merge pull request '测试分支合并请求' (#4) from feature-xxx into dev
Reviewed-on: http://154.8.193.216:3030/admin1/qingcheng-xiaochengxu/pulls/4
2025-06-16 15:24:38 +00:00
d6761b460c Merge branch 'dev' into feature-xxx 2025-06-16 15:23:58 +00:00
d6bfd2d262 测试分支合并请求 2025-06-16 23:21:21 +08:00
bd98398c4e Merge branch 'feture-yt' into dev
# Conflicts:
#	app.json
2025-06-16 16:18:29 +08:00
ea403c8ed9 Merge branch 'feature-xxx' into dev 2025-06-16 16:17:23 +08:00
a8d326cc5f commission--yt-commit 2025-06-16 16:17:00 +08:00
a48fa01050 修改了查询推广码下的结算记录 2025-06-16 16:16:50 +08:00
8ea2d7a89e ------ 2025-06-16 13:18:08 +08:00
fc957770ce 补充了注册页面的小程序用户协议和隐私政策 2025-06-16 10:59:20 +08:00
6f06dfd826 补充了小程序用户协议和隐私政策 2025-06-15 22:28:50 +08:00
7603d8c96c 完成了小程序联系上级的功能(点击手机号跳转拨号页面) 2025-06-15 21:51:05 +08:00
0739bdcbb8 完成了小程序项目列表页,项目明细抽佣表,下级用户项目明细抽佣表的下拉刷新 2025-06-15 21:06:58 +08:00
dc3837dbff 修改了部分样式 2025-06-11 14:16:38 +08:00
a51f9bdea8 修复功能(用户申请提现) 2025-06-11 11:32:02 +08:00
ae9886635d 修复功能(用户申请提现) 2025-06-11 09:16:56 +08:00
a20fbe81e3 添加功能(用户申请提现) 2025-06-10 12:18:44 +08:00
4d40d86061 退出登录的修改密码添加响应式弹窗 2025-06-10 10:03:55 +08:00
7d63133f54 团队管理和下级用户抽佣明细的输入框搜索功能 2025-06-10 09:14:39 +08:00
8d95fb089d Merge branch 'feture-yt' into dev
# Conflicts:
#	pages/projectModule/projectDetail/projectDetail.js
#	pages/projectModule/projectDetail/projectDetail.wxml
#	pages/projectModule/projectList/projectList.js
#	pages/projectModule/projectList/projectList.wxml
#	pages/projectModule/userProject/userProject.js
2025-06-09 19:37:04 +08:00
179f70b65d commission--yt-commit 2025-06-09 19:33:21 +08:00
c0c6b5b61a 添加的功能:查看推广码对应的结算记录 2025-06-09 19:08:32 +08:00
122 changed files with 4000 additions and 556 deletions

4
app.js
View File

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

View File

@ -1,7 +1,9 @@
{
"pages": [
"pages/loginModule/pwdLogin/pwdLogin",
"pages/personCenter/mine/mine",
"pages/loginModule/pwdLogin/pwdLogin",
"pages/loginModule/agreement/agreement",
"pages/loginModule/privacyPolicy/privacyPolicy",
"pages/personCenter/subCommissionSetting/subCommissionSetting",
"pages/test/testVideo/testVideo",
"pages/personCenter/withdrawal/withdrawal",
@ -21,7 +23,18 @@
"pages/personCenter/commissionSetting/commissionSetting",
"pages/personCenter/resetPwd/resetPwd",
"pages/personCenter/bindBankCard/bindBankCard",
"pages/projectModule/settlement/settlement"
"pages/projectModule/settlement/settlement",
"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": {
"navigationBarTextStyle": "black",
@ -44,6 +57,12 @@
"iconPath": "/static/jd1.png",
"selectedIconPath": "/static/jd2.png"
},
{
"pagePath": "pages/course/homepage/homepage",
"text": "课程",
"iconPath": "/static/course.png",
"selectedIconPath": "/static/courseselected.png"
},
{
"pagePath": "pages/personCenter/mine/mine",
"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

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

View File

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

View File

@ -0,0 +1,175 @@
<view class="myOne">
<view class="my-div">
<text class="yhxy">用户协议</text>
<view>
一、总则
<view>
1、用户在注册及使用前请认真阅读本协议确保充分理解本协议中所有条款。除非您接受本协议所有条款否则您无权注册、登录或使用本协议所涉服务。您的注册、登录、使用等行为将视为无条件接受本协议所有条款的约束。
2、除非另有明确规定本产品所推出的新功能、新服务均无条件的使用本协议。
3、我公司保留在任何时候修改本协议条款的权利且无需另行通知。在我公司修改协议条款后如果您不接受修改后的条款请立即停止使用本产品提供的服务继续使用本产品提供的服务将被视为接受修改后的协议。
</view>
</view>
<view>
二、用户注册
<view>
1、用户应当同意本协议的全部条款并按照页面提示完成全部注册程序(未成年人应与法定监护人共同完成)。用户在注册过程中点击“下一步”按钮即表示完全接受本协议全部条款。
2、用户在使用本服务前需要注册一个本产品账号。本产品账号应当使用手机号码绑定注册请用户使用尚未与本产品账号绑定且未被本产品根据本协议封禁的手机号码注册账号。本产品可以根据用户需求或产品需求对账号注册和绑定的方式进行更改而无须事先通知用户。
3、用户在使用本产品服务过程中应保证各项服务业务所需信息的真实性如果因信息不真实而引起的问题以及问题发生所带来的后果本公司不负任何责任。
4、在用户注册及使用本产品时要搜集能识别用户身份的个人信息以便系统可以在必要时联系用户或为用户提供更好的使用体验。系统搜集的信息包括但不限于用户的性别、年龄、出生日期、所在城市系统同意对这些信息的使用将受限于用户个人隐私信息保护的约束。
</view>
</view>
<view>
三、服务内容
<view>
1、本服务的具体内容由本产品根据实际情况提供包括但不限于用户使用本产品等。本产品可以对提供的服务予以变更且本产品提供的服务内容可能随时变更用户将会收到关于服务变更的通知。
2、除非本协议另有其他明示规定本公司所推出的新产品、新功能、新服务均受到本协议条款之规范。
</view>
</view>
<view>
四、服务变更、中断或终止
<view>
1、鉴于网络服务的特殊性(包括但不限于服务器的稳定性问题、恶意的网络攻击等行为的存在及其他无法控制的情形),用户同意我公司有权随时中断或终止部分或全部的服务。
2、我公司需要定期或不定期地对提供服务的系统或相关设备进行检修或维护如因此类情况而造成服务在合理时间内的中断我公司无需为此承担任何责任。
3、如发生下列任何一种情形我公司有权随时变更、中断或终止向用户提供本协议项下的服务而无需对用户或任何第三方承担任何责任
(1)根据法律规定用户应提交真实信息,而用户提供的个人资料不真实、或与注册时信息不一致又未能提供合理证明;
(2)用户违反相关法律法规或本协议的约定;
(3)按照法律规定或有权机关的要求;
(4)出于安全的原因或其他必要的情形。
</view>
</view>
<view>
五、用户个人隐私信息保护
<view>
1、依据法律的规定我们将在特定情形下收集、使用和披露您的个人信息。以下条款描述了我们如何收集、使用和披露您的个人信息。
2、信息收集
(1)用户提供
我们会对您直接提供的信息进行保存。比如:我们会记录您的注册信息、寻求客服或者其他和我们沟通的记录。记录信息的种类包括:头像、昵称、性别、出生日期、所在地区以及其他您选择提供的信息。我们收集、使用和披露个人信息是为了通过创建账户、识别用户、回应查询和邮件等方式来为您提供服务。
当你接触或者使用我们的服务时,我们将自动收集您的信息包括:
Log信息(我们记录所有您使用服务时的log信息包括浏览器信息、使用时间、浏览的网页、IP地址及来源)。我们使用多种技术记录信息包括但不限于向您的移动设备种Cookies。Cookies是一些存在您的硬件上的小数据包用以帮助我们提高服务的质量及您的使用体验了解在哪些区域和功能上受欢迎以及统计流量等。
</view>
</view>
<view>
3、信息使用
<view>
(1)除本隐私政策未载明或本隐私政策的更新未能首先通知您的情况下,您的个人信息将不会用于其他目的。
(2)匿名汇总统计数据不是我公司所定义的个人用户信息,我们将为多种目的,包括但不限于分析和使用模式的报告等,来保存和使用此类信息。我公司保留以任何目的或单方面许可第三方使用和披露匿名汇总统计数据的权利。
(3)您在本产品中上传的信息,有可能会损坏您或他人的合法权益,您必须充分意识此类风险的存在。您明确同意,自行承担因上传信息所存在的一切风险及后果,我公司无需承担任何责任。
</view>
</view>
<view>
4、法定披露
<view>
虽然我们会尽最大努力保护用户隐私,但当我们有理由相信只有公开个人信息才能遵循现行司法程序、 法院指令或其他法律程序或者保护我公司、我公司用户或第三方的权利、财产或安全时,我们可能披露个人信息。
</view>
</view>
<view>
5、信息安全
<view>
我们会采取合理的实际及电子手段以及规程保障措施来保护您的个人信息。 虽然通过因特网信息传输数据并非100% 安全,但我们已经采取并将继续采取商业范畴内合理的努力来确保您的个人信息得到保护。
</view>
</view>
<view>
6、未成年人隐私保护
<view>
我公司重视对未成年人个人隐私信息的保护。我公司将依赖用户提供的个人信息判断用户是否为未成年人。任何18岁以下的未成年人注册账号或使用本服务应事先取得家长或其法定监护人(以下简称“监护人”)的书面同意。除根据法律法规的规定及有权机关的指示披露外,我公司不会使用向任何第三方透露未成年人的个人隐私信息。
</view>
</view>
<view>
六、内容规范
<view>
1、本项规范所述内容是指用户使用本服务过程中所制作、上载、复制、发布、传播的任何内容包括但不限于账号头像、名称、个性签名等注册信息及认证资料或文字、语音、图片、图文等发送、回复消息和相关链接页面以及其他使用本产品账号或本服务所产生的内容。
2、用户承诺使用本产品的服务时必须符合中华人民共和国有关法律法规不得利用本产品的服务制作、上载、复制、发布、传播以下内容
<view>
(1)反对宪法所确定的基本原则的;(2)危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的; (3)损害国家荣誉和利益的;(4)煽动民族仇恨、民族歧视,破坏民族团结的;(5)破坏国家宗教政策,宣扬邪教和封建迷信的;(6)散布谣言,扰乱社会秩序,破坏社会稳定的;(7)散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;(8)侮辱或者诽谤他人,侵害他人合法权益的;(9)含有法律、行政法规禁止的其他内容的。
</view>
3、用户不得利用本产品账号或本服务制作、上载、复制、发布、传播下干扰本产品正常运营以及侵犯其他用户或第三方合作权益的内容
<view>
(1)含有任何性暗示的;
(2)含有辱骂、恐吓、威胁内容的;
(3)含有骚扰、垃圾广告、恶意信息、诱骗信息的;
(4)涉及他人隐私、个人信息或资料的;
(5)含有其他干扰本服务正常运营和侵犯其他用户或第三方合法权益的。
</view>
</view>
</view>
<view>
七、使用规则
<view>
1、用户在本服务中或通过本服务所传送、发布的任何内容并不反映或代表也不得被视为反映或代表我公司的观点、立场或政策我公司对此不承担任何责任。
2、用户在使用本产品时必须遵守中华人民共和国相关法律法规的规定同意将不会利用本产品进行任何违法或不正当的活动包括但不限于下列行为
(1)干扰或破坏有关服务,或与有关服务连接的任何服务器或网络,或与有关服务相关的任何政策、要求或规定;
(2)采集并存储涉及任何其他用户的个人信息,以用于任何被禁止的活动;
(3)故意或非故意违反任何相关的中国法律、法规、规章、条例等其他具有法律效力的规范。
3、用户须对利用本产品账号或本服务传送信息的真实性、合法性、无害性、准确性、有效性等全权负责与用户所传播信息相关的任何法律责任由用户自行承担与我公司无关。如因此给我公司或第三方造成损害的用户应当依法予以赔偿。
4、本产品提供的服务中可能包括广告用户同意在使用过程中显示本产品和第三方供应商、合作伙伴提供的广告。除法律法规明确规定外用户应自行对该广告信息进行的交易负责对用户因该广告信息进行的交易或前述广告商提供的内容或遭受的损失或损害我公司不承担任何责任。
5、用户为使用本产品须自行配备进入国际互联网所必需的设备包括电脑、手机及其他与接入国际互联网有关的装置并自行支付与此服务有关的费用。
</view>
</view>
<view>
八、免责声明
<view>
1、对于经由本产品服务而传送的内容我公司不保证前述内容的正确性、完整性或品质。用户在接受有关服务时有可能会接触到令人不快、不适当或令人厌恶的内容。在任何情况下我公司均不对任何内容负责包括但不限于任何内容发生任何错误或纰漏以及衍生的任何损失或损害。用户使用上述内容应自行承担风险。
2、用户明确同意其使用本产品所存在的风险及其后果将完全由其自己承担我公司对用户不承担任何责任。如因用户违反有关法律、法规或本协议项下的任何条款而给任何其他第三人造成损失用户同意承担由此造成的损害赔偿责任。
3、我公司尊重并保护用户的个人隐私权。但因恶意的网络攻击等行为及其他无法控制的情形导致用户隐私信息泄露的用户同意我公司不承担任何责任。
4、对于因电信系统或互联网网络故障、计算机故障、计算机系统问题或其它任何不可抗力原因而产生损失我公司不承担任何责任但将尽力减少因此给用户造成的损失和影响。
</view>
</view>
<view>
九、知识产权声明
<view>
1、本产品服务中包含的任何文字、图表、音频、视频和软件(包括但不限于软件中包含的图表、动画、音频、视频、界面实际、数据和程序、代码、文档)等信息或材料均受著作权法、商标法和其它法律法规保护,未经相关权利人书面同意,用户不得以任何方式使用该信息或材料。
2、本协议未授予用户使用本产品任何商标、服务标记、标识、域名和其他显著品牌特征的权利任何人不得擅自(包括但不限于:以非法的方式复制、传播、展示、镜像、上载、下载)使用,否则我公司将依法追究法律责任。
3、除本协议明确允许以外用户不得以任何形式或任何方式对本产品部分或全部内容进行修改、出租、租赁、出借、出售、分发、复制、创作衍生品或用于任何商业用途。
</view>
</view>
<view>
十、法律适用
<view>
1、本协议的订立、执行和解释及争议的解决均应适用中国法律并受中国法院管辖。如服务条款任何一部分与中华人民共和国法律相抵触则该部分条款应按法律规定重新解释部分条款无效或重新解释不影响其余条款法律效力。
2、用户和我公司一致同意本协议。在执行本协议过程中如发生纠纷双方应友好协商解决协商不成时任何一方可直接向所在地的人民法院提起诉讼。
</view>
</view>
<view>
十一、其他规定
<view>
1、本协议中的标题仅为方便而设在解释本协议时应被忽略。
2、本协议及其修改权、最终解释权归我公司所有。
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,17 @@
.myOne{
width: 100%;
display: flex;
justify-content: center;
padding-bottom: 60rpx;
}
.my-div{
width: 90%;
margin: auto;
}
.yhxy{
justify-content: center;
color: black;
font-size: 40rpx;
font-weight: 600;
}

View File

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

View File

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

View File

@ -0,0 +1,82 @@
<view class="myOne">
<view class="my-div">
<text class="yhxy">隐私政策</text>
<view>
本应用非常重视用户隐私政策并严格遵守相关的法律规定。请您仔细阅读《隐私政策》后再继续使用。
如果您继续使用我们的服务,表示您已经充分阅读和理解我们协议的全部内容。
</view>
<view>
本小程序尊重并保护所有使用服务用户的个人隐私权。
为了给您提供更准确、更优质的服务,本应用会按照本隐私权政策的规定使用和披露您的个人信息。
除本隐私权政策另有规定外,在未征得您事先许可的情况下,本应用不会将这些信息对外披露或向第三方提供。
本应用会不时更新本隐私权政策。您在同意本应用服务使用协议之时,即视为您已经同意本隐私权政策全部内容。
</view>
<view>
1. 适用范围
<view>
(a) 在您注册本应用小程序帐号时,您根据小程序要求提供的个人注册信息。
(b) 在您使用本应用网络服务,或访问本应用平台网页时,本应用自动接收并记录的您的浏览器和计算机上的信息,
包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据。
(c) 本应用通过合法途径从商业伙伴处取得的用户个人数据。
(d) 本应用严禁用户发布不良信息,如裸露、色情和亵渎内容,发布的内容我们会进行审核,一经发现不良信息,会禁用该用户的所有权限,予以封号处理。
</view>
</view>
<view>
2. 信息使用
<view>
(a) 本应用不会向任何无关第三方提供、出售、出租、分享或交易您的个人登录信息。如果我们存储发生维修或升级,我们会事先发出推送消息来通知您,请您提前允许本应用消息通知。
(b) 本应用亦不允许任何第三方以任何手段收集、编辑、出售或者无偿传播您的个人信息。任何本应用平台用户如从事上述活动一经发现本应用有权立即终止与该用户的服务协议。包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据。
(c) 为服务用户的目的,本应用可能通过使用您的个人信息,向您提供您感兴趣的信息,包括但不限于向您发出产品和服务信息,
或者与本应用合作伙伴共享信息以便他们向您发送有关其产品和服务的信息。(后者需要您的事先同意)
</view>
<view>
3. 信息披露
<view>
在如下情况下,本应用将依据您的个人意愿或法律的规定全部或部分的披露您的个人信息:
(a) 未经您事先同意,我们不会向第三方披露。
(b) 为提供您所要求的产品和服务,而必须和第三方分享您的个人信息。
(c) 根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政、司法机构披露。
(d) 如您出现违反中国有关法律、法规或者本应用服务协议或相关规则的情况,需要向第三方披露。
(e) 如您是适格的知识产权投诉人并已提起投诉,应被投诉人要求,向被投诉人披露,以便双方处理可能的权利纠纷
</view>
</view>
<view>
4. 信息存储和交换
<view>
本应用收集的有关您的信息和资料将保存在本应用及(或)其关联公司的服务器上,这些信息和资料可能传送至您所在国家、地区或本应用收集信息和资料所在地的境外并在境外被访问、存储和展示。
</view>
</view>
<view>
5. Cookie的使用
<view>
(a) 在您未拒绝接受cookies的情况下本应用会在您的计算机上设定或取用cookies以便您能登录或使用依赖于cookies的本应用平台服务或功能。本应用使用cookies可为您提供更加周到的个性化服务包括推广服务。
(b) 您有权选择接受或拒绝接受cookies。您可以通过修改浏览器设置的方式拒绝接受cookies。
但如果您选择拒绝接受cookies则您可能无法登录或使用依赖于cookies的本应用网络服务或功能
(c) 通过本应用所设cookies所取得的有关信息将适用本政策。
</view>
</view>
<view>
6.本隐私政策的更改
<view>
(a) 如果决定更改隐私政策,我们会在本政策中、本公司网站中以及我们认为适当的位置发布这些更改,以便您了解我们如何收集、使用您的个人信息,哪些人可以访问这些信息,以及在什么情况下我们会透露这些信息。
(b) 本公司保留随时修改本政策的权利,因此请经常查看。如对本政策作出重大更改,本公司会通过网站通知的形式告知。
</view>
</view>
<view>
请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密,尤其是本应用用户名及密码发生泄露,请您立即联络本应用客服,以便本应用采取相应措施。
</view>
<view>
感谢您花时间了解我们的隐私政策!我们将尽全力保护您的个人信息和合法权益,再次感谢您的信任!
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,17 @@
.myOne{
width: 100%;
display: flex;
justify-content: center;
padding-bottom: 60rpx;
}
.my-div{
width: 90%;
margin: auto;
}
.yhxy{
justify-content: center;
color: black;
font-size: 40rpx;
font-weight: 600;
}

View File

@ -198,5 +198,17 @@ Page({
// 页面卸载时清理定时器
onUnload() {
this._clearTimer();
}
},
gotoAgreement() {
wx.navigateTo({
url: '/pages/loginModule/agreement/agreement',
})
},
gotoPolicy() {
wx.navigateTo({
url: '/pages/loginModule/privacyPolicy/privacyPolicy',
})
},
});

View File

@ -22,8 +22,7 @@
<!-- 手机号输入 -->
<view class="flex-col self-stretch">
<view class="flex-col justify-start relative section parentstyle ">
<view class='centerStyle'>
<view class="flex-col justify-start relative section">
<input
class="flex-col justify-start items-start text-wrapper view input"
placeholder="请输入手机号"
@ -32,13 +31,11 @@
model:value="{{phone}}"
bindinput="onPhoneInput"
/>
<image src='{{defaultType? "": ""}}' class='imageStyle' bindtap='eyeStatus'></image>
</view>
</view>
<!-- 密码 / 验证码 输入 + 获取验证码按钮 -->
<view class="flex-row items-center section_2 mt-21">
<input
<input
class="flex-col justify-start items-start text-wrapper_2 view_2 input_1"
placeholder="{{ loginType==='password' ? '请输入密码' : '请输入验证码' }}"
password="{{ loginType==='password' }}"
@ -76,9 +73,9 @@
</checkbox-group>
<view class="group_3 ml-12">
<text class="font_4 text_9">登录代表您已同意</text>
<text class="font_4">《用户协议》</text>
<text class="font_4" bind:tap="gotoAgreement">《用户协议》</text>
<text class="text_10">&</text>
<text class="font_4">《隐私协议》</text>
<text class="font_4" bind:tap="gotoPolicy">《隐私协议》</text>
</view>
</view>

View File

@ -69,7 +69,7 @@
}
.section_2 {
margin-right: 4.93rpx;
padding: 12.63rpx 16.88rpx 9.75rpx;
padding: 20.63rpx 16.88rpx 18.75rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
@ -160,29 +160,4 @@
.checkbox .wx-checkbox-input {
width: 37.5rpx;
height: 37.5rpx;
}
.parentstyle {
/* display: flex; */
/* align-items: center; */
/* border: 1rpx solid #e0e0e0; */
border-radius: 10rpx;
/* box-shadow: 0 0 5rpx #e0e0e0; */
/* margin: 30rpx 38px; */
/* padding: 20rpx; */
}
.parentstyle .imageStyle {
width: 41rpx;
height: 41rpx;
margin-right: 20rpx;
}
.parentstyle .centerStyle {
display: flex;
flex: 1;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
}
}

View File

@ -89,6 +89,29 @@ Page({
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() {
@ -102,12 +125,13 @@ Page({
})) {
return;
}
const { nickname, phone, captcha, inviteCode, password } = this.data;
if (!this.validatePassword(password)) return ;
// 2. 再单独校验协议勾选
if (!this.data.agree) {
wx.showToast({ title: '请先同意用户协议', icon: 'none' });
return;
}
const { nickname, phone, captcha, inviteCode, password } = this.data;
wx.showLoading({
title: '加载中',
mask: true
@ -155,52 +179,15 @@ Page({
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
gotoAgreement() {
wx.navigateTo({
url: '/pages/loginModule/agreement/agreement',
})
},
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
gotoPolicy() {
wx.navigateTo({
url: '/pages/loginModule/privacyPolicy/privacyPolicy',
})
},
})

View File

@ -12,6 +12,7 @@
<view class="flex-col justify-start relative section">
<input class="flex-col justify-start items-start text-wrapper_5 view input"
placeholder="请输入昵称"
maxlength="6"
bindinput="onInput" data-field="nickname" value="{{nickname}}"
/>
</view>
@ -63,9 +64,9 @@
</checkbox-group>
<view class="group_2 ml-13">
<text class="font_2 text_10">我已阅读并同意</text>
<text class="font_2">《用户协议》</text>
<text class="font_2" bind:tap="gotoAgreement">《用户协议》</text>
<text class="text_11">&</text>
<text class="font_2">《隐私协议》</text>
<text class="font_2" bind:tap="gotoPolicy">《隐私协议》</text>
</view>
</view>
<view bindtap="onRegister" class="flex-col justify-start items-center text-wrapper_6 mt-26"><text class="font text_12">注册</text></view>

View File

@ -28,12 +28,14 @@ Page({
success: res => {
if (res.data.code === 1) {
wx.showToast({
title: '退出登录',
title: '退出成功',
icon: 'success'
})
wx.reLaunch({
url: '/pages/loginModule/pwdLogin/pwdLogin',
})
setTimeout(() => {
wx.reLaunch({
url: '/pages/loginModule/pwdLogin/pwdLogin',
})
}, 1000); // 1000ms = 1秒
} else {
wx.showToast({
title: res.data.message,
@ -75,53 +77,17 @@ Page({
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
gotoAgreement() {
wx.navigateTo({
url: '/pages/loginModule/agreement/agreement',
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
gotoPolicy() {
wx.navigateTo({
url: '/pages/loginModule/privacyPolicy/privacyPolicy',
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -28,7 +28,7 @@
/>
</view>
<view class="section_3"></view>
<view class="flex-row justify-between items-center group_5">
<view class="flex-row justify-between items-center group_5" bind:tap="gotoAgreement">
<text class="font">用户协议</text>
<image
class="image_2"
@ -36,7 +36,7 @@
/>
</view>
<view class="section_3"></view>
<view class="flex-row justify-between items-center group_6">
<view class="flex-row justify-between items-center group_6" bind:tap="gotoPolicy">
<text class="font text_6">隐私政策</text>
<image
class="image_2"

View File

@ -8,7 +8,7 @@ Page({
*/
data: {
withdrawalList: [],
withdrawalStatus: ['审核', '提现成功', '提现失败']
withdrawalStatus: ['审核', '提现成功', '提现失败']
},
getWithdrawalList() {

View File

@ -2,14 +2,12 @@
margin-top: 28.85rpx;
}
.page {
padding: 88.46rpx 0 87.85rpx;
background-image: linear-gradient(180deg, #ffa74f -29.4%, #ffffff1a 115.7%);
background-color: #ffffff;
width: 100%;
overflow: hidden;
height: 100%;
}
.section {
padding: 88.46rpx 0 878.85rpx;
background-image: linear-gradient(180deg, #ffa74f -29.4%, #ffffff1a 115.7%);
overflow: auto;
}
.section_2 {
margin-left: 50rpx;

View File

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

View File

@ -30,6 +30,7 @@
placeholder="请输入持卡人身份证号"
data-field="idCardNumber"
bindinput="handleInputChange"
type="idcard"
value="{{ idCardNumber }}"
/>
</view>
@ -60,6 +61,7 @@
placeholder="请输入持卡人银行卡号"
data-field="bankCardNumber"
bindinput="handleInputChange"
type="number"
value="{{ bankCardNumber }}"
/>
</view>
@ -73,15 +75,14 @@
placeholder="请输入开户银行"
data-field="bankName"
bindinput="handleInputChange"
type="number"
value="{{ bankName }}"
/>
</view>
</view>
<!-- 保存按钮 -->
<view wx:if="{{ isUpdate }}" class="flex-col justify-start items-center self-center text-wrapper_3">
<text class="font_2 text_8" bindtap="updateInfo" >更新</text>
<view wx:if="{{ isUpdate }}" class="flex-col justify-start items-center self-center text-wrapper_3" bindtap="updateInfo">
<text class="font_2 text_8">更新</text>
</view>
<view wx:else="{{ isUpdate }}" class="flex-col justify-start items-center self-center text-wrapper_3">
<text class="font_2 text_8" bindtap="saveInfo" >保存</text>

View File

@ -11,7 +11,7 @@
.font_2 {
font-size: 30.53rpx;
font-family: SourceHanSansCN;
line-height: 28.09rpx;
line-height: 30.53rpx;
color: #000000;
}
.text_2 {
@ -37,6 +37,7 @@
border-radius: 10rpx;
}
.text_3 {
width: 90%;
margin-left: 27.52rpx;
}
.font {
@ -60,13 +61,14 @@
border-radius: 10rpx;
}
.text_12 {
width: 90%;
margin-left: 25.8rpx;
}
.group_4 {
line-height: 28.09rpx;
}
.text_1 {
width: 400rpx;
width: 90%;
margin-left: 27.82rpx;
}
.group_5 {
@ -76,6 +78,7 @@
line-height: 28.21rpx;
}
.text_5 {
width: 90%;
margin-left: 26.74rpx;
}
.font_4 {
@ -92,10 +95,10 @@
}
.text-wrapper_3 {
margin-top: 57.25rpx;
padding: 25.84rpx 0 20.5rpx;
padding: 26.25rpx 0;
background-color: #ff8d1a;
border-radius: 19.08rpx;
width: 248.09rpx;
width: 243.75rpx;
}
.text_8 {
color: #ffffff;

View File

@ -1,8 +1,17 @@
import { baseUrl } from "../../../request";
import { globalImgUrl } from '../../../request';
// pages/personCenter/commissionSetting/commissionSetting.js
Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad() {
this.getProjectList()
this.getFixedRate()
},
/**
* 页面的初始数据
*/
@ -19,6 +28,7 @@ Page({
nowProjectDetailName: '', // 现在的‘项目详细名称’,用于传给弹窗
isSub: false, // 用于区分是项目抽佣页面还是单个用户抽佣页面
fixedRate: 0, // 固定抽佣——一键设置
globalImgUrl,
},
// 获取项目列表
@ -117,59 +127,26 @@ Page({
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getProjectList()
this.getFixedRate()
},
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.onRefresh();
},
onRefresh:function(){
//导航条加载动画
wx.showNavigationBarLoading()
//loading 提示框
wx.showLoading({
title: '加载中...',
})
console.log("下拉刷新啦");
this.onLoad()
setTimeout(function () {
wx.hideLoading();
wx.hideNavigationBarLoading();
//停止下拉刷新
wx.stopPullDownRefresh();
}, 1000)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -2,5 +2,6 @@
"usingComponents": {
"commissionPop": "/pages/personCenter/component/commissionPop/commissionPop",
"commissionRatePop": "/pages/personCenter/component/commissionRatePop/commissionRatePop"
}
},
"enablePullDownRefresh": true
}

View File

@ -22,7 +22,7 @@
<view class="flex-row flex-1 self-center">
<image
class="shrink-0 image_3"
src="{{ item.projectImage }}"
src="{{ globalImgUrl + item.projectImage }}"
/>
<view class="flex-col items-start flex-1 group_3 ml-13">
<text class="font">{{ item.projectName }}</text>

View File

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

View File

@ -32,9 +32,9 @@ import { baseUrl } from "../../../../request";Component({
// 提交设置
submit() {
const rate = parseFloat(this.data.commissionRate);
if (isNaN(rate) || rate <= 0 || rate > 5) {
if (isNaN(rate) || rate < 0 || rate > 10) {
wx.showToast({
title: `请输入有效的比例,最大为 5%`,
title: `请输入有效的比例,最大为 10%`,
icon: 'none',
});
return;

View File

@ -1,66 +1,55 @@
// pages/personCenter/contactSuper/contactSuper.js
Page({
const { baseUrl } = require("../../../request");
Page({
/**
* 页面的初始数据
*/
data: {
nickName: '', // 后端返回的昵称
phoneNumber: '' // 后端返回的手机号
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.fetchSupervisorInfo();
},
/**
* 生命周期函数--监听页面初次渲染完成
/**
* 请求后端接口,获取上级联系人信息
*/
onReady() {
fetchSupervisorInfo() {
const token = wx.getStorageSync('token');
wx.request({
url: baseUrl + '/userInfo/getSuper',
method: 'POST',
header: {
Authorization: token
},
success: (res) => {
if (res.data.code === 1) {
const { nickName, phoneNumber } = res.data.data;
this.setData({ nickName, phoneNumber });
} else {
wx.showToast({
title: res.data.message || '获取信息失败',
icon: 'none'
});
}
},
fail: (err) => {
console.error('fetchSupervisorInfo error:', err);
wx.showToast({
title: '请求失败,请稍后重试',
icon: 'none'
});
}
});
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
gotoCall() {
wx.makePhoneCall({
phoneNumber: this.data.phoneNumber
})
}
})

View File

@ -1,9 +1,11 @@
<view class="flex-col justify-start page">
<view class="flex-row justify-between section">
<view class="flex-col self-center">
<text class="self-start text">CHENXINZHI</text>
<view class="flex-row items-center self-stretch mt-53">
<text class="text_2">联系电话 15123967648</text>
<!-- 绑定昵称 -->
<text class="self-start text">{{nickName}}</text>
<view class="flex-row items-center self-stretch mt-53" bind:tap="gotoCall">
<!-- 绑定手机号 -->
<text class="text_2">联系电话 {{phoneNumber}}</text>
<image
class="shrink-0 image_2 ml-6"
src="./images/sjh.png"
@ -15,4 +17,4 @@
src="./images/logo.png"
/>
</view>
</view>
</view>

View File

@ -57,11 +57,12 @@ Page({
})
}
if (res.data.code === 1) {
let result = res.data.data
this.setData({
currentBalance: res.data.data.currentBalance,
withdrawalAmount: res.data.data.withdrawalAmount,
withdrawnAmount: res.data.data.withdrawnAmount,
fundsChangeVOList: res.data.data.fundsChangeVOList
currentBalance: result.currentBalance,
withdrawalAmount: result.withdrawalAmount,
withdrawnAmount: result.withdrawnAmount,
fundsChangeVOList: result.fundsChangeVOList
});
}
}

View File

@ -9,11 +9,11 @@
<view class="flex-row self-stretch group_2">
<view class="flex-row items-baseline">
<text class="font text_4">提现中</text>
<text class="ml-8 font_2">{{withdrawalAmount}}</text> <!-- 提现中的余额 -->
<text class="ml-8 font_2">{{withdrawalAmount}}</text> <!-- 提现中的余额 -->
</view>
<view class="flex-row items-baseline ml-33">
<text class="font text_5">已提现</text>
<text class="font_2 ml-7">{{withdrawnAmount}}</text> <!-- 已提现金额 -->
<text class="font_2 ml-7">{{withdrawnAmount}}</text> <!-- 已提现金额 -->
</view>
</view>
</view>
@ -42,11 +42,14 @@
<view class="flex-col list-item mt-13" wx:for="{{fundsChangeVOList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="flex-row">
<text class="flex-1 font_4">{{item.projectName}}</text> <!-- 项目名称 -->
<text class="shrink-0 self-start font_5 text_9 ml-21">{{item.changeAmount}} ¥</text> <!-- 变动金额 -->
<!-- 判断变动金额的符号和字体颜色 -->
<text class="shrink-0 self-start font_5 text_9 ml-21" style="color: {{item.changeAmount >= 0 ? '#FE2828' : '#10D466'}}">{{item.changeAmount >= 0 ? '+' : ''}}{{item.changeAmount}}
</text>
</view>
<view class="mt-12 flex-row justify-between items-center">
<text class="font_6 text_10">{{item.createTime}}</text> <!-- 创建时间 -->
<text class="font_3">{{item.currentAmount}}</text> <!-- 当前金额 -->
<text class="font_3">{{item.currentAmount}}</text> <!-- 当前金额 -->
</view>
</view>
</view>

View File

@ -11,14 +11,14 @@
margin-left: 40.38rpx;
}
.page {
padding: 69.23rpx 38.46rpx 517.31rpx;
padding: 69.23rpx 38.46rpx 69.31rpx;
background-image: linear-gradient(180deg, #ffc387 0%, #ffffff00 120.3%);
width: 100%;
overflow: hidden;
height: 100%;
overflow: auto;
}
.section {
margin-left: 11.54rpx;
margin-left: 3.85rpx;
margin-right: 3.85rpx;
background-color: #ffbb78;
border-radius: 14.15rpx;
@ -38,7 +38,6 @@
line-height: 35.04rpx;
}
.text-wrapper {
padding: 11.54rpx 0;
background-color: #ffffff;
border-radius: 28.85rpx;
width: 130.77rpx;
@ -78,7 +77,7 @@
}
.text_3 {
color: #ff8d1a;
line-height: 24.88rpx;
line-height: 48.08rpx;
}
.text {
line-height: 25.15rpx;

View File

@ -21,6 +21,21 @@ Page({
showPopup: false, // 控制弹窗显示与否
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() {
this.setData({
@ -85,58 +100,62 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
getUserMainInfo() {
const token = wx.getStorageSync('token');
// 获取用户主要信息
wx.request({
url: baseUrl + '/userInfo/get/main/jwt',
method: 'GET',
header: {
Authorization: token
},
success: res => {
if (res.data.code === 1) {
let result = res.data.data
this.setData({
currentBalance: result.currentBalance, // 当前余额
withdrawalingBalance: result.withdrawalAmount, // 提现中的余额
withdrawaledAmount: result.withdrawnAmount, // 已提现的余额
totalIncome: result.totalIncome, // 累计收入
qrcode: globalImgUrl + result.inviteQrCode
})
} else {
wx.showToast({
title: '获取个人信息失败',
icon: 'none'
})
}
},
fail: () => {
wx.showToast({ title: '网络错误,请重试', icon: 'none' });
}
})
// 获取用户信息
wx.request({
url: baseUrl + '/userInfo/get/jwt',
method: 'GET',
header: {
Authorization: token
},
success: res => {
if (res.data.code === 1) {
this.setData({
nickName: res.data.data.nickName,
// TODO 头像未连接
userAvatar: res.data.data.userAvatar,
phoneNumber: res.data.data.phoneNumber,
userAccount: res.data.data.userAccount,
invitationCode: res.data.data.invitationCode
})
}
}
})
},
onLoad(options) {
const token = wx.getStorageSync('token');
// 获取用户主要信息
wx.request({
url: baseUrl + '/userInfo/get/main/jwt',
method: 'GET',
header: {
Authorization: token
},
success: res => {
if (res.data.code === 1) {
let result = res.data.data
this.setData({
currentBalance: result.currentBalance, // 当前余额
withdrawalingBalance: result.withdrawalAmount, // 提现中的余额
withdrawaledAmount: result.withdrawnAmount, // 已提现的余额
totalIncome: result.totalIncome, // 累计收入
qrcode: globalImgUrl + result.inviteQrCode
})
} else {
wx.showToast({
title: '获取个人信息失败',
icon: 'none'
})
}
},
fail: () => {
wx.showToast({ title: '网络错误,请重试', icon: 'none' });
}
})
// 获取用户信息
wx.request({
url: baseUrl + '/userInfo/get/jwt',
method: 'GET',
header: {
Authorization: token
},
success: res => {
if (res.data.code === 1) {
this.setData({
nickName: res.data.data.nickName,
// TODO 头像未连接
userAvatar: res.data.data.userAvatar,
phoneNumber: res.data.data.phoneNumber,
userAccount: res.data.data.userAccount,
invitationCode: res.data.data.invitationCode
})
}
}
})
this.getUserMainInfo()
},
// 复制邀请码到剪贴板
@ -171,41 +190,12 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.getUserMainInfo()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
gotoCall() {
wx.makePhoneCall({
phoneNumber: this.data.phoneNumber
})
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -3,7 +3,7 @@
<view class="flex-row justify-between items-center group">
<view class="flex-col">
<text class="self-start font text">{{ nickName }}</text>
<view class="flex-row items-center self-stretch group_2 mt-9">
<view class="flex-row items-center self-stretch group_2 mt-9" bind:tap="gotoCall">
<image
class="image_3"
src="./images/dianhua.png"
@ -90,6 +90,7 @@
<text class="font text_13 mt-6">提现记录</text>
</view>
</view>
<!-- 接单相关 -->
<view class="flex-col list">
<view
class="flex-row equal-division equal-division_3 mt-15"
@ -131,6 +132,47 @@
<text class="font mt-11">联系上级</text>
</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 class="flex-col list_2">
<view class="flex-row justify-between items-center self-stretch group_13" bind:tap="zhshezhi">

View File

@ -14,7 +14,7 @@
margin-left: 9.38rpx;
}
.page {
padding: 65.63rpx 28.13rpx 331.88rpx 30rpx;
padding: 65.63rpx 28.13rpx 331.88rpx;
background-image: linear-gradient(180deg, #ff8d1a -7.3%, #ffffff00 92.1%);
width: 100%;
overflow: hidden;

View File

@ -18,7 +18,9 @@ Page({
resetPwd() {
const { phone, verificationCode, password, currentPwd } = this.data;
formatPassword(password,currentPwd);
if( !formatPassword(password,currentPwd) ) {
return;
}
wx.request({
url: baseUrl + '/userInfo/mini/in/reset/pwd',
method: 'POST',
@ -39,9 +41,12 @@ Page({
title: '更改密码成功',
icon: 'success'
})
wx.reLaunch({
url: '/pages/loginModule/pwdLogin/pwdLogin',
})
setTimeout(() => {
wx.reLaunch({
url: '/pages/loginModule/pwdLogin/pwdLogin',
})
}, 1000); // 1000ms = 1秒
} else {
wx.showModal({
title: '提示',

View File

@ -34,7 +34,7 @@
font-size: 30.53rpx;
font-family: SourceHanSansCN;
line-height: 28.34rpx;
color: #8c8c8c;
color: #323232;
}
.text_3 {
color: #ff8d1a;
@ -45,7 +45,6 @@
}
.text {
margin-left: 2.69rpx;
color: #000000;
line-height: 23.17rpx;
}
.text_4 {

View File

@ -18,8 +18,29 @@ Page({
nowAgentUnitPrice: 0, // 现在的‘代理单价’,用于传给弹窗
nowProjectDetailName: '', // 现在的‘项目详细名称’,用于传给弹窗
isSub: true, // 用于区分是项目抽佣页面还是单个用户抽佣页面
searchText: '',
tempSubCommissionList: []
},
// 输入框内容变化时更新数据
onInput(e) {
this.setData({
searchText: e.detail.value, // 获取用户输入的关键字
});
},
onSearch() {
let searchValue = this.data.searchText; // 获取输入框的值
let subCommissionList = this.data.subCommissionList
// 筛选出 salespersonName 包含 searchText 的项
let filtered = subCommissionList.filter(item =>
item.subUserNickName.includes(searchValue)
);
this.setData({
tempSubCommissionList: filtered
})
},
// 点击“设价”按钮,显示弹窗
showCommissionRatePop(e) {
console.log('弹窗传值----->',e);
@ -59,7 +80,8 @@ Page({
console.log('下级抽佣列表----->',res.data.data);
if (res.data.code === 1) {
this.setData({
subCommissionList: res.data.data
subCommissionList: res.data.data,
tempSubCommissionList: res.data.data
})
}
}
@ -77,52 +99,25 @@ Page({
this.getSubCommissionList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.onRefresh();
},
onRefresh:function(){
//导航条加载动画
wx.showNavigationBarLoading()
//loading 提示框
wx.showLoading({
title: '加载中...',
})
this.getSubCommissionList()
setTimeout(function () {
wx.hideLoading();
wx.hideNavigationBarLoading();
//停止下拉刷新
wx.stopPullDownRefresh();
}, 1000)
},
})

View File

@ -1,5 +1,6 @@
{
"usingComponents": {
"commissionRatePop": "/pages/personCenter/component/commissionRatePop/commissionRatePop"
}
},
"enablePullDownRefresh": true
}

View File

@ -7,11 +7,11 @@
class="image"
src="./images/ss.png"
/>
<input class="font text_2 ml-7" placeholder="请输入关键字" />
<input class="font text_2 ml-7" placeholder="请输入关键字" bindinput="onInput" confirm-type="search" bindconfirm="onSearch" value="{{searchText}}"/>
</view>
</view>
<view class="flex-col mt-16">
<view class="flex-col list-item_1 mt-23" wx:for="{{ subCommissionList }}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="flex-col list-item_1 mt-23" wx:for="{{ tempSubCommissionList }}" wx:for-item="item" wx:for-index="index" wx:key="index">
<text class="self-start font_2 text_3">结算标准:{{ item.subUserNickName }}</text>
<view class="flex-col self-stretch section_3 mt-17">
<view class="flex-row justify-between items-center">

View File

@ -19,7 +19,7 @@
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
height: calc(100vh - 1rpx);
}
.font {
font-size: 30rpx;
@ -41,7 +41,7 @@
height: 35.63rpx;
}
.text_2 {
color: #999999;
color: #323232;
line-height: 27.96rpx;
}
.list-item_1 {
@ -62,6 +62,7 @@
line-height: 24.49rpx;
}
.section_3 {
position: relative;
padding: 40.14rpx 31.69rpx 25.61rpx 34.52rpx;
background-color: #f5f5f5;
border-radius: 10.05rpx;
@ -101,7 +102,8 @@
line-height: 25.54rpx;
}
.group_2 {
margin-left: 135.81rpx;
position: absolute;
right: 40rpx;
width: 75.75rpx;
}
.image_2 {

View File

@ -8,10 +8,12 @@ Page({
*/
data: {
directAgentSize: 0, // 直接代理人数
teamSize: null, // 团队人数
teamEarnings: null, // 团队收益
teamSize: '', // 团队人数
teamEarnings: '', // 团队收益
invitationCode: "", // 邀请码
userMemberInfoVOList: [] // 成员列表
userMemberInfoVOList: [], // 成员列表
searchText: '',
tempUserMemberInfoVOList: [],
},
// 获取团队成员信息
@ -23,18 +25,39 @@ Page({
Authorization: wx.getStorageSync('token')
},
success: res => {
console.log('团队成员信息---->',res.data.data);
// console.log('团队成员信息---->',res.data.data);
let result = res.data.data
this.setData({
directAgentSize: res.data.data.directAgentSize,
teamSize: res.data.data.teamSize,
teamEarnings: res.data.data.teamEarnings,
invitationCode: res.data.data.invitationCode,
userMemberInfoVOList: res.data.data.userMemberInfoVOList
directAgentSize: result.directAgentSize,
teamSize: result.teamSize,
teamEarnings: result.teamEarnings,
invitationCode: result.invitationCode,
userMemberInfoVOList: result.userMemberInfoVOList,
tempUserMemberInfoVOList: result.userMemberInfoVOList
})
}
})
},
// 输入框内容变化时更新数据
onInput(e) {
this.setData({
searchText: e.detail.value, // 获取用户输入的关键字
});
},
onSearch() {
let searchValue = this.data.searchText; // 获取输入框的值
let userMemberList = this.data.userMemberInfoVOList
// 筛选出 salespersonName 包含 searchText 的项
let filtered = userMemberList.filter(item =>
item.nickName.includes(searchValue)
);
this.setData({
tempUserMemberInfoVOList: filtered
})
},
// 复制邀请码到剪贴板
copyInvitationCode() {
wx.setClipboardData({

View File

@ -44,13 +44,13 @@
class="image_4"
src="./images/ss.png"
/>
<input class="font text_8 ml-4" placeholder="请输入关键字"/>
<input class="font text_8 ml-4" placeholder="请输入关键字" bindinput="onInput" confirm-type="search" bindconfirm="onSearch" value="{{searchText}}"/>
</view>
</view>
<view class="flex-col list mt-13">
<view
class="flex-row items-center relative group_6"
wx:for="{{userMemberInfoVOList}}"
wx:for="{{tempUserMemberInfoVOList}}"
wx:for-item="item"
wx:for-index="index"
wx:key="index"

View File

@ -14,9 +14,8 @@
padding: 39.38rpx 28.13rpx 117.32rpx 30rpx;
background-image: linear-gradient(0deg, #ffffff 66.3%, #ff8d1a 100%);
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
overflow: auto;
}
.section {
padding: 30.97rpx 0 18.75rpx;
@ -131,7 +130,7 @@
height: 35.63rpx;
}
.text_8 {
color: #8c8c8c;
color: #323232;
line-height: 20.96rpx;
}
.list {

View File

@ -6,22 +6,26 @@ Page({
* 页面的初始数据
*/
data: {
withdrawalAccount: '', // 这里保存提现账户信息
currentBalance: 0, // 当前可提现余额
withdrawalAccount: '', // 提现账户信息
withdrawnAmount: '', // 用户输入的提现金额
},
// 获取当前账户信息
getAccountInfo() {
wx.request({
url: baseUrl + '/userAccount/queryById', // 替换为你的后端接口
url: baseUrl + '/withdrawalApply/query/condition', // 替换为你的后端接口
method: 'POST',
header: {
Authorization: wx.getStorageSync('token'),
},
success: (res) => {
console.log('当前账户是---->',res.data.data);
console.log('当前账户是---->', res.data.data);
if (res.data.code === 1) {
let result = res.data.data;
this.setData({
withdrawalAccount: res.data.data.bankCardNumber,
currentBalance: result.currentBalance.toFixed(2),
withdrawalAccount: result.bankCardNumber
});
} else {
wx.showToast({
@ -39,11 +43,95 @@ Page({
});
},
// 输入框内容变化时更新数据
onInput(e) {
this.setData({
withdrawnAmount: e.detail.value, // 获取用户输入的金额
});
},
// 点击“全部提现”,填充当前可提现余额到输入框
onWithdrawAll() {
this.setData({
withdrawnAmount: this.data.currentBalance, // 将当前余额填入提现金额输入框
});
},
// 点击“立即提现”,发送请求
onSubmitWithdraw() {
const { withdrawnAmount, currentBalance } = this.data;
// 校验提现金额是否大于当前可提现余额
if (!withdrawnAmount) {
wx.showToast({
title: '请输入提现金额',
icon: 'none'
});
return;
}
// 校验提现金额是否大于当前可提现余额
if (parseFloat(withdrawnAmount) > parseFloat(currentBalance)) {
wx.showToast({
title: '提现金额不可大于余额',
icon: 'none'
});
return;
}
// 校验提现金额是否小于1元
if (parseFloat(withdrawnAmount) < 1) {
wx.showToast({
title: '最低提现金额为1元',
icon: 'none'
});
return;
}
// 发送提现请求
wx.request({
url: baseUrl + '/withdrawalApply/add', // 后端提现请求路径
method: 'POST',
header: {
Authorization: wx.getStorageSync('token'), // 请求头中加入token
},
data: {
withdrawnAmount: withdrawnAmount // 请求体携带提现金额
},
success: (res) => {
if (res.data.code === 1) {
wx.showToast({
title: '提现成功,等待后台审核',
icon: 'none',
duration: 1000,
});
// 1秒后跳转到账单详情页面
setTimeout(() => {
wx.redirectTo({
url: '/pages/personCenter/billingDetails/billingDetails',
});
}, 1000); // 延时1秒跳转
} else {
wx.showToast({
title: res.data.message,
icon: 'none'
});
}
},
fail: () => {
wx.showToast({
title: '请求失败,请稍后再试',
icon: 'none'
});
}
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getAccountInfo()
this.getAccountInfo(); // 加载页面时获取账户信息
},
/**
@ -89,4 +177,4 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {},
});
});

View File

@ -22,14 +22,14 @@
class="shrink-0 image_2"
src="./images/money.png"
/>
<input class="font_2 text_3 ml-13" placeholder="请输入金额" />
<input class="font_2 text_3 ml-13" placeholder="请输入提现金额" bindinput="onInput" type="digit" value="{{withdrawnAmount}}"/>
</view>
<text class="text_4">全部提现</text>
<text class="text_4" bindtap="onWithdrawAll">全部提现</text>
</view>
<text class="self-start font_2 text_5 mt-19">可提现:13.93元</text>
<text class="self-start font_2 text_5 mt-19">可提现:{{ currentBalance }}元</text>
</view>
</view>
<view class="flex-col justify-start items-center self-center text-wrapper">
<view bindtap="onSubmitWithdraw" class="flex-col justify-start items-center self-center text-wrapper">
<text class="font text_6">立即提现</text>
</view>
</view>
</view>

View File

@ -41,10 +41,11 @@
font-size: 26.72rpx;
font-family: SourceHanSansCN;
line-height: 21.39rpx;
color: #000000;
color: #323232;
}
.text {
line-height: 20.29rpx;
font-size: 32.25rpx;
line-height: 32.25rpx;
}
.section_3 {
margin-top: 40.08rpx;
@ -65,18 +66,19 @@
height: 41.98rpx;
}
.text_3 {
color: #b0b0b0;
line-height: 24.92rpx;
color: #323232;
line-height: 35.25rpx;
font-size: 35.25rpx;
}
.text_4 {
color: #ff8d1a;
font-size: 22.9rpx;
font-size: 30.25rpx;
font-family: SourceHanSansCN;
line-height: 21.39rpx;
line-height: 30.25rpx;
}
.text_5 {
font-size: 24.81rpx;
line-height: 22.88rpx;
font-size: 30.25rpx;
line-height: 30.25rpx;
}
.text-wrapper {
margin-top: 64.89rpx;

View File

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

Some files were not shown because too many files have changed in this diff Show More