From 57172d54d56af638ba940b636fbbab4aac862d20 Mon Sep 17 00:00:00 2001 From: jacy <18049821889@163.com> Date: Fri, 17 Jul 2026 08:20:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E4=BC=99=E4=BA=BA=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/h5-partner/src/pages/CenterPage.tsx | 103 +++++++---------------- apps/h5-partner/src/styles.css | 14 +++ 2 files changed, 45 insertions(+), 72 deletions(-) diff --git a/apps/h5-partner/src/pages/CenterPage.tsx b/apps/h5-partner/src/pages/CenterPage.tsx index 3e25753..ca63791 100644 --- a/apps/h5-partner/src/pages/CenterPage.tsx +++ b/apps/h5-partner/src/pages/CenterPage.tsx @@ -28,8 +28,6 @@ function fmtMoney(n: number) { export default function CenterPage({ variant = 'primary', roleLabel }: CenterPageProps) { const { account, logout, refresh, applySession } = usePartnerSession(); const isPrimary = variant === 'primary' && isPrimaryAccount(account); - const [name, setName] = useState(account?.name ?? ''); - const [saving, setSaving] = useState(false); const [authorizing, setAuthorizing] = useState(false); const [bills, setBills] = useState([]); const [staffCount, setStaffCount] = useState(0); @@ -38,10 +36,6 @@ export default function CenterPage({ variant = 'primary', roleLabel }: CenterPag document.title = isPrimary ? '合伙人中心' : '个人中心'; }, [isPrimary]); - useEffect(() => { - setName(account?.name ?? ''); - }, [account?.name]); - useEffect(() => { if (!isPrimary) return; void request('PARTNER_H5', '/partner/settlement/bills') @@ -69,25 +63,6 @@ export default function CenterPage({ variant = 'primary', roleLabel }: CenterPag }; }, [bills]); - async function handleSave() { - const trimmed = name.trim(); - if (!trimmed) { - toastError('请输入姓名'); - return; - } - if (trimmed === account?.name) return; - setSaving(true); - try { - await request('PARTNER_H5', '/partner/me', { - method: 'PUT', - body: JSON.stringify({ name: trimmed }), - }); - await refresh(); - } finally { - setSaving(false); - } - } - function handleContactPartner() { if (isPrimary) { if (!contactSupport()) toastError('暂无客服电话'); @@ -255,59 +230,43 @@ export default function CenterPage({ variant = 'primary', roleLabel }: CenterPag chevron_right + )} {!isPrimary && ( - <> -
-

个人信息设置

-
- - setName(e.target.value)} - placeholder="请输入姓名" - maxLength={32} - /> - - -

手机号由管理员维护,如需修改请联系总部

- -
-
- -
-
- - -
-
- +
+
+ + +
+
)}