vehicle-monitor/src/store/modules/community.ts

17 lines
416 B
TypeScript
Raw Normal View History

2025-05-12 17:12:01 +08:00
import { defineStore } from 'pinia';
import { getCommunityStatistics } from '@/api/community';
export const useCommunityStore = defineStore('communityStore', {
state: () => ({
communityStatisticsList: [],
}),
actions: {
/* 社区统计 */
async loadCommunityStatisticsList() {
const result = await getCommunityStatistics();
this.communityStatisticsList = result.data;
},
},
});