@@ -50,10 +50,11 @@ function SubAccountRoutes() {
|
||||
<Routes>
|
||||
<Route element={<SubAccountLayout />}>
|
||||
<Route path="/stores" element={<StoreListPage />} />
|
||||
<Route path="/stores/new" element={<StoreCreatePage />} />
|
||||
<Route path="/stores/:id" element={<StoreDetailPage />} />
|
||||
<Route path="/me" element={<PartnerMePage />} />
|
||||
</Route>
|
||||
{/* 与主账号一致:录入门店全屏,避免 sticky 底栏被 TabBar 挡住 */}
|
||||
<Route path="/stores/new" element={<StoreCreatePage />} />
|
||||
<Route path="*" element={<Navigate to="/stores/new?step=1" replace />} />
|
||||
</Routes>
|
||||
);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { PARTNER_STAFF_ROLE_LABELS, type PartnerStaffRole } from '@dukang/shared-types';
|
||||
import { request } from '../lib/api';
|
||||
import { usePartnerSession } from '../contexts/PartnerSessionContext';
|
||||
@@ -43,21 +44,31 @@ export default function PartnerMePage() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="page partner-me-page">
|
||||
<section className="partner-profile-card" style={{ margin: '16px var(--space-page)' }}>
|
||||
<div className="page partner-center-page partner-me-page">
|
||||
<header className="header app-page-header">
|
||||
<h1 className="app-page-title">杜康好客</h1>
|
||||
</header>
|
||||
|
||||
<section className="partner-profile-card">
|
||||
<div className="partner-profile-avatar">
|
||||
<span className="material-symbols-outlined">person</span>
|
||||
</div>
|
||||
<div style={{ flex: 1 }}>
|
||||
<h2 className="headline-lg" style={{ fontSize: 20 }}>{account?.name || '我的'}</h2>
|
||||
<p className="label-md text-muted" style={{ marginTop: 4 }}>{roleLabel}</p>
|
||||
{account?.companyName ? (
|
||||
<p className="body-md text-muted" style={{ marginTop: 4 }}>{account.companyName}</p>
|
||||
) : null}
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<h2 className="headline-lg" style={{ fontSize: 20 }}>{account?.name || '合伙人'}</h2>
|
||||
<span className="partner-role-badge">{roleLabel}</span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 4, marginTop: 4, color: 'var(--color-subtle-gray)' }}>
|
||||
<span className="material-symbols-outlined" style={{ fontSize: 16 }}>location_on</span>
|
||||
<span className="body-md">{account?.companyName || '—'}</span>
|
||||
</div>
|
||||
<p className="label-md text-muted" style={{ marginTop: 4 }}>{account?.phone || ''}</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="partner-form-section" style={{ padding: '0 var(--space-page)' }}>
|
||||
<section className="partner-menu-section">
|
||||
<h3 className="headline-md" style={{ marginBottom: 8 }}>账号资料</h3>
|
||||
<div className="partner-menu-card" style={{ padding: '16px' }}>
|
||||
<label className="partner-form-label" htmlFor="me-name">姓名</label>
|
||||
<input
|
||||
id="me-name"
|
||||
@@ -75,27 +86,49 @@ export default function PartnerMePage() {
|
||||
readOnly
|
||||
disabled
|
||||
/>
|
||||
<p className="label-md text-muted" style={{ marginTop: 4 }}>手机号由管理员维护,如需修改请联系总部</p>
|
||||
</section>
|
||||
<p className="label-md text-muted" style={{ marginTop: 4 }}>
|
||||
手机号由管理员维护,如需修改请联系总部
|
||||
</p>
|
||||
|
||||
<div style={{ padding: '24px var(--space-page) 100px' }}>
|
||||
<button
|
||||
type="button"
|
||||
className="partner-btn-primary"
|
||||
style={{ width: '100%' }}
|
||||
style={{ width: '100%', marginTop: 16 }}
|
||||
disabled={saving}
|
||||
onClick={() => void handleSave()}
|
||||
>
|
||||
{saving ? '保存中…' : '保存'}
|
||||
{saving ? '保存中…' : '保存资料'}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="partner-btn-outline"
|
||||
style={{ width: '100%', marginTop: 12 }}
|
||||
onClick={logout}
|
||||
>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="partner-menu-section">
|
||||
<h3 className="headline-md" style={{ marginBottom: 8 }}>快捷入口</h3>
|
||||
<div className="partner-menu-card">
|
||||
<Link to="/stores" className="partner-menu-item">
|
||||
<div className="partner-menu-item-left">
|
||||
<div className="partner-menu-icon"><span className="material-symbols-outlined">store</span></div>
|
||||
<span className="body-md" style={{ fontSize: 16 }}>门店管理</span>
|
||||
</div>
|
||||
<span className="material-symbols-outlined text-muted">chevron_right</span>
|
||||
</Link>
|
||||
<Link to="/stores/new?step=1" className="partner-menu-item">
|
||||
<div className="partner-menu-item-left">
|
||||
<div className="partner-menu-icon"><span className="material-symbols-outlined">add_business</span></div>
|
||||
<span className="body-md" style={{ fontSize: 16 }}>录入新门店</span>
|
||||
</div>
|
||||
<span className="material-symbols-outlined text-muted">chevron_right</span>
|
||||
</Link>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<button type="button" className="partner-logout-btn" onClick={logout}>
|
||||
<span className="material-symbols-outlined">logout</span>
|
||||
退出登录
|
||||
</button>
|
||||
|
||||
<div style={{ textAlign: 'center', opacity: 0.3, padding: '32px 0' }}>
|
||||
<p className="label-md text-muted">传承千年 · 杜康好客</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -20,7 +20,6 @@ import { fetchPartnerCities, type OpenCityOption } from '../lib/upload';
|
||||
import { isWechatEnv, weixinSdk } from '../lib/weixin';
|
||||
|
||||
import { usePartnerSession } from '../contexts/PartnerSessionContext';
|
||||
import { isSubAccount } from '../lib/partnerAccess';
|
||||
|
||||
import {
|
||||
|
||||
@@ -82,8 +81,6 @@ export default function StoreCreatePage() {
|
||||
|
||||
const { account, refresh } = usePartnerSession();
|
||||
|
||||
const subAccountLayout = isSubAccount(account);
|
||||
|
||||
const accountId = account?.id;
|
||||
|
||||
const wechatReady = !!account?.hasWechat;
|
||||
@@ -610,7 +607,7 @@ export default function StoreCreatePage() {
|
||||
|
||||
return (
|
||||
|
||||
<div className={`partner-page-sticky${subAccountLayout ? ' partner-page-sticky--tabbar' : ''}`}>
|
||||
<div className="partner-page-sticky">
|
||||
|
||||
<PageHeader title="录入新门店" onBack={() => navigate('/stores')} />
|
||||
|
||||
@@ -1094,7 +1091,7 @@ export default function StoreCreatePage() {
|
||||
|
||||
|
||||
|
||||
<footer className={`partner-sticky-footer${subAccountLayout ? ' partner-sticky-footer--above-tabbar' : ''}`}>
|
||||
<footer className="partner-sticky-footer">
|
||||
|
||||
{step > 1 && (
|
||||
|
||||
|
||||
@@ -1296,7 +1296,7 @@ nav.app-tabbar .app-tabbar-label {
|
||||
|
||||
.partner-sticky-footer--above-tabbar {
|
||||
bottom: calc(56px + env(safe-area-inset-bottom, 0px));
|
||||
z-index: 90;
|
||||
z-index: 110;
|
||||
}
|
||||
|
||||
.partner-stepper {
|
||||
@@ -1752,12 +1752,13 @@ nav.app-tabbar .app-tabbar-label {
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
transform: none;
|
||||
background: rgba(250, 249, 247, 0.92);
|
||||
background: rgba(250, 249, 247, 0.96);
|
||||
backdrop-filter: blur(8px);
|
||||
border-top: 1px solid rgba(226, 190, 188, 0.2);
|
||||
box-shadow: 0 -4px 20px rgba(166, 29, 36, 0.05);
|
||||
padding: 16px var(--space-page) calc(16px + env(safe-area-inset-bottom, 0px));
|
||||
z-index: 60;
|
||||
/* 高于 .app-tabbar(100),防止偶发叠层遮挡「下一步/提交」 */
|
||||
z-index: 110;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
Reference in New Issue
Block a user