diff --git a/packages/app/src/pages/admin/index.vue b/packages/app/src/pages/admin/index.vue index 0057241..0bfcc88 100644 --- a/packages/app/src/pages/admin/index.vue +++ b/packages/app/src/pages/admin/index.vue @@ -2,31 +2,6 @@ - - - - - - - - - - 课务运营 @@ -101,37 +76,21 @@ import { ref, onMounted } from 'vue' import { storeToRefs } from 'pinia' import CustomNavBar from '../../components/CustomNavBar.vue' import { getSystemLayout } from '../../utils/system' -import { useAdminStore } from './stores/admin' import { useUserStore } from '../../stores/user' -import type { AdminStats } from './stores/admin' import { requestAdminBookingSubscriptionCount } from '../../utils/wechat-subscription' import { getErrorMessage } from '../../utils/auth' const navBarHeight = ref('64px') -const adminStore = useAdminStore() const userStore = useUserStore() const { user } = storeToRefs(userStore) -const statsLoading = ref(false) -const stats = ref({ todayBookings: 0, totalOrders: 0, totalBookings: 0 }) const adminSubscribeLoading = ref(false) function navigate(path: string) { uni.navigateTo({ url: path }) } -async function loadStats() { - statsLoading.value = true - try { - stats.value = await adminStore.fetchDashboardStats() - } catch { - // fail silently — stats are non-critical - } finally { - statsLoading.value = false - } -} - async function handleIncreaseSubscriptionCount() { if (adminSubscribeLoading.value) { return @@ -156,72 +115,12 @@ async function handleIncreaseSubscriptionCount() { onMounted(() => { navBarHeight.value = `${getSystemLayout().navBarHeight}px` - loadStats() userStore.fetchProfile() })