new member 8.9

This commit is contained in:
2020-08-10 17:38:54 +08:00
parent 39466d3360
commit 8c3121d5ed
18 changed files with 348 additions and 14 deletions

View File

@@ -87,6 +87,13 @@
</swiper-item>
</swiper>
</view>
<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>
</view>
</template>
@@ -198,6 +205,42 @@
margin: 200rpx auto 0;
text-align: center;
}
.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: 108rpx;
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>
<script>
@@ -237,7 +280,9 @@
loadmore: '轻轻上拉',
loading: '努力加载中',
nomore: '实在没有了'
}
},
showCoupon: false,
newMemberCoupon: {},
}
},
components: {
@@ -254,6 +299,7 @@
},
onLoad(){
if(this.$store.state.hasLogin){
this.isNewmembervoucher();
const user = uni.getStorageSync('user_info');
console.log(user)
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
@@ -445,7 +491,23 @@
this.$u.route("/pageB/search/index", {
type: 2,
});
}
},
// 是否显示新人优惠券
isNewmembervoucher() {
this.$u.api.isNewmembervoucher().then(res => {
if(res.errCode == 0) {
this.newMemberCoupon = res.data;
this.showCoupon = true;
} else {
this.showCoupon = false;
}
})
},
viewCoupon() {
this.$u.route('/pageB/coupon/details', {
price: this.newMemberCoupon.price
});
}
},
}
</script>