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