fixing bug 8.11
This commit is contained in:
@@ -56,17 +56,8 @@ export default {
|
||||
},
|
||||
onLoad(option) {
|
||||
this.price = option.price;
|
||||
// this.isNewmembervoucher();
|
||||
},
|
||||
methods: {
|
||||
// 是否显示新人优惠券
|
||||
isNewmembervoucher() {
|
||||
this.$u.api.isNewmembervoucher().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.price = res.data.price;
|
||||
}
|
||||
})
|
||||
},
|
||||
exchangeCoupon() {
|
||||
this.$u.api.getCoupon({ id: 1 }).then(res => {
|
||||
this.$u.toast(res.message);
|
||||
|
||||
85
pageB/coupon/index.vue
Normal file
85
pageB/coupon/index.vue
Normal file
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<u-popup v-model="showCoupon" mode="center" class="u-coupon-popup">
|
||||
<view class="coupon">
|
||||
<view class="price">{{ newMemberCoupon.price }}</view>
|
||||
<image src="/static/image/common/30.png" class="coupon-image" @click="viewCoupon"></image>
|
||||
<image src="/static/image/common/24.png" class="close-image" @click="showCoupon=false"></image>
|
||||
</view>
|
||||
</u-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showCoupon: true,
|
||||
newMemberCoupon: {},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
showCoupon(value) {
|
||||
if(!value) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.isNewmembervoucher();
|
||||
},
|
||||
methods: {
|
||||
viewCoupon() {
|
||||
this.$u.route('/pageB/coupon/details', {
|
||||
price: this.newMemberCoupon.price
|
||||
});
|
||||
},
|
||||
// 是否显示新人优惠券
|
||||
isNewmembervoucher() {
|
||||
this.$u.api.isNewmembervoucher().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.newMemberCoupon = res.data;
|
||||
} else {
|
||||
this.showCoupon = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.u-coupon-popup {
|
||||
/deep/ .u-mode-center-box {
|
||||
background-color: transparent;
|
||||
}
|
||||
.coupon {
|
||||
width: 750rpx;
|
||||
height: 583rpx;
|
||||
position: relative;
|
||||
.price {
|
||||
z-index: 3;
|
||||
color: #EBB36E;
|
||||
position: absolute;
|
||||
font-size: 98rpx;
|
||||
font-weight: bold;
|
||||
top: 200rpx;
|
||||
left: 50%;
|
||||
transform: translate(-68%, 0);
|
||||
}
|
||||
.coupon-image {
|
||||
width: 568rpx;
|
||||
height: 583rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-60%, 0);
|
||||
}
|
||||
.close-image {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 155rpx;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user