diff --git a/src/api/shop/stats.ts b/src/api/shop/stats.ts index b1ba8d6..adc2d83 100644 --- a/src/api/shop/stats.ts +++ b/src/api/shop/stats.ts @@ -78,6 +78,10 @@ export interface StatsDTO { * 获取统计数据 * @returns 包含统计数据的响应 */ -export const getStats = () => { - return http.request>('get', '/shop/shops/Stats'); +export const getStats = (corpid: string) => { + return http.request>('get', '/shop/shops/Stats', { + params: { + corpid, + }, + }); }; \ No newline at end of file diff --git a/src/views/welcome/index.vue b/src/views/welcome/index.vue index 3752de2..08c0459 100644 --- a/src/views/welcome/index.vue +++ b/src/views/welcome/index.vue @@ -64,7 +64,7 @@ const handleSubmit = async () => { onMounted(async () => { try { - const { data } = await getStats(); + const { data } = await getStats(wxStore.corpid); shopData.value = [ { name: '商店', icon: markRaw(Shop), value: data.shopCount }, { name: '商品总数量', icon: markRaw(Goods), value: data.goodsCount },