From 8bf5264ea80709c64a8677cec34e1d0ca8e03f52 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=83=AD=E5=BA=86=E6=B3=B0?=
<12369755+htcloud1@user.noreply.gitee.com>
Date: Tue, 18 Aug 2026 01:18:05 +0800
Subject: [PATCH] =?UTF-8?q?refactor(manager/accounts):=20=E5=88=A0?=
=?UTF-8?q?=E4=B8=A4=E4=B8=AA=20section-title=20+=20=E5=88=A0=E9=82=AE?=
=?UTF-8?q?=E7=AE=B1=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
template:
- 删 '修改个人信息' / '修改密码' 两个 section-title
- 删邮箱 form-item
- 个人信息只剩:姓名 + 手机号
script:
- form 删 email 字段
- rules 删 email 校验
- loadProfile 不再读 email
- onSave 提交 data 删 email
- onCancel 不再重置 email
style:
- 删 .section-title CSS (不再用)
---
ry-vue3/src/views/manager/Accounts.vue | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/ry-vue3/src/views/manager/Accounts.vue b/ry-vue3/src/views/manager/Accounts.vue
index 6a0c700..bf92955 100644
--- a/ry-vue3/src/views/manager/Accounts.vue
+++ b/ry-vue3/src/views/manager/Accounts.vue
@@ -3,12 +3,9 @@
首页 / 账号管理
- 修改个人信息
-
- 修改密码
@@ -23,7 +20,7 @@ import { reactive, ref, onMounted } from 'vue'
import { ElMessage } from 'element-plus'
import request from '@/utils/request'
-const form = reactive({ nickName: '', phonenumber: '', email: '', oldPassword: '', newPassword: '', confirmPassword: '' })
+const form = reactive({ nickName: '', phonenumber: '', oldPassword: '', newPassword: '', confirmPassword: '' })
const profile = ref({})
const saving = ref(false)
const formRef = ref(null)
@@ -31,7 +28,6 @@ const formRef = ref(null)
const rules = {
nickName: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
phonenumber: [{ pattern: /^1[3-9]\d{9}$/, message: '手机号格式不正确', trigger: 'blur' }],
- email: [{ type: 'email', message: '邮箱格式不正确', trigger: 'blur' }],
oldPassword: [{ required: false }],
newPassword: [{ min: 6, max: 20, message: '密码长度 6-20 位', trigger: 'blur' }],
confirmPassword: [{
@@ -48,7 +44,6 @@ async function loadProfile() {
profile.value = data || {}
form.nickName = profile.value.nickName || ''
form.phonenumber = profile.value.phonenumber || ''
- form.email = profile.value.email || ''
} catch { ElMessage.error('获取个人信息失败') }
}
@@ -59,7 +54,7 @@ async function onSave() {
await formRef.value.validate()
saving.value = true
try {
- await request({ url: '/system/user/profile', method: 'put', data: { nickName: form.nickName, phonenumber: form.phonenumber, email: form.email, sex: profile.value.sex } })
+ await request({ url: '/system/user/profile', method: 'put', data: { nickName: form.nickName, phonenumber: form.phonenumber, sex: profile.value.sex } })
if (form.newPassword) {
await request({ url: '/system/user/profile/updatePwd', method: 'put', data: { oldPassword: form.oldPassword, newPassword: form.newPassword } })
}
@@ -73,7 +68,6 @@ async function onSave() {
function onCancel() {
form.nickName = profile.value.nickName || ''
form.phonenumber = profile.value.phonenumber || ''
- form.email = profile.value.email || ''
form.oldPassword = ''; form.newPassword = ''; form.confirmPassword = ''
}
@@ -85,10 +79,4 @@ onMounted(loadProfile)
.manager-accounts { padding: 16px; }
.breadcrumb { font-size: 13px; color: #8c8c8c; margin-bottom: 12px; }
.filter-tip { color: #909399; font-size: 12px; margin-bottom: 12px; }
-.section-title {
- font-weight: 600;
- margin: 16px 0 12px;
- padding-left: 8px;
- border-left: 3px solid var(--brand-primary);
-}
\ No newline at end of file