diff --git a/src/pages/select-event/select-event.vue b/src/pages/select-event/select-event.vue index 5c9791d..09da1c3 100644 --- a/src/pages/select-event/select-event.vue +++ b/src/pages/select-event/select-event.vue @@ -43,16 +43,11 @@ export default { if (options.type) { this.type = options.type; } - // Load project list after type is set if (this.eventId) { this.loadProjectList(this.eventId) } }, methods: { - /** - * Load project list filtered by participation type - * @param {String} eventId Competition ID - */ async loadProjectList(eventId) { try { const params = { competitionId: eventId } @@ -77,6 +72,7 @@ export default { id: item.id, name: item.name || item.projectName, price: item.price || item.registrationFee || 0, + type: item.type || (this.type === 'team' ? 2 : 1), selected: false })) } catch (err) { @@ -92,6 +88,7 @@ export default { item.selected = !item.selected; this.$forceUpdate(); }, + handleRegister() { const selectedProjects = this.projectList.filter(item => item.selected); if (selectedProjects.length === 0) { @@ -102,8 +99,16 @@ export default { return; } + // Include type in selected projects data + const projectsData = selectedProjects.map(p => ({ + id: p.id, + name: p.name, + price: p.price, + type: p.type + })) + uni.navigateTo({ - url: `/pages/event-register/event-register?eventId=${this.eventId}&projects=${encodeURIComponent(JSON.stringify(selectedProjects))}` + url: `/pages/event-register/event-register?eventId=${this.eventId}&projects=${encodeURIComponent(JSON.stringify(projectsData))}` }); } }