From 87c847cbdf7a62d1e7a9956633c7365d97d57c5d Mon Sep 17 00:00:00 2001 From: jsy_zjg <31502350@qq.com> Date: Wed, 8 Jan 2025 12:24:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mine/pwd/index.vue | 27 +++++++++++++++------------ pages/work/user/index.vue | 15 +++++++++------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/pages/mine/pwd/index.vue b/pages/mine/pwd/index.vue index e1b810c..e3c8400 100644 --- a/pages/mine/pwd/index.vue +++ b/pages/mine/pwd/index.vue @@ -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(); + }) + }) - }) } } diff --git a/pages/work/user/index.vue b/pages/work/user/index.vue index e780213..a4edd2b 100644 --- a/pages/work/user/index.vue +++ b/pages/work/user/index.vue @@ -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 = [];