huangxiaojing hace 4 años
padre
commit
6c567017bd
Se han modificado 6 ficheros con 228 adiciones y 529 borrados
  1. 94 173
      screenIos/WXdraw.js
  2. 72 266
      screenIos/WXtrialInterface.html
  3. 3 40
      screenIos/decoder.js
  4. 13 19
      screenIos/helper.js
  5. 11 11
      screenIos/pcm-player.js
  6. 35 20
      screenIos/websocket.js

+ 94 - 173
screenIos/WXdraw.js

@@ -1,73 +1,22 @@
-//画布
-var canvas;
-var context;
-//蒙版
+// 蒙版
 var canvas_bak = document.getElementById("box");;
-var context_bak;
 
-var canvasWidth = 720;
-var canvasHeight = 1280;
-
-var canvasTop;
-var canvasLeft;
-var winHeight = window.screen.height - window.innerHeight
-var vowidth = window.screen.width
+var winHeight = window.screen.height - window.innerHeight;
+var vowidth = window.screen.width;
 var topwinHeightDraw = window.screen.height - window.innerHeight + 30; //计算title top 头部
-var numse = window.screen.height //-winHeight
+var numse = window.screen.height // -winHeight
 //计算title top 头部
 if (numse <= 70) {
-
 	var voheight = window.screen.height - winHeight - 34 - 20
 } else {
-	console.log("numse>>>", numse)
 	var voheight = window.screen.height - topwinHeightDraw - 20
 }
 
 //画笔大小
-var size = 1;
-var color = '#000000';
-var resolving
+var resolving;
 var url = window.location.href;
-url = url.split('/')
-
-var query = window.location.search.substring(1);
-var vars = query.split("&");
-var data = {}
-var clientType = vars.find(e => {
-	return e.startsWith('clientType')
-}) || ''
-var cardIp = vars.find(e => {
-	return e.startsWith('cardIp')
-}) || ''
-var port = vars.find(e => {
-	return e.startsWith('port')
-}) || ''
-
-var sn = vars.find(e => {
-	return e.startsWith('sn')
-}) || ''
-var username = vars.find(e => {
-	return e.startsWith('username')
-}) || ''
-var userCardId = vars.find(e => {
-	return e.startsWith('userCardId')
-}) || ''
-var ip = vars.find(e => {
-	return e.startsWith('ip')
-}) || ''
-
-var data = {}
-data.clientType = clientType.substring(11, clientType.length)
-
-data.cardIp = cardIp.substring(7, cardIp.length)
+url = url.split('/');
 
-data.port = port.substring(5, port.length)
-
-data.sn = sn.substring(3, sn.length)
-data.username = username.substring(9, username.length)
-data.userCardId = userCardId.substring(11, userCardId.length)
-data.ip = ip.substring(3, ip.length)
-urlss = '192.168.31.20'
 var parameters = GetRequest();
 
 var form = {};
@@ -81,40 +30,61 @@ form.ip = parameters['ip'];
 form.domainName = parameters["domainName"];
 var isWSS = false;
 var cUrl = isWSS ? "wss://" + form.domainName + "/card?cardIp=" + form.ip : "ws://" + form.domainName + "/card?cardIp=" + form.ip;
-console.log(cUrl, 'curl')
-var wsss = new WebSocket(cUrl);
-console.log('wsssss==============', wsss)
-wsss.binaryType = 'arraybuffer';
 
-wsss.onopen = function () {
-	var pings = {
-		"event": "getScreenStatus"
-	}
-	wsss.send(JSON.stringify(pings));
-	var bitRate = {
-		"data": {
-			"bitRate": 2243000
-		},
-		"event": "bitRate"
-	}
-	console.log('打开安卓卡wsss.onopen========', data.sn)
-	wsss.send(ExexuteMove(JSON.stringify(bitRate), data.sn))
-};
-wsss.onmessage = function (event) {
+var wsss;
+doConnect();
+function doConnect() {
+	wsss = new WebSocket(cUrl);
+	wsss.binaryType = 'arraybuffer';
 
-};
-wsss.onclose = function (event) {
-	console.log("onclose==============");
-};
-wsss.onerror = function (event) {
-	console.log("onerror==============");
-};
+	wsss.onopen = function () {
+		var pings = {
+			"event": "getScreenStatus"
+		}
+		wsss.send(JSON.stringify(pings));
+		var bitRate = {
+			"data": {
+				"bitRate": 2243000
+			},
+			"event": "bitRate"
+		}
+		wsss.send(ExexuteMove(JSON.stringify(bitRate), form.sn))
+	};
+	wsss.onclose = function () {
+		$.confirm({
+			title: '提示',
+			text: '连接断开,是否准备重连?',
+			onOK: function () {
+				doConnect();
+			},
+			onCancel: function () {
+				wx.miniProgram.switchTab({
+					url: '/pages/home/home'
+				})
+			}
+		});
+	};
+	wsss.onerror = function () {
+		$.confirm({
+			title: '提示',
+			text: '连接断开,是否准备重连?',
+			onOK: function () {
+				doConnect();
+			},
+			onCancel: function () {
+				wx.miniProgram.switchTab({
+					url: '/pages/home/home'
+				})
+			}
+		});
+	};
+}
 $('#box').on("click", function () {
 	draw_graph('pencil', this)
 })
 //剪切板
 $(".upload").on("click", function () {
-	let texts = $(this).attr("data-text")
+	var texts = $(this).attr("data-text")
 	if (texts == "uploads") {
 		$(".mainbox").css({
 			"display": "block"
@@ -122,55 +92,39 @@ $(".upload").on("click", function () {
 		$(".sbox").css({
 			"display": "none"
 		})
-	} else if (texts == "Signout") {
-		//		alert()
-
 	}
 })
 
 //home 控制home
 $(".botmat1img").on("click", function () {
-	let codes = $(this).attr("data-text")
-	console.log("homehomehome---------", codes)
+	var codes = $(this).attr("data-text")
 	if (codes == "home") {
-		console.log("打印主页json", data.sn)
-		wsss.send(ExexuteKeyBoard(3, data.sn));
+		wsss.send(ExexuteKeyBoard(3, form.sn));
 	} else if (codes == "return") {
-		wsss.send(ExexuteKeyBoard(4, data.sn));
+		wsss.send(ExexuteKeyBoard(4, form.sn));
 	} else if (codes == "gengduo") {
-		wsss.send(ExexuteKeyBoard(187, data.sn));
+		wsss.send(ExexuteKeyBoard(187, form.sn));
 	}
-
 })
 //高清控制
 $(".PictureQuality").on("click", function () {
 	$(this).addClass("avit").siblings().removeClass('avit')
-	let id = $(this).attr("data-id")
+	var id = $(this).attr("data-id")
 	var bitRate = {
 		"data": {
 			"bitRate": id
 		},
 		"event": "bitRate"
 	}
-	console.log('打开安卓卡11==============', data.sn)
-	wsss.send(ExexuteMove(JSON.stringify(bitRate), data.sn))
-	console.log(id)
+	wsss.send(ExexuteMove(JSON.stringify(bitRate), form.sn))
 })
-
+var canDraw = false;
 //画图形
-var draw_graph = function (graphType, obj) {
-	console.log('111》》》', graphType)
+var draw_graph = function (graphType) {
 	//把蒙版放于画板上面
 	$("#container").css("z-index", 30);
 	$("#dedit").css("z-index", 20);
-	//先画在蒙版上 再复制到画布上
-
-	chooseImg(obj);
-	var canDraw = false;
-
-	var startX;
-	var startY;
-
+	// 先画在蒙版上 再复制到画布上
 	//鼠标按下获取 开始xy开始画图
 	var touchstart = function (e) {
 		$('.control-right-img').attr({
@@ -179,16 +133,13 @@ var draw_graph = function (graphType, obj) {
 		$(".leftmains").css({
 			"right": "-4rem"
 		})
-		//		.toFixed(2)
 		var touchfor = e.originalEvent.targetTouches; //for 的手指数组
-		var touch = e.originalEvent.targetTouches[0];
-		var thochlethng = e.originalEvent.targetTouches.length
 		//是否横屏
 		if (resolving == 0) {
-			let ping
-			for (let i = 0; i < touchfor.length; i++) {
-				let cawidthXs = touchfor[i].pageY * (1280 / voheight)
-				let caheightYs = 720 - touchfor[i].pageX * (720 / vowidth)
+			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)
 				ping = {
 					"data": {
 						"action": 0,
@@ -200,14 +151,12 @@ var draw_graph = function (graphType, obj) {
 					"event": "0"
 				}
 			}
-			console.log('打开安卓卡鼠标按下获取 开始xy开始画图======', data.sn)
-			wsss.send(ExexuteMove(JSON.stringify(ping), data.sn))
-			console.log("鼠标按下>>>", ping, data.sn)
+			wsss.send(ExexuteMove(JSON.stringify(ping), form.sn))
 		} else {
-			let ping
-			for (let i = 0; i < touchfor.length; i++) {
-				let cawidthXs = touchfor[i].pageX * (720 / vowidth)
-				let caheightYs = touchfor[i].pageY * (1280 / voheight)
+			var ping
+			for (var i = 0; i < touchfor.length; i++) {
+				var cawidthXs = touchfor[i].pageX * (720 / vowidth)
+				var caheightYs = touchfor[i].pageY * (1280 / voheight)
 				ping = {
 					"data": {
 						"action": 0,
@@ -220,9 +169,7 @@ var draw_graph = function (graphType, obj) {
 				}
 
 			}
-			console.log('打开安卓卡=22=============', data.sn)
-			wsss.send(ExexuteMove(JSON.stringify(ping), data.sn))
-			console.log("鼠标按下>>>", ping, data.sn)
+			wsss.send(ExexuteMove(JSON.stringify(ping), form.sn))
 		}
 
 		canDraw = true;
@@ -232,14 +179,12 @@ var draw_graph = function (graphType, obj) {
 	//鼠标离开 把蒙版canvas的图片生成到canvas中
 	var touchend = function (e) {
 		var touchfor = e.originalEvent.changedTouches; //for 的手指数组
-		var touch = e.originalEvent.changedTouches[0];
-		var thochlethng = e.originalEvent.changedTouches.length
 		//是否横屏 morePortionUp
 		if (resolving == 0) {
-			let ping
-			for (let i = 0; i < touchfor.length; i++) {
-				let cawidthXs = touchfor[i].pageY * (1280 / voheight)
-				let caheightYs = 720 - touchfor[i].pageX * (720 / vowidth)
+			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)
 				ping = {
 					"data": {
 						"action": 1,
@@ -251,15 +196,12 @@ var draw_graph = function (graphType, obj) {
 					"event": "1"
 				}
 			}
-
-			console.log('打开安卓卡==33============', data.sn)
-			wsss.send(ExexuteMove(JSON.stringify(ping), data.sn))
-
+			wsss.send(ExexuteMove(JSON.stringify(ping), form.sn))
 		} else {
-			let ping
-			for (let i = 0; i < touchfor.length; i++) {
-				let cawidthXs = touchfor[i].pageX * (720 / vowidth)
-				let caheightYs = touchfor[i].pageY * (1280 / voheight)
+			var ping
+			for (var i = 0; i < touchfor.length; i++) {
+				var cawidthXs = touchfor[i].pageX * (720 / vowidth)
+				var caheightYs = touchfor[i].pageY * (1280 / voheight)
 				ping = {
 					"data": {
 						"action": 1,
@@ -271,35 +213,26 @@ var draw_graph = function (graphType, obj) {
 					"event": "1"
 				}
 			}
-
-			console.log('打开安卓卡=55=============', data.sn)
-			wsss.send(ExexuteMove(JSON.stringify(ping), data.sn))
+			wsss.send(ExexuteMove(JSON.stringify(ping), form.sn))
 		}
-
 		canDraw = false;
-
 	};
 
 	//清空层 云手机超出屏幕的开关
-	var clearContext = function (type) {
+	var clearContext = function () {
 		canDraw = false;
 	}
 
 	// 鼠标移动
 	var touchmove = function (e) {
-
 		e = e || window.event;
 		var touchfor = e.originalEvent.targetTouches; //for 的手指数组
-		var touch = e.originalEvent.targetTouches[0];
-		var thochlethng = e.originalEvent.targetTouches.length
-		let ping
+		var ping
 		//是否横屏  morePortionMove
 		if (resolving == 0) {
-			let obj = []
-			for (let i = 0; i < touchfor.length; i++) {
-				let cawidthXs = touchfor[i].pageY * (1280 / voheight)
-				let caheightYs = 720 - touchfor[i].pageX * (720 / vowidth)
-
+			for (var i = 0; i < touchfor.length; i++) {
+				var cawidthXs = touchfor[i].pageY * (1280 / voheight)
+				var caheightYs = 720 - touchfor[i].pageX * (720 / vowidth)
 				ping = {
 					"data": {
 						"action": 2,
@@ -310,16 +243,13 @@ var draw_graph = function (graphType, obj) {
 					},
 					"event": "2"
 				}
-
 			}
-
-			console.log('打开安卓卡==66============', data.sn)
-			wsss.send(ExexuteMove(JSON.stringify(ping), data.sn))
+			wsss.send(ExexuteMove(JSON.stringify(ping), form.sn))
 		} else {
-			let ping
-			for (let i = 0; i < touchfor.length; i++) {
-				let cawidthXs = touchfor[i].pageX * (720 / vowidth)
-				let caheightYs = touchfor[i].pageY * (1280 / voheight)
+			var ping
+			for (var i = 0; i < touchfor.length; i++) {
+				var cawidthXs = touchfor[i].pageX * (720 / vowidth)
+				var caheightYs = touchfor[i].pageY * (1280 / voheight)
 				ping = {
 					"data": {
 						"action": 2,
@@ -330,10 +260,8 @@ var draw_graph = function (graphType, obj) {
 					},
 					"event": "2"
 				}
-
 			}
-			console.log('打开安卓卡==88============', data.sn)
-			wsss.send(ExexuteMove(JSON.stringify(ping), data.sn))
+			wsss.send(ExexuteMove(JSON.stringify(ping), form.sn))
 		}
 	};
 
@@ -341,10 +269,8 @@ var draw_graph = function (graphType, obj) {
 	var mouseout = function () {
 		if (graphType != 'handwriting') {
 			clearContext();
-
 		}
 	}
-
 	$(canvas_bak).unbind();
 	$(canvas_bak).bind('touchstart', touchstart);
 	$(canvas_bak).bind('touchmove', touchmove);
@@ -352,11 +278,6 @@ var draw_graph = function (graphType, obj) {
 	$(canvas_bak).bind('mouseout', mouseout);
 }
 
-//选择功能按钮 修改样式
-function chooseImg(obj) {
-
-}
-
 function GetRequest() {
 	var url = location.search; // 获取url中"?"符后的字串
 	var obj = new Object();

+ 72 - 266
screenIos/WXtrialInterface.html

@@ -4,35 +4,23 @@
 <head>
 	<meta charset="utf-8">
 	<title></title>
-	<meta http-equiv="X-UA-Compatible" content="IE=edge">
-	<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1,user-scalable=no">
 	<meta name="x5-orientation" content="portrait" />
 	<meta name="screen-orientation" content="portrait" />
-	<meta name="viewport" content="width=device-width, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
-
-	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
 	<meta name="apple-mobile-web-app-capable" content="yes">
-	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<meta name="format-detection" content="telephone=no, email=no">
 	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-	<meta name="apple-mobile-web-app-capable" content="yes">
 	<!-- 删除苹果默认的工具栏和菜单栏 -->
 	<meta name="apple-mobile-web-app-status-bar-style" content="black">
-	<!-- 设置苹果工具栏颜��? -->
+	<!-- 设置苹果工具栏颜 -->
 	<meta name="format-detection" content="telphone=no, email=no">
 	<!-- 忽略页面中的数字识别为电话,忽略email识别 -->
-	<!-- 启用360浏览器的极速模��?(webkit) -->
+	<!-- 启用360浏览器的极速模(webkit) -->
 	<meta name="renderer" content="webkit">
 	<!-- 避免IE使用兼容模式 -->
 	<meta http-equiv="X-UA-Compatible" content="IE=edge">
-	<!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑��? -->
+	<!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑 -->
 	<meta name="HandheldFriendly" content="true">
-	<!-- 微软的老式浏览��? -->
+	<!-- 微软的老式浏览 -->
 	<meta name="MobileOptimized" content="320">
-	<!-- uc强制竖屏 -->
-	<!-- <meta name="screen-orientation" content="portrait"> -->
-	<!-- QQ强制竖屏 -->
-	<!-- <meta name="x5-orientation" content="portrait"> -->
 	<!-- 不能旋转,问题出在这 -->
 	<!-- UC强制全屏 -->
 	<meta name="full-screen" content="yes">
@@ -42,25 +30,21 @@
 	<meta name="browsermode" content="application">
 	<!-- QQ应用模式 -->
 	<meta name="x5-page-mode" content="app">
-	<!-- windows phone 点击无高��? -->
+	<!-- windows phone 点击无高 -->
 	<meta name="msapplication-tap-highlight" content="no">
-	<title></title>
 	<link rel="stylesheet" type="text/css" href="css/WXtrialInterface.css" />
+	<link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css">
+	<link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css">
 </head>
 
 <body class="scroll h-player" style="overscroll-behavior: contain;">
-
 	<div class="container" id="player">
 		<div class="muted" id="btnMuted">
 			<div class="control-right-img" data-id="1">
 				<img src="../static/img/xuanfu_icon.png">
 			</div>
 		</div>
-
 		<div id="wine">
-
-			<!-- <video id="video1" muted="muted" x5-video-orientation="landscape" playsinline="true" autoplay="true"
-				 webkit-playsinline="true" x5-playsinline="true" x5-video-player-type="h5" x5-video-player-fullscreen="false" style="pointer-events: none;"></video> -->
 			<div id="box">
 				<canvas id="playCanvas" width="450" height="800"></canvas>
 			</div>
@@ -72,7 +56,6 @@
 				<div class="PictureQuality" data-id="400000">极速</div>
 				<div class="PictureQuality" data-id="400000">自动</div>
 			</div>
-
 			<div class="operation">
 				<div class="upload" id="showsuss" data-text="uploads">
 					<img src="../static/img/wx/shangchuan_icon.png">
@@ -87,79 +70,75 @@
 					<div>退出</div>
 				</div>
 			</div>
-
 		</div>
 		<div class="bottommains">
 			<div class="botmat1">
 				<div class="botmat1img" data-text="gengduo">
 					<img src="../static/img/wx/gengduo_icon.png">
 				</div>
-
 			</div>
 			<div class="botmat1">
 				<div class="botmat1img" data-text="home">
 					<img src="../static/img/wx/home_icon.png">
 				</div>
-
 			</div>
 			<div class="botmat1">
 				<div class="botmat1img" data-text="return">
 					<img src="../static/img/wx/fanhui_icon.png">
 				</div>
-
 			</div>
 		</div>
-
 		<div class="mainbox" style="display: none;">
 			<div class="boxTitle">提示</div>
 			<div class="boxText">
 				<div>由于小程序的功能限制,此功能暂时</div>
 				<div>无法使用,请下载APP使用更多功能</div>
-
 			</div>
 			<div class="boxbt" onclick="cp(document.getElementById('user_ref_id'));">立即前往下载</div>
-
 			<div class="boximg"><img src="../static/img/wx/guanbi_icon.png"></div>
 		</div>
-
 		<div class="sbox" style="display: none;">
 			<div class="sboxText">下载地址已复制到剪切板</div>
 			<div class="sboxbu">确定</div>
 		</div>
-
+		<div class="loading"></div>
+	</div>
+	<div class="weui-mask_transparent"></div>
+	<div class="weui-toast weui_loading_toast weui-toast--visible">
+		<div class="weui_loading"><i class="weui-loading weui-icon_toast"></i></div>
+		<p class="weui-toast_content">数据加载中</p>
 	</div>
-
 	<div id="copy-txt" style="position: absolute;opacity: 0;">
 		<span id="user_ref_id">www.androidsCloud.com</span>
 	</div>
-
 	<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
-	<script src="../static/js/jquery-1.11.0.min.js"></script>
+	<script type="text/javascript" src="jquery-1.11.0.min.js"></script>
 	<!-- ffm软解 -->
 	<script type="text/javascript" src="helper.js"></script>
 	<script type="text/javascript" src="pcm-player.js"></script>
 	<script type="text/javascript" src="webgl.js"></script>
-	<script src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
-	<script src="WXdraw.js?id=105"></script>
+	<script type="text/javascript" src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
+	<script type="text/javascript" src="jquery-weui.min.js"></script>
+	<script type="text/javascript" src="WXdraw.js?id=105"></script>
 
 	<script>
 		var topwinHeight = window.screen.height - window.innerHeight + 30; //计算title top 头部
 		$('#wine').css({
 			"width": window.screen.width,
 			"height": window.screen.height - topwinHeight - 20,
-			"position": "absolute",
-
+			"position": "absolute"
 		})
+		$('.loading').css({
+			"width": window.screen.width,
+			"height": window.screen.height - topwinHeight - 20
+		});
 		var winese = document.createElement("wine");
 		wine.style.top = "-" + winese + 'px';
 
 		var url = window.location.href;
-		url = url.split('/')
-		var query = window.location.search.substring(1);
-		var vars = query.split("&");
-		console.log(vars)
+		url = url.split('/');
 		var baseUrl = "http://192.168.199.243";
-		var data = {}
+		var form = {}
 		//			 审核
 		$.ajax({
 			url: baseUrl + "/api/user/v1/config/download/isShow",
@@ -167,175 +146,50 @@
 			type: 'get',
 			dataType: 'json',
 			success: function (data) {
-
 				if (data.data) {
 					$("#showsuss").show()
 				} else {
 					$("#showsuss").hide()
 				}
-				//                       
 			}
 		})
-		var clientType = vars.find(e => {
-			return e.startsWith('clientType')
-		}) || ''
-		// console.log(clientType)
-		data.clientType = clientType.substring(11, clientType.length)
-		//			小程序直接进入
-		var diskName = vars.find(e => {
-			return e.startsWith('diskName')
-		}) || ''
-
-		data.diskName = diskName.substring(9, diskName.length)
-
-		// document.title = decodeURI(data.diskName)
-		if (data.clientType == 1) {
-			var cardIp = vars.find(e => {
-				return e.startsWith('cardIp')
-			}) || ''
-			var port = vars.find(e => {
-				return e.startsWith('port')
-			}) || ''
-
-			var sn = vars.find(e => {
-				return e.startsWith('sn')
-			}) || ''
-			var demoTime = vars.find(e => {
-				return e.startsWith('demoTime')
-			}) || ''
-			var id = vars.find(e => {
-				return e.startsWith('id')
-			}) || ''
-
-
-			data.clientType = clientType.substring(11, clientType.length)
-
-			data.cardIp = cardIp.substring(7, cardIp.length)
-
-			data.port = port.substring(5, port.length)
-
-			data.sn = sn.substring(3, sn.length)
-
-			data.demoTime = demoTime.substring(9, demoTime.length)
-			data.id = id.substring(3, id.length)
-			console.log("打印sn卡", data.sn)
-
-		} else if (data.clientType == 2) { //分享屏幕
-			console.log("走到分享屏幕里面啦==========", data.clientTypes);
+		var parameters = GetRequest();
+		form.clientType = parameters['clientType'];
+		form.diskName = parameters['clientType'];
+
+		if (form.clientType == 1) {
+			form.cardIp = parameters['cardIp'];
+			form.port = parameters['port'];
+			form.sn = parameters['sn'];
+			form.demoTime = parameters['demoTime'];
+			form.id = parameters['id'];
+		} else if (form.clientType == 2) { // 分享屏幕
 			$(".leftmains").css({
 				"right": "-4rem"
 			})
 			$('.leftmains').hide()
 			$('.bottommains').hide()
 			$('#btnMuted').hide()
-			let ip = vars.find(e => {
-				return e.startsWith('ip')
-			}) || ''
-			var username = vars.find(e => {
-				return e.startsWith('username')
-			}) || ''
-			var id = vars.find(e => {
-				return e.startsWith('id')
-			}) || ''
-			var userCardId = vars.find(e => {
-				return e.startsWith('userCardId')
-			}) || ''
-			data.id = id.substring(3, id.length)
-			data.username = username.substring(9, username.length)
-			data.ip = ip.substring(3, ip.length)
-			data.userCardId = userCardId.substring(11, userCardId.length)
+
+			form.id = parameters['id'];
+			form.username = parameters['username'];
+			form.ip = parameters['ip'];
+			form.userCardId = parameters['userCardId'];
 		} else {
-			var username = vars.find(e => {
-				return e.startsWith('username')
-			}) || ''
-
-			var userCardId = vars.find(e => {
-				return e.startsWith('userCardId')
-			}) || ''
-			data.username = username.substring(9, username.length)
-			data.userCardId = userCardId.substring(11, userCardId.length)
-			console.log(data.ip)
+			form.username = parameters['username'];
+			form.userCardId = parameters['userCardId'];
 		}
 
 		var orientation = 0 //0 竖屏,1横屏
-		var winHeight = window.screen.height - window.innerHeight
-		// var urlss = url[2]
-		// var urlss='192.168.31.20'
-		// var urlss = "14.215.128.96"
-		var urlss = 'test.androidscloud.com'
+
 		document.body.addEventListener('touchmove', function (e) {
 			e.preventDefault()
 		}, {
 			passive: false
 		})
 
-		var warid = {
-			id: data.id,
-			type: 1,
-			sn: data.sn
-		}
-		//结束时间 type=2
-		var warids = {
-			id: data.id,
-			type: 2,
-			sn: data.sn
-		}
-		//撤销的array
-		var cancelList = new Array();
-		//撤销的次数
-		var cancelIndex = 0;
-		var inputType = 0 //输入类型 0:手写,1:键盘输入
-		//判断是否ie
-		var IE_HACK = (/msie/i.test(navigator.userAgent) &&
-			!/opera/i.test(navigator.userAgent));
-
-		$(function () {
-			initCanvas();
-		});
-		//初始化
-		var initCanvas = function () {
-
-		}
-
-		window.onload = function () { };
-
-		$("#voew").on("click", function () { })
-
-		$("#box").on("click", function () {
-
-		})
-
-		$('#mocan').on('click', function () {
-			draw_graph('pencil', this)
-		})
-
-		// //初始化一下就可以了,
-		let vConsole = new VConsole();
-		//			 //你打印的数据 比如
-		console.log('test');
-		//就可像小程序一样的看了和调试了。
-		$('.no-ne-an').on('click', function () {
-			//结束时间 type=2
-			let warids = {
-				id: data.id,
-				type: 2,
-				sn: data.sn
-			}
-			$.ajax({
-				url: baseUrl + "/api/game/v1/cloudGame/dev/getSn",
-				data: warid,
-				type: 'get',
-				dataType: 'json',
-				success: function (data) {
-					history.go(-1)
-					if (data.status == 0) {
-
-					} else {
-						alert(data.msg)
-					}
-				}
-			})
-		})
+		// 初始化一下就可以了,
+		var vConsole = new VConsole();
 
 		var btnMuted = document.querySelector("#btnMuted");
 		btnMuted && (function () {
@@ -365,7 +219,7 @@
 					left: rect.left,
 					width: rect.width,
 					height: rect.height
-				}; //部分低版本浏览器,该属性为只读
+				}; // 部分低版本浏览器,该属性为只读
 				if (loc) {
 					rect.left = loc.left;
 					rect.top = loc.top;
@@ -381,7 +235,6 @@
 				left = Math.max(left, minX);
 				top = Math.min(top, maxY);
 				top = Math.max(top, minY);
-				console.log(rect.top, top, loc);
 				if (loc || top !== rect.top || left !== rect.left) {
 					btnMuted.style.cssText += "left:" + left + "px;top:" + top + "px;";
 				}
@@ -431,7 +284,6 @@
 					fixLoc();
 				} else {
 					//按点击处理
-
 					var set = $('.control-right-img').attr("data-id")
 					if (set == '1') {
 						$('.control-right-img').attr({
@@ -440,10 +292,7 @@
 						$(".leftmains").css({
 							"right": "-4rem"
 						})
-						// console.log(players)
-						// players.play();
 					} else {
-
 						$('.control-right-img').attr({
 							"data-id": "1"
 						})
@@ -454,6 +303,7 @@
 					}
 				}
 			}
+
 			btnMuted.addEventListener("touchstart", function (e) {
 				e.preventDefault();
 				toMove = false;
@@ -469,7 +319,6 @@
 				window.addEventListener("touchend", touchend, {
 					passive: false
 				});
-
 			}, {
 				passive: false
 			});
@@ -486,13 +335,13 @@
 			})
 		})
 
-		//			剪切板
+		// 剪切板
 		$(".sboxbu").on("click", function () {
 			$(".sbox").css({
 				"display": "none"
 			})
 		})
-		//			剪切板
+		// 剪切板
 		$(".uploadss").on("click", function () {
 			$(".sbox").css({
 				"display": "none"
@@ -542,7 +391,6 @@
 
 		Module = {};
 		Module.onRuntimeInitialized = function () {
-			console.log("Wasm 加载成功!")
 			isFinish = true;
 		}
 
@@ -550,7 +398,7 @@
 			var retPtr = Module._malloc(4 * 5 * 1024); //接收的数据
 			var inputPtr = Module._malloc(4 * data.length); //输入数据
 
-			for (i = 0; i < data.length; i++) {
+			for (var i = 0; i < data.length; i++) {
 				Module.HEAPU8[(inputPtr) + i] = data[i]; //转换为堆数据
 			}
 
@@ -558,20 +406,16 @@
 
 			if (pcmLen >= 0) {
 				var pcmData = new Uint8Array(pcmLen);
-				for (i = 0; i < pcmLen; i++) {
+				for (var i = 0; i < pcmLen; i++) {
 					pcmData[i] = Module.HEAPU8[(retPtr) + i]
 				}
 
 				player.feed(pcmData);
-			} else {
-				console.log("%d帧 aac 解码失败, %d", decodeCount, pcmLen);
 			}
-
 			decodeCount++;
 			Module._free(inputPtr);
 			Module._free(retPtr);
 		}
-
 		var decodeWoker = new Worker('decoder.js');
 		var myVideo = document.getElementById("playCanvas");
 		decodeWoker.onmessage = function (event) {
@@ -581,22 +425,18 @@
 				case 0:
 					break;
 				case 1:
-					var time = new Date().getTime();
 					webglPlayer.renderFrame(objData.data, 720, 1280, 720 * 1280, (720 / 2) * (1280 / 2));
+					$('.weui-mask_transparent').hide()
+					$('.weui-toast').hide()
+					$('.loading').hide()
 			}
 		}
 
-
-		if (typeof (Worker) !== "undefined") {
-			console.log("支持webworker");
-		} else {
-			alert("不支持webworker");
-		}
-
 		var isFinish = false;
 		var webglPlayer = new WebGLPlayer(myVideo, {
 			preserveDrawingBuffer: false
 		});
+
 		function GetRequest() {
 			var url = location.search; // 获取url中"?"符后的字串
 			var obj = new Object();
@@ -609,34 +449,35 @@
 			}
 			return obj;
 		}
-		var parameters = GetRequest();
 		var ip = parameters["ip"];
 		var domainName = parameters["domainName"];
 		var webSocketWorker = new Worker('websocket.js?ip=' + ip + '&domainName=' + domainName);
-		var startTime = new Date().getTime();
-
-
 
 		webSocketWorker.onmessage = function (event) {
-			var input = event.data
+			var input = event.data;
 			if (input[0] == 0xff) {
 				decodeAAC(input);
 			}
 			if (input[0] == 0 && input[1] == 0 && input[2] == 0 && input[3] == 1) {
 				decodeWoker.postMessage(event.data);
 			}
-		}
-
-		document.addEventListener("visibilitychange", () => {
-			if (document.visibilityState == "visible") {
-
-			} else {
-				console.log("页面不可见");
+			if (event.data === 'close') {
+				$.confirm({
+					title: '提示',
+					text: '连接断开,是否准备重连?',
+					onOK: function () {
+						webSocketWorker.postMessage('restart');
+					},
+					onCancel: function () {
+						wx.miniProgram.switchTab({
+							url: '/pages/home/home'
+						})
+					}
+				});
 			}
-		});
+		}
 
-		function Close() //webworker 关闭,清理
-		{
+		function Close() { // webworker 关闭,清理
 			var cmd = {
 				cmd: 0
 			};
@@ -647,44 +488,9 @@
 		}
 
 		var isDrag = false;
-		// myVideo.onmousedown = function (event) {
-		// 	console.log('5555555555安卓卡', data.sn)
-		// 	if (event.button == 0) {
-		// 		var posX = event.offsetX * 720 * 1.0 / myVideo.clientWidth;
-		// 		var posY = event.offsetY * 1280 * 1.0 / myVideo.clientHeight;
-		// 		var buffer = ExexuteMouseDown(posX.toString(), posY.toString(), data.sn);
-		// 		// console.log('55555', buffer)
-		// 		webSocketWorker.postMessage(buffer);
-		// 		isDrag = true;
-		// 	}
-
-		// }
-
-		// myVideo.onmousemove = function (event) {
-		// 	if (isDrag && event.button == 0) {
-		// 		var posX = event.offsetX * 720 * 1.0 / myVideo.clientWidth;
-		// 		var posY = event.offsetY * 1280 * 1.0 / myVideo.clientHeight;
-		// 		var buffer = ExexuteMouseMove(posX.toString(), posY.toString(), data.sn);
-		// 		console.log('55555', buffer)
-		// 		webSocketWorker.postMessage(buffer);
-		// 		console.log("移动位置 %d, %d", posX, posY);
-		// 	}
-
-		// }
-
-		// myVideo.onmouseup = function (event) {
-		// 	console.log('5555555555')
-		// 	isDrag = false;
-		// 	var posX = event.offsetX * 720 * 1.0 / myVideo.clientWidth;
-		// 	var posY = event.offsetY * 1280 * 1.0 / myVideo.clientHeight;
-		// 	var buffer = ExexuteMouseUp(posX.toString(), posY.toString(), data.sn);
-		// 	webSocketWorker.postMessage(buffer);
-
-		// }
 
 		myVideo.onkeydown = function (event) {
-			console.log('5555555555')
-			ExexuteKeyDown(e.keyCode, data.sn);
+			ExexuteKeyDown(e.keyCode, form.sn);
 		}
 	</script>
 	<script type="text/javascript" src="aac.js"></script>

+ 3 - 40
screenIos/decoder.js

@@ -8,7 +8,6 @@ self.Module = {
 		ret = Module._openDecoder(720, 1280);
 		if (!ret) {
 			isFinish = true;
-			console.log("打开编码器成功");
 		}
 	}
 };
@@ -17,13 +16,6 @@ self.importScripts("ffmpeghelper.js");
 
 self.addEventListener('message', function (e) {
 	h264Queue.push(e.data);
-	var AACdata = e.data;
-	if (!ret) {
-		console.log("打开编码器成功");
-		if (AACdata[0] == 0xff && isFinish) {
-		} else { }
-	}
-
 }, false);
 
 function PrintfLog(str) {
@@ -36,32 +28,6 @@ function PrintfLog(str) {
 	self.postMessage(objData);
 }
 
-function decodeAAC(data) {
-	var retPtr = Module._malloc(4 * 5 * 1024); //接收的数据
-	var inputPtr = Module._malloc(4 * data.length); //输入数据
-
-	for (i = 0; i < data.length; i++) {
-		Module.HEAPU8[(inputPtr) + i] = data[i]; //转换为堆数据
-	}
-
-	var pcmLen = Module._feedData(retPtr, inputPtr, data.length);
-
-	if (pcmLen > 0) {
-		var pcmData = new Uint8Array(pcmLen);
-		for (i = 0; i < pcmLen; i++) {
-			pcmData[i] = Module.HEAPU8[(retPtr) + i]
-		}
-
-		player.feed(pcmData);
-	} else {
-		console.log("%d帧 aac 解码失败, %d", decodeCount, pcmLen);
-	}
-
-	decodeCount++;
-	Module._free(inputPtr);
-	Module._free(retPtr);
-}
-
 setInterval(
 	function () {
 		if (h264Queue.length > 0 && isFinish) {
@@ -76,8 +42,6 @@ setInterval(
 			}
 
 			decodeH264(h264Queue.shift());
-		} else {
-
 		}
 	}, 1);
 
@@ -86,7 +50,7 @@ function decodeH264(data) {
 	var retPtr = Module._malloc(2457600); //接收的数据
 	var inputPtr = Module._malloc(data.length); //输入数据
 
-	for (i = 0; i < data.length; i++) {
+	for (var i = 0; i < data.length; i++) {
 		Module.HEAPU8[(inputPtr) + i] = data[i]; //转换为堆数据
 	}
 
@@ -100,11 +64,10 @@ function decodeH264(data) {
 			decodeCount = 0;
 		}
 		decodeCount++;
-	} else {
 	}
 
 	var yuvData = new Uint8Array(2457600);
-	for (i = 0; i < yuvData.length; i++) {
+	for (var i = 0; i < yuvData.length; i++) {
 		yuvData[i] = Module.HEAPU8[(retPtr) + i];
 	}
 
@@ -122,4 +85,4 @@ function decodeH264(data) {
 
 function closeDecoder() {
 	Module._destroyDecoder();
-}
+}

+ 13 - 19
screenIos/helper.js

@@ -6,7 +6,7 @@
 //返回计算协议中校验位的校验码
 function calBcc(arry) {
 	var bcc = 0;
-	for (i = 0; i < arry.length; i++) {
+	for (var i = 0; i < arry.length; i++) {
 		bcc ^= arry[i];
 	}
 	return bcc;
@@ -16,7 +16,7 @@ function calBcc(arry) {
 function PrintArry(data) {
 	var str = "";
 
-	for (i = 0; i < data.length; i++) {
+	for (var i = 0; i < data.length; i++) {
 		str = str + data[i].toString(16).padStart(2, '0');
 	}
 
@@ -29,7 +29,6 @@ function PrintArry(data) {
 //jsonCmd: json命令
 //返回值:生成一个Uint8Array,通过websocket发送给板卡
 function makeFrame(sn, dataType, jsonCmd) {
-	console.log("makeFramemakeFrame", sn)
 	var index = 0;
 	var dataLen = jsonCmd.length;
 	var frameLen = dataLen + 26;
@@ -42,20 +41,19 @@ function makeFrame(sn, dataType, jsonCmd) {
 	outPut[index++] = 0; //类型为client
 
 	//sn号赋值,string转ascii
-	for (i = 0; i < sn.length; i++) {
+	for (var i = 0; i < sn.length; i++) {
 		outPut[index++] = sn[i].charCodeAt();
 	}
 
 	outPut[index++] = dataType; //指定数据类型为json
 	//json string转ascii
-	for (i = 0; i < jsonCmd.length; i++) {
+	for (var i = 0; i < jsonCmd.length; i++) {
 		outPut[index++] = jsonCmd[i].charCodeAt();
 	}
 
 	var bccBuffer = outPut.slice(1, frameLen - 3 + 1); //忽略协议头和协议尾
 	outPut[index++] = calBcc(bccBuffer);
 	outPut[index++] = 0x16;
-	console.log("数组长度:%d", outPut.length);
 	return outPut;
 }
 //触发键盘事件, code表示键盘值
@@ -67,7 +65,6 @@ function ExexuteKeyDown(code, sn) {
 		}
 	};
 	var json = JSON.stringify(jsonObj);
-	console.log("json==================", json);
 	return makeFrame(sn, 0, json);
 }
 //触发鼠标按下事件,x:x坐标, y:y坐标
@@ -83,6 +80,7 @@ function ExexuteMouseDown(x, y, sn) {
 		"event": "0"
 	};
 	var json = JSON.stringify(jsonObj);
+	// var sn = "RK3923C1201900139";
 	return makeFrame(sn, 0, json);
 }
 //触发鼠标移动事件,x:x坐标, y:y坐标
@@ -109,7 +107,6 @@ function ExexuteKeyBoard(keycode, sn) {
 		"event": "keyCode"
 	};
 	var json = JSON.stringify(jsonObj);
-	console.log("ExexuteKeyBoard-------------", sn)
 	return makeFrame(sn, 0, json);
 }
 
@@ -126,14 +123,13 @@ function ExexuteMouseUp(x, y, sn) {
 		"event": "1"
 	};
 	var json = JSON.stringify(jsonObj);
-	// var sn = "RK3923C1201900139";
 	return makeFrame(sn, 0, json);
 }
 //触发滑动事件
 function ExexuteMove(data, sn) {
-	console.log("打开安卓卡ExexuteMove", sn)
 	return makeFrame(sn, 0, data);
 }
+
 //示例:
 //var sn = "RK3923C1201900139";
 //var json = "{\"data\":{\"keyCode\":24},\"type\":\"keyDown\"}";
@@ -144,7 +140,6 @@ function ExexuteMove(data, sn) {
 
 // 加个请求I帧的报文
 function RequestIFrame(sn) {
-	console.log('加个请求I帧的报文')
 	var outPut = new Uint8Array([0x20])
 	return makeFrameExtend(sn, 6, outPut)
 }
@@ -162,13 +157,13 @@ function makeFrameExtend(sn, dataType, body) {
 	outPut[index++] = 0 // 类型为client
 
 	// sn号赋值,string转ascii
-	for (let i = 0; i < sn.length; i++) {
+	for (var i = 0; i < sn.length; i++) {
 		outPut[index++] = sn[i].charCodeAt()
 	}
 
 	outPut[index++] = dataType // 指定数据类型为json
 	// json string转ascii
-	for (let i = 0; i < body.length; i++) {
+	for (var i = 0; i < body.length; i++) {
 		outPut[index++] = body[i]
 	}
 
@@ -195,21 +190,20 @@ function makeFrameExtend(sn, dataType, body) {
 	outPut[index++] = dataLen & 0x000000ff;
 	outPut[index++] = 0;//类型为client
 
-	//sn号赋值,string转ascii
-	for (i = 0; i < sn.length; i++) {
+	// sn号赋值,string转ascii
+	for (var i = 0; i < sn.length; i++) {
 		outPut[index++] = sn[i].charCodeAt();
 	}
 
 	outPut[index++] = dataType;//指定数据类型为json
-	//json string转ascii
-	for (i = 0; i < body.length; i++) {
+	// json string转ascii
+	for (var i = 0; i < body.length; i++) {
 		outPut[index++] = body[i];
 	}
 
 	var bccBuffer = outPut.slice(1, frameLen - 3 + 1);//忽略协议头和协议尾
 	outPut[index++] = calBcc(bccBuffer);
 	outPut[index++] = 0x16;
-	var str = PrintArry(outPut);
 	return outPut;
 }
 
@@ -244,4 +238,4 @@ function GetScreenState() {
 function ConfigChannel(sn) {
 	var outPut = new Uint8Array([0x07]);
 	return makeFrameExtend(sn, 6, outPut);
-}
+}

+ 11 - 11
screenIos/pcm-player.js

@@ -2,7 +2,7 @@ function PCMPlayer(option) {
     this.init(option);
 }
 
-PCMPlayer.prototype.init = function (option) {
+PCMPlayer.prototype.init = function(option) {
     var defaults = {
         encoding: '16bitInt',
         channels: 1,
@@ -40,7 +40,7 @@ PCMPlayer.prototype.getTypedArray = function () {
     return typedArrays[this.option.encoding] ? typedArrays[this.option.encoding] : typedArrays['16bitInt'];
 };
 
-PCMPlayer.prototype.createContext = function () {
+PCMPlayer.prototype.createContext = function() {
     this.audioCtx = new (window.AudioContext || window.webkitAudioContext)();
     this.gainNode = this.audioCtx.createGain();
     this.gainNode.gain.value = 1;
@@ -48,11 +48,11 @@ PCMPlayer.prototype.createContext = function () {
     this.startTime = this.audioCtx.currentTime;
 };
 
-PCMPlayer.prototype.isTypedArray = function (data) {
+PCMPlayer.prototype.isTypedArray = function(data) {
     return (data.byteLength && data.buffer && data.buffer.constructor == ArrayBuffer);
 };
 
-PCMPlayer.prototype.feed = function (data) {
+PCMPlayer.prototype.feed = function(data) {
     if (!this.isTypedArray(data)) return;
     data = this.getFormatedValue(data);
     var tmp = new Float32Array(this.samples.length + data.length);
@@ -61,7 +61,7 @@ PCMPlayer.prototype.feed = function (data) {
     this.samples = tmp;
 };
 
-PCMPlayer.prototype.getFormatedValue = function (data) {
+PCMPlayer.prototype.getFormatedValue = function(data) {
     var data = new this.typedArray(data.buffer),
         float32 = new Float32Array(data.length),
         i;
@@ -72,11 +72,11 @@ PCMPlayer.prototype.getFormatedValue = function (data) {
     return float32;
 };
 
-PCMPlayer.prototype.volume = function (volume) {
+PCMPlayer.prototype.volume = function(volume) {
     this.gainNode.gain.value = volume;
 };
 
-PCMPlayer.prototype.destroy = function () {
+PCMPlayer.prototype.destroy = function() {
     if (this.interval) {
         clearInterval(this.interval);
     }
@@ -85,7 +85,7 @@ PCMPlayer.prototype.destroy = function () {
     this.audioCtx = null;
 };
 
-PCMPlayer.prototype.flush = function () {
+PCMPlayer.prototype.flush = function() {
     if (!this.samples.length) return;
     var bufferSource = this.audioCtx.createBufferSource(),
         length = this.samples.length / this.option.channels,
@@ -104,16 +104,16 @@ PCMPlayer.prototype.flush = function () {
             audioData[i] = this.samples[offset];
             /* fadein */
             if (i < 50) {
-                audioData[i] = (audioData[i] * i) / 50;
+                audioData[i] =  (audioData[i] * i) / 50;
             }
             /* fadeout*/
             if (i >= (length - 51)) {
-                audioData[i] = (audioData[i] * decrement--) / 50;
+                audioData[i] =  (audioData[i] * decrement--) / 50;
             }
             offset += this.option.channels;
         }
     }
-
+    
     if (this.startTime < this.audioCtx.currentTime) {
         this.startTime = this.audioCtx.currentTime;
     }

+ 35 - 20
screenIos/websocket.js

@@ -1,33 +1,48 @@
 self.importScripts("helper.js");
-// self.importScripts("pcm-player.js");
-// self.importScripts("pcm-player.min.js");
 var parameters = GetRequest();
 var ip = parameters["ip"];
 var domainName = parameters["domainName"];
 var isWSS = false;
 var socketURL = isWSS ? "wss://" + domainName + "/card?cardIp=" + ip : "ws://" + domainName + "/card?cardIp=" + ip;
 
+doConnect();
 
-var ws = new WebSocket(socketURL);
-ws.binaryType = 'arraybuffer';
+function doConnect() {
+	var ws = new WebSocket(socketURL);
+	ws.binaryType = 'arraybuffer';
 
-ws.addEventListener('open', function (event) {
-	console.log("发送配置帧");
-});
-
-self.addEventListener('message', function (e) {
-	ws.send(e.data);
-	console.log('ws', ws)
-}, false);
-ws.addEventListener('message', function (event) {
-	var input = new Uint8Array(event.data);
+	ws.onclose = function () {
+		self.postMessage('close');
+	}
 
-	if (input[0] == 0xff) {
-		self.postMessage(input);
-	} else {
-		self.postMessage(input);
+	ws.onerror = function () {
+		self.postMessage('close');
 	}
-});
+
+	ws.addEventListener('open', function (event) {
+		ws.send(ConfigChannel("RK3923C1201900139"));
+		var buffer = RequestIFrame("RK3923C1201900139");
+		ws.send(buffer);
+	});
+
+	ws.addEventListener('message', function (event) {
+		var input = new Uint8Array(event.data);
+
+		if (input[0] == 0xff) {
+			self.postMessage(input);
+		} else {
+			self.postMessage(input);
+		}
+	});
+
+	self.addEventListener('message', function (e) {
+		if (e.data === 'restart') {
+			doConnect();
+			return
+		}
+		ws.send(e.data);
+	}, false);
+}
 
 function GetRequest() {
 	var url = location.search; // 获取url中"?"符后的字串
@@ -40,4 +55,4 @@ function GetRequest() {
 		}
 	}
 	return obj;
-}
+}