I had a good time during the trip.

Literal

Trip-during pleasant memories [object-を] had.

楽しい思いをする (to have a pleasant experience) is a set expression: 思い (feeling/experience) + をする (to have/undergo). 旅行中 (during the trip) uses 中 as a suffix meaning 'during.'