Commit 43461bc8 authored by 罗超's avatar 罗超

支持膨胀红包

parent 43c063c7
......@@ -267,6 +267,7 @@
margin: 25rpx;
padding: 20rpx;
}
</style>
<template>
<view class="jz_Reserve">
......@@ -451,6 +452,33 @@
<!-- #ifdef MP-ALIPAY -->
<subscribe-msg />
<!-- #endif -->
<u-popup v-model="showPz" mode="center" :mask-close-able="false" custom-style="padding:0;background:none;">
<view style="height: 802rpx;width: 570rpx;">
<view style="position: relative; width:100%;height:517rpx;background-repeat: no-repeat; background-size: 100% auto; background-image: url(https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638731507896933295.png);">
<view style="position: absolute;top:233rpx;left:244rpx;">
<text style="font-size: 89rpx;color: #FFFFFF;text-shadow: 0rpx 2rpx 7rpx rgba(144,5,0,0.44);">{{pzCoupon.expansionModel.denomination}}</text>
<text style="font-weight: bold;font-size: 28rpx;color: #FFFFFF;margin-left: 6rpx;"></text>
</view>
<view style="position: absolute;top:318rpx;left:82rpx;">
<text style="font-size: 54rpx;color: #FF0063;text-shadow: 0rpx 2rpx 7rpx rgba(144,5,0,0.44);">
{{pzCoupon.realDenomination}}
</text>
<text style="font-weight: bold;font-size: 22rpx;color: #FF0063;margin-left: 6rpx;"></text>
</view>
<view style="position: absolute;top:380rpx;left:250rpx; text-align: center; width: 240rpx;">
<text style="font-weight: bold;font-size: 24rpx;color: #FDE4D5;text-shadow: 0rpx 2rpx 0rpx rgba(67,12,7,0.17);">
{{pzCoupon.remark}}
</text>
</view>
</view>
<view style="text-align: center;">
<image @click="usePzCouponHandler" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638731507894902113.png" mode="widthFix" style="width: 281rpx;height: 123rpx;"></image>
</view>
<view style="text-align: center;margin-top: 106rpx;">
<image @click="()=>showPz=false" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638731507894526128.png" mode="widthFix" style="width: 52rpx;height: 52rpx;"></image>
</view>
</view>
</u-popup>
</view>
</template>
......@@ -500,6 +528,8 @@
realCurrentPriceInfo: {},
customer: {},
CreateBy: 0,
showPz:true,
pzCoupon:null
};
},
created() {
......@@ -590,6 +620,7 @@
console.log("coupon_post_GetUserCanUseCouponList", res);
if (res.resultCode == 1) {
this.couponList = res.data
this.calcPzCouponHandler()
}
},
(err) => {
......@@ -597,6 +628,25 @@
}
);
},
usePzCouponHandler(){
this.showPz = false
this.closeCouponHandler(this.pzCoupon.id)
this.pzCoupon = null
},
calcPzCouponHandler(){
this.couponList.forEach((x)=>{
if(x.expansionModel.denomination>0){
if(this.pzCoupon && this.pzCoupon.expansionModel.denomination<x.expansionModel.denomination)
this.pzCoupon=x
else
this.pzCoupon=x
x.realDenomination = x.denomination
x.denomination =x.expansionModel.denomination
}
})
this.showPz = this.pzCoupon?true:false
},
changecheckbox(e, index, item) {
if (item.IsHightSchool) {
let newObj = JSON.parse(JSON.stringify(item));
......@@ -872,7 +922,7 @@
(res) => {
if (res.resultCode == 1) {
const tempData = res.data
if(tempData.CounponList){
if(tempData.CounponList && tempData.CounponList.length>0){
uni.setStorageSync('coupons',tempData.CounponList)
}
uni.showToast({
......@@ -894,11 +944,22 @@
//去掉支付
//this.querenAli(data);
// #endif
} else {}
} else {
uni.showToast({
title:res.message,
icon:'none',
duration:3000
})
}
this.submit = false;
},
(e) => {
this.submit = false;
uni.showToast({
title:e.message,
icon:'none',
duration:3000
})
}
);
},
......
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