diff --git a/src/api/admin.js b/src/api/admin.js index 9ae710d7..7e034181 100644 --- a/src/api/admin.js +++ b/src/api/admin.js @@ -89,10 +89,11 @@ export function UpdateUserRole(param) { }) } -export function resetPassword(userId) { +export function resetPassword(data) { return request({ - url: `/user/resetPassword/${userId}`, - method: 'get' + url: `/user/resetPassword`, + method: 'post', + data }) } diff --git a/src/views/admin/user/components/Account.vue b/src/views/admin/user/components/Account.vue index 4ee4bfeb..f1019b0d 100644 --- a/src/views/admin/user/components/Account.vue +++ b/src/views/admin/user/components/Account.vue @@ -23,7 +23,11 @@ export default { }) .then(() => { - resetPassword(this.userId).then(res => { + let data = { + BaseUrl: `${location.protocol}//${location.host}/login`, + UserId: this.userId + } + resetPassword(data).then(res => { if (res.IsSuccess) { this.$message({ message: 'Reset password successfully', diff --git a/src/views/system/user/components/Account.vue b/src/views/system/user/components/Account.vue index 83045fcf..927498af 100644 --- a/src/views/system/user/components/Account.vue +++ b/src/views/system/user/components/Account.vue @@ -4,7 +4,7 @@ Security -->
- {{$t('system:userlist:button:ResetPassword')}} + {{ $t('system:userlist:button:ResetPassword') }}
@@ -23,7 +23,11 @@ export default { distinguishCancelAndClose: true, }) .then(() => { - resetPassword(this.userId).then(res => { + let data = { + BaseUrl: `${location.protocol}//${location.host}/login`, + UserId: this.userId + } + resetPassword(data).then(res => { if (res.IsSuccess) { let msg = this.$t('system:userlist:message:ResetPassword2') msg = msg.replace('xxx', params('userName'))