|
|
@ -1,30 +1,34 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<view class="width100 fotct coupon-status font20 fcorred" v-if="couponDesInfo.couponCodeInfo.status == 3">已使用 |
|
|
|
<view class="width100" v-if="couponDesInfo"> |
|
|
|
</view> |
|
|
|
<view class="width100 fotct coupon-status font20 fcorred" v-if="couponDesInfo.couponCodeInfo.status == 3"> |
|
|
|
<view class="width100 fotct coupon-status font20 fcor41c" v-if="couponDesInfo.couponCodeInfo.status == 2">未使用 |
|
|
|
已使用 |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="line1"></view> |
|
|
|
|
|
|
|
<view class="coupon-cont width90"> |
|
|
|
|
|
|
|
<view class="flright fotct"> |
|
|
|
|
|
|
|
<image class="coupon-img" :src="imageUrl+couponDesInfo.couponInfo.couponImg"></image> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="coupon-mes mart10"> |
|
|
|
<view class="width100 fotct coupon-status font20 fcor41c" v-if="couponDesInfo.couponCodeInfo.status == 2"> |
|
|
|
<view class="fcor333 fontwig6 font24 width100 text2">{{couponDesInfo.couponInfo.couponName}}</view> |
|
|
|
未使用 |
|
|
|
<view class="fcor666 font13 width100 mart5" v-if="oneTime"> |
|
|
|
</view> |
|
|
|
领取时间:{{oneTime | formatDate('-')}}</view> |
|
|
|
<view class="line1"></view> |
|
|
|
<view class="fcor666 font13 width100 mart5" v-if="twoTime"> |
|
|
|
<view class="coupon-cont width90"> |
|
|
|
使用有效期:{{twoTime | formatDate('-')}}</view> |
|
|
|
<view class="flright fotct"> |
|
|
|
<view class="fcorred font15 width100 mart5" v-if="threeTime"> |
|
|
|
<image class="coupon-img" :src="imageUrl+couponDesInfo.couponInfo.couponImg"></image> |
|
|
|
消费时间:{{threeTime | formatDate('-')}}</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="coupon-mes mart10"> |
|
|
|
|
|
|
|
<view class="fcor333 fontwig6 font24 width100 text2">{{couponDesInfo.couponInfo.couponName}}</view> |
|
|
|
|
|
|
|
<view class="fcor666 font13 width100 mart5" v-if="oneTime"> |
|
|
|
|
|
|
|
领取时间:{{oneTime | formatDate('-')}}</view> |
|
|
|
|
|
|
|
<view class="fcor666 font13 width100 mart5" v-if="twoTime"> |
|
|
|
|
|
|
|
使用有效期:{{twoTime | formatDate('-')}}</view> |
|
|
|
|
|
|
|
<view class="fcorred font15 width100 mart5" v-if="threeTime"> |
|
|
|
|
|
|
|
消费时间:{{threeTime | formatDate('-')}}</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="line1 mart15"></view> |
|
|
|
|
|
|
|
<view class="width90 mart10 fcor666">核销码(商户扫客户)</view> |
|
|
|
|
|
|
|
<view class="width90 mart20 fotct"> |
|
|
|
|
|
|
|
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="line1 mart15"></view> |
|
|
|
<view class="width90 mart30 font20 fcor333 fotct marb40" v-if="!couponDesInfo">二维码生效中,前往个人中心查看</view> |
|
|
|
<view class="width90 mart10 fcor666">核销码(商户扫客户)</view> |
|
|
|
|
|
|
|
<view class="width90 mart20 fotct"> |
|
|
|
|
|
|
|
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.couponCodeInfo.ext1"></image> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="width90 mart20" style="height: 80px;" v-for="(store,i) in storeList" :key="i"> |
|
|
|
<view class="width90 mart20" style="height: 80px;" v-for="(store,i) in storeList" :key="i"> |
|
|
|
<view class="coupon-des flleft"> |
|
|
|
<view class="coupon-des flleft"> |
|
|
|
立即<br>前往 |
|
|
|
立即<br>前往 |
|
|
@ -49,7 +53,10 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import {getUserCouponDetail,getStoreListByCoupon} from "../../../Utils/Api.js" |
|
|
|
import { |
|
|
|
|
|
|
|
getUserNewCouponDetail, |
|
|
|
|
|
|
|
getStoreListByCoupon |
|
|
|
|
|
|
|
} from "../../../Utils/Api.js" |
|
|
|
let app = getApp() |
|
|
|
let app = getApp() |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
@ -65,7 +72,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
onLoad(option) { |
|
|
|
this.couDesId = option.id; |
|
|
|
this.couDesId = option.id; |
|
|
|
this.getUserCouponDetail(); |
|
|
|
this.getUserNewCouponDetail(); |
|
|
|
this.getStoreListByCoupon(); |
|
|
|
this.getStoreListByCoupon(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
filters: { |
|
|
|
filters: { |
|
|
@ -91,14 +98,14 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
//我的卡券详情 |
|
|
|
//我的卡券详情 |
|
|
|
getUserCouponDetail() { |
|
|
|
getUserNewCouponDetail() { |
|
|
|
uni.showLoading({ |
|
|
|
uni.showLoading({ |
|
|
|
title: '加载中...' |
|
|
|
title: '加载中...' |
|
|
|
}) |
|
|
|
}) |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
couponId: this.couDesId |
|
|
|
couponId: this.couDesId |
|
|
|
} |
|
|
|
} |
|
|
|
getUserCouponDetail(params).then(res => { |
|
|
|
getUserNewCouponDetail(params).then(res => { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
this.couponDesInfo = res.return_data; |
|
|
|
this.couponDesInfo = res.return_data; |
|
|
|
this.oneTime = res.return_data.couponCodeInfo.receiveTime; |
|
|
|
this.oneTime = res.return_data.couponCodeInfo.receiveTime; |
|
|
@ -227,6 +234,7 @@ |
|
|
|
background-color: red; |
|
|
|
background-color: red; |
|
|
|
color: #FFFFFF; |
|
|
|
color: #FFFFFF; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.coupne-btn { |
|
|
|
.coupne-btn { |
|
|
|
position: fixed; |
|
|
|
position: fixed; |
|
|
|
bottom: 0px; |
|
|
|
bottom: 0px; |
|
|
|