From 99814f3720cf00f7e46eba37a5ec79a1db045df4 Mon Sep 17 00:00:00 2001 From: richarjiang Date: Thu, 10 Sep 2026 19:22:44 +0800 Subject: [PATCH] =?UTF-8?q?refactor(app):=20=E7=A7=BB=E9=99=A4=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=B8=AD=E5=BF=83=E9=A1=B6=E9=83=A8=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=8D=A1=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=B7=B2=E5=9C=A8=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=88=86=E6=9E=90=E9=A1=B5=E6=8F=90=E4=BE=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/app/src/pages/admin/index.vue | 101 ------------------------- 1 file changed, 101 deletions(-) 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() })