feat(escort): 下单页增加免责协议勾选与协议弹层
提交预约前须勾选《全程陪诊服务免责协议》,点击协议名弹层查看全文;提交时回传所读版本,服务端判定过期则作废缓存并重新弹层要求重新确认。
This commit is contained in:
@@ -155,6 +155,20 @@
|
||||
<textarea class="order-textarea" value="{{remark}}" placeholder="请输入其他需求或备注信息" maxlength="200" placeholder-class="input-placeholder" bindinput="onRemarkChange" />
|
||||
<text class="textarea-count">{{remark.length}}/200</text>
|
||||
</view>
|
||||
|
||||
<!-- 下单前置确认:勾选后才允许提交预约 -->
|
||||
<view class="agreement-block {{agreementHint ? 'is-hint' : ''}}">
|
||||
<view class="agreement-row" bindtap="onToggleAgreement" aria-role="checkbox" aria-checked="{{agreementAgreed}}">
|
||||
<view class="agreement-check {{agreementAgreed ? 'checked' : ''}}">
|
||||
<t-icon wx:if="{{agreementAgreed}}" name="check" size="22rpx" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="agreement-consent">
|
||||
<text class="agreement-consent-text">我已阅读并同意</text>
|
||||
<text class="agreement-link" catchtap="onOpenAgreement">《{{agreementTitle}}》</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="agreement-hint" wx:if="{{agreementHint}}">请勾选同意后再提交预约</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom-placeholder"></view>
|
||||
@@ -220,4 +234,47 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 免责协议弹层:下单前必须阅读并勾选同意 -->
|
||||
<view class="popup-mask {{showAgreementPopup ? 'show' : ''}}" bindtap="onCloseAgreementPopup"></view>
|
||||
<view class="popup-content agreement-popup {{showAgreementPopup ? 'show' : ''}}">
|
||||
<view class="popup-header">
|
||||
<text class="popup-title">{{agreementTitle}}</text>
|
||||
<view class="popup-close" aria-role="button" aria-label="关闭弹窗" bindtap="onCloseAgreementPopup">
|
||||
<t-icon name="close" size="40rpx" color="#6F655C" />
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="agreement-popup-body" scroll-y>
|
||||
<block wx:if="{{disclaimer}}">
|
||||
<text class="agreement-popup-subtitle" wx:if="{{disclaimer.subtitle}}">{{disclaimer.subtitle}}</text>
|
||||
<view class="agreement-section" wx:for="{{disclaimer.sections}}" wx:key="number">
|
||||
<view class="agreement-section-title">
|
||||
<view class="agreement-section-number">{{item.number}}</view>
|
||||
<text>{{item.title}}</text>
|
||||
</view>
|
||||
<block wx:if="{{item.type === 'list'}}">
|
||||
<view class="agreement-item" wx:for="{{item.items}}" wx:for-item="subItem" wx:key="*this">
|
||||
<view class="agreement-item-dot"></view>
|
||||
<text class="agreement-item-text">{{subItem}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="agreement-popup-footer" wx:if="{{disclaimer.footer.length}}">
|
||||
<text class="agreement-popup-footer-text" wx:for="{{disclaimer.footer}}" wx:for-item="footItem" wx:key="*this">{{footItem}}</text>
|
||||
</view>
|
||||
</block>
|
||||
<view class="agreement-popup-state" wx:elif="{{disclaimerLoading}}">
|
||||
<t-loading theme="circular" size="40rpx" text="加载中..." />
|
||||
</view>
|
||||
<view class="agreement-popup-state" wx:elif="{{disclaimerError}}">
|
||||
<text class="page-state-text">协议加载失败,请重试</text>
|
||||
<button class="page-retry" bindtap="retryLoadDisclaimer">重新加载</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="popup-footer">
|
||||
<view class="popup-btn popup-btn-ghost" bindtap="onCloseAgreementPopup">暂不</view>
|
||||
<view class="popup-btn popup-btn-primary" wx:if="{{disclaimer}}" bindtap="onAgreeFromPopup">我已阅读并同意</view>
|
||||
<view class="popup-btn popup-btn-primary" wx:else bindtap="retryLoadDisclaimer">重新加载</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user