Files
quyun/frontend/admin/src/api/mockService.js
2025-04-01 16:21:43 +08:00

32 lines
831 B
JavaScript

/**
* Mock service that provides fake data for development
*/
export const mockService = {
/**
* Get mock count of posts
* @returns {Promise<{count: number}>}
*/
getPostsCount() {
console.log('Using MOCK service for posts count');
return Promise.resolve({ count: 42 });
},
/**
* Get mock count of media items
* @returns {Promise<{count: number}>}
*/
getMediasCount() {
console.log('Using MOCK service for medias count');
return Promise.resolve({ count: 18 });
},
/**
* Get all mock statistics in a single call
* @returns {Promise<{posts: number, medias: number}>}
*/
getAllStatistics() {
console.log('Using MOCK service for all statistics');
return Promise.resolve({ posts: 42, medias: 18 });
}
};