diff --git a/src/components/workspace/CashManagement.vue b/src/components/workspace/CashManagement.vue index c54d9de..b488801 100644 --- a/src/components/workspace/CashManagement.vue +++ b/src/components/workspace/CashManagement.vue @@ -100,7 +100,6 @@ const startDate = `${currentYear}-01-01 00:00:00`; const endDate = `${currentYear}-12-31 23:59:59`; // 获取接口数据 const fetchCashData = async () => { - getAdminData() try { const res = await request({ url: '/workbench/getTotalRevenue', @@ -227,9 +226,9 @@ const renderChart = () => { chartInstance.setOption(option) } -onMounted(() => { - // getAdminData() - fetchCashData() +onMounted( async() => { + await getAdminData() + await fetchCashData() })