From f3793037f0e56530d9ec79dc48feebf086543fb3 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 25 十月 2024 11:40:33 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-ui/src/page/index/top/index.vue | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/page/index/top/index.vue b/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
index 9969734..ca8584f 100644
--- a/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
+++ b/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
@@ -132,6 +132,7 @@
import topNotice from './top-notice'
import topLang from "./top-lang";
import {changePassword} from "@/api/user"
+import func from "@/util/func";
export default {
components: {
@@ -300,9 +301,20 @@
submitSwitch(form, done) {
let userInfo = JSON.parse(localStorage.getItem('saber-userInfo'));
- let params = {userOid:userInfo.content.userOid,...form}
+ let params = {
+ userOid:userInfo.content.userOid,
+ oldPassword:func.encryptData(form.oldPassword,'daliantan0v0vcip'),
+ password:func.encryptData(form.password,'daliantan0v0vcip'),
+ confirmPassword:func.encryptData(form.confirmPassword,'daliantan0v0vcip'),
+
+ }
changePassword(params).then(res =>{
- console.log(res);
+ if(res.data.code === 200){
+ this.$message.success(res.data.msg);
+ this.passwordVisible = false;
+ }
+ }).catch(err => {
+ console.log(err);
})
// this.$store.dispatch("refreshToken", form).then(() => {
// this.userBox = false;
@@ -317,6 +329,7 @@
type: "warning"
}).then(() => {
this.$store.dispatch("LogOut").then(() => {
+ console.log('123');
resetRouter();
this.$router.push({path: "/login"});
});
--
Gitblit v1.10.0