Selaa lähdekoodia

Merge branch 'test' of Software/android-cloud-H5 into develop

zengzhixiang 2 vuotta sitten
vanhempi
commit
7c4f1cd0b8

+ 5 - 3
static/microserviceUserH5/static/css/awardActivity.css

@@ -568,17 +568,19 @@ input:focus{
 
 .rule-content{
   width: 5.86rem;
-  height: 6.6rem;
   padding: 0.2rem 0;
   border-radius: 0.1rem;
-  overflow-y: scroll;
   position: absolute;
   top: 0.2rem;
 }
 
 .rule-point-wrap{
+  height: 4.9rem;
+  margin: 0 0.4rem;
   margin-top: 0.34rem;
-  font-size: 0.24rem;
+  font-size: 0.28rem;
+  line-height: 0.4rem;
+  overflow-y: scroll;
 }
 
 .rule-point{

BIN
static/microserviceUserH5/static/img/iosEnter/entry.png


BIN
static/microserviceUserH5/static/img/iosEnter/index-phone.png


BIN
static/microserviceUserH5/static/img/iosEnter/index-what.png


+ 30 - 18
static/microserviceUserH5/vcloud/awardActivity.html

@@ -219,7 +219,7 @@
 			pageNum = 1,
 			pages = 0,
 			recordFlag1 = true,
-			pageNum1 = 1,
+			pageNum1 = 0,
 			recordFlag2 = true,
 			pageNum2 = 1,
 			pages2 = 0,
@@ -232,6 +232,7 @@
 			currTotalTime = 0,
 			phoneRemainQuantity = 0,
 			userCardId = 0,
+			awardTimer = null,
 			flagNum = 1;
 			isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
 			isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
@@ -330,9 +331,6 @@
 			// 继续抽奖
 			function nextLottery(e) {
 				if(e.target.className === 'card-btn'){
-					$('.main-contain').eq(0).empty();
-					let num = flagNum > 12 ? flagNum - 12 : flagNum;
-					$('.curr-award-item').eq(num).css('background', '#ffffff');
 					cardClose();
 					stopManyClick(() =>{
 						startLottery('next');
@@ -365,6 +363,7 @@
 				let flag = $('.curr-award-id').eq(num).text();
 				if(flag == lotteryResult.id){
 					flagNum = num < 6 ? num + awardNumber : num;
+					console.log('flagNum', flagNum)
 				}
 				timer = setTimeout(() => {
 					if(num === awardNumber) {
@@ -402,7 +401,6 @@
 				} else {
 					operate('mfhd_2022_h5_开始抽奖');
 				}
-				
 				if(!lotteryFlag) {
 					return
 				}
@@ -410,6 +408,9 @@
 				if(!GetRequest().token){
 					return
 				}
+				let num = flagNum > awardNumber ? flagNum - awardNumber : flagNum;
+				console.log(num);
+				$('.curr-award-item').eq(num).css('background', '#ffffff');
 				$.ajax({
 					url: baseUrl + '/api/activity/gratis/startLottery',
 					type: 'get',
@@ -439,6 +440,7 @@
 			}
 			//抽奖结果展示
 			function lotteryResultHandle() {
+				$('.main-contain').eq(0).empty();
 				$('.result-dialog').animate({top: '3.86rem'},"fast");
 				$('.result-mask').show();
 				document.documentElement.style.overflow='hidden';
@@ -458,7 +460,7 @@
 					return lotteryResult[key];
 				})
 				goodsList();
-				rewardList();
+				tabHandle2();
 				allotTimeCardList();
 				$('.main-contain').eq(0).append(result)
 				$('.times').eq(0).text(lotteryResult.lotteryCount)
@@ -468,6 +470,7 @@
 				if(!GetRequest().token){
 					return
 				}
+				console.log(pageNum)
 				$.ajax({
 					url: baseUrl + '/api/activity/gratis/rewardList',
 					type: 'get',
@@ -475,7 +478,7 @@
 						'Authorization': GetRequest().token //id
 					},
 					data: {
-						pageNum: pageNum,
+						page: pageNum,
 						pageSize: 5
 					},
 					contentType: "application/json",
@@ -568,6 +571,7 @@
 							if(lotteryCount !== 0) {
 								$('.start-award')[0].src = '../static/img/awardActivity/start-award.png';
 							}
+							clearInterval(awardTimer);
 							headerAward();
 							$('.rule-point-wrap').eq(0).html(actRule)
 							$('.times').eq(0).text(lotteryCount)
@@ -588,7 +592,7 @@
 				if(awardData.length === 0) {
 					return
 				}
-				setInterval(() =>{
+				awardTimer = setInterval(() =>{
 					awardHandle();
 				},3000);
 			}
@@ -622,6 +626,8 @@
 			}
 			// 分配云手机列表
 			function allotTimeCardList(type){
+				pageNum1 = 0;
+				$('.distribution-container').eq(0).empty();
 				if(!GetRequest().token){
 					return
 				}
@@ -658,14 +664,14 @@
 				recordFlag1 = true;
 				let list = cardList.slice(pageNum1 * 5, (pageNum1 * 5) + 5)
 				list.map((item, index) => {
-					item.index = (pageNum1 - 1) * 5 + index
+					item.index = pageNum1 * 5 + index
 					result += $('#distribution').text().replace(/{{(.*?)}}/g, function(node, key) {
 						return item[key];
 					})
 				})
 				$('.distribution-container').eq(0).append(result);
 				for (var i = 0; i < list.length; i++) {
-					$('.num-ipt')[(pageNum1 - 1) * 5 + i].oninput = function (e) {
+					$('.num-ipt')[pageNum1 * 5 + i].oninput = function (e) {
 						const id = e.target.dataset.id;
 						let oldDuration = 0;
 						let preTotalTime = 0;
@@ -743,7 +749,7 @@
 				}
 			});
 			// 分配时长记录
-			function allotTimeRecord(){
+			function allotTimeRecord(type){
 				if(!GetRequest().token){
 					return
 				}
@@ -754,7 +760,7 @@
 						'Authorization': GetRequest().token //id
 					},
 					data: {
-						pageNum: pageNum2,
+						page: pageNum2,
 						pageSize: 5
 					},
 					contentType: "application/json",
@@ -766,6 +772,10 @@
 							let result = ''
 							pages2 = res.data.pages
 							recordFlag2 = true;
+							if(type != 'down'){
+								console.log('清空')
+								$('.award-record-list-wrap').eq(0).empty();
+							}
 							list.map(item => {
 								result += $('#record').text().replace(/{{(.*?)}}/g, function(node, key) {
 									return item[key];
@@ -807,6 +817,12 @@
 					})
 					return
 				}
+				if(!lotteryFlag) {
+					// stopManyClick(() =>{
+					// 	toastr.error('抽奖进行中,请等待抽奖结束!');
+					// })
+					return
+				}
 				if(type != 'bug') {
 					operate('mfhd_2022_h5_获取次数按钮');
 				}
@@ -972,15 +988,11 @@
 								})
 								distributionList = [];
 								cardList = [];
-								stopManyClick(() => {
-									toastr.error('分配成功,请前往云机列表查看');
-								})
+								toastr.error('分配成功,请前往云机列表查看');
 							} else {
 								console.log(res.msg)
 								$('.sure-distribution-wrap').eq(0).css('display', 'none');
-								stopManyClick(() => {
-									toastr.error(res.msg);
-								})
+								toastr.error(res.msg);
 							}
 						},
 					})

+ 13 - 4
static/microserviceUserH5/vcloud/iosEnter.html

@@ -18,11 +18,12 @@
 	</script>
 </head>
 <div class="container">
-	<div class="index-icon" id="index-what">
-		<img class="img" src="../static/img/iosEnter/index-what.png" />
-	</div>
 	<div class="index-icon" id="index-phone">
 		<img class="img" src="../static/img/iosEnter/index-phone.png" />
+		<img class="entry" src="../static/img/iosEnter/entry.png" />
+	</div>
+	<div class="index-icon" id="index-what">
+		<img class="img" src="../static/img/iosEnter/index-what.png" />
 	</div>
 </div>
 <script type="text/javascript" th:inline="javascript">
@@ -91,7 +92,8 @@
 	.index-icon{
 		width: 6.5rem;
 		height: 2.28rem;
-		padding-top: 0.36rem;
+		margin-top: 0.36rem;
+		position: relative;
 	}
 	.img{
 		width: 100%;
@@ -100,6 +102,13 @@
 	#index-phone{
 		display: none;
 	}
+	.entry{
+		width: 2.08rem;
+		height: 1.28rem;
+		position: absolute;
+		top: 0.32rem;
+		right: 0.4rem;
+	}
 	#toast-container>.toast-error {
 		background-image: none !important;
 	}