From 4a9c50891fc1b48cf3d5f6bef3c72181f23e5a34 Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Mon, 25 Aug 2025 22:50:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/src/common/request.js | 27 +- mobile/src/pages.json | 8 + mobile/src/pages/index/index.vue | 42 +- mobile/src/pages/internship/index.vue | 475 +++++---- mobile/src/pages/user/changeaAvatar.vue | 932 ++++++++++++++++++ mobile/src/pages/user/resetPasswd.vue | 418 ++++++++ .../src/pages/xg/xsjcxx/xsws/stuMsgDialog.vue | 4 +- mobile/src/static/{logo-2.png => logo-22.png} | Bin mobile/src/static/logo.svg | 8 + mobile/src/static/password.png | Bin 0 -> 2420 bytes mobile/src/utils/user.js | 2 +- 11 files changed, 1695 insertions(+), 221 deletions(-) create mode 100644 mobile/src/pages/user/changeaAvatar.vue create mode 100644 mobile/src/pages/user/resetPasswd.vue rename mobile/src/static/{logo-2.png => logo-22.png} (100%) create mode 100644 mobile/src/static/logo.svg create mode 100755 mobile/src/static/password.png diff --git a/mobile/src/common/request.js b/mobile/src/common/request.js index d5da71be..829b407e 100644 --- a/mobile/src/common/request.js +++ b/mobile/src/common/request.js @@ -38,7 +38,7 @@ function handleUnauthorized(message = '登录已失效,请重新登录') { const pages = getCurrentPages(); const currentPage = pages[pages.length - 1]; const currentPath = '/' + currentPage.route; - + // 如果是新生报名页面,不跳转到登录页,只是静默处理 if (currentPath === '/pages/enrollment/index') { console.log('📋 新生报名页面401错误,使用兜底数据,不跳转登录页'); @@ -395,6 +395,31 @@ export const api = { url: '/auth/logout', method: 'POST', }), + + // 修改密码 + resetPassword: (data) => + request({ + url: '/system/user/profile/updatePwd', + method: 'PUT', + header: { + isEncrypt: 'true', // 修复:使用字符串 'true' 而不是布尔值 true + repeatSubmit: false, + }, + data: { + oldPassword: data.oldPassword, + newPassword: data.newPassword, + }, + }), + + // 更新用户头像 + // updateUserAvatar: (data) => + // request({ + // url: '/system/user/profile/updateAvatar', + // method: 'PUT', + // data: { + // avatar: data.avatar, + // }, + // }), }; // 便捷请求方法封装 diff --git a/mobile/src/pages.json b/mobile/src/pages.json index e17ad23b..c3960042 100644 --- a/mobile/src/pages.json +++ b/mobile/src/pages.json @@ -294,6 +294,14 @@ "navigationBarBackgroundColor": "#1890ff", "navigationBarTextStyle": "white" } + }, + { + "path": "pages/user/resetPasswd", + "style": { + "navigationBarTitleText": "修改密码", + "navigationBarBackgroundColor": "#0051d9", + "navigationBarTextStyle": "white" + } } ], "globalStyle": { diff --git a/mobile/src/pages/index/index.vue b/mobile/src/pages/index/index.vue index 01bee670..202e2d01 100644 --- a/mobile/src/pages/index/index.vue +++ b/mobile/src/pages/index/index.vue @@ -460,7 +460,7 @@ --> - + + - --> + @@ -946,6 +966,20 @@ export default { }); }, + // 跳转到修改密码页面 + gotoResetPassword() { + uni.navigateTo({ + url: '/pages/user/resetPasswd', + }); + }, + + // 跳转到修改头像页面 + gotoChangeAvatar() { + uni.navigateTo({ + url: '/pages/user/changeaAvatar', + }); + }, + // 图片加载成功处理 handleImageLoad(event) { console.log('✅ 轮播图片加载成功:', event.detail); diff --git a/mobile/src/pages/internship/index.vue b/mobile/src/pages/internship/index.vue index cccf3355..2d82eee0 100644 --- a/mobile/src/pages/internship/index.vue +++ b/mobile/src/pages/internship/index.vue @@ -4,14 +4,16 @@ 实习期间: - {{ formatDateRange(internshipInfo.internshipStartDate, internshipInfo.internshipEndDate) }} + + {{ + formatDateRange( + internshipInfo.internshipStartDate, + internshipInfo.internshipEndDate, + ) + }} + 状态: - + @@ -51,7 +64,7 @@ 今日签到 {{ currentDate }} - + @@ -70,18 +83,18 @@ - - + {{ checkinLoading ? '签到中...' : '立即签到' }} - + {{ checkinTips }} @@ -93,17 +106,16 @@ - 签到位置 - + - - + - 经纬度:{{ currentLocation.latitude.toFixed(6) }},{{ currentLocation.longitude.toFixed(6) }} + 经纬度:{{ currentLocation.latitude.toFixed(6) }},{{ + currentLocation.longitude.toFixed(6) + }} - + - - 定位精度 {{ currentLocation.accuracy.toFixed(0) }}米 - + + 定位精度 {{ currentLocation.accuracy.toFixed(0) }}米 + + - + - @@ -161,37 +182,57 @@ 位置信息 - - + - + 无法获取位置信息 - + {{ locationError }} - + 签到需要位置信息,请确保: - + 已开启位置权限 - + GPS/网络定位已开启 - + 网络连接正常 @@ -202,7 +243,7 @@ - + 本月考勤 @@ -226,14 +267,14 @@ -