Sfoglia il codice sorgente

Merge branch 'dev-5.2' of http://192.168.32.253:3000/Software/android-cloud-H5 into dev-5.2

huangxiaojing 3 anni fa
parent
commit
e32d93873b

+ 35 - 27
microserviceUserH5/vcloud/browserDetail.html

@@ -45,9 +45,9 @@
 <script type="text/javascript">
 	document.addEventListener("visibilitychange",()=>{
 		if(document.hidden){
-			init();
+			init('visibilitychange');
 		}else{
-			init();
+			init('visibilitychange');
 		}
 	})
 	let title = decodeURIComponent(GetRequest().plateName);
@@ -57,7 +57,7 @@
 	(function(){
 		init();
 	})();
-	function init(){
+	function init(type){
 		$.ajax({
 			url: `${baseUrl}/api/public/v1/browserLabel/client/query/${GetRequest().plateId}`,
 			type: 'get',
@@ -77,7 +77,9 @@
 					return
 				}
 				labelId = list[0].id;
-				rankingGet();
+				if(type != 'visibilitychange'){
+					rankingGet();
+				}
 				for(let i=0; i < list.length; i++){
 					node += `<div class="tag-item ${i === index ? 'active' : ''}" data-id="${list[i].id}" data-index="${i}">${list[i].labelName}</div>`
 				}
@@ -87,29 +89,30 @@
 	};
 	function getType() {
 		return new Promise((resolve, reject) => {
-			$.ajax({
-				url: `http://localhost:9888/getType`,
-				type: 'get',
-				contentType:"application/json",
-				dataType: 'json',
-				cache: false,
-				success: function (res) {
-					if(res.code === 200){
-						let cardType = res.data.devType;
-						let phoneObj = {
-							'VIRTUAL_RK3399': 'VIP',
-							'RK_3399': 'SVIP',
-							'MTK_G90': 'STAR',
-							'QUALCOMM': 'STARPRO'
-						}
-						phoneType = phoneObj[cardType];
-						resolve(phoneType);
-					}
-				}
-			})
+			resolve('SVIP');
+			// $.ajax({
+			// 	url: `http://localhost:9888/getType`,
+			// 	type: 'get',
+			// 	contentType:"application/json",
+			// 	dataType: 'json',
+			// 	cache: false,
+			// 	success: function (res) {
+			// 		if(res.code === 200){
+			// 			let cardType = res.data.devType;
+			// 			let phoneObj = {
+			// 				'VIRTUAL_RK3399': 'VIP',
+			// 				'RK_3399': 'SVIP',
+			// 				'MTK_G90': 'STAR',
+			// 				'QUALCOMM': 'STARPRO'
+			// 			}
+			// 			phoneType = phoneObj[cardType];
+			// 			resolve(phoneType);
+			// 		}
+			// 	}
+			// })
 		})
 	}
-	function rankingGet(){
+	function rankingGet(type){
 		getType().then((phoneType) => {
 			$.ajax({
 				url: `${baseUrl}/api/public/v1/ranking/client/get`,
@@ -130,7 +133,9 @@
 						total = res.data.total;
 						recordFlag = true;
 						let node = '';
-						$('.download-content').eq(0).text('');
+						if(type != 'down'){
+							$('.download-content').eq(0).text('');
+						}
 						for(let i=0; i < list.length; i++){
 							node += `<div class="download-item">
 										<div class="main-wrap">
@@ -235,6 +240,9 @@
 								// 进度条的位置也是translate,一开始是用translateX(-100%)挪到外面去
 								$('.progress')[index].style.transform = `translateX(${percentComplete * 100}%)`;
 								$('.text').eq(index).text(`${(percentComplete * 100).toFixed(1)}%`);
+								if((percentComplete * 100).toFixed(1) == 100){
+									$('.text').eq(index).text('下载完成');
+								}
 							}
 						}, false);
 						xhr.send();
@@ -260,7 +268,7 @@
 			if(recordFlag && nowlength < total && total > 0){
 				recordFlag = false;
 				pageNum++;
-				rankingGet();
+				rankingGet('down');
 			}
 		}
 	});

+ 2 - 1
screenAndroid/WXtrialInterface.html

@@ -273,11 +273,12 @@
     }
     //云机倒计时
     let validTime = parameters['validTime'];
+    let detailTime = validTime * 60 * 1000
     setTimeout(() => {
       $('.bug-title').eq(0).text('尊敬的用户您的云手机试用时间已到期');
       getDate = true;
       $('.buy-phone-wrap').eq(0).show();
-    }, validTime)
+    }, detailTime)
     var topwinHeight = window.screen.height - window.innerHeight + 30; //计算title top 头部  
     $('#wine').css({
       "width": window.screen.width,