@@ -31,7 +31,7 @@ import {
|
||||
explainUseCase
|
||||
} from '@/usecases/explainUseCase'
|
||||
import type {
|
||||
ExplainBusinessUnit
|
||||
ExplainGuideStop
|
||||
} from '@/domain/museum'
|
||||
import {
|
||||
normalizeExplainDetailTargetFromGuideStop
|
||||
@@ -49,8 +49,8 @@ const explainGuideStopItems = ref<ExplainGuideStopSelectItem[]>([])
|
||||
const explainLoading = ref(false)
|
||||
const explainError = ref('')
|
||||
|
||||
const toGuideStopItems = (unit: ExplainBusinessUnit): ExplainGuideStopSelectItem[] => (
|
||||
unit.stops.map((stop) => ({
|
||||
const toGuideStopItems = (stops: ExplainGuideStop[]): ExplainGuideStopSelectItem[] => (
|
||||
stops.map((stop) => ({
|
||||
id: stop.id,
|
||||
name: stop.name,
|
||||
hallId: stop.hallId,
|
||||
@@ -99,7 +99,11 @@ onLoad(async (options: any = {}) => {
|
||||
}
|
||||
selectedExplainBusinessUnitName.value = unit.name || selectedExplainBusinessUnitName.value
|
||||
syncPageTitle(selectedExplainBusinessUnitName.value)
|
||||
explainGuideStopItems.value = toGuideStopItems(unit)
|
||||
const stops = await explainUseCase.listGuideStopsByBusinessUnit(
|
||||
selectedExplainHallId.value,
|
||||
selectedExplainBusinessUnitId.value
|
||||
)
|
||||
explainGuideStopItems.value = toGuideStopItems(stops)
|
||||
} catch (error) {
|
||||
explainError.value = '讲解点加载失败,请稍后重试'
|
||||
} finally {
|
||||
@@ -118,6 +122,10 @@ const handleExplainGuideStopClick = (stop: ExplainGuideStopSelectItem) => {
|
||||
targetType: target.targetType,
|
||||
targetId: target.targetId
|
||||
})
|
||||
if (stop.hallId) params.set('hallId', stop.hallId)
|
||||
if (stop.hallName) params.set('hallName', stop.hallName)
|
||||
if (stop.floorId) params.set('floorId', stop.floorId)
|
||||
if (stop.poiId) params.set('poiId', stop.poiId)
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pages/exhibit/detail?${params.toString()}`
|
||||
|
||||
Reference in New Issue
Block a user