diff --git a/apps/miniprogram/src/components/ui/DoctorTabBar/index.scss b/apps/miniprogram/src/components/ui/DoctorTabBar/index.scss
new file mode 100644
index 0000000..e8af20b
--- /dev/null
+++ b/apps/miniprogram/src/components/ui/DoctorTabBar/index.scss
@@ -0,0 +1,52 @@
+@import '../../../styles/variables.scss';
+
+.doctor-tabbar {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: $tabbar-space;
+ background: $card;
+ display: flex;
+ align-items: flex-start;
+ padding-top: 6px;
+ padding-bottom: env(safe-area-inset-bottom, 0px);
+ box-shadow: 0 -1px 0 $bd, $shadow-md;
+ z-index: 999;
+
+ &__item {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: 2px;
+ padding: 6px 0;
+ cursor: pointer;
+ -webkit-tap-highlight-color: transparent;
+
+ &--active {
+ .doctor-tabbar__icon {
+ transform: scale(1.15);
+ }
+
+ .doctor-tabbar__label {
+ color: $doc-pri;
+ font-weight: 600;
+ }
+ }
+ }
+
+ &__icon {
+ font-size: 22px;
+ line-height: 1;
+ transition: transform 0.15s ease;
+ }
+
+ &__label {
+ font-size: 10px;
+ color: $tx3;
+ line-height: 1.2;
+ transition: color 0.15s ease;
+ }
+}
diff --git a/apps/miniprogram/src/components/ui/DoctorTabBar/index.tsx b/apps/miniprogram/src/components/ui/DoctorTabBar/index.tsx
new file mode 100644
index 0000000..b416557
--- /dev/null
+++ b/apps/miniprogram/src/components/ui/DoctorTabBar/index.tsx
@@ -0,0 +1,47 @@
+import { View, Text } from '@tarojs/components';
+import Taro from '@tarojs/taro';
+import './index.scss';
+
+interface TabItem {
+ key: string;
+ icon: string;
+ activeIcon: string;
+ label: string;
+ url: string;
+}
+
+const DOCTOR_TABS: TabItem[] = [
+ { key: 'workbench', icon: '🏠', activeIcon: '🏠', label: '工作台', url: '/pages/pkg-doctor-core/index' },
+ { key: 'patients', icon: '👤', activeIcon: '👤', label: '患者', url: '/pages/pkg-doctor-core/patients/index' },
+ { key: 'consultation', icon: '💬', activeIcon: '💬', label: '咨询', url: '/pages/pkg-doctor-core/consultation/index' },
+ { key: 'settings', icon: '⚙️', activeIcon: '⚙️', label: '我的', url: '/pages/pkg-profile/settings/index' },
+];
+
+interface DoctorTabBarProps {
+ active?: string;
+}
+
+export default function DoctorTabBar({ active }: DoctorTabBarProps) {
+ const currentPath = `/${Taro.getCurrentPages().pop()?.path ?? ''}`;
+ const activeKey = active ?? DOCTOR_TABS.find((t) => currentPath.startsWith(t.url.replace('/index', '')))?.key ?? 'workbench';
+
+ const handleTab = (tab: TabItem) => {
+ if (tab.key === activeKey) return;
+ Taro.reLaunch({ url: tab.url });
+ };
+
+ return (
+
+ {DOCTOR_TABS.map((tab) => (
+ handleTab(tab)}
+ >
+ {tab.key === activeKey ? tab.activeIcon : tab.icon}
+ {tab.label}
+
+ ))}
+
+ );
+}
diff --git a/apps/miniprogram/src/pages/pkg-doctor-core/consultation/index.tsx b/apps/miniprogram/src/pages/pkg-doctor-core/consultation/index.tsx
index 1e04bf1..baaff75 100644
--- a/apps/miniprogram/src/pages/pkg-doctor-core/consultation/index.tsx
+++ b/apps/miniprogram/src/pages/pkg-doctor-core/consultation/index.tsx
@@ -11,6 +11,7 @@ import LoadingCard from '@/components/ui/LoadingCard';
import ErrorState from '@/components/ErrorState';
import EmptyState from '@/components/EmptyState';
import { useDoctorClass } from '@/hooks/useDoctorClass';
+import DoctorTabBar from '@/components/ui/DoctorTabBar';
import { safeNavigateTo } from '@/utils/navigate';
import { formatDateTime } from '@/utils/date';
import './index.scss';
@@ -125,6 +126,7 @@ export default function ConsultationList() {
))}
)}
+
);
}
diff --git a/apps/miniprogram/src/pages/pkg-doctor-core/index.tsx b/apps/miniprogram/src/pages/pkg-doctor-core/index.tsx
index 5645eed..deb58d5 100644
--- a/apps/miniprogram/src/pages/pkg-doctor-core/index.tsx
+++ b/apps/miniprogram/src/pages/pkg-doctor-core/index.tsx
@@ -7,6 +7,7 @@ import { usePageData } from '@/hooks/usePageData';
import { getDashboard, type DoctorDashboard } from '@/services/doctor/dashboard';
import Loading from '@/components/Loading';
import ContentCard from '@/components/ui/ContentCard';
+import DoctorTabBar from '@/components/ui/DoctorTabBar';
import ShortcutButton from '@/components/ui/ShortcutButton';
import TodoAlert from '@/components/ui/TodoAlert';
import './index.scss';
@@ -137,6 +138,7 @@ export default function DoctorHome() {
)}
+
);
}
diff --git a/apps/miniprogram/src/pages/pkg-doctor-core/patients/index.tsx b/apps/miniprogram/src/pages/pkg-doctor-core/patients/index.tsx
index 6920d58..724ad7e 100644
--- a/apps/miniprogram/src/pages/pkg-doctor-core/patients/index.tsx
+++ b/apps/miniprogram/src/pages/pkg-doctor-core/patients/index.tsx
@@ -11,6 +11,7 @@ import LoadingCard from '@/components/ui/LoadingCard';
import EmptyState from '@/components/EmptyState';
import Loading from '@/components/Loading';
import { useDoctorClass } from '@/hooks/useDoctorClass';
+import DoctorTabBar from '@/components/ui/DoctorTabBar';
import './index.scss';
const AVATAR_COLORS: Array<'pri' | 'acc' | 'wrn' | 'dan'> = ['pri', 'acc', 'wrn', 'dan'];
@@ -169,6 +170,7 @@ export default function PatientList() {
{loading && patients.length > 0 && }
)}
+
);
}
diff --git a/apps/miniprogram/src/pages/pkg-profile/settings/index.tsx b/apps/miniprogram/src/pages/pkg-profile/settings/index.tsx
index 86c95d1..5a10cfb 100644
--- a/apps/miniprogram/src/pages/pkg-profile/settings/index.tsx
+++ b/apps/miniprogram/src/pages/pkg-profile/settings/index.tsx
@@ -6,11 +6,13 @@ import { useAuthStore } from '../../../stores/auth';
import { invalidateHeadersCache, clearRequestCache } from '@/services/request';
import { useElderClass } from '../../../hooks/useElderClass';
import PageShell from '@/components/ui/PageShell';
+import DoctorTabBar from '@/components/ui/DoctorTabBar';
import './index.scss';
export default function Settings() {
const modeClass = useElderClass();
const logout = useAuthStore((s) => s.logout);
+ const isMedicalStaff = useAuthStore((s) => s.isMedicalStaff);
const handleClearCache = async () => {
const { confirm } = await Taro.showModal({
@@ -99,6 +101,7 @@ export default function Settings() {
退出登录
+ {isMedicalStaff() && }
);
}