接口调试完毕
This commit is contained in:
26
src/apis.js
26
src/apis.js
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user