feat: 🎸 封装了一个滚动加载组件
This commit is contained in:
9
src/services/dashboard.js
Normal file
9
src/services/dashboard.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import request from "@/utils/request";
|
||||
// 获取主页信息
|
||||
export async function getDashboardStatistics(studentId) {
|
||||
return request.get(`/api/dashboard/stats/${studentId}`);
|
||||
}
|
||||
// 获取学习进度
|
||||
export async function getLearningProgressSummary(studentId) {
|
||||
return request.get(`/api/dashboard/learning-summary/${studentId}`);
|
||||
}
|
||||
7
src/services/index.js
Normal file
7
src/services/index.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import {
|
||||
getDashboardStatistics,
|
||||
getLearningProgressSummary,
|
||||
} from "./dashboard";
|
||||
import { getProjectsList } from "./projectLibrary";
|
||||
|
||||
export { getDashboardStatistics, getLearningProgressSummary, getProjectsList };
|
||||
5
src/services/projectLibrary.js
Normal file
5
src/services/projectLibrary.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import request from "@/utils/request";
|
||||
// 获取项目列表
|
||||
export async function getProjectsList(params) {
|
||||
return request.get(`/api/projects`, { params });
|
||||
}
|
||||
Reference in New Issue
Block a user