Преглед изворни кода

免费抽奖模块获奖名单内中奖弹框添加

DELL пре 3 година
родитељ
комит
3a28b08f0f
2 измењених фајлова са 16 додато и 8 уклоњено
  1. 1 2
      packageOperate/activity/index.vue
  2. 15 6
      packageOperate/activity/record.vue

+ 1 - 2
packageOperate/activity/index.vue

@@ -158,8 +158,7 @@
 						let awardsList = res.data.awardsList
 						awardsList.forEach(item => {
 							item.prizeList.forEach(itemTwo => {
-								itemTwo.picUrl = (env.filePublic + itemTwo.picUrl.split(',')[0] +
-									'?imageView2/2/w/750')
+								itemTwo.picUrl = (env.filePublic + itemTwo.picUrl.split(',')[0] + '?imageView2/2/w/750')
 							})
 						})
 						this.awardsList = awardsList

+ 15 - 6
packageOperate/activity/record.vue

@@ -34,7 +34,7 @@
 		<!-- 中奖 -->
 		<u-popup :show="activityShow" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5" @touchmove.prevent.stop>
 			<view class="choiceShow-wrap">
-				<view style="width: 400rpx; height: 400rpx;line-height: 400rpx; text-align: center;">
+				<view style="width: 200rpx; height: 200rpx;margin: 100rpx; text-align: center;">
 					恭喜你获得一等奖
 				</view>
 				<button @click="toPrize()">前往查看</button>
@@ -45,10 +45,8 @@
 		<!-- 未中奖 -->
 		<u-popup :show="closeShow" mode="center" round="17" @close="close" :closeable="true" overlayOpacity="0.5" @touchmove.prevent.stop>
 			<view class="choiceShow-wrap">
-				<view style="width: 400rpx; height: 400rpx;line-height: 400rpx; text-align: center;">
-					很遗憾你未中奖
-					<br>
-					欢迎继续参与其他抽奖,好运就在你身边
+				<view style="width: 200rpx; height: 200rpx;margin: 100rpx; text-align: center;">
+					很遗憾你未中奖,欢迎继续参与其他抽奖,好运就在你身边
 				</view>
 				<button @click="close()">取消</button>
 			</view>
@@ -74,7 +72,6 @@
 			this.pageList()
 		},
 		methods: {
-			
 
 			pageList() {
 				this.pageNum = 1
@@ -103,8 +100,20 @@
 				}).catch(() => {
 					uni.hideLoading();
 					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
+					}
+					if(res.code == 0 && res.data && res.data.isHit == 0){
+						this.closeShow = true
+					}
 				})
 			},
+			close() {
+				this.closeShow = false
+				this.activityShow = false
+			},
 			
 			toPrize() {
 				uni.navigateTo({