From c0a51a278e8f0178b0a0a76eaef7d83eca55fbb6 Mon Sep 17 00:00:00 2001 From: xiaowang <2161656029@qq.com> Date: Fri, 4 Sep 2026 14:10:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E7=94=A8=E6=88=B7=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E5=AF=86=E7=A0=81=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JC-Salon-Frontend/src/views/admin/UsersView.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/JC-Salon-Frontend/src/views/admin/UsersView.vue b/JC-Salon-Frontend/src/views/admin/UsersView.vue index d46416ca..141b62ef 100644 --- a/JC-Salon-Frontend/src/views/admin/UsersView.vue +++ b/JC-Salon-Frontend/src/views/admin/UsersView.vue @@ -645,6 +645,19 @@ const showDefaultPasswordCreateNotice = async () => { }) } +const showDefaultPasswordResetNotice = async () => { + const password = await resolveAdminDefaultPasswordForNotice() + Modal.success({ + title: '密码重置成功', + content: h('div', { class: 'default-password-notice' }, [ + h('p', '该用户的密码已重置为后台默认密码,请及时告知用户并提醒首次登录后修改。'), + h('div', { class: 'default-password-notice__value' }, password) + ]), + okText: '一键复制密码', + onOk: () => copyTextToClipboard(password) + }) +} + /** normalizeUserType is a local helper used by this page script. */ const normalizeUserType = (value: unknown) => { const type = Number(value) @@ -1646,7 +1659,7 @@ const handleResetPassword = (record: any) => { try { await runWithGlobalLoading(async () => { await adminUserApi.resetPassword(record.id) - message.success('密码重置成功') + await showDefaultPasswordResetNotice() }) } catch (error) { console.error('重置密码失败:', error)