Browse Source

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

heyang 3 years ago
parent
commit
f238db42da

+ 1 - 1
microserviceUserH5/static/css/experience.css

@@ -140,7 +140,7 @@ button:focus, input:focus {
 	flex-wrap: wrap;
 }
 .bottom {
-	width: 100%;
+	width: 6.8rem;
 	position: absolute;
 	text-align: center;
 	bottom: 0.3rem;

+ 1 - 1
microserviceUserH5/static/js/vender/config.js

@@ -1,7 +1,7 @@
 var url = window.location.href;
 url = url.split('/');
 var baseUrl = url[0] + '//' + url[2];
-// var baseUrl = 'http://14.18.190.141:54413'
+// var baseUrl = 'http://prese.phone.androidscloud.com'
 // var baseUrl = 'http://vclusters.imwork.net:2221'
 
 

+ 6 - 6
microserviceUserH5/static/js/vender/vue/config.js

@@ -4,18 +4,18 @@
 // var base_url = 'http://192.168.100.98:3001'; //测试服务器
 var base_url = baseUrl; //测试服务器
 //http://test.androidscloud.com
-// var base_url = 'https://per.cs.se.androidscloud.com/';
-//var base_url = 'https://per.cs.se.androidscloud.com/'
+// var base_url = 'https://prese.phone.androidscloud.com/';
+//var base_url = 'https://prese.phone.androidscloud.com/'
 //https://www.nn-jtjt.com/app
 // var base_url = 'http://kmpark.cdwatertek.com/appwechatpay'; //测试服务器
 // var base_url = 'http://192.168.100.83:3001'; //测试服务器
 //var base_url = 'http://**********'; //正式服务器
 
 
-const fileCenterApi = baseUrl.includes('14.18.190.141')?'http://110.53.221.195:8210':'https://wjzx.androidscloud.com:9091';
-//const fileCenterApi = 'https://per.cs.se.androidscloud.com/'
-// https://per.cs.se.androidscloud.com/
-// https://per.cs.se.androidscloud.com/
+const fileCenterApi = baseUrl.includes('prese.phone.androidscloud.com')?'http://110.53.221.195:8210':'https://wjzx.androidscloud.com:9091';
+//const fileCenterApi = 'https://prese.phone.androidscloud.com/'
+// https://prese.phone.androidscloud.com/
+// https://prese.phone.androidscloud.com/
 axios.defaults.headers['Content-Type'] = 'application/json';
 // axios.defaults.headers['Access-Control-Allow-Origin'] = '*';
 

+ 2 - 2
microserviceUserH5/vcloud/actFission.html

@@ -329,7 +329,7 @@
 				<div class="select-title">选择你要分享的内容</div>
 				<div class="select-list">
 					<div v-for="(item,index) in tagList" :key="index" @click="toDetail(item)">
-						<img :src="fileCenterApi + `/document/newFile/download/0/3dn9b4585511476691c6?fileKey=${item.cover}`" class="icon" alt="">
+						<img :src="fileCenterApi + `/document/newFile/download/0/347905r86eb745a1sc38?fileKey=${item.cover}`" class="icon" alt="">
 					</div>
 				</div>
 			</div>
@@ -487,7 +487,7 @@
 
 				},
 				standarImg(id) {
-					return `${fileCenterApi}/document/newFile/download/0/3dn9b4585511476691c6?fileKey=${id}`;
+					return `${fileCenterApi}/document/newFile/download/0/347905r86eb745a1sc38?fileKey=${id}`;
 				},
 				getShare() {
 					systemBuriedPoint({

+ 1 - 1
microserviceUserH5/vcloud/actFissionList.html

@@ -79,7 +79,7 @@
 		<van-list v-model="loading" :finished-text="finishedText" :finished="finished"
 			:immediate-check=false @load="onLoad">
 			<div v-for="(item,index) in tagList" :key="index" class="item" @click="toDetail(item)">
-				<img :src="fileCenterApi + `/document/newFile/download/0/3dn9b4585511476691c6?fileKey=${item.fileId}`" class="icon" alt="">
+				<img :src="fileCenterApi + `/document/newFile/download/0/347905r86eb745a1sc38?fileKey=${item.fileId}`" class="icon" alt="">
 				<div class="right">
 					<div class="titles">{{item.strategyTitle}}</div>
 					<div class="contents">{{getContent(index,item.content)}}</div>

+ 1 - 1
microserviceUserH5/vcloud/actFissionShare.html

@@ -786,7 +786,7 @@
                     }
                 },
                 standarImg(id) {
-                    return `${fileCenterApi}/document/newFile/download/0/3dn9b4585511476691c6?fileKey=${id}`;
+                    return `${fileCenterApi}/document/newFile/download/0/347905r86eb745a1sc38?fileKey=${id}`;
                 },
                 getMarquee() {
                     getMarquee().then(res => {

+ 0 - 1
microserviceUserH5/vcloud/channel.html

@@ -44,7 +44,6 @@
 
 </div>
 <script type="text/javascript" th:inline="javascript">
-	// var baseUrl = 'http://14.18.190.141:38051'
 	let code = '', platform = '', version = '', fileIp = '', downloadId = '';
 	goAppDownload();
 	function goAppDownload() {

+ 1 - 6
microserviceUserH5/vcloud/exchangePhoneActivity.html

@@ -137,7 +137,6 @@
 		toastr.options.timeOut = '1500';
 	</script>
 	<script type="text/javascript">
-        // var baseUrl = 'http://14.18.190.141:24380'
 		let timer, flag = true;
 		let time = 60, codeTimer = null, enable = false, isStart = false,  changePhoneType = 2, phone = '', code = '', captchaVerification = '';
 		var url = window.location.href;
@@ -385,11 +384,7 @@
 		},false);
         function download() {
             if (isAndroid) {
-				if(baseUrl.includes('14.18.190.141')){
-					location.href = `./exchangePhoneDownApp.html?code=B8D94k56bj11&platform=1`;
-				}else{
-					location.href = `./exchangePhoneDownApp.html?code=nEk3HnNl61C3&platform=1`;
-				}
+				location.href = `./exchangePhoneDownApp.html?code=nEk3HnNl61C3&platform=1`;
             } else if (isIOS) {
                 location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
             } else {

+ 0 - 1
microserviceUserH5/vcloud/exchangePhoneDownApp.html

@@ -37,7 +37,6 @@
 
 </div>
 <script type="text/javascript">
-	// var baseUrl = 'http://14.18.190.141:24380';
 	let code = '', downloadId = '', platform = '', fileIp = '', version = '';
 	goAppDownload();
 	function goAppDownload() {

+ 0 - 2
microserviceUserH5/vcloud/official.html

@@ -136,8 +136,6 @@
     <script type="text/javascript" th:inline="javascript">
         var url = window.location.href;
         url = url.split('/')
-        // var baseUrl = 'https://' + url[2]
-        // var baseUrl = 'http://14.18.190.141:24380'
 
         $("#recv_ipt").bind('input propertychange', function (e) {
             var ipt_phones = $('#recv_ipt').val();

+ 2 - 2
microserviceUserH5/vcloud/promote.html

@@ -155,10 +155,10 @@
 						} else if (res.status === 1) {
 							toastr.error(res.msg)
 							setTimeout(function () {
-								if(baseUrl.includes('14.18.190.141')){
+								if(baseUrl.includes('prese.phone.androidscloud.com')){
 									$(window).attr('location', 'http://14.18.190.144:18888');
 								}else{
-									$(window).attr('location', 'http://www.androidscloud.com/');
+									$(window).attr('location', 'http://www.androidscloud.com');
 								}
 							}, 1000)
 						} else {

+ 3 - 3
microserviceUserH5/vcloud/qqActivity.html

@@ -133,7 +133,7 @@
 		toastr.options.timeOut = '1500';
 	</script>
 	<script type="text/javascript">
-        // var baseUrl = 'https://per.cs.se.androidscloud.com'
+        // var baseUrl = 'https://prese.phone.androidscloud.com'
 		let timer, flag = true;
 		let time = 60, codeTimer = null, isStart = false, myCode = '';
 		var url = window.location.href;
@@ -319,8 +319,8 @@
 		},false);
         function download() {
             if (isAndroid) {
-                if (baseUrl == 'https://per.cs.se.androidscloud.com') {
-                    window.location.href = 'http://per.cs.se.androidscloud.com:8888'
+                if (baseUrl == 'https://prese.phone.androidscloud.com') {
+                    window.location.href = 'http://prese.phone.androidscloud.com:8888'
                 } else {
                     window.location.href = 'http://www.androidscloud.com?timestamp=' + Math.random();
                 }

+ 4 - 4
microserviceUserH5/vcloud/register.html

@@ -139,10 +139,10 @@
           } else if (res.status === 1) {
             toastr.error(res.msg)
             setTimeout(function () {
-              if (baseUrl.includes('14.18.190.141')) {
+              if (baseUrl.includes('prese.phone.androidscloud.com')) {
                 $(window).attr('location', 'http://14.18.190.144:18888');
               } else {
-                $(window).attr('location', 'http://www.androidscloud.com/');
+                $(window).attr('location', 'http://www.androidscloud.com');
               }
             }, 1000)
           } else if (res.status === 11) {
@@ -177,8 +177,8 @@
     function getHead(fileId) {
       $('.head img').attr('src', '../static/img/invite/header-img.png');
       if (fileId) {
-        let urls = baseUrl == 'http://14.18.190.141:24380' ? 'http://110.53.221.195:8210' : 'https://wjzx.androidscloud.com:9091';
-        $('.head img').attr('src', `${urls}/document/newFile/download/0/3dn9b4585511476691c6?fileKey=` + fileId);
+        let urls = baseUrl == 'http://prese.phone.androidscloud.com' ? 'http://110.53.221.195:8210' : 'https://wjzx.androidscloud.com:9091';
+        $('.head img').attr('src', `${urls}/document/newFile/download/0/347905r86eb745a1sc38?fileKey=` + fileId);
       }
     }
     function encrypt(word, keyStr) {

+ 1 - 1
microserviceUserH5/vcloud/share.html

@@ -220,7 +220,7 @@
 						this.showD = true;
 						return;
 					} else {
-						if(window.location.href.includes('14.18.190.141')){
+						if(window.location.href.includes('prese.phone.androidscloud.com')){
 							window.location.href = 'http://14.18.190.144:18888/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601'
 						} else {
 							window.location.href ='http://www.androidscloud.com/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601';

+ 186 - 173
screenAndroid/WXdraw.js

@@ -8,9 +8,9 @@ var numse = window.screen.height;
 
 // 计算title top 头部 连接断开,是否准备重连?
 if (numse <= 70) {
-	var voheight = window.screen.height - winHeight - 34 - 20
+  var voheight = window.screen.height - winHeight - 34 - 20
 } else {
-	var voheight = window.screen.height - topwinHeightDraw - 20
+  var voheight = window.screen.height - topwinHeightDraw - 20
 }
 
 // 画笔大小
@@ -23,7 +23,7 @@ var parameters = GetRequest();
 var form = {};
 
 var cardToken = parameters["cardToken"];
-cardToken = cardToken && cardToken.replace(/@/g,"=");
+cardToken = cardToken && cardToken.replace(/@/g, "=");
 form.cardIp = parameters["cardIp"];
 form.port = parameters["port"];
 form.username = parameters["username"];
@@ -31,207 +31,220 @@ form.userCardId = parameters["userCardId"];
 form.ip = parameters["ip"];
 form.domainName = parameters["domainName"];
 var isWSS = true;
-var cUrl = isWSS ? "wss://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken : "ws://" + form.domainName + "?cardIp=" + form.ip  + "&token=" + cardToken;
-// var cUrl = "wss://192.168.31.198/businessChannel?cardIp=192.168.20.53&token=LDAz32tutqS9wQqi0WlmvJ68/Is83cX+kavJQij1IMRvewgZ1dLvviFZqd4b8gcaR1eLztR/ViRLyyAVvZO7GA==";
+var cUrl = isWSS ? "wss://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken : "ws://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken;
+var videoWidth = 720
+var videoHeight = 1280
 
-var wsss,errorTime = 0;
+var wsss, errorTime = 0;
 var first = true;
 doConnect();
 function throttle(fn, delay) {
-	var flag = true;
-	errorTime += delay;
-	return () => {
-		if (!flag) return;
-		flag = false;
-		timer = setTimeout(() => {
-		fn();
-		flag = true;
-		}, delay);
-	};
+  var flag = true;
+  errorTime += delay;
+  return () => {
+    if (!flag) return;
+    flag = false;
+    timer = setTimeout(() => {
+      fn();
+      flag = true;
+    }, delay);
+  };
 }
 
 function doConnect() {
-	wsss = new WebSocket(cUrl);
-	wsss.binaryType = 'arraybuffer';
-
-	wsss.onopen = function () {
-		// 获取虚拟场景状态
-		var pings = { "type": "getVsStatus" }
-		wsss.send(JSON.stringify(pings));
-		var bitRate = {
-			"data": {
-				"bitRate": 1243000
-			},
-			"type": "bitRate"
-		}
-		wsss.send(JSON.stringify(bitRate));
-		// 获取实时截图
-		var screenPic = {
-			type: 'getScreenPic',
+  wsss = new WebSocket(cUrl);
+  wsss.binaryType = 'arraybuffer';
+
+  wsss.onopen = function () {
+    // 获取虚拟场景状态
+    var pings = { "type": "getVsStatus" }
+    wsss.send(JSON.stringify(pings));
+    var bitRate = {
+      "data": {
+        "bitRate": 1243000
+      },
+      "type": "bitRate"
+    }
+    wsss.send(JSON.stringify(bitRate));
+    // 获取实时截图
+    var screenPic = {
+      type: 'getScreenPic',
       data: {
         taskUid: '346789',
         intervalTime: 0
       }
-		}
-		wsss.send(JSON.stringify(screenPic));
-	};
-	wsss.onerror = function (evt) {
-		wsss.close();
-		throttle(doConnect,100);
-		if(errorTime > 1000){
-			wx.miniProgram.switchTab({
-				url: '/pages/home/home'
-			})
-		}
-	};
-	wsss.onmessage = function(res) {
-		var result = typeof res.data === 'string' ? JSON.parse(res.data) : res.data
-		if (result.type === 'cutting') {
-			if (result.data.status === 0) {
-				$.toast('复制成功', "text");
-			} else {
-				$.toast(result.msg, "text");
-			}
-			return
-		}
-		var unit8Arr = new Uint8Array(result);
-		if (unit8Arr[0] == 0x68 && unit8Arr[1] == 0x09 && first) {
-			first = false;
-			unit8Arr = unit8Arr.slice(12,unit8Arr.length-2);
-			var base64 = 'data:image/jpg;base64,' + window.btoa(String.fromCharCode(...new Uint8Array(unit8Arr)));
-			$(".loading_sceen_pic").attr('src', base64);
-		}
-	}
+    }
+    wsss.send(JSON.stringify(screenPic));
+    // 获取分辨率
+    var phoneSize = {
+      "type": "getPhoneSize"
+    }
+    wsss.send(JSON.stringify(phoneSize));
+  };
+  wsss.onerror = function (evt) {
+    wsss.close();
+    throttle(doConnect, 100);
+    if (errorTime > 1000) {
+      wx.miniProgram.switchTab({
+        url: '/pages/home/home'
+      })
+    }
+  };
+  wsss.onmessage = function (res) {
+    var result = typeof res.data === 'string' ? JSON.parse(res.data) : res.data
+    if (result.type === 'cutting') {
+      if (result.data.status === 0) {
+        $.toast('复制成功', "text");
+      } else {
+        $.toast(result.msg, "text");
+      }
+      return
+    }
+    if (result.type === 'getPhoneSize') {
+      if (result.data.status === 0) {
+        videoWidth = result.data.width
+        videoHeight = result.data.height
+      }
+      return
+    }
+    var unit8Arr = new Uint8Array(result);
+    if (unit8Arr[0] == 0x68 && unit8Arr[1] == 0x09 && first) {
+      first = false;
+      unit8Arr = unit8Arr.slice(12, unit8Arr.length - 2);
+      var base64 = 'data:image/jpg;base64,' + window.btoa(String.fromCharCode(...new Uint8Array(unit8Arr)));
+      $(".loading_sceen_pic").attr('src', base64);
+    }
+  }
 }
 
 $('body').on("click", function () {
-	draw_graph('pencil');
+  draw_graph('pencil');
 })
 //剪切板
 $(".upload").on("click", function () {
-	var texts = $(this).attr("data-text")
-	if (texts == "uploads") {
-		$(".mainbox").css({
-			"display": "block"
-		})
-		$(".sbox").css({
-			"display": "none"
-		})
-	}
+  var texts = $(this).attr("data-text")
+  if (texts == "uploads") {
+    $(".mainbox").css({
+      "display": "block"
+    })
+    $(".sbox").css({
+      "display": "none"
+    })
+  }
 })
 
 //home 控制home
 $(".botmat1img").on("click", function () {
-	var codes = $(this).attr("data-text")
-	if (codes == "home") {
-		wsss.send(ExexuteKeyBoard(3));
-	} else if (codes == "return") {
-		wsss.send(ExexuteKeyBoard(4));
-	} else if (codes == "gengduo") {
-		wsss.send(ExexuteKeyBoard(187));
-	}
+  var codes = $(this).attr("data-text")
+  if (codes == "home") {
+    wsss.send(ExexuteKeyBoard(3));
+  } else if (codes == "return") {
+    wsss.send(ExexuteKeyBoard(4));
+  } else if (codes == "gengduo") {
+    wsss.send(ExexuteKeyBoard(187));
+  }
 
 })
 //高清控制
 $(".PictureQuality").on("click", function () {
-	$(this).addClass("avit").siblings().removeClass('avit')
-	var id = $(this).attr("data-id")
-	var bitRate = {
-		"data": {
-			"bitRate": id
-		},
-		"type": "bitRate"
-	}
-	wsss.send(JSON.stringify(bitRate))
+  $(this).addClass("avit").siblings().removeClass('avit')
+  var id = $(this).attr("data-id")
+  var bitRate = {
+    "data": {
+      "bitRate": id
+    },
+    "type": "bitRate"
+  }
+  wsss.send(JSON.stringify(bitRate))
 })
 var ongoingTouches = [];
 //画图形
 var draw_graph = function (graphType, obj) {
-	//把蒙版放于画板上面
-	$("#container").css("z-index", 30);
-	$("#dedit").css("z-index", 20);
-	var canDraw = false;
-	//鼠标按下获取 开始xy开始画图
-	var touchstart = function (e) {
-		$('.control-right-img').attr({
-			"data-id": "2"
-		})
-		$(".leftmains").css({
-			"right": "-4rem"
-		})
-		var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
-		ongoingTouches.push(touchfor);
-		var acrossWidthX = touchfor.pageY * (1280 / voheight);
-		var acrossHeightY = 720 - touchfor.pageX * (720 / vowidth);
-		var verticalWidthX = touchfor.pageX * (720 / vowidth);
-		var verticalHeightY = touchfor.pageY * (1280 / voheight);
-		//是否横屏
-		var ping = resolving == 0 ? 
-			{"data":{"action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2)},"type": "event"} :
-				{"data":{"action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2)},"type": "event"};
-		wsss.send(JSON.stringify(ping));
-		canDraw = true;
-	};
-
-	//鼠标离开 把蒙版canvas的图片生成到canvas中
-	var touchend = function (e) {
-		var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
-		var acrossWidthX = touchfor.pageY * (1280 / voheight);
-		var acrossHeightY = 720 - touchfor.pageX * (720 / vowidth);
-		var verticalWidthX = touchfor.pageX * (720 / vowidth);
-		var verticalHeightY = touchfor.pageY * (1280 / voheight);
-		//是否横屏
-		var ping = resolving == 0 ? 
-			{"data":{"action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2)},"type": "event"} :
-				{"data":{"action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2)},"type": "event"};
-		wsss.send(JSON.stringify(ping));
-		ongoingTouches.splice(touchfor.identifier, 1);
-		canDraw = false;
-	};
-
-	//清空层 云手机超出屏幕的开关
-	var clearContext = function () {
-		canDraw = false;
-	}
-
-	// 鼠标移动
-	var touchmove = function (e) {
-		e = e || window.event;
-		var touchfor =  e.originalEvent.changedTouches[0]; //for 的手指数组
-		var acrossWidthX = touchfor.pageY * (1280 / voheight);
-		var acrossHeightY = 720 - touchfor.pageX * (720 / vowidth);
-		var verticalWidthX = touchfor.pageX * (720 / vowidth);
-		var verticalHeightY = touchfor.pageY * (1280 / voheight);
-		var ping = resolving == 0 ? 
-			{"data":{"action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2)},"type": "event"} :
-				{"data":{"action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2)},"type": "event"};
-		wsss.send(JSON.stringify(ping));
-	};
-
-	//鼠标离开区域以外 除了涂鸦 都清空
-	var mouseout = function () {
-		if (graphType != 'handwriting') {
-			clearContext();
-		}
-	}
-
-	$(canvas_bak).unbind();
-	$(canvas_bak).bind('touchstart', touchstart);
-	$(canvas_bak).bind('touchmove', touchmove);
-	$(canvas_bak).bind('touchend', touchend);
-	$(canvas_bak).bind('mouseout', mouseout);
+  //把蒙版放于画板上面
+  $("#container").css("z-index", 30);
+  $("#dedit").css("z-index", 20);
+  var canDraw = false;
+  //鼠标按下获取 开始xy开始画图
+  var touchstart = function (e) {
+    $('.control-right-img').attr({
+      "data-id": "2"
+    })
+    $(".leftmains").css({
+      "right": "-4rem"
+    })
+    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
+    ongoingTouches.push(touchfor);
+    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
+    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
+    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
+    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
+    //是否横屏
+    var ping = resolving == 0 ?
+      { "data": { "action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+      { "data": { "action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+    wsss.send(JSON.stringify(ping));
+    canDraw = true;
+  };
+
+  //鼠标离开 把蒙版canvas的图片生成到canvas中
+  var touchend = function (e) {
+    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
+    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
+    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
+    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
+    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
+    //是否横屏
+    var ping = resolving == 0 ?
+      { "data": { "action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+      { "data": { "action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+    wsss.send(JSON.stringify(ping));
+    ongoingTouches.splice(touchfor.identifier, 1);
+    canDraw = false;
+  };
+
+  //清空层 云手机超出屏幕的开关
+  var clearContext = function () {
+    canDraw = false;
+  }
+
+  // 鼠标移动
+  var touchmove = function (e) {
+    e = e || window.event;
+    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
+    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
+    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
+    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
+    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
+    var ping = resolving == 0 ?
+      { "data": { "action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+      { "data": { "action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+    wsss.send(JSON.stringify(ping));
+  };
+
+  //鼠标离开区域以外 除了涂鸦 都清空
+  var mouseout = function () {
+    if (graphType != 'handwriting') {
+      clearContext();
+    }
+  }
+
+  $(canvas_bak).unbind();
+  $(canvas_bak).bind('touchstart', touchstart);
+  $(canvas_bak).bind('touchmove', touchmove);
+  $(canvas_bak).bind('touchend', touchend);
+  $(canvas_bak).bind('mouseout', mouseout);
 }
 
 // 获取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;
+  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;
 }

+ 178 - 165
screenIos/WXdraw.js

@@ -7,9 +7,9 @@ var topwinHeightDraw = window.screen.height - window.innerHeight + 30; //计算t
 var numse = window.screen.height // -winHeight
 //计算title top 头部
 if (numse <= 70) {
-	var voheight = window.screen.height - winHeight - 34 - 20
+  var voheight = window.screen.height - winHeight - 34 - 20
 } else {
-	var voheight = window.screen.height - topwinHeightDraw - 20
+  var voheight = window.screen.height - topwinHeightDraw - 20
 }
 
 //画笔大小
@@ -21,7 +21,7 @@ var parameters = GetRequest();
 
 var form = {};
 var cardToken = parameters["cardToken"];
-cardToken = cardToken && cardToken.replace(/@/g,"=");
+cardToken = cardToken && cardToken.replace(/@/g, "=");
 form.cardIp = parameters['cardIp'];
 form.port = parameters['port'];
 form.sn = parameters['sn'];
@@ -31,204 +31,217 @@ form.ip = parameters['ip'];
 form.domainName = parameters["domainName"];
 var isWSS = true;
 var cUrl = isWSS ? "wss://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken : "ws://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken;
-
+var videoWidth = 720
+var videoHeight = 1280
 var wsss;
 var errorTime = 0;
 var first = true;
 doConnect();
 
 function throttle(fn, delay) {
-	var flag = true;
-	errorTime += delay;
-	return () => {
-		if (!flag) return;
-		flag = false;
-		timer = setTimeout(() => {
-			fn();
-			flag = true;
-		}, delay);
-	};
+  var flag = true;
+  errorTime += delay;
+  return () => {
+    if (!flag) return;
+    flag = false;
+    timer = setTimeout(() => {
+      fn();
+      flag = true;
+    }, delay);
+  };
 }
 
 function doConnect() {
-	wsss = new WebSocket(cUrl);
-	wsss.binaryType = 'arraybuffer';
+  wsss = new WebSocket(cUrl);
+  wsss.binaryType = 'arraybuffer';
 
-	wsss.onopen = function () {
-		// 获取虚拟场景状态
-		var pings = { "type": "getVsStatus" }
-		wsss.send(JSON.stringify(pings));
-		var bitRate = {
-			"data": {
-				"bitRate": 1243000
-			},
-			"type": "bitRate"
-		}
-		wsss.send(JSON.stringify(bitRate))
-		// 获取实时截图
-		var screenPic = {
-			type: 'getScreenPic',
+  wsss.onopen = function () {
+    // 获取虚拟场景状态
+    var pings = { "type": "getVsStatus" }
+    wsss.send(JSON.stringify(pings));
+    var bitRate = {
+      "data": {
+        "bitRate": 1243000
+      },
+      "type": "bitRate"
+    }
+    wsss.send(JSON.stringify(bitRate))
+    // 获取实时截图
+    var screenPic = {
+      type: 'getScreenPic',
       data: {
         taskUid: '346789',
         intervalTime: 0
       }
-		}
-		wsss.send(JSON.stringify(screenPic));
-	};
-	wsss.onerror = function () {
-		wsss.close();
-		throttle(doConnect, 100);
-		if (errorTime > 1000) {
-			wx.miniProgram.switchTab({
-				url: '/pages/home/home'
-			})
-		}
-	};
-	wsss.onmessage = function(res) {
-		var result = typeof res.data === 'string' ? JSON.parse(res.data) : res.data
-		if (result.type === 'cutting') {
-			if (result.data.status === 0) {
-				$.toast('复制成功', "text");
-			} else {
-				$.toast(result.msg, "text");
-			}
-			return
-		}
-		var unit8Arr = new Uint8Array(result);
-		if (unit8Arr[0] == 0x68 && unit8Arr[1] == 0x09 && first) {
-			first = false;
-			unit8Arr = unit8Arr.slice(12,unit8Arr.length-2);
-			var base64 = 'data:image/jpg;base64,' + window.btoa(String.fromCharCode(...new Uint8Array(unit8Arr)));
-			$(".loading_sceen_pic").attr('src', base64)
-		}
-	}
+    }
+    wsss.send(JSON.stringify(screenPic));
+    // 获取分辨率
+    var phoneSize = {
+      "type": "getPhoneSize"
+    }
+    wsss.send(JSON.stringify(phoneSize));
+  };
+  wsss.onerror = function () {
+    wsss.close();
+    throttle(doConnect, 100);
+    if (errorTime > 1000) {
+      wx.miniProgram.switchTab({
+        url: '/pages/home/home'
+      })
+    }
+  };
+  wsss.onmessage = function (res) {
+    var result = typeof res.data === 'string' ? JSON.parse(res.data) : res.data
+    if (result.type === 'cutting') {
+      if (result.data.status === 0) {
+        $.toast('复制成功', "text");
+      } else {
+        $.toast(result.msg, "text");
+      }
+      return
+    }
+    if (result.type === 'getPhoneSize') {
+      if (result.data.status === 0) {
+        videoWidth = result.data.width
+        videoHeight = result.data.height
+      }
+      return
+    }
+    var unit8Arr = new Uint8Array(result);
+    if (unit8Arr[0] == 0x68 && unit8Arr[1] == 0x09 && first) {
+      first = false;
+      unit8Arr = unit8Arr.slice(12, unit8Arr.length - 2);
+      var base64 = 'data:image/jpg;base64,' + window.btoa(String.fromCharCode(...new Uint8Array(unit8Arr)));
+      $(".loading_sceen_pic").attr('src', base64)
+    }
+  }
 }
 $('body').on("click", function () {
-	draw_graph('pencil', this)
+  draw_graph('pencil', this)
 })
 //剪切板
 $(".upload").on("click", function () {
-	var texts = $(this).attr("data-text")
-	if (texts == "uploads") {
-		$(".mainbox").css({
-			"display": "block"
-		})
-		$(".sbox").css({
-			"display": "none"
-		})
-	}
+  var texts = $(this).attr("data-text")
+  if (texts == "uploads") {
+    $(".mainbox").css({
+      "display": "block"
+    })
+    $(".sbox").css({
+      "display": "none"
+    })
+  }
 })
 
 //home 控制home
 $(".botmat1img").on("click", function () {
-	var codes = $(this).attr("data-text")
-	if (codes == "home") {
-		wsss.send(ExexuteKeyBoard(3));
-	} else if (codes == "return") {
-		wsss.send(ExexuteKeyBoard(4));
-	} else if (codes == "gengduo") {
-		wsss.send(ExexuteKeyBoard(187));
-	}
+  var codes = $(this).attr("data-text")
+  if (codes == "home") {
+    wsss.send(ExexuteKeyBoard(3));
+  } else if (codes == "return") {
+    wsss.send(ExexuteKeyBoard(4));
+  } else if (codes == "gengduo") {
+    wsss.send(ExexuteKeyBoard(187));
+  }
 })
 //高清控制
 $(".PictureQuality").on("click", function () {
-	$(this).addClass("avit").siblings().removeClass('avit')
-	var id = $(this).attr("data-id")
-	var bitRate = {
-		"data": {
-			"bitRate": id
-		},
-		"type": "bitRate"
-	}
-	wsss.send(JSON.stringify(bitRate))
+  $(this).addClass("avit").siblings().removeClass('avit')
+  var id = $(this).attr("data-id")
+  var bitRate = {
+    "data": {
+      "bitRate": id
+    },
+    "type": "bitRate"
+  }
+  wsss.send(JSON.stringify(bitRate))
 })
 var canDraw = false;
 var ongoingTouches = [];
 //画图形
 var draw_graph = function (graphType) {
-	//把蒙版放于画板上面
-	$("#container").css("z-index", 30);
-	$("#dedit").css("z-index", 20);
-	// 先画在蒙版上 再复制到画布上
-	//鼠标按下获取 开始xy开始画图
-	var touchstart = function (e) {
-		$('.control-right-img').attr({
-			"data-id": "2"
-		})
-		$(".leftmains").css({
-			"right": "-4rem"
-		})
-		var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
-		ongoingTouches.push(touchfor);
-		var acrossWidthX = touchfor.pageY * (1280 / voheight);
-		var acrossHeightY = 720 - touchfor.pageX * (720 / vowidth);
-		var verticalWidthX = touchfor.pageX * (720 / vowidth);
-		var verticalHeightY = touchfor.pageY * (1280 / voheight);
-		//是否横屏
-		var ping = resolving == 0 ? 
-			{"data":{"action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2)},"type": "event"} :
-				{"data":{"action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2)},"type": "event"};
-		wsss.send(JSON.stringify(ping));
-		canDraw = true;
-	};
+  //把蒙版放于画板上面
+  $("#container").css("z-index", 30);
+  $("#dedit").css("z-index", 20);
+  // 先画在蒙版上 再复制到画布上
+  //鼠标按下获取 开始xy开始画图
+  var touchstart = function (e) {
+    $('.control-right-img').attr({
+      "data-id": "2"
+    })
+    $(".leftmains").css({
+      "right": "-4rem"
+    })
+    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
+    ongoingTouches.push(touchfor);
+    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
+    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
+    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
+    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
+    //是否横屏
+    var ping = resolving == 0 ?
+      { "data": { "action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+      { "data": { "action": 0, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+    wsss.send(JSON.stringify(ping));
+    canDraw = true;
+  };
 
-	//鼠标离开 把蒙版canvas的图片生成到canvas中
-	var touchend = function (e) {
-		var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
-		var acrossWidthX = touchfor.pageY * (1280 / voheight);
-		var acrossHeightY = 720 - touchfor.pageX * (720 / vowidth);
-		var verticalWidthX = touchfor.pageX * (720 / vowidth);
-		var verticalHeightY = touchfor.pageY * (1280 / voheight);
-		//是否横屏
-		var ping = resolving == 0 ? 
-			{"data":{"action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2)},"type": "event"} :
-				{"data":{"action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2)},"type": "event"};
-		wsss.send(JSON.stringify(ping));
-		ongoingTouches.splice(touchfor.identifier, 1);
-		canDraw = false;
-	};
+  //鼠标离开 把蒙版canvas的图片生成到canvas中
+  var touchend = function (e) {
+    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
+    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
+    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
+    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
+    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
+    //是否横屏
+    var ping = resolving == 0 ?
+      { "data": { "action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+      { "data": { "action": 1, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+    wsss.send(JSON.stringify(ping));
+    ongoingTouches.splice(touchfor.identifier, 1);
+    canDraw = false;
+  };
 
-	//清空层 云手机超出屏幕的开关
-	var clearContext = function () {
-		canDraw = false;
-	}
+  //清空层 云手机超出屏幕的开关
+  var clearContext = function () {
+    canDraw = false;
+  }
 
-	// 鼠标移动
-	var touchmove = function (e) {
-		e = e || window.event;
-		var touchfor =  e.originalEvent.changedTouches[0]; //for 的手指数组
-		var acrossWidthX = touchfor.pageY * (1280 / voheight);
-		var acrossHeightY = 720 - touchfor.pageX * (720 / vowidth);
-		var verticalWidthX = touchfor.pageX * (720 / vowidth);
-		var verticalHeightY = touchfor.pageY * (1280 / voheight);
-		var ping = resolving == 0 ? 
-			{"data":{"action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2)},"type": "event"} :
-				{"data":{"action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2)},"type": "event"};
-		wsss.send(JSON.stringify(ping));
-	};
+  // 鼠标移动
+  var touchmove = function (e) {
+    e = e || window.event;
+    var touchfor = e.originalEvent.changedTouches[0]; //for 的手指数组
+    var acrossWidthX = touchfor.pageY * (videoHeight / voheight);
+    var acrossHeightY = videoWidth - touchfor.pageX * (videoWidth / vowidth);
+    var verticalWidthX = touchfor.pageX * (videoWidth / vowidth);
+    var verticalHeightY = touchfor.pageY * (videoHeight / voheight);
+    var ping = resolving == 0 ?
+      { "data": { "action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
+      { "data": { "action": 2, "count": ongoingTouches.length, "id": touchfor.identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
+    wsss.send(JSON.stringify(ping));
+  };
 
-	//鼠标离开区域以外 除了涂鸦 都清空
-	var mouseout = function () {
-		if (graphType != 'handwriting') {
-			clearContext();
-		}
-	}
-	$(canvas_bak).unbind();
-	$(canvas_bak).bind('touchstart', touchstart);
-	$(canvas_bak).bind('touchmove', touchmove);
-	$(canvas_bak).bind('touchend', touchend);
-	$(canvas_bak).bind('mouseout', mouseout);
+  //鼠标离开区域以外 除了涂鸦 都清空
+  var mouseout = function () {
+    if (graphType != 'handwriting') {
+      clearContext();
+    }
+  }
+  $(canvas_bak).unbind();
+  $(canvas_bak).bind('touchstart', touchstart);
+  $(canvas_bak).bind('touchmove', touchmove);
+  $(canvas_bak).bind('touchend', touchend);
+  $(canvas_bak).bind('mouseout', mouseout);
 }
 
 function GetRequest() {
-	var url = location.search; // 获取url中"?"符后的字串
-	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;
+  var url = location.search; // 获取url中"?"符后的字串
+  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;
 }

+ 4 - 2
screenIos/WXtrialInterface.html

@@ -629,7 +629,9 @@
       Module._free(inputPtr);
       Module._free(retPtr);
     }
-    var decodeWoker = new Worker('decoder.js');
+    var vWidth = Number(parameters['width']) ? Number(parameters['width']) : videoWidth;
+    var vHeight = Number(parameters['height']) ? Number(parameters['height']) : videoHeight;
+    var decodeWoker = new Worker('decoder.js?width=' + vWidth + '&height=' + vHeight);
     var myVideo = document.getElementById("playCanvas");
     decodeWoker.onmessage = function (event) {
       var objData = event.data;
@@ -641,7 +643,7 @@
           if (renderCount++ < 4 || !isAudioPlay) {
             return
           }
-          webglPlayer.renderFrame(objData.data, 720, 1280, 720 * 1280, (720 / 2) * (1280 / 2));
+          webglPlayer.renderFrame(objData.data, vWidth, vHeight, vWidth * vHeight, (vWidth / 2) * (vHeight / 2));
           $('.weui-mask_transparent').hide()
           $('.weui-toast').hide()
           $('.loading').hide()

+ 79 - 61
screenIos/decoder.js

@@ -3,86 +3,104 @@ var decodeCount = 0;
 var h264Queue = [];
 var isFirst = true;
 var ret = ''
+var parameters = GetRequest();
+var videoWidth = parameters['width'];
+var videoHeight = parameters['height'];
 self.Module = {
-	onRuntimeInitialized: function () {
-		ret = Module._openDecoder(720, 1280);
-		if (!ret) {
-			isFinish = true;
-		}
-	}
+  onRuntimeInitialized: function () {
+    ret = Module._openDecoder(videoWidth, videoHeight);
+    if (!ret) {
+      isFinish = true;
+    }
+  }
 };
 
 self.importScripts("ffmpeghelper.js");
 
 self.addEventListener('message', function (e) {
-	h264Queue.push(e.data);
+  h264Queue.push(e.data);
 }, false);
 
 function PrintfLog(str) {
-	var curTime = new Date().getTime();
-	var objData = {
-		cmd: 0,
-		data: str,
-		time: curTime
-	};
-	self.postMessage(objData);
+  var curTime = new Date().getTime();
+  var objData = {
+    cmd: 0,
+    data: str,
+    time: curTime
+  };
+  self.postMessage(objData);
 }
 
 setInterval(
-	function () {
-		if (h264Queue.length > 0 && isFinish) {
-			if (isFirst) {
-				PrintfLog("当前队列大小 :" + h264Queue.length);
-				isFirst = false;
-			}
+  function () {
+    if (h264Queue.length > 0 && isFinish) {
+      if (isFirst) {
+        PrintfLog("当前队列大小 :" + h264Queue.length);
+        isFirst = false;
+      }
 
-			if (h264Queue.length > 10 && isFinish) {
-				PrintfLog("解不过来 " + h264Queue.length);
-				return;
-			}
+      if (h264Queue.length > 10 && isFinish) {
+        PrintfLog("解不过来 " + h264Queue.length);
+        return;
+      }
 
-			decodeH264(h264Queue.shift());
-		}
-	}, 1);
+      decodeH264(h264Queue.shift());
+    }
+  }, 1);
 
 
 function decodeH264(data) {
-	var retPtr = Module._malloc(2457600); //接收的数据
-	var inputPtr = Module._malloc(data.length); //输入数据
-
-	for (var i = 0; i < data.length; i++) {
-		Module.HEAPU8[(inputPtr) + i] = data[i]; //转换为堆数据
-	}
-
-	var time = new Date().getTime();
-	var ret = Module._feedData(inputPtr, data.length, retPtr);
-
-	if (ret >= 0) {
-		if (decodeCount > 50) {
-			var curCost = new Date().getTime() - time;
-			PrintfLog("解码耗时 " + curCost + " ms");
-			decodeCount = 0;
-		}
-		decodeCount++;
-	}
-
-	var yuvData = new Uint8Array(2457600);
-	for (var i = 0; i < yuvData.length; i++) {
-		yuvData[i] = Module.HEAPU8[(retPtr) + i];
-	}
-
-	var curTime = new Date().getTime();
-	var objData = {
-		cmd: 1,
-		data: yuvData,
-		time: curTime
-	};
-	self.postMessage(objData);
-	Module._free(inputPtr);
-	Module._free(retPtr);
+  var size = videoWidth * videoHeight *3;
+  var retPtr = Module._malloc(size); //接收的数据
+  var inputPtr = Module._malloc(data.length); //输入数据
+
+  for (var i = 0; i < data.length; i++) {
+    Module.HEAPU8[(inputPtr) + i] = data[i]; //转换为堆数据
+  }
+
+  var time = new Date().getTime();
+  var ret = Module._feedData(inputPtr, data.length, retPtr);
+
+  if (ret >= 0) {
+    if (decodeCount > 50) {
+      var curCost = new Date().getTime() - time;
+      PrintfLog("解码耗时 " + curCost + " ms");
+      decodeCount = 0;
+    }
+    decodeCount++;
+  }
+
+  var yuvData = new Uint8Array(size);
+  for (var i = 0; i < yuvData.length; i++) {
+    yuvData[i] = Module.HEAPU8[(retPtr) + i];
+  }
+
+  var curTime = new Date().getTime();
+  var objData = {
+    cmd: 1,
+    data: yuvData,
+    time: curTime
+  };
+  self.postMessage(objData);
+  Module._free(inputPtr);
+  Module._free(retPtr);
 }
 
 
 function closeDecoder() {
-	Module._destroyDecoder();
+  Module._destroyDecoder();
 }
+
+// 获取url中"?"符后的字串
+function GetRequest() {
+  var url = location.search;
+  var obj = new Object();
+  if (url.indexOf("?") != -1) {
+    var str = url.substring(1);
+    strs = str.split("&");
+    for (var i = 0; i < strs.length; i++) {
+      obj[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
+    }
+  }
+  return obj;
+}