Files
wxapp_escort/pages/escort/agreement.wxml
2026-05-29 20:30:42 +08:00

63 lines
2.6 KiB
Plaintext

<!--pages/escort/agreement.wxml-->
<view class="container">
<view wx:if="{{loading}}" class="loading">加载中...</view>
<block wx:if="{{!loading && agreement}}">
<view class="header-section">
<view class="header-icon-wrap">
<t-icon name="file-1" size="48rpx" class="header-icon" />
</view>
<text class="header-title">{{agreement.title}}</text>
<text class="header-subtitle">{{agreement.subtitle}}</text>
</view>
<view class="agreement-card">
<view wx:for="{{agreement.sections}}" wx:key="number" class="section">
<view class="section-title">
<view class="section-number">{{item.number}}</view>
<text>{{item.title}}</text>
</view>
<view class="section-content">
<!-- list / mixed 类型的 items -->
<block wx:if="{{item.type === 'list' || item.type === 'mixed'}}">
<view wx:for="{{item.items}}" wx:for-item="subItem" wx:for-index="subIdx" wx:key="subIdx" class="list-item">
<view class="list-dot"></view>
<text class="list-text">{{subItem}}</text>
</view>
</block>
<!-- mixed 类型下的表格 -->
<block wx:if="{{item.type === 'mixed' && item.table}}">
<view class="refund-table">
<view class="table-row header">
<text wx:for="{{item.table.headers}}" wx:for-item="h" wx:key="*this" class="table-cell">{{h}}</text>
</view>
<view wx:for="{{item.table.rows}}" wx:for-item="row" wx:key="*this" class="table-row">
<text wx:for="{{row}}" wx:for-item="cell" wx:key="*this" class="table-cell">{{cell}}</text>
</view>
</view>
</block>
<!-- paragraph 类型 -->
<block wx:if="{{item.type === 'paragraph'}}">
<text class="paragraph">{{item.content}}</text>
</block>
<!-- contact 类型 -->
<block wx:if="{{item.type === 'contact'}}">
<view class="contact-info">
<view wx:for="{{item.contacts}}" wx:for-item="contact" wx:key="text" class="contact-row" bindtap="onContactTap" data-action="{{contact.action}}">
<t-icon name="{{contact.icon}}" size="28rpx" class="contact-icon" />
<text class="contact-text">{{contact.text}}</text>
</view>
</view>
</block>
</view>
</view>
</view>
<view class="footer-section">
<text wx:for="{{agreement.footer}}" wx:key="*this" class="footer-text">{{item}}</text>
</view>
</block>
</view>