Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
2025-08-10 16:22:31 +08:00
5 changed files with 19 additions and 10 deletions

View File

@ -129,7 +129,7 @@ Page({
fail: () => { fail: () => {
// 请求失败后隐藏loading // 请求失败后隐藏loading
wx.hideLoading(); wx.hideLoading();
console.log('111');
wx.showToast({ wx.showToast({
title: '请求失败', title: '请求失败',
icon: 'none' icon: 'none'

View File

@ -125,8 +125,7 @@ Page({
verificationCode: code, verificationCode: code,
userPassword: newPwd, userPassword: newPwd,
userConfirmPassword: confirmPwd, userConfirmPassword: confirmPwd,
sourceToken: null, userRole: role
role: role
}, },
success: res => { success: res => {
if (res.data.code === 1) { if (res.data.code === 1) {

View File

@ -166,7 +166,7 @@ Page({
: baseUrl + '/userInfo/mini/vcd/login'; : baseUrl + '/userInfo/mini/vcd/login';
const payload = loginType === 'password' const payload = loginType === 'password'
? { phoneNumber: phone, userPassword: credential, userRole: role } ? { phoneNumber: phone, userPassword: credential, userRole: role }
: { phoneNumber: phone, verificationCode: credential }; : { phoneNumber: phone, verificationCode: credential, userRole: role };
wx.request({ wx.request({
url, url,

View File

@ -10,12 +10,14 @@ Page({
nickName: "", nickName: "",
userAvatar: "", userAvatar: "",
phoneNumber: "", phoneNumber: "",
globalImgUrl globalImgUrl,
role: '',
}, },
gotoResetPwd() { gotoResetPwd() {
const { role } = this.data;
wx.navigateTo({ wx.navigateTo({
url: '/pages/personCenter/resetPwd/resetPwd', url: `/pages/personCenter/resetPwd/resetPwd?role=${ role }`,
}) })
}, },
@ -65,12 +67,14 @@ Page({
Authorization: token Authorization: token
}, },
success: res => { success: res => {
console.log('用户信息---->',res.data.data);
if (res.data.code === 1) { if (res.data.code === 1) {
this.setData({ this.setData({
nickName: res.data.data.nickName, nickName: res.data.data.nickName,
userAvatar: res.data.data.userAvatar, userAvatar: res.data.data.userAvatar,
phoneNumber: res.data.data.phoneNumber, phoneNumber: res.data.data.phoneNumber,
userAccount: res.data.data.userAccount userAccount: res.data.data.userAccount,
role:res.data.data.userRole,
}) })
} }
}, },

View File

@ -13,11 +13,12 @@ Page({
count: 60, count: 60,
password: '', // 第一次输入的密码 password: '', // 第一次输入的密码
currentPwd: '', // 再次确认密码 currentPwd: '', // 再次确认密码
verificationCode: '' // 验证码 verificationCode: '', // 验证码
role: '',
}, },
resetPwd() { resetPwd() {
const { phone, verificationCode, password, currentPwd } = this.data; const { phone, verificationCode, password, currentPwd, role } = this.data;
if( !formatPassword(password,currentPwd) ) { if( !formatPassword(password,currentPwd) ) {
return; return;
} }
@ -32,7 +33,8 @@ Page({
verificationCode: verificationCode, verificationCode: verificationCode,
userPassword: password, userPassword: password,
userConfirmPassword: currentPwd, userConfirmPassword: currentPwd,
sourceToken: wx.getStorageSync('token') sourceToken: wx.getStorageSync('token'),
userRole: role,
}, },
success: res => { success: res => {
console.log('修改密码--->',res); console.log('修改密码--->',res);
@ -112,6 +114,10 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log('---->',options);
this.setData({
role: options.role
})
// 获取用户信息 —— 用于渲染手机号 // 获取用户信息 —— 用于渲染手机号
wx.request({ wx.request({
url: baseUrl + '/userInfo/get/jwt', url: baseUrl + '/userInfo/get/jwt',