| | |
| | | } |
| | | |
| | | const GET_APPLICATIONS = ` |
| | | query GetApplications($name: String, $page: Int, $size: Int) { |
| | | activityPlayerApplications(name: $name, page: $page, size: $size) { |
| | | query GetApplications($name: String, $activityId: ID, $page: Int, $size: Int) { |
| | | activityPlayerApplications(name: $name, activityId: $activityId, page: $page, size: $size) { |
| | | id playerName activityName phone applyTime state |
| | | } |
| | | } |
| | | ` |
| | | |
| | | export const PlayerApi = { |
| | | getApplications: async (name, page, size) => { |
| | | const data = await graphqlRequest(GET_APPLICATIONS, { name, page, size }) |
| | | getApplications: async (name, activityId, page, size) => { |
| | | const data = await graphqlRequest(GET_APPLICATIONS, { name, activityId, page, size }) |
| | | return data.activityPlayerApplications || [] |
| | | } |
| | | } |