@@ -136,7 +136,7 @@
|
|||||||
<view class="guide-quick-icon-floor top"></view>
|
<view class="guide-quick-icon-floor top"></view>
|
||||||
<view class="guide-quick-icon-floor bottom"></view>
|
<view class="guide-quick-icon-floor bottom"></view>
|
||||||
</view>
|
</view>
|
||||||
<text class="guide-quick-action-text">{{ indoorQuickActionLabel }}</text>
|
<text class="guide-quick-action-text">导览</text>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="guide-quick-action"
|
class="guide-quick-action"
|
||||||
@@ -671,9 +671,6 @@ const guideQuickActiveAction = computed<'indoor' | 'arrival' | 'explain'>(() =>
|
|||||||
if (showArrivalPanel.value) return 'arrival'
|
if (showArrivalPanel.value) return 'arrival'
|
||||||
return is3DMode.value ? 'indoor' : 'arrival'
|
return is3DMode.value ? 'indoor' : 'arrival'
|
||||||
})
|
})
|
||||||
const indoorQuickActionLabel = computed(() => (
|
|
||||||
is3DMode.value && indoorView.value !== 'overview' ? '外观' : '馆内'
|
|
||||||
))
|
|
||||||
|
|
||||||
const toRoutePointOption = (target: GuideRouteTarget): RoutePointOption => ({
|
const toRoutePointOption = (target: GuideRouteTarget): RoutePointOption => ({
|
||||||
poiId: target.poiId,
|
poiId: target.poiId,
|
||||||
|
|||||||
@@ -279,14 +279,26 @@ describe('首页搜索与地图闭环', () => {
|
|||||||
expect(window.location.hash).toBe('#/pages/index/index?tab=guide&embedded=wechat-mini-program')
|
expect(window.location.hash).toBe('#/pages/index/index?tab=guide&embedded=wechat-mini-program')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('首页暂不展示来馆入口及其到馆面板', async () => {
|
it('首页暂不展示来馆入口,导览快捷按钮文案固定且保留原切换行为', async () => {
|
||||||
const wrapper = await mountIndex()
|
const wrapper = await mountIndex()
|
||||||
|
const map = wrapper.getComponent(GuideMapShellStub)
|
||||||
|
const guideAction = wrapper.findAll('.guide-quick-action')[0]
|
||||||
|
|
||||||
expect(wrapper.text()).not.toContain('来馆')
|
expect(wrapper.text()).not.toContain('来馆')
|
||||||
expect(wrapper.findAll('.guide-quick-action').map((item) => item.text())).toEqual([
|
expect(wrapper.findAll('.guide-quick-action').map((item) => item.text())).toEqual([
|
||||||
'馆内',
|
'导览',
|
||||||
'讲解'
|
'讲解'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
await guideAction.trigger('tap')
|
||||||
|
await flushPromises()
|
||||||
|
expect(map.props('indoorView')).toBe('floor')
|
||||||
|
expect(wrapper.findAll('.guide-quick-action')[0]?.text()).toBe('导览')
|
||||||
|
|
||||||
|
await guideAction.trigger('tap')
|
||||||
|
await flushPromises()
|
||||||
|
expect(map.props('indoorView')).toBe('overview')
|
||||||
|
expect(wrapper.findAll('.guide-quick-action')[0]?.text()).toBe('导览')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('向搜索面板传入当前楼层,并将分类结果 ID 精确传给地图', async () => {
|
it('向搜索面板传入当前楼层,并将分类结果 ID 精确传给地图', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user