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} - /> - - -

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

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