接口调试完毕

This commit is contained in:
kron
2025-08-05 11:51:09 +08:00
parent 05f0c14920
commit 414bedf69f
7 changed files with 116 additions and 50 deletions

View File

@@ -374,7 +374,7 @@ export const savePointBookAPI = async (
targetType,
groups,
arrows,
group_data = []
data = []
) => {
return request("POST", "/user/score/sheet/report", {
bowType,
@@ -382,15 +382,27 @@ export const savePointBookAPI = async (
targetType,
groups,
arrows,
group_data,
group_data: data.map((item) =>
item.map((i) => ({
...i,
ring: i.ring === "M" ? -1 : i.ring === "X" ? 0 : Number(i.ring),
}))
),
});
};
export const getPointBookListAPI = async (page = 1, size = 10) => {
return request(
"GET",
`/user/score/sheet/list?pageNum=${page}&pageSize=${size}`
);
export const getPointBookListAPI = async (
page = 1,
bowType,
distance,
targetType
) => {
let url = `/user/score/sheet/list?pageNum=${page}&pageSize=10`;
if (bowType) url += `&bowType=${bowType}`;
if (distance) url += `&distance=${distance}`;
if (targetType) url += `&targetType=${targetType}`;
const result = await request("GET", url);
return result.list || [];
};
export const getPointBookDetailAPI = async (id) => {