refactor travel
This commit is contained in:
69
miniprogram/components/travel-location-popup/index.wxml
Normal file
69
miniprogram/components/travel-location-popup/index.wxml
Normal file
@ -0,0 +1,69 @@
|
||||
<!-- 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.requireIdCard}}" 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>
|
||||
Reference in New Issue
Block a user