From e977b8737d88aa1bd0286fe27bf4fd22cb2501d9 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期四, 18 七月 2024 17:34:42 +0800 Subject: [PATCH] 整合代码 --- Source/plt-web/plt-web-ui/src/page/index/top/index.vue | 16 ++++++++++++++-- 1 files changed, 14 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..7225469 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; -- Gitblit v1.9.3