功能:收口小程序前后台安全与防重复提交
This commit is contained in:
@@ -4,27 +4,46 @@
|
||||
<view class="page-content">
|
||||
<view wx:if="{{!isLoggedIn}}" class="page-card empty-card">
|
||||
<text class="empty-title">登录后查看优惠券</text>
|
||||
<text class="empty-desc">可用优惠、VIP 自动折扣都会统一展示在这里。</text>
|
||||
<text class="empty-desc">登录后查看可用优惠。</text>
|
||||
<view class="ghost-btn" bindtap="handleOpenAuth">去登录</view>
|
||||
</view>
|
||||
|
||||
<block wx:elif="{{coupons.length}}">
|
||||
<view class="page-hero coupons-hero">
|
||||
<text class="hero-kicker">优惠资产</text>
|
||||
<text class="hero-title">当前有 {{coupons.length}} 张可查看</text>
|
||||
<text class="hero-desc">普通优惠券和系统自动匹配的 VIP 折扣都会在结算前统一展示。</text>
|
||||
<text class="hero-title">当前有 {{coupons.length}} 张</text>
|
||||
<text class="hero-desc">下单前可查看可用优惠。</text>
|
||||
</view>
|
||||
|
||||
<view wx:for="{{coupons}}" wx:key="id" class="page-card coupon-card">
|
||||
<view class="coupon-top">
|
||||
<view>
|
||||
<view class="coupon-title">{{item.couponName}}</view>
|
||||
<view class="coupon-source">{{item.sourceText}}</view>
|
||||
</view>
|
||||
<view class="coupon-status">{{item.statusName || '待使用'}}</view>
|
||||
<view class="coupon-filter-row">
|
||||
<view
|
||||
wx:for="{{filterOptions}}"
|
||||
wx:key="value"
|
||||
class="coupon-filter-chip {{activeFilter === item.value ? 'active' : ''}}"
|
||||
data-value="{{item.value}}"
|
||||
bindtap="handleFilterChange"
|
||||
>
|
||||
{{item.label}}
|
||||
</view>
|
||||
<view class="coupon-benefit">{{item.benefitText}}</view>
|
||||
<view class="coupon-period">{{item.periodText}}</view>
|
||||
</view>
|
||||
|
||||
<block wx:if="{{filteredCoupons.length}}">
|
||||
<view wx:for="{{filteredCoupons}}" wx:key="id" class="page-card coupon-card">
|
||||
<view class="coupon-top">
|
||||
<view>
|
||||
<view class="coupon-title">{{item.couponName}}</view>
|
||||
<view class="coupon-source">{{item.sourceText}}</view>
|
||||
</view>
|
||||
<view class="coupon-status">{{item.statusName || '待使用'}}</view>
|
||||
</view>
|
||||
<view class="coupon-benefit">{{item.benefitText}}</view>
|
||||
<view class="coupon-period">{{item.periodText}}</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view wx:else class="page-card empty-card">
|
||||
<text class="empty-title">当前筛选下暂无优惠券</text>
|
||||
<text class="empty-desc">换个筛选试试。</text>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
@@ -34,7 +53,7 @@
|
||||
|
||||
<view wx:else class="page-card empty-card">
|
||||
<text class="empty-title">你还没有优惠券</text>
|
||||
<text class="empty-desc">下单前系统也会自动帮你匹配最合适的优惠方式。</text>
|
||||
<text class="empty-desc">下单前会自动匹配可用优惠。</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user