From 564a0a651f319cdc75ec9d8fbec5eba8af022437 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Thu, 23 Oct 2025 14:25:52 +0800
Subject: [PATCH] feat:个人信息/修改密码

---
 src/subPackages/userDetail/password/index.vue |   41 +++++++++++++++++++++--------------------
 1 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/src/subPackages/userDetail/password/index.vue b/src/subPackages/userDetail/password/index.vue
index 4c17598..7d4123b 100644
--- a/src/subPackages/userDetail/password/index.vue
+++ b/src/subPackages/userDetail/password/index.vue
@@ -27,15 +27,16 @@
 </template>
 
 <script setup>
+	import {
+		useUserStore
+	} from "@/store/index.js";
 	import md5 from "js-md5";
 	import {
 		getUserInfo,
 		updateInfo,
 		updatePassword
 	} from '@/api/user/index.js';
-	import {
-		useUserStore
-	} from "@/store/index.js";
+
 	const userStore = useUserStore();
 	const passwordForm = ref({
 		oldPassword: '',
@@ -43,19 +44,13 @@
 		newPassword1: '',
 	});
 	const clearForm = () => {
-			passwordForm.value = {
-				oldPassword: '',
-				newPassword: '',
-				newPassword1: '',
-			};
+		passwordForm.value = {
+			oldPassword: '',
+			newPassword: '',
+			newPassword1: '',
 		};
+	};
 	const reset = () => {
-		// passwordForm.value = {
-		// 	id: userStore.userInfo.user_id,
-		// 	oldPassword: '',
-		// 	newPassword: '',
-		// 	newPassword1: '',
-		// };
 		clearForm();
 	};
 	const submit = () => {
@@ -70,6 +65,10 @@
 					duration: 2000
 				});
 				clearForm();
+				userStore.setUserInfo(null)
+				uni.redirectTo({
+					url: '/pages/login/index'
+				})
 
 			} else {
 				uni.showToast({
@@ -83,7 +82,7 @@
 
 	};
 	onShow(async () => {
-clearForm();
+		clearForm();
 	});
 </script>
 
@@ -91,7 +90,7 @@
 	.container {
 
 		width: 100%;
-	
+
 		height: 100%;
 		display: flex;
 		flex-direction: column;
@@ -101,7 +100,7 @@
 		background-size: cover;
 
 		background-attachment: fixed;
-		
+
 
 	}
 
@@ -150,12 +149,14 @@
 
 	.btngroup {
 		display: flex;
-		margin-top: 120px;
+		position: absolute;
+		bottom:75px;
 	}
-	.u-button:first-child{
+
+	.u-button:first-child {
 		margin-right: 15px;
 	}
-	
+
 	.custom-style {
 		width: 138px;
 		height: 38px;

--
Gitblit v1.9.3