feat;提交管理端和城市合伙人端

This commit is contained in:
ljy
2026-07-05 23:48:20 +08:00
parent fecfc61ec5
commit 569becedaa
73 changed files with 10150 additions and 80 deletions
+31
View File
@@ -0,0 +1,31 @@
import { View, Text } from '@tarojs/components';
import Taro from '@tarojs/taro';
type Props = {
title: string;
back?: boolean;
plain?: boolean;
actionText?: string;
onAction?: () => void;
};
/** 带顶部安全区(刘海/状态栏)适配的通用头部 */
export default function HqHeader({ title, back, plain, actionText, onAction }: Props) {
return (
<View className={`hq-header${plain ? ' hq-header--plain' : ''}`}>
<View className="hq-header__bar">
{back && (
<View className="hq-header__back" onClick={() => Taro.navigateBack()}>
<Text className="material-symbols-outlined">arrow_back_ios_new</Text>
</View>
)}
<Text className="hq-header__title">{title}</Text>
{actionText && (
<View className="hq-header__action" onClick={onAction}>
<Text>{actionText}</Text>
</View>
)}
</View>
</View>
);
}
+51
View File
@@ -0,0 +1,51 @@
.hq-tabbar {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 100;
display: flex;
justify-content: space-around;
align-items: center;
padding: 10px 12px calc(10px + var(--hq-safe-bottom));
background: #fff;
border-top: 1px solid rgba(226, 190, 188, 0.2);
border-radius: 16px 16px 0 0;
box-shadow: 0 -4px 20px rgba(166, 29, 36, 0.05);
box-sizing: border-box;
}
.hq-tabbar__item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
padding: 6px 4px;
border-radius: 12px;
color: #4e5852;
opacity: 0.75;
transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.hq-tabbar__item--active {
color: var(--hq-red);
background: rgba(255, 218, 215, 0.35);
opacity: 1;
}
.hq-tabbar__icon {
font-size: 24px;
line-height: 1;
}
.hq-tabbar__icon--active {
font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.hq-tabbar__label {
font-size: 12px;
font-weight: 500;
line-height: 1.2;
}
+41
View File
@@ -0,0 +1,41 @@
import { View, Text } from '@tarojs/components';
import Taro from '@tarojs/taro';
import './HqTabBar.css';
export const HQ_TABS = [
{ pagePath: '/pages/dashboard/index', text: '管理中心', icon: 'dashboard' },
{ pagePath: '/pages/stores/index', text: '门店审核', icon: 'fact_check' },
{ pagePath: '/pages/settlement/index', text: '结算中心', icon: 'account_balance_wallet' },
{ pagePath: '/pages/tickets/index', text: '客服中心', icon: 'support_agent' },
] as const;
type HqTabBarProps = {
selected: number;
};
/** 总部底栏(H5 需页面内显式渲染;Taro custom-tab-bar 在 H5 不自动挂载) */
export default function HqTabBar({ selected }: HqTabBarProps) {
return (
<View className="hq-tabbar">
{HQ_TABS.map((tab, index) => {
const active = selected === index;
return (
<View
key={tab.pagePath}
className={`hq-tabbar__item${active ? ' hq-tabbar__item--active' : ''}`}
onClick={() => {
if (!active) Taro.switchTab({ url: tab.pagePath });
}}
>
<Text
className={`material-symbols-outlined hq-tabbar__icon${active ? ' hq-tabbar__icon--active' : ''}`}
>
{tab.icon}
</Text>
<Text className="hq-tabbar__label">{tab.text}</Text>
</View>
);
})}
</View>
);
}