fix bugs
This commit is contained in:
@@ -489,15 +489,26 @@ export default {
|
||||
// 提交报名订单
|
||||
const res = await registrationAPI.submitRegistration(submitData)
|
||||
|
||||
// 保存报名ID
|
||||
this.registrationId = res.id || res.registrationId
|
||||
console.log('=== 报名响应数据 ===')
|
||||
console.log('完整响应:', res)
|
||||
console.log('响应数据:', res.data)
|
||||
|
||||
// 保存报名ID - 尝试多个可能的字段
|
||||
this.registrationId = res.id || res.registrationId || res.data?.id || res.data?.registrationId || orderNo
|
||||
|
||||
console.log('报名ID:', this.registrationId)
|
||||
|
||||
// 更新选中的选手列表(包含编号)
|
||||
this.selectedPlayers = selected.map(item => ({
|
||||
name: item.name,
|
||||
idCard: item.idCard,
|
||||
number: item.number || `${this.registrationId}-${item.id}`
|
||||
}))
|
||||
this.selectedPlayers = selected.map((item, index) => {
|
||||
// 生成编号:使用报名ID或订单号 + 选手索引
|
||||
const playerNumber = item.playerNo || item.number || `${this.registrationId}-${String(index + 1).padStart(6, '0')}`
|
||||
|
||||
return {
|
||||
name: item.name,
|
||||
idCard: item.idCard,
|
||||
number: playerNumber
|
||||
}
|
||||
})
|
||||
|
||||
this.currentStep = 3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user