fix: 修复获取统计数据时缺少corpid参数的问题
在获取统计数据时添加corpid参数,确保接口请求正确过滤对应企业的数据
This commit is contained in:
parent
aa9a89c5c5
commit
c8b44f3620
|
@ -78,6 +78,10 @@ export interface StatsDTO {
|
||||||
* 获取统计数据
|
* 获取统计数据
|
||||||
* @returns 包含统计数据的响应
|
* @returns 包含统计数据的响应
|
||||||
*/
|
*/
|
||||||
export const getStats = () => {
|
export const getStats = (corpid: string) => {
|
||||||
return http.request<ResponseData<StatsDTO>>('get', '/shop/shops/Stats');
|
return http.request<ResponseData<StatsDTO>>('get', '/shop/shops/Stats', {
|
||||||
|
params: {
|
||||||
|
corpid,
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
|
@ -64,7 +64,7 @@ const handleSubmit = async () => {
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
try {
|
try {
|
||||||
const { data } = await getStats();
|
const { data } = await getStats(wxStore.corpid);
|
||||||
shopData.value = [
|
shopData.value = [
|
||||||
{ name: '商店', icon: markRaw(Shop), value: data.shopCount },
|
{ name: '商店', icon: markRaw(Shop), value: data.shopCount },
|
||||||
{ name: '商品总数量', icon: markRaw(Goods), value: data.goodsCount },
|
{ name: '商品总数量', icon: markRaw(Goods), value: data.goodsCount },
|
||||||
|
|
Loading…
Reference in New Issue