Sfoglia il codice sorgente

调整免费活动

heyang 2 anni fa
parent
commit
fab59b17ef
1 ha cambiato i file con 25 aggiunte e 0 eliminazioni
  1. 25 0
      static/microserviceUserH5/vcloud/awardActivity.html

+ 25 - 0
static/microserviceUserH5/vcloud/awardActivity.html

@@ -230,11 +230,13 @@
 			activityState = 0,
 			awardNumber = 0,
 			currTotalTime = 0,
+			phoneRemainQuantity = 0,
 			flagNum = 1;
 			isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
 			isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
 		(function(doc) {
 			var init = function () {
+				getPhoneNumber();
 				bindEvent();
 				goodsList();
 				rewardList();
@@ -927,6 +929,29 @@
 				$('.result-mask').hide();
 				document.documentElement.style.overflow='auto';
 			}
+			//获取云机数量
+			function getPhoneNumber(){
+				$.ajax({
+					url: baseUrl + '/api/pay/v2/meal/info?phoneType=SVIP',
+					type: 'get',
+					headers: {
+						'Authorization': id //id
+					},
+					contentType: "application/json",
+					dataType: 'json',
+					cache: false,
+					success: function (res) {
+						if(res.status === 0){
+							phoneRemainQuantity = res.data.list[0].phoneRemainQuantity;
+						}else{
+							stopManyClick(() =>{
+								toastr.error(res.msg)
+							})
+						}
+						
+					},
+				})
+			}
 			init();
 		})(document);
 		//埋点