Pārlūkot izejas kodu

Merge branch 'release/v5.4.0' of Software/android-cloud-H5 into develop

heyang 2 gadi atpakaļ
vecāks
revīzija
c90a350dfe
1 mainītis faili ar 26 papildinājumiem un 8 dzēšanām
  1. 26 8
      static/microserviceUserH5/vcloud/awardActivity.html

+ 26 - 8
static/microserviceUserH5/vcloud/awardActivity.html

@@ -284,7 +284,6 @@
 					$('.no-award-data').eq(0).css('display', 'none');
 				}
 			}
-
 			function tabHandle2 (e) {
 				if(activityState == 0){
 					stopManyClick(() =>{
@@ -292,12 +291,6 @@
 					})
 					return
 				}
-				if(activityState == 2){
-					stopManyClick(() =>{
-						toastr.error('活动已结束!');
-					})
-					return
-				}
 				operate('mfhd_2022_h5_tab分配奖励');
 				$('.tab-bg1').eq(0).css('display', 'none');
 				$('.award-title')[0].className = 'award-title';
@@ -942,10 +935,17 @@
 					}
 				}
 			});
-			function distributionTime(e) {
+			async function distributionTime(e) {
 				if(!lotteryFlag) {
 					return
 				}
+				let res = await isShow();
+				if(res == 0) {
+					stopManyClick(() =>{
+						toastr.error('活动已结束!');
+					})
+					return
+				}
 				operate('mfhd_2022_h5_分配奖励');
 				distributionList = distributionList.filter(item => item.allotTime != 0);
 				if (distributionList.length === 0) {
@@ -956,6 +956,24 @@
 					$('.sure-distribution-wrap').eq(0).css('display', 'block');
 				}
 			}
+			// 活动结束是否超过三天
+			function isShow(){
+				return new Promise((resolve, reject) => {
+					$.ajax({
+						url: baseUrl + '/api/activity/gratis/isShow',
+						type: 'get',
+						headers: {
+							'Authorization': GetRequest().token //id
+						},
+						contentType:"application/json",
+						dataType: 'json',
+						cache: false,
+						success: function (res) {
+							resolve(res.data)
+						},
+					})
+				})
+			}
 			//点击分配时长取消按钮
 			$('.sure-distribution-cannel')[0].addEventListener('click', (e) => {
 				operate('mfhd_2022_h5_分配奖励_取消');