mirror of
https://github.com/kerwincui/FastBee.git
synced 2025-09-26 20:31:12 +08:00
fix(修改密码):修改密码传参方式修改
This commit is contained in:
@@ -102,15 +102,12 @@ export function updateUserProfile(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 用户密码重置
|
// 用户密码重置
|
||||||
export function updateUserPwd(oldPassword, newPassword) {
|
export function updateUserPwd(data) {
|
||||||
const data = {
|
|
||||||
oldPassword,
|
|
||||||
newPassword
|
|
||||||
}
|
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/profile/updatePwd',
|
url: '/system/user/profile/updatePwd',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
params: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -66,7 +66,11 @@ export default {
|
|||||||
submit() {
|
submit() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
|
const params = {
|
||||||
|
oldPassword: this.user.oldPassword,
|
||||||
|
newPassword: this.user.newPassword
|
||||||
|
}
|
||||||
|
updateUserPwd(params).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功,请重新登录!");
|
this.$modal.msgSuccess("修改成功,请重新登录!");
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
//清除登录缓存
|
//清除登录缓存
|
||||||
|
Reference in New Issue
Block a user