42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
|
|
<view class="takeout-page">
|
||
|
|
<!-- 错误态 -->
|
||
|
|
<view class="empty" wx:if="{{error}}">
|
||
|
|
<view class="empty-icon">😿</view>
|
||
|
|
<view>{{error}}</view>
|
||
|
|
<button class="btn-primary" style="margin-top:32rpx" bind:tap="retry">换个区域试试</button>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 结果区(动效结束后展示) -->
|
||
|
|
<view class="result-area" wx:if="{{!showAnimation && result}}">
|
||
|
|
<view class="result-title">🎉 你抽到的外卖是…</view>
|
||
|
|
<result-card
|
||
|
|
imageUrl="{{result.imageUrl}}"
|
||
|
|
name="{{result.name}}"
|
||
|
|
rating="{{result.rating}}"
|
||
|
|
avgPrice="{{result.avgPrice}}"
|
||
|
|
distance="{{distanceText}}"
|
||
|
|
extra="{{deliveryInfo}}"
|
||
|
|
recommendReason="{{result.recommendReason}}"
|
||
|
|
signatureDishes="{{result.signatureDishes}}"
|
||
|
|
/>
|
||
|
|
<view class="actions">
|
||
|
|
<button class="btn-primary btn-main" bind:tap="goOrder">去下单</button>
|
||
|
|
<view class="btn-retry" bind:tap="retry">再开一个</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 开盒动效覆盖层 -->
|
||
|
|
<box-animation
|
||
|
|
show="{{showAnimation}}"
|
||
|
|
boxType="takeout"
|
||
|
|
dataReady="{{dataReady}}"
|
||
|
|
bind:done="onAnimationDone"
|
||
|
|
>
|
||
|
|
<view class="animation-result-preview" wx:if="{{result}}">
|
||
|
|
<view class="preview-emoji">🛵</view>
|
||
|
|
<view class="preview-text">{{result.name}}</view>
|
||
|
|
<view class="preview-sub" wx:if="{{result.rating}}">⭐ {{result.rating}}</view>
|
||
|
|
</view>
|
||
|
|
</box-animation>
|
||
|
|
</view>
|