Commit 1fe7b4d8 authored by renjie's avatar renjie

获取劵金额

parent 932e7f3e
......@@ -67,13 +67,18 @@
</view>
</view>
<view class="coupon" @click="couponTip = true">
<image
class="coupon"
class="coupon-img"
src="@/static/img/my/coupon.png"
mode="aspectFit"
@click="couponTip = true"
v-if="isHaveCoupon">
</image>
<text class="coupon-price">
<text class="r-symbol"></text>
{{couponPrice}}
</text>
</view>
<u-mask :show="postCartTip || couponTip || showUseRule">
<view class="mask">
......@@ -92,7 +97,7 @@
<view class="congra">恭喜您!</view>
<view class="get-coupon">
获得摄影抵用券
<text class="price">20</text>
<text class="price">{{couponPrice}}</text>
</view>
<image class="my-card" src="./static/album/myCard.png" mode="aspectFit"></image>
<view class="use-rule" @click="showUseRuleClick">
......@@ -183,8 +188,9 @@ export default {
],
rules: [],//使用规则
options: {},//路由参数
couponPrice: '',//优惠券金额
openid: '',
userId: ''
userId: '',
}
},
methods: {
......@@ -295,10 +301,10 @@ export default {
},
findPageMarketFun(){//---获取优惠券
var data = {
pageCode: 'orderInfo',
pageCode: 'albumIndex',
marketingStatus: 1,
openid: this.openid,
userId: this.userId,
userId: this.userId
}
this.$request('scenic/market/findPageMarket',data).then((res)=>{
if(res.code === '00'){
......@@ -317,6 +323,7 @@ export default {
res.data.forEach(item => {
if(item.useRange === 11 && item.couponStatus === 1) {
this.isHaveCoupon = true
this.couponPrice = item.deductPrice
// 处理使用规则数据结构
let ruleContents = item.couponRule ? item.couponRule.split(';') : []
......@@ -419,6 +426,22 @@ export default {
bottom: 200rpx;
width: 180rpx;
height: 180rpx;
.coupon-img {
width: 100%;
height: 100%;
}
.coupon-price {
position: absolute;
bottom: 64rpx;
left: 50%;
transform: translateX(-50%);
font-size: 40rpx;
font-weight: 700;
color: #fff;
}
.r-symbol {
font-size: 10rpx;
}
}
}
.nav-bar {
......@@ -601,6 +624,7 @@ export default {
font-weight: 700;
}
.price {
margin: 0 6rpx;
font-size: 64rpx;
font-weight: 700;
color: #EE520E;
......
static/img/my/coupon.png

11.2 KB | W: | H:

static/img/my/coupon.png

9.02 KB | W: | H:

static/img/my/coupon.png
static/img/my/coupon.png
static/img/my/coupon.png
static/img/my/coupon.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment