Files
gaoYuJournal/miniprogram/components/travel-location-popup/index.wxml
2025-12-16 16:57:49 +08:00

79 lines
3.2 KiB
Plaintext

<!-- components/travel-location-popup/index.wxml -->
<t-popup
class="popup"
visible="{{visible}}"
placement="bottom"
bind:visible-change="closeDetail"
>
<view class="detail-panel">
<view class="detail-content">
<view class="header">
<view class="info">
<view class="title-row">
<t-icon wx:if="{{locations[currentLocationIndex].typeIcon}}" class="type-icon" name="{{locations[currentLocationIndex].typeIcon}}" />
<text class="title">{{locations[currentLocationIndex].title || '未命名地点'}}</text>
</view>
<view wx:if="{{locations[currentLocationIndex].location}}" class="location" catchtap="openLocation">
<t-icon class="icon" name="location-filled" />
<text class="text">{{locations[currentLocationIndex].location}}</text>
</view>
</view>
<view class="actions">
<view wx:if="{{locations.length > 1}}" class="indicator">
{{currentLocationIndex + 1}}/{{locations.length}}
</view>
<t-icon name="close" catchtap="closeDetail" size="48rpx" />
</view>
</view>
<swiper class="locations-swiper" current="{{currentLocationIndex}}" bindchange="onSwiperChange">
<block wx:for="{{locations}}" wx:key="id">
<swiper-item class="swiper-item-wrapper">
<scroll-view scroll-y class="location-scroll">
<view class="location-item">
<view class="tags">
<t-tag wx:if="{{item.typeLabel}}" theme="primary" variant="outline">
{{item.typeLabel}}
</t-tag>
<t-tag wx:if="{{item.amount}}" theme="warning" variant="outline">
¥{{item.amount}}
</t-tag>
<t-tag wx:if="{{item.score}}" theme="success" variant="outline">
评分 {{item.score}}
</t-tag>
<t-tag wx:if="{{item.importance}}" theme="success" variant="outline">
重要性 {{item.importance}}
</t-tag>
<t-tag wx:if="{{item.travelCount > 0}}" theme="default" variant="outline">
已出行 {{item.travelCount}} 次
</t-tag>
<t-tag wx:if="{{item.requireIdCard}}" theme="danger" variant="outline">
需要身份证
</t-tag>
<t-tag wx:if="{{item.requireAppointment}}" theme="danger" variant="outline">
需要预约
</t-tag>
</view>
<view wx:if="{{item.description}}" class="description">{{item.description}}</view>
<view wx:if="{{item.columnedItems && item.columnedItems.length > 0}}" class="items">
<view wx:for="{{item.columnedItems}}" wx:for-item="column" wx:for-index="columnIndex" wx:key="columnIndex" class="column">
<block wx:for="{{column}}" wx:key="attachmentId" wx:for-item="media" wx:for-index="itemIndex">
<image
class="item thumbnail {{media.type === 1 ? 'video' : 'image'}}"
src="{{media.thumbURL}}"
mode="widthFix"
catchtap="previewMedia"
data-item-index="{{media.originalIndex}}"
/>
</block>
</view>
</view>
<view wx:if="{{!item.description && (!item.columnedItems || item.columnedItems.length === 0)}}" class="empty">暂无详细说明</view>
</view>
</scroll-view>
</swiper-item>
</block>
</swiper>
</view>
</view>
</t-popup>