From bafd46bf63ac8bc85230e5b9b487738682f62c92 Mon Sep 17 00:00:00 2001
From: yuanteng0011 <1876787513@qq.com>
Date: Thu, 29 May 2025 21:31:35 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E4=BA=86=E6=88=91=E7=9A=84?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=EF=BC=8C=E6=88=91=E7=9A=84=E6=8A=BD=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 3 +-
pages/loginModule/register/register.js | 1 +
.../accountSetting/accountSetting.js | 6 +
.../billingDetails/billingDetails.wxml | 8 +-
.../commissionSetting/commissionSetting.wxml | 20 ++--
.../commissionSetting/images/right.png | Bin 0 -> 182 bytes
.../commissionSetting/images/rightBlack.png | Bin 0 -> 603 bytes
pages/personCenter/mine/mine.wxml | 16 +--
pages/personCenter/resetPwd/resetPwd.js | 111 +++++++++++++++++-
pages/personCenter/resetPwd/resetPwd.wxml | 32 ++++-
.../userProject/userProject.wxml | 12 +-
utils/util.js | 36 +++++-
12 files changed, 208 insertions(+), 37 deletions(-)
create mode 100644 pages/personCenter/commissionSetting/images/right.png
create mode 100644 pages/personCenter/commissionSetting/images/rightBlack.png
diff --git a/app.json b/app.json
index f3f96a0..1216b58 100644
--- a/app.json
+++ b/app.json
@@ -19,7 +19,8 @@
"pages/projectModule/applyCode/applyCode",
"pages/projectModule/userProject/userProject",
"pages/loginModule/forgetPwd/forgetPwd",
- "pages/personCenter/commissionSetting/commissionSetting"
+ "pages/personCenter/commissionSetting/commissionSetting",
+ "pages/personCenter/resetPwd/resetPwd"
],
"window": {
"navigationBarTextStyle": "black",
diff --git a/pages/loginModule/register/register.js b/pages/loginModule/register/register.js
index 58400fb..b7b0aeb 100644
--- a/pages/loginModule/register/register.js
+++ b/pages/loginModule/register/register.js
@@ -51,6 +51,7 @@ Page({
});
},
+ // 验证码开始
startCountdown() {
this.setData({ sending: true, count: 60 });
const timer = setInterval(() => {
diff --git a/pages/personCenter/accountSetting/accountSetting.js b/pages/personCenter/accountSetting/accountSetting.js
index bde9c36..b9de5be 100644
--- a/pages/personCenter/accountSetting/accountSetting.js
+++ b/pages/personCenter/accountSetting/accountSetting.js
@@ -12,6 +12,12 @@ Page({
phoneNumber: ""
},
+ gotoResetPwd() {
+ wx.navigateTo({
+ url: '/pages/personCenter/resetPwd/resetPwd',
+ })
+ },
+
logOut() {
wx.request({
url: baseUrl + '/userInfo/mini/logout',
diff --git a/pages/personCenter/billingDetails/billingDetails.wxml b/pages/personCenter/billingDetails/billingDetails.wxml
index bbf47ec..c57ce70 100644
--- a/pages/personCenter/billingDetails/billingDetails.wxml
+++ b/pages/personCenter/billingDetails/billingDetails.wxml
@@ -3,14 +3,16 @@
账单明细
-
+
银行卡
- ¥2.00
+ ¥{{ item.withdrawnAmount }}
2025-10-20 18:45:15
- 待审核
+ {{ withdrawalStatus[0] }}
+ {{ withdrawalStatus[1] }}
+ {{ withdrawalStatus[2] }}
diff --git a/pages/personCenter/commissionSetting/commissionSetting.wxml b/pages/personCenter/commissionSetting/commissionSetting.wxml
index 9a89f87..118fb04 100644
--- a/pages/personCenter/commissionSetting/commissionSetting.wxml
+++ b/pages/personCenter/commissionSetting/commissionSetting.wxml
@@ -12,28 +12,28 @@
-
+
- 美团神券包-春季活动
+ {{ item.projectName }}
- 结算T+2
+ 结算T+{{ item.projectSettlementCycle }}
下级单价
@@ -47,13 +47,13 @@
- 3.6元购买
- 0.30/0.30/0.00%
+ {{ commission.projectDetailName }}
+ {{ commission.myUnitPrice }}/{{ commission.agentUnitPrice }}/{{ commission.currentCommissionRate }}%
TA46m9V+fY)8d>*4(M
aRk0=&&rJ6UyS@S1#o+1c=d#Wzp$Pz=ggQz9
literal 0
HcmV?d00001
diff --git a/pages/personCenter/commissionSetting/images/rightBlack.png b/pages/personCenter/commissionSetting/images/rightBlack.png
new file mode 100644
index 0000000000000000000000000000000000000000..e12ea1114e0d79f53c18b3d4516410edafbdcde0
GIT binary patch
literal 603
zcmV-h0;K(kP)Px#1am@3R0s$N2z&@+hyVZr1xZ9fR9J=W*RgKeKpe;M@87PgDj@Y}ak=q?myBfV
z7~UX#gYpJ>gYYJF%|ttPLU{ssfmS!7(uf-fA|mm10R~HvYGc92DDmOt+vxSJ
z+iW(q!gjd315VIE7@RL3*0;68vN%M}TaAWVKCHjj4%_42H5&%#iSV)2JY%_9-_;HS
zSgzLJT8+k)2wITKV{wH}=(L}%ikfxu0{JQ^I
zI}9>7k9$t(@9w_8PN`eDkDWW49bI{AR07LJJSy)ymB98}iJViH?0&w{Pn9
z0MOO#n>{Mg@u+SOkU@3Yx$mo&a#W9XJMC*hh5+6(OCO&GrKmV!Bqcij42%Fg*mSeK
zu+F(!VJ41yVZa1Id9W$lzMVT;7OD`;Xk|hlO%J!aY%j`2LCzjCN~!Fqv5WFixnZyy
p$U@;!Q(25ss;a;5Q%?Dp`2%Ac!d(ZjZ{Pp`002ovPDHLkV1hz55<&m~
literal 0
HcmV?d00001
diff --git a/pages/personCenter/mine/mine.wxml b/pages/personCenter/mine/mine.wxml
index a8a0770..62268b8 100644
--- a/pages/personCenter/mine/mine.wxml
+++ b/pages/personCenter/mine/mine.wxml
@@ -2,25 +2,25 @@
- qingcheng
+ {{ nickName }}
- 15214547473
+ {{ phoneNumber }}
- 邀请码:123445
+ 邀请码:{{ invitationCode }}
-
+
当前金额:
- ¥5.00
+ ¥{{ currentBalance }}
提现中
- ¥0.00
+ ¥{{ withdrawalAmount }}
已提现
- ¥0.00
+ ¥{{ withdrawnAmount }}
累计收入
- ¥0.00
+ ¥{{ totalIncome }}
diff --git a/pages/personCenter/resetPwd/resetPwd.js b/pages/personCenter/resetPwd/resetPwd.js
index e8d04cd..c61a722 100644
--- a/pages/personCenter/resetPwd/resetPwd.js
+++ b/pages/personCenter/resetPwd/resetPwd.js
@@ -1,3 +1,6 @@
+import { baseUrl } from "../../../request";
+import { formatPassword } from "../../../utils/util"
+
// pages/personCenter/resetPwd/resetPwd.js
Page({
@@ -5,14 +8,118 @@ Page({
* 页面的初始数据
*/
data: {
-
+ phone: '', // 手机号
+ sending: false, // 是否发送验证码
+ count: 60,
+ password: '', // 第一次输入的密码
+ currentPwd: '', // 再次确认密码
+ verificationCode: '' // 验证码
},
+ resetPwd() {
+ const { phone, verificationCode, password, currentPwd } = this.data;
+ formatPassword(password,currentPwd);
+ wx.request({
+ url: baseUrl + '/userInfo/mini/in/reset/pwd',
+ method: 'POST',
+ header: {
+ Authorization: wx.getStorageSync('token')
+ },
+ data: {
+ phoneNumber: phone,
+ verificationCode: verificationCode,
+ userPassword: password,
+ userConfirmPassword: currentPwd
+ },
+ success: res => {
+ console.log('修改密码--->',res);
+ if (res.data.code === 1) {
+ wx.showToast({
+ title: '更改密码成功',
+ icon: 'success'
+ })
+ wx.reLaunch({
+ url: '/pages/loginModule/pwdLogin/pwdLogin',
+ })
+ } else {
+ wx.showModal({
+ title: '提示',
+ content: res.data.message
+ })
+ }
+ }
+ })
+ },
+
+ // 获取验证码
+ getVerificationCode() {
+ const { phone } = this.data;
+ wx.request({
+ url: baseUrl + '/userInfo/code/pwd',
+ method: 'POST',
+ header: {
+ Authorization: wx.getStorageSync('token')
+ },
+ data: {
+ templateString: phone
+ },
+ success: res => {
+ if (res.data.code === 1) {
+ wx.showToast({ title: '验证码已发送' });
+ this.startCountdown();
+ } else {
+ wx.showToast({
+ title: '发送失败',
+ icon: 'error'
+ })
+ }
+ }
+ })
+ },
+
+ // 验证码开始
+ startCountdown() {
+ this.setData({ sending: true, count: 60 });
+ const timer = setInterval(() => {
+ let { count } = this.data;
+ if (count <= 1) {
+ clearInterval(timer);
+ this.setData({ sending: false });
+ } else {
+ this.setData({ count: count - 1 });
+ }
+ }, 1000);
+ },
+
+ // 通用输入事件处理函数
+ onInput(e) {
+ const field = e.currentTarget.dataset.field; // 获取字段名
+ console.log(field);
+ const value = e.detail.value; // 获取输入容
+ this.setData({
+ [field]: value // 动态更新应字段
+ });
+ },
+
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
-
+ // 获取用户信息 —— 用于渲染手机号
+ wx.request({
+ url: baseUrl + '/userInfo/get/jwt',
+ method: 'GET',
+ header: {
+ Authorization: wx.getStorageSync('token')
+ },
+ success: res => {
+ if (res.data.code === 1) {
+ this.setData({
+ phone: res.data.data.phoneNumber
+ })
+ }
+ }
+ })
},
/**
diff --git a/pages/personCenter/resetPwd/resetPwd.wxml b/pages/personCenter/resetPwd/resetPwd.wxml
index bb9b943..c71fbe5 100644
--- a/pages/personCenter/resetPwd/resetPwd.wxml
+++ b/pages/personCenter/resetPwd/resetPwd.wxml
@@ -1,13 +1,33 @@
- 15888610253
+ {{ phone }}
-
- 获取验证码
+
+
+ {{ sending ? count + 's后重发' : '发送验证码' }}
+
-
+
-
+
- 重置密码
+ 重置密码
\ No newline at end of file
diff --git a/pages/projectModule/userProject/userProject.wxml b/pages/projectModule/userProject/userProject.wxml
index 4088f69..0e602e4 100644
--- a/pages/projectModule/userProject/userProject.wxml
+++ b/pages/projectModule/userProject/userProject.wxml
@@ -1,20 +1,22 @@
-
+
- 美团省钱包
- 结算T+1 实时数据
+ {{ item.projectName }}
+ 结算T+{{ item.projectSettlementCycle }} 实时数据
@@ -25,7 +27,7 @@
/>
推广码
-
+
{
return n[1] ? n : `0${n}`
}
-module.exports = {
- formatTime
+const formatPassword = (pwd , currentPwd) => {
+ if (pwd === '') {
+ wx.showToast({
+ title: '密码不能为空',
+ icon: 'error'
+ })
+ return;
+ }
+ if (pwd.length < 6) {
+ wx.showToast({
+ title: '密码不能小于6位',
+ icon: 'error'
+ })
+ return;
+ }
+ if (currentPwd === '') {
+ wx.showToast({
+ title: '请输入二次确认密码',
+ icon: 'error'
+ })
+ return;
+ }
+ if (currentPwd !== pwd) {
+ wx.showToast({
+ title: '两次密码不一致',
+ icon: 'error'
+ })
+ return;
+ }
+}
+
+module.exports = {
+ formatTime,
+ formatPassword
}