fix: 修复获取统计数据时缺少corpid参数的问题

在获取统计数据时添加corpid参数,确保接口请求正确过滤对应企业的数据
This commit is contained in:
dzq 2025-07-01 08:27:27 +08:00
parent aa9a89c5c5
commit c8b44f3620
2 changed files with 7 additions and 3 deletions

View File

@ -78,6 +78,10 @@ export interface StatsDTO {
*
* @returns
*/
export const getStats = () => {
return http.request<ResponseData<StatsDTO>>('get', '/shop/shops/Stats');
export const getStats = (corpid: string) => {
return http.request<ResponseData<StatsDTO>>('get', '/shop/shops/Stats', {
params: {
corpid,
},
});
};

View File

@ -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 },