@@ -254,6 +254,7 @@
|
||||
:loading="explainLoading"
|
||||
:error="explainError"
|
||||
@hall-click="handleExplainHallClick"
|
||||
@retry="loadExplainHalls"
|
||||
@back="handleExplainBack"
|
||||
/>
|
||||
</view>
|
||||
@@ -1202,9 +1203,9 @@ const navigateFromSelectedPoiToDetail = (url: string) => {
|
||||
})
|
||||
}
|
||||
|
||||
const navigateToHallDetail = (hallId: string) => {
|
||||
const navigateToHallExplainObjects = (hallId: string, hallName = '讲解') => {
|
||||
navigateFromSelectedPoiToDetail(
|
||||
`/pages/hall/detail?id=${encodeURIComponent(hallId)}&tab=explain`
|
||||
explainGuideStopListUrl(hallId, hallName)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1218,7 +1219,7 @@ const handleViewSelectedHall = async () => {
|
||||
return
|
||||
}
|
||||
|
||||
navigateToHallDetail(hall.id)
|
||||
navigateToHallExplainObjects(hall.id, hall.name)
|
||||
}
|
||||
|
||||
const handleSelectedPoiRelated = async () => {
|
||||
@@ -1226,24 +1227,16 @@ const handleSelectedPoiRelated = async () => {
|
||||
|
||||
const hall = await resolveSelectedPoiHall()
|
||||
if (hall) {
|
||||
navigateToHallDetail(hall.id)
|
||||
navigateToHallExplainObjects(hall.id, hall.name)
|
||||
return
|
||||
}
|
||||
|
||||
const keyword = selectedGuidePoi.value.hallName || selectedGuidePoi.value.name
|
||||
const results = await explainUseCase.searchExplain(keyword)
|
||||
const firstHall = results.find((item) => item.type === 'hall' && item.hallId)
|
||||
const firstExhibit = results.find((item) => item.type === 'exhibit' && item.exhibitId)
|
||||
|
||||
if (firstHall?.hallId) {
|
||||
navigateToHallDetail(firstHall.hallId)
|
||||
return
|
||||
}
|
||||
|
||||
if (firstExhibit?.exhibitId) {
|
||||
navigateFromSelectedPoiToDetail(
|
||||
`/pages/exhibit/detail?id=${encodeURIComponent(firstExhibit.exhibitId)}&tab=explain`
|
||||
)
|
||||
navigateToHallExplainObjects(firstHall.hallId, selectedGuidePoi.value.hallName || '讲解')
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user