|
@@ -2,7 +2,6 @@
|
|
|
<div>
|
|
|
<img src="~/assets/image/activity/double-eleven/head.png" width="100%">
|
|
|
<div class="double-eleven">
|
|
|
-
|
|
|
<van-overlay :show="login" style="background: transparent;">
|
|
|
<div class="wrapper">
|
|
|
<div class="wrapper-login">
|
|
@@ -11,8 +10,16 @@
|
|
|
</div>
|
|
|
</van-overlay>
|
|
|
|
|
|
+
|
|
|
<div class="double-eleven-container">
|
|
|
|
|
|
+ <div class="default" v-if="!couponsList.length">
|
|
|
+ <img src="~/assets/image/activity/double-eleven/couponbj.png" width="100%" >
|
|
|
+ <div class="default-img" >
|
|
|
+ <img src="~/assets/image/activity/double-eleven/default.png" >
|
|
|
+ 暂无优惠券哦~
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- <div class="coupon" >
|
|
|
<div class="let-title">
|
|
|
<div><span>7</span>折</div>
|
|
@@ -28,10 +35,15 @@
|
|
|
|
|
|
<div class="coupon" v-for="item in couponsList" :key="item.id">
|
|
|
<!-- <div class="icon">{{item.couponName}}</div> -->
|
|
|
+ <!-- 类型(1.抵扣券 2.折扣券 3.红包券)" -->
|
|
|
<div class="let-title">
|
|
|
- <div><span>7</span>折</div>
|
|
|
- <div>折扣券</div>
|
|
|
+ <div v-if="item.couponType===1">¥<span>{{item.couponValue}}</span></div>
|
|
|
+ <div v-else><span>{{item.couponValue}}</span>折</div>
|
|
|
+ <div v-if="item.maxValue">满{{ item.maxValue }}元减</div>
|
|
|
+ <div v-else>{{ item.useThreshold }}</div>
|
|
|
</div>
|
|
|
+
|
|
|
+
|
|
|
<div class="content">
|
|
|
<div class="title">{{item.couponName}}</div>
|
|
|
<div class="tips">{{item.couponExplain}}</div>
|
|
@@ -53,10 +65,14 @@
|
|
|
<van-popup v-model="show" style="background: transparent;" :close-on-click-overlay="false">
|
|
|
<div class="popup-container">
|
|
|
<div class="coupon">
|
|
|
- <div class="let-title">
|
|
|
- <div><span>7</span>折</div>
|
|
|
- <div>折扣券</div>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <div class="let-title">
|
|
|
+ <div v-if="coupons.couponType===1">¥<span>{{coupons.couponValue}}</span></div>
|
|
|
+ <div v-else><span>{{coupons.couponValue}}</span>折</div>
|
|
|
+ <div v-if="coupons.maxValue">满{{ coupons.maxValue }}元减</div>
|
|
|
+ <div v-else>{{ coupons.useThreshold }}</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="content">
|
|
|
<div class="title">{{coupons.couponName}}</div>
|
|
|
<div class="tips">{{coupons.couponExplain}}</div>
|
|
@@ -112,7 +128,15 @@ export default {
|
|
|
}
|
|
|
if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
|
|
|
this.token = await window.native.getToken();
|
|
|
- } else {
|
|
|
+ } else if (this.$userAgent.isSzx && this.$userAgent.isIos) {
|
|
|
+ window.webkit.messageHandlers.getToken.postMessage('获取token');
|
|
|
+
|
|
|
+ let _this = this
|
|
|
+ window.getIosToken=(token) => {
|
|
|
+ _this.token = token
|
|
|
+ resolve();
|
|
|
+ };
|
|
|
+ }else if(this.$route.query.token){
|
|
|
this.token = this.$route.query.token;
|
|
|
}
|
|
|
|
|
@@ -135,10 +159,10 @@ export default {
|
|
|
title: '双十一 大额优惠券免费领',
|
|
|
},
|
|
|
created() {
|
|
|
- const _this = this
|
|
|
- setInterval(() => {
|
|
|
- _this.getCoupons()
|
|
|
- }, 600000);
|
|
|
+ // const _this = this
|
|
|
+ // setInterval(() => {
|
|
|
+ // _this.getCoupons()
|
|
|
+ // }, 600000);
|
|
|
},
|
|
|
methods: {
|
|
|
visit() {
|
|
@@ -184,7 +208,7 @@ export default {
|
|
|
},
|
|
|
async receiveCouponRewards(row)
|
|
|
{
|
|
|
- if(!this.$route.query.token)
|
|
|
+ if(!this.token)
|
|
|
{
|
|
|
this.login = true
|
|
|
const _this = this
|
|
@@ -368,7 +392,9 @@ img{
|
|
|
color: #F0F3FC;
|
|
|
display: inline-block;
|
|
|
margin-left: 2px;
|
|
|
- vertical-align: initial;
|
|
|
+ vertical-align: top;
|
|
|
+ margin-top: 23px;
|
|
|
+ // vertical-align: initial;
|
|
|
// display: inline-block;
|
|
|
// vertical-align:text-bottom;
|
|
|
// float:right;
|
|
@@ -386,7 +412,8 @@ img{
|
|
|
color: #F0F3FC;
|
|
|
display: inline-block;
|
|
|
margin-left: 2px;
|
|
|
- vertical-align: initial;
|
|
|
+ vertical-align: top;
|
|
|
+ margin-top: 23px;
|
|
|
}
|
|
|
|
|
|
.btn-nocoupon{
|
|
@@ -402,7 +429,8 @@ img{
|
|
|
color: #F0F3FC;
|
|
|
display: inline-block;
|
|
|
margin-left: 2px;
|
|
|
- vertical-align: initial;
|
|
|
+ vertical-align: top;
|
|
|
+ margin-top: 23px;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -517,4 +545,19 @@ img{
|
|
|
.login{
|
|
|
background-color:transparent;
|
|
|
}
|
|
|
+ .default{
|
|
|
+ width:100%;
|
|
|
+ position: relative;
|
|
|
+ border-radius: 24px;
|
|
|
+ .default-img{
|
|
|
+ position: absolute;
|
|
|
+ top: calc(50% - 50px);
|
|
|
+ left: calc(50% - 50px);
|
|
|
+ color: #333;
|
|
|
+ img {
|
|
|
+ width: 100px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|