重置密码接口修改
continuous-integration/drone/push Build is failing Details

wangxiaoshuang 2026-02-05 10:21:06 +08:00
parent 953033b768
commit bc3e00c8b4
3 changed files with 15 additions and 6 deletions

View File

@ -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
})
}

View File

@ -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',

View File

@ -4,7 +4,7 @@
<span>Security</span>
</div> -->
<div>
<el-button type="danger" @click="handleReset">{{$t('system:userlist:button:ResetPassword')}}</el-button>
<el-button type="danger" @click="handleReset">{{ $t('system:userlist:button:ResetPassword') }}</el-button>
</div>
</el-card>
</template>
@ -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'))