添加确认

This commit is contained in:
jsy_zjg 2025-01-08 12:24:12 +08:00
parent 7e0893bdeb
commit 87c847cbdf
2 changed files with 24 additions and 18 deletions

View File

@ -20,6 +20,7 @@
userResetPwd
} from "@/api/system/user"
import store from '@/store'
import plugin from "@/plugins"
export default {
data() {
return {
@ -65,19 +66,21 @@
},
methods: {
submit() {
this.$refs.form.validate().then(res => {
let user = {};
user.userId = store.state.user.user.userId;
user.password = this.user.newPassword;
userResetPwd(user).then(response => {
uni.showToast({
title: '修改成功',
mask: false,
duration: 1000
});
uni.navigateBack();
plugin.modal.confirm("您确定要修改密码吗?").then(res => {
this.$refs.form.validate().then(res => {
let user = {};
user.userId = store.state.user.user.userId;
user.password = this.user.newPassword;
userResetPwd(user).then(response => {
uni.showToast({
title: '修改成功',
mask: false,
duration: 1000
});
uni.navigateBack();
})
})
})
}
}

View File

@ -318,12 +318,15 @@
user.userId = this.selectItem.userId;
user.password = this.userForm.passWord;
console.log(user)
userResetPwd(user)
.then(res => {
this.showModal = false;
this.userForm.passWord = null;
plugin.modal.msgSuccess("修改成功!")
})
plugin.modal.confirm("您确定要修改密码吗?").then(res => {
userResetPwd(user)
.then(res => {
this.showModal = false;
this.userForm.passWord = null;
plugin.modal.msgSuccess("修改成功!")
})
})
},
onDeleteClick(userId) {
let ids = [];