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