| | |
| | | size: params.size || 10 |
| | | } |
| | | const result = await graphqlRequest(GET_PROMOTION_COMPETITIONS, variables) |
| | | return result.data.promotionCompetitions || [] |
| | | return result?.data?.promotionCompetitions || [] |
| | | } catch (error) { |
| | | console.error('获取比赛晋级列表失败:', error) |
| | | throw error |
| | |
| | | size: params.size || 10 |
| | | } |
| | | const result = await graphqlRequest(GET_COMPETITION_PARTICIPANTS, variables) |
| | | return result.data.competitionParticipants || [] |
| | | return result?.data?.competitionParticipants || [] |
| | | } catch (error) { |
| | | console.error('获取比赛参赛人员失败:', error) |
| | | throw error |
| | |
| | | async getPromotableParticipants(currentStageId) { |
| | | try { |
| | | const variables = { currentStageId } |
| | | const data = await graphqlRequest(GET_PROMOTABLE_PARTICIPANTS, variables) |
| | | return data.promotableParticipants |
| | | const result = await graphqlRequest(GET_PROMOTABLE_PARTICIPANTS, variables) |
| | | return result?.data?.promotableParticipants |
| | | } catch (error) { |
| | | console.error('获取可晋级参赛者列表失败:', error) |
| | | throw error |
| | |
| | | targetStageId |
| | | } |
| | | } |
| | | const data = await graphqlRequest(PROMOTE_PARTICIPANTS, variables) |
| | | return data.promoteParticipants |
| | | const result = await graphqlRequest(PROMOTE_PARTICIPANTS, variables) |
| | | return result?.data?.promoteParticipants |
| | | } catch (error) { |
| | | console.error('执行晋级操作失败:', error) |
| | | throw error |