Commit 1fe7b4d8 authored by renjie's avatar renjie

获取劵金额

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