|
@@ -10,17 +10,17 @@
|
|
<view class="award-nickNames">
|
|
<view class="award-nickNames">
|
|
<view class="nickName"><text>{{item.nickName}}</text>
|
|
<view class="nickName"><text>{{item.nickName}}</text>
|
|
<view v-if="item.awardName == '一等奖'" class="awardName">
|
|
<view v-if="item.awardName == '一等奖'" class="awardName">
|
|
- <image src="../../static/activity/one.png" mode="">
|
|
|
|
|
|
+ <image src="../static/activity/one.png" mode="">
|
|
</image>
|
|
</image>
|
|
<text style="color: #FFD225;">{{item.awardName}}</text>
|
|
<text style="color: #FFD225;">{{item.awardName}}</text>
|
|
</view>
|
|
</view>
|
|
<view v-else-if="item.awardName == '二等奖'" class="awardName">
|
|
<view v-else-if="item.awardName == '二等奖'" class="awardName">
|
|
- <image src="../../static/activity/two.png" mode="">
|
|
|
|
|
|
+ <image src="../static/activity/two.png" mode="">
|
|
</image>
|
|
</image>
|
|
<text style="color: #94CBEC;">{{item.awardName}}</text>
|
|
<text style="color: #94CBEC;">{{item.awardName}}</text>
|
|
</view>
|
|
</view>
|
|
<view v-else-if="item.awardName == '三等奖'" class="awardName">
|
|
<view v-else-if="item.awardName == '三等奖'" class="awardName">
|
|
- <image src="../../static/activity/three.png" mode=""></image>
|
|
|
|
|
|
+ <image src="../static/activity/three.png" mode=""></image>
|
|
<text style="color: #F2B47A;">{{item.awardName}}</text>
|
|
<text style="color: #F2B47A;">{{item.awardName}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -30,9 +30,10 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<!-- 中奖 -->
|
|
<!-- 中奖 -->
|
|
- <u-popup :show="activityShow" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5" @touchmove.prevent.stop>
|
|
|
|
|
|
+ <u-popup :show="activityShow" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5"
|
|
|
|
+ @touchmove.prevent.stop>
|
|
<view class="choiceShow-wrap">
|
|
<view class="choiceShow-wrap">
|
|
<view style="width: 200rpx; height: 200rpx;margin: 100rpx; text-align: center;">
|
|
<view style="width: 200rpx; height: 200rpx;margin: 100rpx; text-align: center;">
|
|
恭喜你获得一等奖
|
|
恭喜你获得一等奖
|
|
@@ -41,9 +42,10 @@
|
|
<button @click="close()">关闭</button>
|
|
<button @click="close()">关闭</button>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
-
|
|
|
|
|
|
+
|
|
<!-- 未中奖 -->
|
|
<!-- 未中奖 -->
|
|
- <u-popup :show="closeShow" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5" @touchmove.prevent.stop>
|
|
|
|
|
|
+ <u-popup :show="closeShow" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5"
|
|
|
|
+ @touchmove.prevent.stop>
|
|
<view class="choiceShow-wrap">
|
|
<view class="choiceShow-wrap">
|
|
<view style="width: 200rpx; height: 200rpx;margin: 100rpx; text-align: center;">
|
|
<view style="width: 200rpx; height: 200rpx;margin: 100rpx; text-align: center;">
|
|
很遗憾你未中奖,欢迎继续参与其他抽奖,好运就在你身边
|
|
很遗憾你未中奖,欢迎继续参与其他抽奖,好运就在你身边
|
|
@@ -101,25 +103,41 @@
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
this.loading = false
|
|
this.loading = false
|
|
});
|
|
});
|
|
- $http.post(`/api/v1/mp/user/marketing/hit/prize/isHit/${this.marketingId}`,{}).then(res => {
|
|
|
|
- if(res.code == 0 && res.data && res.data.isHit == 1){
|
|
|
|
- this.activityShow = true
|
|
|
|
|
|
+
|
|
|
|
+ try {
|
|
|
|
+ const value = uni.getStorageSync(this.marketingId);
|
|
|
|
+ if (value) {
|
|
|
|
+
|
|
|
|
+ }else {
|
|
|
|
+ this.successFail()
|
|
|
|
+ uni.setStorageSync(this.marketingId, this.marketingId);
|
|
}
|
|
}
|
|
- if(res.code == 0 && res.data && res.data.isHit == 0){
|
|
|
|
- this.closeShow = true
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ } catch (e) {
|
|
|
|
+ // error
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
close() {
|
|
close() {
|
|
this.closeShow = false
|
|
this.closeShow = false
|
|
this.activityShow = false
|
|
this.activityShow = false
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
toPrize() {
|
|
toPrize() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:'/packagePrize/prize/index'
|
|
|
|
|
|
+ url: '/packagePrize/prize/index'
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ successFail() {
|
|
|
|
+ $http.post(`/api/v1/mp/user/marketing/hit/prize/isHit/${this.marketingId}`, {}).then(
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == 0 && res.data && res.data.isHit == 1) {
|
|
|
|
+ this.activityShow = true
|
|
|
|
+ }
|
|
|
|
+ if (res.code == 0 && res.data && res.data.isHit == 0) {
|
|
|
|
+ this.closeShow = true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -158,12 +176,14 @@
|
|
|
|
|
|
.awardName {
|
|
.awardName {
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
|
+
|
|
image {
|
|
image {
|
|
width: 40rpx;
|
|
width: 40rpx;
|
|
height: 36rpx;
|
|
height: 36rpx;
|
|
margin-left: 30rpx;
|
|
margin-left: 30rpx;
|
|
vertical-align: -10%;
|
|
vertical-align: -10%;
|
|
}
|
|
}
|
|
|
|
+
|
|
text {
|
|
text {
|
|
display: inline-block;
|
|
display: inline-block;
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
@@ -175,6 +195,7 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
// 设置ios刘海屏底部横线安全区域
|
|
// 设置ios刘海屏底部横线安全区域
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
padding-bottom: env(safe-area-inset-bottom);
|