Browse Source

Merge branch 'dev-4.9.3' into uat

huangxiaojing 3 years ago
parent
commit
314f7d80ca

BIN
microserviceUserH5/static/offImg/zhiyin_pic.png


+ 7 - 1
microserviceUserH5/vcloud/actFissionShare.html

@@ -416,7 +416,13 @@
                 download() {
                     if (isAndroid) {
                         console.log(isAndroid);
-                        document.location.href = 'http://www.androidscloud.com/suanchou?timestamp=' + Math.random();
+                        console.log(baseUrl)
+                        if(baseUrl=='https://per.cs.se.androidscloud.com'){
+							window.location.href='http://per.cs.se.androidscloud.com:8888/suanchou'
+						}else{
+							window.location.href ='http://www.androidscloud.com/suanchou?timestamp=' + Math.random();
+						}
+
                     } else if (isIOS) {
                         document.location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
                     }

+ 10 - 25
microserviceUserH5/vcloud/share.html

@@ -149,6 +149,7 @@
 		}
 
 		.prompt img {
+			width: 200px;
 			position: absolute;
 			right: 15px;
 			top: 6px;
@@ -212,7 +213,7 @@
 					var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
 					if (isAndroid) {
 						this.getBrowser()
-					
+
 					} else if (isIOS) {
 						window.location.href = 'https://www.pgyer.com/gemini6';
 					} else {
@@ -220,34 +221,18 @@
 					}
 				},
 				getBrowser() {
-					var browser = {
-						versions: function () {
-							var u = navigator.userAgent,
-								app = navigator.appVersion;
-							return {
-								trident: u.indexOf('Trident') > -1, //IE内核
-								presto: u.indexOf('Presto') > -1, //opera内核
-								webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
-								gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
-								mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
-								ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
-								android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
-								iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
-								iPad: u.indexOf('iPad') > -1, //是否iPad
-								webApp: u.indexOf('Safari') == -1, //是否web应该程序,没有头部与底部
-								weixin: u.indexOf('MicroMessenger') > -1, //是否微信 (2015-01-22新增)
-								qq: u.match(/QQ/i) == "qq" //是否QQ
-							};
-						}(),
-						language: (navigator.browserLanguage || navigator.language).toLowerCase()
-					}
-					if (browser.versions.weixin || navigator.userAgent.toLowerCase().toString().indexOf('qqbrowser') >-1) { //qq 微信
+					var ua = navigator.userAgent.toLowerCase();
+					if (ua.match(/MicroMessenger/i) == "micromessenger" || ua.match(/QQ\/[0-9]/i)) {
 						this.showD = true;
 						return;
-					}else{
-						window.location.href ='http://www.androidscloud.com/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601';
+					} else {
+						
+					
+							window.location.href ='http://www.androidscloud.com/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601';
+					
 
 					}
+
 				},
 				getList() {
 					this.$toast.loading({

+ 15 - 13
screenAndroid/WXdraw.js

@@ -33,7 +33,9 @@ form.domainName = parameters["domainName"];
 var isWSS = true;
 var cUrl = isWSS ? "wss://" + form.domainName + "?cardIp=" + form.ip : "ws://" + form.domainName + "?cardIp=" + form.ip;
 // var cUrl = "ws://192.168.199.46:9101?token=test0123456789";
-
+var deviceBoard = parameters['deviceBoard'];
+var videoWidth = deviceBoard.substring(0, 2) === 'MTK' ? 1080 : 720
+var videoHeight = deviceBoard.substring(0, 2) === 'MTK' ? 1920 : 1280
 var wsss,errorTime = 0;
 doConnect();
 function throttle(fn, delay) {
@@ -148,8 +150,8 @@ var draw_graph = function (graphType, obj) {
 		if (resolving == 0) {
 			var ping;
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageY * (1280 / voheight)
-				var caheightYs = 720 - touchfor[i].pageX * (720 / vowidth)
+				var cawidthXs = touchfor[i].pageY * (videoHeight / voheight)
+				var caheightYs = videoWidth - touchfor[i].pageX * (videoWidth / vowidth)
 				ping = {
 					"data": {
 						"action": 0,
@@ -165,8 +167,8 @@ var draw_graph = function (graphType, obj) {
 		} else {
 			var ping;
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageX * (720 / vowidth)
-				var caheightYs = touchfor[i].pageY * (1280 / voheight)
+				var cawidthXs = touchfor[i].pageX * (videoWidth / vowidth)
+				var caheightYs = touchfor[i].pageY * (videoHeight / voheight)
 				ping = {
 					"data": {
 						"action": 0,
@@ -191,8 +193,8 @@ var draw_graph = function (graphType, obj) {
 		if (resolving == 0) {
 			var ping;
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageY * (1280 / voheight);
-				var caheightYs = 720 - touchfor[i].pageX * (720 / vowidth);
+				var cawidthXs = touchfor[i].pageY * (videoHeight / voheight);
+				var caheightYs = videoWidth - touchfor[i].pageX * (videoWidth / vowidth);
 				ping = {
 					"data": {
 						"action": 1,
@@ -208,8 +210,8 @@ var draw_graph = function (graphType, obj) {
 		} else {
 			var ping;
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageX * (720 / vowidth);
-				var caheightYs = touchfor[i].pageY * (1280 / voheight);
+				var cawidthXs = touchfor[i].pageX * (videoWidth / vowidth);
+				var caheightYs = touchfor[i].pageY * (videoHeight / voheight);
 				ping = {
 					"data": {
 						"action": 1,
@@ -239,8 +241,8 @@ var draw_graph = function (graphType, obj) {
 		//是否横屏  morePortionMove
 		if (resolving == 0) {
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageY * (1280 / voheight)
-				var caheightYs = 720 - touchfor[i].pageX * (720 / vowidth)
+				var cawidthXs = touchfor[i].pageY * (videoHeight / voheight)
+				var caheightYs = videoWidth - touchfor[i].pageX * (videoWidth / vowidth)
 				ping = {
 					"data": {
 						"action": 2,
@@ -257,8 +259,8 @@ var draw_graph = function (graphType, obj) {
 		} else {
 			var ping;
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageX * (720 / vowidth);
-				var caheightYs = touchfor[i].pageY * (1280 / voheight);
+				var cawidthXs = touchfor[i].pageX * (videoWidth / vowidth);
+				var caheightYs = touchfor[i].pageY * (videoHeight / voheight);
 				ping = {
 					"data": {
 						"action": 2,

+ 0 - 1
screenAndroid/WXtrialInterface.html

@@ -395,7 +395,6 @@
 		})
 
 		form.clientType = parameters['clientType'];
-		form.diskName = parameters['diskName'];
 		form.id = parameters['id'];
 		form.userCardId = parameters['userCardId'];
 

+ 15 - 13
screenIos/WXdraw.js

@@ -30,7 +30,9 @@ form.ip = parameters['ip'];
 form.domainName = parameters["domainName"];
 var isWSS = true;
 var cUrl = isWSS ? "wss://" + form.domainName + "?cardIp=" + form.ip : "ws://" + form.domainName + "?cardIp=" + form.ip;
-
+var deviceBoard = parameters['deviceBoard'];
+var videoWidth = deviceBoard.substring(0, 2) === 'MTK' ? 1080 : 720
+var videoHeight = deviceBoard.substring(0, 2) === 'MTK' ? 1920 : 1280
 var wsss;
 var errorTime = 0;
 doConnect();
@@ -143,8 +145,8 @@ var draw_graph = function (graphType) {
 		if (resolving == 0) {
 			var ping
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageY * (1280 / voheight)
-				var caheightYs = 720 - touchfor[i].pageX * (720 / vowidth)
+				var cawidthXs = touchfor[i].pageY * (videoHeight / voheight)
+				var caheightYs = videoWidth - touchfor[i].pageX * (videoWidth / vowidth)
 				ping = {
 					"data": {
 						"action": 0,
@@ -160,8 +162,8 @@ var draw_graph = function (graphType) {
 		} else {
 			var ping
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageX * (720 / vowidth)
-				var caheightYs = touchfor[i].pageY * (1280 / voheight)
+				var cawidthXs = touchfor[i].pageX * (videoWidth / vowidth)
+				var caheightYs = touchfor[i].pageY * (videoHeight / voheight)
 				ping = {
 					"data": {
 						"action": 0,
@@ -188,8 +190,8 @@ var draw_graph = function (graphType) {
 		if (resolving == 0) {
 			var ping
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageY * (1280 / voheight)
-				var caheightYs = 720 - touchfor[i].pageX * (720 / vowidth)
+				var cawidthXs = touchfor[i].pageY * (videoHeight / voheight)
+				var caheightYs = videoWidth - touchfor[i].pageX * (videoWidth / vowidth)
 				ping = {
 					"data": {
 						"action": 1,
@@ -205,8 +207,8 @@ var draw_graph = function (graphType) {
 		} else {
 			var ping
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageX * (720 / vowidth)
-				var caheightYs = touchfor[i].pageY * (1280 / voheight)
+				var cawidthXs = touchfor[i].pageX * (videoWidth / vowidth)
+				var caheightYs = touchfor[i].pageY * (videoHeight / voheight)
 				ping = {
 					"data": {
 						"action": 1,
@@ -236,8 +238,8 @@ var draw_graph = function (graphType) {
 		//是否横屏  morePortionMove
 		if (resolving == 0) {
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageY * (1280 / voheight)
-				var caheightYs = 720 - touchfor[i].pageX * (720 / vowidth)
+				var cawidthXs = touchfor[i].pageY * (videoHeight / voheight)
+				var caheightYs = videoWidth - touchfor[i].pageX * (videoWidth / vowidth)
 				ping = {
 					"data": {
 						"action": 2,
@@ -253,8 +255,8 @@ var draw_graph = function (graphType) {
 		} else {
 			var ping
 			for (var i = 0; i < touchfor.length; i++) {
-				var cawidthXs = touchfor[i].pageX * (720 / vowidth)
-				var caheightYs = touchfor[i].pageY * (1280 / voheight)
+				var cawidthXs = touchfor[i].pageX * (videoWidth / vowidth)
+				var caheightYs = touchfor[i].pageY * (videoHeight / voheight)
 				ping = {
 					"data": {
 						"action": 2,

+ 5 - 2
screenIos/WXtrialInterface.html

@@ -647,7 +647,10 @@
 		Module.onRuntimeInitialized = function () {
 			isFinish = true;
 		}
-
+		
+		var deviceBoard = parameters['deviceBoard'];
+		var videoWidth = deviceBoard.substring(0, 2) === 'MTK' ? 1080 : 720
+		var videoHeight = deviceBoard.substring(0, 2) === 'MTK' ? 1920 : 1280
 		function decodeAAC(data) {
 			var retPtr = Module._malloc(4 * 5 * 1024); //接收的数据
 			var inputPtr = Module._malloc(4 * data.length); //输入数据
@@ -682,7 +685,7 @@
 					if (renderCount++ < 4 || !isAudioPlay) {
 						return
 					}
-					webglPlayer.renderFrame(objData.data, 720, 1280, 720 * 1280, (720 / 2) * (1280 / 2));
+					webglPlayer.renderFrame(objData.data, videoWidth, videoHeight, videoWidth * videoHeight, (videoWidth / 2) * (videoHeight / 2));
 					$('.weui-mask_transparent').hide()
 					$('.weui-toast').hide()
 					$('.loading').hide()

+ 23 - 3
screenIos/decoder.js

@@ -2,10 +2,15 @@ var isFinish = false;
 var decodeCount = 0;
 var h264Queue = [];
 var isFirst = true;
+var parameters = GetRequest();
+var deviceBoard = parameters['deviceBoard'];
+var videoWidth = deviceBoard.substring(0, 2) === 'MTK' ? 1080 : 720
+var videoHeight = deviceBoard.substring(0, 2) === 'MTK' ? 1920 : 1280
+
 var ret = ''
 self.Module = {
 	onRuntimeInitialized: function () {
-		ret = Module._openDecoder(720, 1280);
+		ret = Module._openDecoder(videoWidth, videoHeight);
 		if (!ret) {
 			isFinish = true;
 		}
@@ -47,7 +52,8 @@ setInterval(
 
 
 function decodeH264(data) {
-	var retPtr = Module._malloc(2457600); //接收的数据
+	var size = videoWidth * videoHeight *3;
+	var retPtr = Module._malloc(size); //接收的数据
 	var inputPtr = Module._malloc(data.length); //输入数据
 
 	for (var i = 0; i < data.length; i++) {
@@ -66,7 +72,7 @@ function decodeH264(data) {
 		decodeCount++;
 	}
 
-	var yuvData = new Uint8Array(2457600);
+	var yuvData = new Uint8Array(size);
 	for (var i = 0; i < yuvData.length; i++) {
 		yuvData[i] = Module.HEAPU8[(retPtr) + i];
 	}
@@ -86,3 +92,17 @@ function decodeH264(data) {
 function closeDecoder() {
 	Module._destroyDecoder();
 }
+
+// 获取url中"?"符后的字串
+function GetRequest() {
+	var url = location.search;
+	var obj = new Object();
+	if (url.indexOf("?") != -1) {
+		var str = url.substr(1);
+		strs = str.split("&");
+		for (var i = 0; i < strs.length; i++) {
+			obj[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
+		}
+	}
+	return obj;
+}