fix bugs
This commit is contained in:
@@ -489,15 +489,26 @@ export default {
|
|||||||
// 提交报名订单
|
// 提交报名订单
|
||||||
const res = await registrationAPI.submitRegistration(submitData)
|
const res = await registrationAPI.submitRegistration(submitData)
|
||||||
|
|
||||||
// 保存报名ID
|
console.log('=== 报名响应数据 ===')
|
||||||
this.registrationId = res.id || res.registrationId
|
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 => ({
|
this.selectedPlayers = selected.map((item, index) => {
|
||||||
name: item.name,
|
// 生成编号:使用报名ID或订单号 + 选手索引
|
||||||
idCard: item.idCard,
|
const playerNumber = item.playerNo || item.number || `${this.registrationId}-${String(index + 1).padStart(6, '0')}`
|
||||||
number: item.number || `${this.registrationId}-${item.id}`
|
|
||||||
}))
|
return {
|
||||||
|
name: item.name,
|
||||||
|
idCard: item.idCard,
|
||||||
|
number: playerNumber
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
this.currentStep = 3;
|
this.currentStep = 3;
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,18 @@
|
|||||||
<text class="empty-icon">📋</text>
|
<text class="empty-icon">📋</text>
|
||||||
<text class="empty-text">暂无规程信息</text>
|
<text class="empty-text">暂无规程信息</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 快捷入口 -->
|
||||||
|
<view class="quick-actions" v-if="eventId">
|
||||||
|
<view class="quick-action-item" @click="goToPlayers">
|
||||||
|
<view class="action-icon">👥</view>
|
||||||
|
<view class="action-text">查看参赛选手</view>
|
||||||
|
</view>
|
||||||
|
<view class="quick-action-item" @click="goToRegister">
|
||||||
|
<view class="action-icon">📝</view>
|
||||||
|
<view class="action-text">我要报名</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -266,6 +278,24 @@ export default {
|
|||||||
const sizes = ['B', 'KB', 'MB', 'GB']
|
const sizes = ['B', 'KB', 'MB', 'GB']
|
||||||
const i = Math.floor(Math.log(bytes) / Math.log(k))
|
const i = Math.floor(Math.log(bytes) / Math.log(k))
|
||||||
return (bytes / Math.pow(k, i)).toFixed(2) + ' ' + sizes[i]
|
return (bytes / Math.pow(k, i)).toFixed(2) + ' ' + sizes[i]
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到参赛选手页面
|
||||||
|
*/
|
||||||
|
goToPlayers() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/event-players/event-players?eventId=${this.eventId}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到报名页面
|
||||||
|
*/
|
||||||
|
goToRegister() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/event-register/event-register?eventId=${this.eventId}`
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -488,4 +518,39 @@ export default {
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 快捷入口
|
||||||
|
.quick-actions {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.quick-action-item {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 15rpx;
|
||||||
|
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||||
|
transition: all 0.3s;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
transform: scale(0.95);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-icon {
|
||||||
|
font-size: 48rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-text {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user