|
@@ -1,52 +1,58 @@
|
|
|
<template>
|
|
|
<view class="container clearfix" >
|
|
|
<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading ="true" :loadingType="5" />
|
|
|
- <view class="container-content tui-skeleton" v-else>
|
|
|
- <view class="container-list">
|
|
|
- <view class="coupon-list">
|
|
|
- <view class="list-cell-le">
|
|
|
- <view class="coupon-maxMoney"> <text class="small">¥</text> {{ coupon.couponAmount }} </view>
|
|
|
- <view class="coupon-minMoney"> 满{{ coupon.touchPrice }}可用 </view>
|
|
|
- </view>
|
|
|
- <view class="list-cell-ri">
|
|
|
- <view class="list-cell-top">
|
|
|
- <view class="list-cell-type">
|
|
|
- <view class="list-cell-tags">
|
|
|
- <template v-if="coupon.moneyCouponFlag == 1">
|
|
|
- <text class="tags" v-if="coupon.moneyCouponType == 1"
|
|
|
- >意向{{ coupon.couponType | TypeFormat }}</text
|
|
|
- >
|
|
|
- <text class="tags" v-else>定向{{ coupon.couponType | TypeFormat }}</text>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <text class="tags">{{ coupon.couponType | TypeFormat }}</text>
|
|
|
- </template>
|
|
|
- </view>
|
|
|
- <view class="list-cell-texts">
|
|
|
- <text v-if="coupon.couponType == 0">
|
|
|
- {{
|
|
|
- coupon.productType && coupon.productType == 1
|
|
|
- ? '全商城商品通用'
|
|
|
- : '仅可购买指定商品'
|
|
|
- }}
|
|
|
- </text>
|
|
|
- <text v-if="coupon.couponType == 1">
|
|
|
- {{ coupon.categoryType == 1 ? '仅限购买产品类商品' : '仅限购买仪器类商品' }}
|
|
|
- </text>
|
|
|
- <text v-if="coupon.couponType == 3"
|
|
|
- >仅限购买店铺【{{ coupon.shopName }}】的商品</text
|
|
|
- >
|
|
|
- <text v-if="coupon.couponType == 4 || coupon.couponType == 2">全商城商品通用</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="list-cell-time">{{ coupon.startDate }} - {{ coupon.endDate }}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="container-button">
|
|
|
- <view class="button" @click="handeleReceiveCoupon(coupon)">领取优惠券</view>
|
|
|
- </view>
|
|
|
+ <view class="container-content tui-skeleton" v-else>
|
|
|
+ <view class="empty-container" v-if="!coupon">
|
|
|
+ <image class="empty-container-image" :src="StaticUrl + '/icon/icon-coupon-empty@2x.png'"></image>
|
|
|
+ <text class="error-text">暂无优惠券~</text>
|
|
|
+ </view>
|
|
|
+ <template v-else>
|
|
|
+ <view class="container-list">
|
|
|
+ <view class="coupon-list">
|
|
|
+ <view class="list-cell-le">
|
|
|
+ <view class="coupon-maxMoney"> <text class="small">¥</text> {{ coupon.couponAmount }} </view>
|
|
|
+ <view class="coupon-minMoney"> 满{{ coupon.touchPrice }}可用 </view>
|
|
|
+ </view>
|
|
|
+ <view class="list-cell-ri">
|
|
|
+ <view class="list-cell-top">
|
|
|
+ <view class="list-cell-type">
|
|
|
+ <view class="list-cell-tags">
|
|
|
+ <template v-if="coupon.moneyCouponFlag == 1">
|
|
|
+ <text class="tags" v-if="coupon.moneyCouponType == 1"
|
|
|
+ >意向{{ coupon.couponType | TypeFormat }}</text
|
|
|
+ >
|
|
|
+ <text class="tags" v-else>定向{{ coupon.couponType | TypeFormat }}</text>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <text class="tags">{{ coupon.couponType | TypeFormat }}</text>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ <view class="list-cell-texts">
|
|
|
+ <text v-if="coupon.couponType == 0">
|
|
|
+ {{
|
|
|
+ coupon.productType && coupon.productType == 1
|
|
|
+ ? '全商城商品通用'
|
|
|
+ : '仅可购买指定商品'
|
|
|
+ }}
|
|
|
+ </text>
|
|
|
+ <text v-if="coupon.couponType == 1">
|
|
|
+ {{ coupon.categoryType == 1 ? '仅限购买产品类商品' : '仅限购买仪器类商品' }}
|
|
|
+ </text>
|
|
|
+ <text v-if="coupon.couponType == 3"
|
|
|
+ >仅限购买店铺【{{ coupon.shopName }}】的商品</text
|
|
|
+ >
|
|
|
+ <text v-if="coupon.couponType == 4 || coupon.couponType == 2">全商城商品通用</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="list-cell-time">{{ coupon.startDate }} - {{ coupon.endDate }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="container-button">
|
|
|
+ <view class="button" @click="handeleReceiveCoupon(coupon)">领取优惠券</view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -162,15 +168,15 @@ page {
|
|
|
.container {
|
|
|
width: 100%;
|
|
|
height: auto;
|
|
|
-}
|
|
|
-.container-list {
|
|
|
- box-sizing: border-box;
|
|
|
- padding: 24rpx;
|
|
|
- .empty-container-image {
|
|
|
+}
|
|
|
+.empty-container-image {
|
|
|
width: 260rpx;
|
|
|
height: 260rpx;
|
|
|
margin-top: -300rpx;
|
|
|
}
|
|
|
+.container-list {
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 24rpx;
|
|
|
.toIndexPage {
|
|
|
bottom: 390rpx;
|
|
|
}
|