Эх сурвалжийг харах

页面添加功能

原index.html重命名为internet.html,为网络版;
新建index.html,为服务器版
wcs 5 жил өмнө
parent
commit
ac6168dd36

BIN
img/battery-0.png


BIN
img/battery-100.png


BIN
img/battery-20.png


BIN
img/battery-40.png


BIN
img/battery-60.png


BIN
img/battery-80.png


BIN
img/battery.png


BIN
img/ds2.png


BIN
img/liftstatus-down.png


+ 0 - 0
img/ds.png → img/liftstatus-up.png


BIN
img/liftstatus.png


+ 0 - 0
img/sd.png → img/speed-high.png


BIN
img/speed-low.png


BIN
img/speed-medium.png


+ 285 - 297
index.html

@@ -1,6 +1,5 @@
 <!DOCTYPE html>
 <html>
-
 	<head>
 		<meta charset="utf-8">
 		<title>华力机电SIMANC</title>
@@ -12,132 +11,7 @@
 		<!--App自定义的css-->
 		<link rel="stylesheet" type="text/css" href="css/app.css" />
 		<link rel="stylesheet" type="text/css" href="css/iconfont.css" />
-		<style>
-			.mui-btn-block{
-				margin-bottom: 0;
-			}
-			.mui-content-padded{
-			  	margin: 2px;
-			  }
-			.mui-col{  
-				display: inline-block;  
-				padding: 2px;
-			}  
-			/*滚动条样式*/
-			::-webkit-scrollbar {
-            width: 0;
-            background-color: #F5F5F5;
-			}
-			/*定义滚动条轨道 内阴影+圆角*/
-			::-webkit-scrollbar-track {
-				background-color: #2e3342;
-			}
-			/*定义滑块 内阴影+圆角*/
-			::-webkit-scrollbar-thumb {
-				background-color: #2e3342;
-			}
-			.mui-btn-royal{
-					background-color: rgba(141, 157, 199, 0.5);
-					border:1px solid rgba(141, 157, 199, 0.5)
-			}
-			.active {
-				background-color: #d4d4d4;
-				color:white;
-			}
-			.up{
-				background: #0087c5 url(img/top.svg) no-repeat 50% 10%;
-			}
-			.down{
-				background: #0087c5 url(img/bottom.svg) no-repeat 50% 10%;
-			}
-			.mui-plus .plus{
-				display: inline;
-			}
-			.plus{
-				display: none;
-			}
-			#topPopover {
-				position: fixed;
-				top: 16px;
-				right: 6px;
-			}
-			#topPopover .mui-popover-arrow {
-				left: auto;
-				right: 6px;
-			}
-			p {
-				text-indent: 22px;
-			}
-			span.mui-icon {
-				font-size: 14px;
-				color: #007aff;
-				margin-left: -15px;
-				padding-right: 10px;
-			}
-			.mui-popover {
-				color:#fff;
-				height: 260px;
-				width: 130px;
-				background-color: rgba(141, 157, 199, 0.9);
-			}
-			.mui-content {
-				padding: 10px;
-			}
-			 .mui-scroll-wrapper{
-				background-color:transparent;
-			}
-			.mui-popover .mui-table-view{
-				background-color: transparent;
-			}
-			.history tr{
-				background-color: #ffffff;
-				border-radius:5px 0 0 5px;
-			}
-			.history td:first-child{
-				border-radius:5px 0 0 5px;
-			}
-			.history td:last-child{
-				border-radius: 0 5px 5px 0;
-			}
-			
-			.grid-task >div{
-            display: grid;
-            grid-template-columns: 60px 1fr 1fr 100px;
-            grid-gap: 1px;
-        }
-        .grid-task >div>span{
-			color: #fff;
-			font-size: 15px;
-            background-color: rgba(141, 157, 199, 0.5);
-            padding:5px 5px 2px 10px;
-        }
-		.mui-bar{
-			height:35px
-		}
-		.mui-bar-nav{
-			top: 0;
-			box-shadow: 0 1px 6px #2e3342;
-		}
-		.mui-title {
-			line-height:35px
-		}
-		.mui-bar .mui-icon {
-			padding-top:5px
-		}
-		.mui-bar-nav~.mui-content{
-			padding-top: 30px;
-		}
-		.text-success{
-			color:#27c24c
-		}
-		.mui-bar .mui-btn-link {
-			line-height: 36px;
-		}
-		.mui-col-xs-3{
-			width: 22%;
-		}
-		* { touch-action: none; }
-	</style>
+		<link rel="stylesheet" type="text/css" href="css/style.css" />
 	</head>
 	<body style="background: url(img/bg.png) no-repeat 0px -0px;width:99%;">
 		<div id="title" style="height: 4%;text-align: center;padding-top: 10px;padding-bottom: 5px;background: url(img/title_bg.png) no-repeat 0 17px;background-size:100%;">
@@ -146,15 +20,15 @@
 		<div id="top" style="height: 30%;text-align: center;padding-top: 1px;background: url(img/top_bg.png) no-repeat 0 0px;background-size:100%;">
 			<div class="mui-row">
 				<div class="mui-col mui-col-xs-12">
-					<div id="speed" style="height: 10%;width: 50%;padding-top: 10px;float: left;">
-						<img src="img/sd.png" style="margin-left: -80px;width: 13%;">
+					<div style="height: 10%;width: 50%;padding-top: 10px;float: left;">
+						<img id="speed" src="img/speed-high.png" style="margin-left: -80px;width: 13%;">
 					</div>
-					<div id="battery" style="height: 10%;width: 50%;padding-top: 10px;float: left;">
-						<img src="img/battery.png" style="margin-right: -80px;width: 23%;">
+					<div style="height: 10%;width: 50%;padding-top: 10px;float: left;">
+						<img id="battery" src="img/battery-100.png" style="margin-right: -80px;width: 23%;">
 					</div>
 				</div>
 				<div class="mui-col mui-col-xs-12">
-					<div id="jacking" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: left;margin-left: 23px;">
+					<div id="tgts" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: left;margin-left: 23px;">
 						<div style="margin-left: -60px;margin-top: 15px;">
 							<a style="color: #FFFFFF;font-size: 18px;">目标</a><br>
 						</div>
@@ -162,10 +36,10 @@
 							<a style="color: #FFFFFF;font-size: 18px;">站点</a><br>
 						</div>
 						<div style="margin-left: 40px;margin-top: -40px;">
-							<a style="color: #FFFFFF;font-size: 50px;">7</a><br>
+							<a id="tgtstation" style="color: #FFFFFF;font-size: 50px;"></a><br>
 						</div>
 					</div>
-					<div id="jacking" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: right;margin-right: 20px;">
+					<div id="jack" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: right;margin-right: 20px;">
 						<div style="margin-left: -60px;margin-top: 15px;">
 							<a style="color: #FFFFFF;font-size: 18px;">顶升</a><br>
 						</div>
@@ -173,59 +47,22 @@
 							<a style="color: #FFFFFF;font-size: 18px;">状态</a><br>
 						</div>
 						<div style="margin-left: 60px;margin-top: -55px;">
-							<img src="img/ds.png" width="60%">
+							<img id="liftstatus" src="img/liftstatus.png" width="60%">
 						</div>
 					</div>
 				</div>
 				<br>
 				<br>
-				<div style="width: 94%;height: 50px;margin-top: 100px;margin-left: 20px;">
-					<div style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">停止</div>
-					<div style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">运行</div>
-					<div style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">注意</div>
-					<div id="details" style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">详情</div>
+				<div style="width: 100%;height: 50px;margin-top: 100px;margin-left: 20px;">
+					<div id="stop" style="width: 28%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">停止</div>
+					<div id="run" style="width: 28%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">运行</div>
+					<div id="warning" style="width: 28%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">注意</div>
 				</div>
-				<div style="width: 87%;height: 30px;margin-left: 25px;background-color: #0b6d78;border-radius: 3px;"></div>
+				<div id="info" style="width: 87%;height: 30px;margin-left: 25px;color:#ccc;font-size:4px;line-height: 30px;background-color: #0b6d78;border-radius: 3px;text-align: left;padding-left: 5px;"></div>
 				<div class="mui-content-padded" style="background: url(img/btlist5_bg.png) no-repeat 10px 0;margin-top: 25px;width: 100%;height: auto;">
 					<div class="mui-row">
-						<div class="mui-col mui-col-xs-12" id="BtnList" style="padding-top:10px;overflow-y:auto;">
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="1" id="1" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">1</button>
-							</div>
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="2" id="2" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">2</button>
-							</div>
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="3" id="3" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">3</button>
-							</div>
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="4" id="4" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">4</button>
-							</div>
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="5" id="5" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">5</button>
-							</div>
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="6" id="6" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">6</button>
-							</div>
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="7" id="7" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">7</button>
-							</div>
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="8" id="8" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">8</button>
-							</div>
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="9" id="9" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">9</button>
-							</div>
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="10" id="10" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">10</button>
-							</div>
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="11" id="11" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">11</button>
-							</div>
-							<div class="mui-col mui-col-xs-3">
-								<button type="button" value="12" id="12" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">12</button>
-							</div>
-						</div>
+						<div class="mui-col mui-col-xs-12" id="btlist" style="padding-top:10px;min-height:285px;overflow-y:auto;max-height:285px"></div>
+
 						<div class="mui-col mui-col-xs-12" style="text-align: center;padding-bottom: 13px;">
 							<div class="mui-col mui-col-xs-3" id="gomoving">
 								<button type="button" class="mui-btn mui-btn-royal mui-btn-block operation" id="moving" style="border:1px solid #4a5a6a;">移动</button>
@@ -245,176 +82,327 @@
 	</body>
 	<script src="js/jquery.min.js"></script>
 	<script src="js/mui.min.js"></script>
+	<script src="js/msg.js"></script>
+	<script src="js/lodash.js"></script>
+	<script src="js/backbone.js"></script>
+	<script src="js/rappid.min.js"></script>
+	<script src="js/models/joint.shapes.smcr.js"></script>
+	<script src="js/map.js"></script>
+	<script src="js/models/joint.shapes.app.js"></script>
 	<script type="text/javascript">
-		var windowHeight = $(window).height(),
-			$body = $("body");
-		//  $body.css("height", windowHeight); //重要代码
-		$("body").on("touchstart", function(e) {
-			e.preventDefault();
-			startX = e.originalEvent.changedTouches[0].pageX,
-			startY = e.originalEvent.changedTouches[0].pageY;
-		});
-		$("body").on("touchmove", function(e) {
-			e.preventDefault();
-			moveEndX = e.originalEvent.changedTouches[0].pageX,
-			moveEndY = e.originalEvent.changedTouches[0].pageY,
-			X = moveEndX - startX,
-			Y = moveEndY - startY;
-	    if ( Math.abs(X) > Math.abs(Y) && X > 0 ) {
-	     window.location.href = "settings.html"; //right
-	    }
-	    else if ( Math.abs(X) > Math.abs(Y) && X < 0 ) {
-	       window.location.href = "remote.html";  //left
-	    }
-	    else if ( Math.abs(Y) > Math.abs(X) && Y > 0) {
-	      return //bottom
-	    }
-	    else if ( Math.abs(Y) > Math.abs(X) && Y < 0 ) {
-	      return //top
-	    }
-	    else{
-	      return
-	    }
-		});
+		var $btlist = $('#btlist');
 		$(function() {
+			//获取保存的ip、agvid、mapid等,如果没有数据,则设置为默认
 			if (localStorage.getItem("ip") == "" || localStorage.getItem("ip") == null) {
-				ip = "http://192.168.0.118:8899";
-			}else{
-				ip = "http://" + localStorage.getItem("ip") + ":8899";
+				ip = "192.168.1.92:8888";
+				url = "http://192.168.1.92:8888"
+			} else {
+				ip = localStorage.getItem("ip") + ":8888";
+				url = "http://" + localStorage.getItem("ip") + ":8888";
 			}
 			if (localStorage.getItem("agvid") == "" || localStorage.getItem("agvid") == null) {
 				agvid = 1;
-			}else{
+			} else {
 				agvid = parseInt(localStorage.getItem("agvid"))
 			}
 			if (localStorage.getItem("mapid") == "" || localStorage.getItem("mapid") == null) {
-				mapid = "1";
-			}else{
+				mapid = "2019081410472902";
+			} else {
 				mapid = localStorage.getItem("mapid")
 			}
-			
+			//获取按钮
+			createList();
+
+			//获取状态
+			startLog();
+			setInterval(function() {
+				if (ws.readyState === 3) {
+					startLog();
+				}
+			}, 1000);
+
+			//设置操作按钮
 			$("#gostart").addClass("mui-hidden");
 			$("#moving").attr("disabled", true);
 			$("#start").attr("disabled", true);
-			$("button[name]").on("touchstart", onSelectStation);
-		})
-		$("#11814").click(function() {
-			var s = 1
-			var d = 4
-			var strone = {
-				"t": "AddTsk",
-				"id": agvid,
-				"s": s,
-				"d": d
-			}
-			var ss = JSON.stringify(strone)
-			$.post(ip, ss);
-		})
-		$("#11841").click(function() {
-			var s = 4
-			var d = 1
-			var strone = {
-				"t": "AddTsk",
-				"id": agvid,
-				"s": s,
-				"d": d
-			}
-			var ss = JSON.stringify(strone)
-			$.post(ip, ss);
-		})
-		$("#200").click(function() {
-			var s = 4
-			var d = 1
-			var strone = {
-				"t": "AddTsk",
-				"id": agvid,
-				"s": s,
-				"d": d
-			}
-			var ss = JSON.stringify(strone)
-			$.post(ip, ss);
-		})
-		$("151").click(function() {
-			var s = 1
-			var d = 4
-			var strone = {
-				"t": "AddTsk",
-				"id": agvid,
-				"s": s,
-				"d": d
-			}
-			var ss = JSON.stringify(strone)
-			$.post(ip, ss);
+
+			//设置页面可以左滑右滑跳转页面
+			var windowHeight = $(window).height(),
+				$body = $("body");
+			$("body").on("touchstart", function(e) {
+				e.preventDefault();
+				startX = e.originalEvent.changedTouches[0].pageX,
+					startY = e.originalEvent.changedTouches[0].pageY;
+			});
+			$("body").on("touchmove", function(e) {
+				e.preventDefault();
+				moveEndX = e.originalEvent.changedTouches[0].pageX,
+					moveEndY = e.originalEvent.changedTouches[0].pageY,
+					X = moveEndX - startX,
+					Y = moveEndY - startY;
+				if (Math.abs(X) > Math.abs(Y) && X > 0) {
+					window.location.href = "internet.html"; //right
+				} else if (Math.abs(X) > Math.abs(Y) && X < 0) {
+					window.location.href = "remote.html"; //left
+				} else if (Math.abs(Y) > Math.abs(X) && Y > 0) {
+					return //bottom
+				} else if (Math.abs(Y) > Math.abs(X) && Y < 0) {
+					return //top
+				} else {
+					return
+				}
+			});
 		})
+		//按钮点击事件
 		function onSelectStation(evt) {
 			var $this = $(this);
-			if ($("div[id='BtnList']").is(':active')) {
+			if ($("div[id='btlist']").is(':active')) {
 				$this.removeClass('active');
 			} else {
 				$this.addClass('active');
 			}
-			if ($("div[id='BtnList']").find(".active").length == 1) {
+			if ($("div[id='btlist']").find(".active").length == 1) {
 				$("#moving").attr("disabled", false);
 				$this.addClass('up');
 				$("#start").removeAttr("disabled");
 				$("#cancel").removeAttr("disabled");
-			} else if ($("div[id='BtnList']").find(".active").length == 2) {
+			} else if ($("div[id='btlist']").find(".active").length == 2) {
 				$("#gomoving").addClass("mui-hidden");
 				$("#gostart").removeClass("mui-hidden");
 				$this.addClass('down');
 				$('#start').attr("disabled", false);
 				$("#handling").removeAttr("disabled");
 			}
-			if ($("div[id='BtnList']").find(".active").length >= 2) {
-				$("button[name='Site']").css("pointer-events", "none")
+			if ($("div[id='btlist']").find(".active").length >= 2) {
+				$("button[name='stbtn']").css("pointer-events", "none")
 			} else {
-				$("button[name='Site']").css("pointer-events", "auto")
+				$("button[name='stbtn']").css("pointer-events", "auto")
 			}
 		};
+		//取消按钮操作
 		function Reset(evt) {
-			if ($("div[id='BtnList']").find(".active")) {
+			if ($("div[id='btlist']").find(".active")) {
 				$("#gostart").addClass("mui-hidden");
 				$("#gomoving").removeClass("mui-hidden");
-				$("button[name='Site']").removeClass('up');
-				$("button[name='Site']").removeClass('down');
-				$("button[name='Site']").removeClass('active');
-				$("button[name='Site']").css("pointer-events", "auto");
+				$("button[name='stbtn']").removeClass('up');
+				$("button[name='stbtn']").removeClass('down');
+				$("button[name='stbtn']").removeClass('active');
+				$("button[name='stbtn']").css("pointer-events", "auto");
 				$('#start').attr("disabled", true);
 				$('#cancel').attr("disabled", true);
 				$('#moving').attr("disabled", true);
 			}
 		}
-		//移动
+		//移动按钮
 		$("#moving").click(function() {
-			var bt_value = [];
-			$("div[id='BtnList']").find(".up").each(function(evt) {
-				parseInt(bt_value.push($(this).val()));
+			let to;
+			$("div[id='btlist']").find(".up").each(function(evt){
+			    to = parseInt(($(this).context).id);
+			});
+			SendCmd(AgvId, msgTypeToStation, {"Stn":to}, function(d) {
+			    console.log("AddTransTask", d);
+				 Reset()
 			})
-			Reset()
 		});
-		//搬运
+		//搬运按钮
 		$("#start").click(function() {
 			var bt_value = [];
-			$("div[id='BtnList']").find(".up").each(function(evt) {
+			$("div[id='btlist']").find(".up").each(function(evt) {
 				bt_value.push($(this).val());
 			});
-			$("div[id='BtnList']").find(".down").each(function(evt) {
+			$("div[id='btlist']").find(".down").each(function(evt) {
 				bt_value.push($(this).val());
 			});
-			var strone = {
-				"t": "AddTsk",
-				"id": agvid,
-				"s": parseInt(bt_value[0]),
-				"d": parseInt(bt_value[1])
-			}
-			var ss = JSON.stringify(strone)
-			$.post(ip, ss);
-			Reset()
+			AddTransTask(AgvId, bt_value[0], bt_value[1], function(d) {
+		        //console.log("AddTransTask", d);
+		        Reset()
+		    })
 		});
-		//取消
+		
+		function AddTransTask(agvId, from, to, callback){
+		    $.post(url+"/task", {
+		        id:agvId,
+		        from: from,
+		        to: to
+		    }, callback);
+		};
+		function SendCmd(agvId, cmd, opt, func) {
+		    let param = {"t":cmd};
+		    opt = _.extend(param, opt);
+		    //console.log("param", opt);
+		    $.post(url+"/agv/SendString/" + agvId,
+		        JSON.stringify(opt),
+		        func
+		    );
+		}
+		//取消按钮
 		$("#cancel").on("click", Reset);
-		$("#details").click(function() {
-			window.location.href = "details.html";
-		})
+		//填充按钮列表
+		function createList() {
+			$.get(url + "/map/getStations/" + mapid, function(data) {
+				trs = "";
+				for (i in data) {
+					if (data[i].Name != "") {
+						trs += '<div class="mui-col mui-col-xs-3" drag-id="' + data[i].Id + '">' +
+							'<button type="button" class="mui-btn mui-btn-royal mui-btn-block" name="stbtn" id="' + data[i].Id +
+							'" value="' + data[i].Id + '">' +
+							data[i].Name + '</button></div>'
+					}
+				}
+				$btlist.append(trs);
+				//注册按钮点击事件
+				$("button[name]").on("touchstart", onSelectStation);
+			});
+		}
+
+		//新建ws连接,获取agv的状态
+		let ws;
+		function startLog() {
+			ws = new WebSocket("ws://" + ip + "/ws/msg/" + agvid);
+			ws.onmessage = function(e) {
+				let result;
+				let msg = JSON.parse(e.data);
+				switch (msg.type) {
+					case msgTypeStatus:
+						// 每秒一次状态
+						let stMap = JSON.parse(msg.data);
+						//根据状态设置图标等
+						showStatusValue(stMap);
+						//当前站点按钮文字闪烁
+						if (agvid == msg.id) {
+							let stMap = JSON.parse(msg.data);
+							$("#" + stMap.Station + "").toggleClass("text-success");
+						}
+						break;
+						//读取设置状态,可以获得电池伏数
+					case msgTypeGetCfg:
+						//console.log(msg.type, msg.data);
+						break;
+					default:
+						console.log(msg.type, msg.data);
+				}
+			};
+		}
+
+		//根据获取到的agv状态,设置速度、电量、站点、顶升、提示信息、运行按钮等的颜色和文字显示
+		function showStatusValue(status) {
+			for (let k in status) {
+				let v = status[k];
+				//速度显示
+				if (k == "Speed") {
+					if (v >= "30") { //SpeedHigh
+						document.getElementById("speed").src = "img/speed-high.png";
+					}
+					if (v >= "20") { //SpeedMid
+						document.getElementById("speed").src = "img/speed-medium.png";
+					}
+					if (v <= "10") { //SpeedLow
+						document.getElementById("speed").src = "img/speed-low.png";
+					}
+				}
+				//电量显示
+				if (k == "BatteryVolt") {
+					if (v >= "52") { //BatteryVoltFull
+						document.getElementById("battery").src = "img/battery-100.png";
+					}
+					if ("52" < v >= "50") { //BatteryVoltHigh
+						document.getElementById("battery").src = "img/battery-80.png";
+					}
+					if ("50" < v >= "48") { //BatteryVoltMid
+						document.getElementById("battery").src = "img/battery-60.png";
+					}
+					if ("48" < v >= "47") { //BatteryVoltLow
+						document.getElementById("battery").src = "img/battery-40.png";
+					}
+					if ("47" < v >= "45") { //BatteryVoltWarn
+						document.getElementById("battery").src = "img/battery-20.png";
+					}
+					if (v <= "45") { //BatteryVoltStop
+						document.getElementById("battery").src = "img/battery-0.png";
+					}
+				}
+				//目标站点
+				if (k == "TgtStation") {
+					if (v == "65535") {
+						$("#tgtstation").text("0");
+					} else {
+						$("#tgtstation").text(v);
+					}
+				}
+				//顶升状态
+				if (k == "liftstatus") {
+					if (v == "1" || v == "3" || v == "5" || v == "7") {
+						document.getElementById("liftstatus").src = "img/liftstatus-up.png";
+					} else if (v == "0") {
+						document.getElementById("liftstatus").src = "img/liftstatus.png";
+					} else {
+						document.getElementById("liftstatus").src = "img/liftstatus-down.png";
+					}
+				}
+				//停止运行注意按钮及信息提示框
+				if (k == "Status") {
+					if (v == "1") {
+						$("#info").text("未设置状态");
+					}
+					if (v == "2") {
+						document.getElementById("run").style.backgroundImage = "url('img/btn2_bg.png')";
+					}
+					if (v == "3" || v == "4" || v == "9") {
+						if (v == "3") {
+							$("#info").text("停止状态");
+						}
+						if (v == "4") {
+							$("#info").text("急停按钮急停状态");
+						}
+						if (v == "9") {
+							$("#info").text("手动控制状态");
+						}
+						document.getElementById("stop").style.backgroundImage = "url('img/btn3_bg.png')";
+					}
+					if (v == "6") {
+						$("#info").text("驱动器错误");
+					}
+					if (v == "7") {
+						$("#info").text("导航错误");
+					}
+					if (v == "8") {
+						$("#info").text("任务错误");
+					}
+					if (v == "11" || v == "22") {
+						if (v == "11") {
+							$("#info").text("遇到障碍物停止 或者 冲突区域");
+						}
+						if (v == "22") {
+							$("#info").text("车辆遇到障碍物靠近");
+						}
+						document.getElementById("warning").style.backgroundImage = "url('img/btn1_bg.png')";
+					}
+					if (v == "12") {
+						$("#info").text("防撞条紧急停止");
+					}
+					if (v == "15") {
+						$("#info").text("电压低");
+					}
+					if (v == "21") {
+						$("#info").text("车辆低电压运行");
+					}
+					if (v == "31") {
+						$("#info").text("正方向磁导航脱线");
+					}
+					if (v == "32") {
+						$("#info").text("反方向磁导航脱线");
+					}
+					if (v == "33") {
+						$("#info").text("正方向磁导航脱线");
+					}
+					if (v == "34") {
+						$("#info").text("反方向磁导航脱线");
+					}
+					if (v == "71" || v == "72" || v == "73") {
+						$("#info").text("取货物时举升不为空");
+					}
+				}
+			}
+		}
 	</script>
 </html>

+ 294 - 0
internet.html

@@ -0,0 +1,294 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="utf-8">
+		<title>华力机电SIMANC</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-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">
+		<!--标准mui.css-->
+		<link rel="stylesheet" type="text/css" href="css/mui.min.css">
+		<!--App自定义的css-->
+		<link rel="stylesheet" type="text/css" href="css/app.css" />
+		<link rel="stylesheet" type="text/css" href="css/iconfont.css" />
+		<link rel="stylesheet" type="text/css" href="css/style.css" />
+	</head>
+	<body style="background: url(img/bg.png) no-repeat 0px -0px;width:99%;">
+		<div id="title" style="height: 4%;text-align: center;padding-top: 10px;padding-bottom: 5px;background: url(img/title_bg.png) no-repeat 0 17px;background-size:100%;">
+			<a style="color: #FFFFFF;font-size: 20px;">华力西曼克</a>
+		</div>
+		<div id="top" style="height: 30%;text-align: center;padding-top: 1px;background: url(img/top_bg.png) no-repeat 0 0px;background-size:100%;">
+			<div class="mui-row">
+				<div class="mui-col mui-col-xs-12">
+					<div id="speed" style="height: 10%;width: 50%;padding-top: 10px;float: left;">
+						<img src="img/sd.png" style="margin-left: -80px;width: 13%;">
+					</div>
+					<div id="battery" style="height: 10%;width: 50%;padding-top: 10px;float: left;">
+						<img src="img/battery.png" style="margin-right: -80px;width: 23%;">
+					</div>
+				</div>
+				<div class="mui-col mui-col-xs-12">
+					<div id="jacking" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: left;margin-left: 23px;">
+						<div style="margin-left: -60px;margin-top: 15px;">
+							<a style="color: #FFFFFF;font-size: 18px;">目标</a><br>
+						</div>
+						<div style="margin-left: -60px;margin-top: 10px;">
+							<a style="color: #FFFFFF;font-size: 18px;">站点</a><br>
+						</div>
+						<div style="margin-left: 40px;margin-top: -40px;">
+							<a style="color: #FFFFFF;font-size: 50px;">7</a><br>
+						</div>
+					</div>
+					<div id="jacking" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: right;margin-right: 20px;">
+						<div style="margin-left: -60px;margin-top: 15px;">
+							<a style="color: #FFFFFF;font-size: 18px;">顶升</a><br>
+						</div>
+						<div style="margin-left: -60px;margin-top: 10px;">
+							<a style="color: #FFFFFF;font-size: 18px;">状态</a><br>
+						</div>
+						<div style="margin-left: 60px;margin-top: -55px;">
+							<img src="img/ds.png" width="60%">
+						</div>
+					</div>
+				</div>
+				<br>
+				<br>
+				<div style="width: 94%;height: 50px;margin-top: 100px;margin-left: 20px;">
+					<div style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">停止</div>
+					<div style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">运行</div>
+					<div style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">注意</div>
+					<div id="details" style="width: 22%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">详情</div>
+				</div>
+				<div style="width: 87%;height: 30px;margin-left: 25px;background-color: #0b6d78;border-radius: 3px;"></div>
+				<div class="mui-content-padded" style="background: url(img/btlist5_bg.png) no-repeat 10px 0;margin-top: 25px;width: 100%;height: auto;">
+					<div class="mui-row">
+						<div class="mui-col mui-col-xs-12" id="BtnList" style="padding-top:10px;overflow-y:auto;">
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="1" id="1" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">1</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="2" id="2" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">2</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="3" id="3" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">3</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="4" id="4" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">4</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="5" id="5" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">5</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="6" id="6" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">6</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="7" id="7" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">7</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="8" id="8" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">8</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="9" id="9" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">9</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="10" id="10" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">10</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="11" id="11" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">11</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" value="12" id="12" name="Site" class="mui-btn mui-btn-royal mui-btn-block" style="float: left;">12</button>
+							</div>
+						</div>
+						<div class="mui-col mui-col-xs-12" style="text-align: center;padding-bottom: 13px;">
+							<div class="mui-col mui-col-xs-3" id="gomoving">
+								<button type="button" class="mui-btn mui-btn-royal mui-btn-block operation" id="moving" style="border:1px solid #4a5a6a;">移动</button>
+							</div>
+							<div class="mui-col mui-col-xs-3" id="gostart">
+								<button type="button" class="mui-btn mui-btn-royal mui-btn-block operation" id="start" style="border:1px solid #4a5a6a;">搬运</button>
+							</div>
+							<div class="mui-col mui-col-xs-3">
+								<button type="button" class="mui-btn mui-btn-royal mui-btn-block operation" id="cancel" style="border:1px solid #4a5a6a;">取消</button>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div style="height: 15px;width: 101%;background: url(img/bottom_bg.png) no-repeat -25px 0;"></div>
+			</div>
+		</div>
+	</body>
+	<script src="js/jquery.min.js"></script>
+	<script src="js/mui.min.js"></script>
+	<script type="text/javascript">
+		var windowHeight = $(window).height(),
+			$body = $("body");
+		//  $body.css("height", windowHeight); //重要代码
+		$("body").on("touchstart", function(e) {
+			e.preventDefault();
+			startX = e.originalEvent.changedTouches[0].pageX,
+			startY = e.originalEvent.changedTouches[0].pageY;
+		});
+		$("body").on("touchmove", function(e) {
+			e.preventDefault();
+			moveEndX = e.originalEvent.changedTouches[0].pageX,
+			moveEndY = e.originalEvent.changedTouches[0].pageY,
+			X = moveEndX - startX,
+			Y = moveEndY - startY;
+	    if ( Math.abs(X) > Math.abs(Y) && X > 0 ) {
+	     window.location.href = "index.html"; //right
+	    }
+	    else if ( Math.abs(X) > Math.abs(Y) && X < 0 ) {
+	       window.location.href = "remote.html";  //left
+	    }
+	    else if ( Math.abs(Y) > Math.abs(X) && Y > 0) {
+	      return //bottom
+	    }
+	    else if ( Math.abs(Y) > Math.abs(X) && Y < 0 ) {
+	      return //top
+	    }
+	    else{
+	      return
+	    }
+		});
+		$(function() {
+			if (localStorage.getItem("ip") == "" || localStorage.getItem("ip") == null) {
+				ip = "http://192.168.0.118:8899";
+			}else{
+				ip = "http://" + localStorage.getItem("ip") + ":8899";
+			}
+			if (localStorage.getItem("agvid") == "" || localStorage.getItem("agvid") == null) {
+				agvid = 1;
+			}else{
+				agvid = parseInt(localStorage.getItem("agvid"))
+			}
+			if (localStorage.getItem("mapid") == "" || localStorage.getItem("mapid") == null) {
+				mapid = "1";
+			}else{
+				mapid = localStorage.getItem("mapid")
+			}
+			
+			$("#gostart").addClass("mui-hidden");
+			$("#moving").attr("disabled", true);
+			$("#start").attr("disabled", true);
+			$("button[name]").on("touchstart", onSelectStation);
+		})
+		$("#11814").click(function() {
+			var s = 1
+			var d = 4
+			var strone = {
+				"t": "AddTsk",
+				"id": agvid,
+				"s": s,
+				"d": d
+			}
+			var ss = JSON.stringify(strone)
+			$.post(ip, ss);
+		})
+		$("#11841").click(function() {
+			var s = 4
+			var d = 1
+			var strone = {
+				"t": "AddTsk",
+				"id": agvid,
+				"s": s,
+				"d": d
+			}
+			var ss = JSON.stringify(strone)
+			$.post(ip, ss);
+		})
+		$("#200").click(function() {
+			var s = 4
+			var d = 1
+			var strone = {
+				"t": "AddTsk",
+				"id": agvid,
+				"s": s,
+				"d": d
+			}
+			var ss = JSON.stringify(strone)
+			$.post(ip, ss);
+		})
+		$("151").click(function() {
+			var s = 1
+			var d = 4
+			var strone = {
+				"t": "AddTsk",
+				"id": agvid,
+				"s": s,
+				"d": d
+			}
+			var ss = JSON.stringify(strone)
+			$.post(ip, ss);
+		})
+		function onSelectStation(evt) {
+			var $this = $(this);
+			if ($("div[id='BtnList']").is(':active')) {
+				$this.removeClass('active');
+			} else {
+				$this.addClass('active');
+			}
+			if ($("div[id='BtnList']").find(".active").length == 1) {
+				$("#moving").attr("disabled", false);
+				$this.addClass('up');
+				$("#start").removeAttr("disabled");
+				$("#cancel").removeAttr("disabled");
+			} else if ($("div[id='BtnList']").find(".active").length == 2) {
+				$("#gomoving").addClass("mui-hidden");
+				$("#gostart").removeClass("mui-hidden");
+				$this.addClass('down');
+				$('#start').attr("disabled", false);
+				$("#handling").removeAttr("disabled");
+			}
+			if ($("div[id='BtnList']").find(".active").length >= 2) {
+				$("button[name='Site']").css("pointer-events", "none")
+			} else {
+				$("button[name='Site']").css("pointer-events", "auto")
+			}
+		};
+		function Reset(evt) {
+			if ($("div[id='BtnList']").find(".active")) {
+				$("#gostart").addClass("mui-hidden");
+				$("#gomoving").removeClass("mui-hidden");
+				$("button[name='Site']").removeClass('up');
+				$("button[name='Site']").removeClass('down');
+				$("button[name='Site']").removeClass('active');
+				$("button[name='Site']").css("pointer-events", "auto");
+				$('#start').attr("disabled", true);
+				$('#cancel').attr("disabled", true);
+				$('#moving').attr("disabled", true);
+			}
+		}
+		//移动
+		$("#moving").click(function() {
+			var bt_value = [];
+			$("div[id='BtnList']").find(".up").each(function(evt) {
+				parseInt(bt_value.push($(this).val()));
+			})
+			Reset()
+		});
+		//搬运
+		$("#start").click(function() {
+			var bt_value = [];
+			$("div[id='BtnList']").find(".up").each(function(evt) {
+				bt_value.push($(this).val());
+			});
+			$("div[id='BtnList']").find(".down").each(function(evt) {
+				bt_value.push($(this).val());
+			});
+			var strone = {
+				"t": "AddTsk",
+				"id": agvid,
+				"s": parseInt(bt_value[0]),
+				"d": parseInt(bt_value[1])
+			}
+			var ss = JSON.stringify(strone)
+			$.post(ip, ss);
+			Reset()
+		});
+		//取消
+		$("#cancel").on("click", Reset);
+		$("#details").click(function() {
+			window.location.href = "details.html";
+		})
+	</script>
+</html>

+ 232 - 360
manifest.json

@@ -1,362 +1,234 @@
 {
-	"@platforms" : 
-	[
-		"android",
-		"iPhone",
-		"iPad"
-	],
-	"id" : "H5052C011", /*应用的标识*/
-	
-	"name" : "agv-summoner", /*应用名称,程序桌面图标名称*/
-	
-	"version" : 
-	{
-		"name" : "1.0", /*应用版本名称*/
-		
-		"code" : ""
-	},
-	"description" : "", /*应用描述信息*/
-	
-	"icons" : 
-	{
-		"72" : "icon.png"
-	},
-	"launch_path" : "index.html", /*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/
-	
-	"developer" : 
-	{
-		"name" : "", /*开发者名称*/
-		
-		"email" : "", /*开发者邮箱地址*/
-		
-		"url" : "" /*开发者个人主页地址*/
-		
-	},
-	"permissions" : 
-	{
-		"Accelerometer" : 
-		{
-			"description" : "访问加速度感应器"
-		},
-		"Audio" : 
-		{
-			"description" : "访问麦克风"
-		},
-		"Cache" : 
-		{
-			"description" : "管理应用缓存"
-		},
-		"Camera" : 
-		{
-			"description" : "访问摄像头"
-		},
-		"Console" : 
-		{
-			"description" : "跟踪调试输出日志"
-		},
-		"Device" : 
-		{
-			"description" : "访问设备信息"
-		},
-		"Downloader" : 
-		{
-			"description" : "文件下载管理"
-		},
-		"Events" : 
-		{
-			"description" : "应用扩展事件"
-		},
-		"File" : 
-		{
-			"description" : "访问本地文件系统"
-		},
-		"Gallery" : 
-		{
-			"description" : "访问系统相册"
-		},
-		"Geolocation" : 
-		{
-			"description" : "访问位置信息"
-		},
-		"Invocation" : 
-		{
-			"description" : "使用Native.js能力"
-		},
-		"Orientation" : 
-		{
-			"description" : "访问方向感应器"
-		},
-		"Proximity" : 
-		{
-			"description" : "访问距离感应器"
-		},
-		"Storage" : 
-		{
-			"description" : "管理应用本地数据"
-		},
-		"Uploader" : 
-		{
-			"description" : "管理文件上传任务"
-		},
-		"Runtime" : 
-		{
-			"description" : "访问运行期环境"
-		},
-		"XMLHttpRequest" : 
-		{
-			"description" : "跨域网络访问"
-		},
-		"Zip" : 
-		{
-			"description" : "文件压缩与解压缩"
-		},
-		"Barcode" : 
-		{
-			"description" : "管理二维码扫描插件"
-		},
-		"Webview" : 
-		{
-			"description" : "窗口管理"
-		},
-		"NativeUI" : 
-		{
-			"description" : "原生UI控件"
-		},
-		"Navigator" : 
-		{
-			"description" : "浏览器信息"
-		},
-		"NativeObj" : 
-		{
-			"description" : "原生对象"
-		}
-	},
-	"plus" : 
-	{
-		"splashscreen" : 
-		{
-			"autoclose" : true, /*是否自动关闭程序启动界面,true表示应用加载应用入口页面后自动关闭;false则需调plus.navigator.closeSplashscreen()关闭*/
-			
-			"waiting" : false /*是否在程序启动界面显示等待雪花,true表示显示,false表示不显示。*/
-			
-		},
-		"popGesture" : "close", /*设置应用默认侧滑返回关闭Webview窗口,"none"为无侧滑返回功能,"hide"为侧滑隐藏Webview窗口。参考http://ask.dcloud.net.cn/article/102*/
-		
-		"runmode" : "normal", /*应用的首次启动运行模式,可取liberate或normal,liberate模式在第一次启动时将解压应用资源(Android平台File API才可正常访问_www目录)*/
-		
-		"signature" : "Sk9JTiBVUyBtYWlsdG86aHIyMDEzQGRjbG91ZC5pbw==", /*可选,保留给应用签名,暂不使用*/
-		
-		"distribute" : 
-		{
-			"apple" : 
-			{
-				"appid" : "", /*iOS应用标识,苹果开发网站申请的appid,如io.dcloud.HelloH5*/
-				
-				"mobileprovision" : "", /*iOS应用打包配置文件*/
-				
-				"password" : "", /*iOS应用打包个人证书导入密码*/
-				
-				"p12" : "", /*iOS应用打包个人证书,打包配置文件关联的个人证书*/
-				
-				"devices" : "universal", /*iOS应用支持的设备类型,可取值iphone/ipad/universal*/
-				
-				"frameworks" : [] /*调用Native.js调用原生Objective-c API需要引用的FrameWork,如需调用GameCenter,则添加"GameKit.framework"*/
-				
-			},
-			"google" : 
-			{
-				"packagename" : "", /*Android应用包名,如io.dcloud.HelloH5*/
-				
-				"keystore" : "", /*Android应用打包使用的密钥库文件*/
-				
-				"password" : "", /*Android应用打包使用密钥库中证书的密码*/
-				
-				"aliasname" : "", /*Android应用打包使用密钥库中证书的别名*/
-				
-				"permissions" : 
-				[
-					"<uses-feature android:name=\"android.hardware.camera\"/>",
-					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
-					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
-					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-					"<uses-permission android:name=\"android.permission.INTERNET\"/>",
-					"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
-					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
-					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-					"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
-					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-				]
-			},
-			/*使用Native.js调用原生安卓API需要使用到的系统权限*/
-			"orientation" : 
-			[
-				"portrait-primary",
-				"portrait-secondary"
-			], /*应用支持的方向,portrait-primary:竖屏正方向;portrait-secondary:竖屏反方向;landscape-primary:横屏正方向;landscape-secondary:横屏反方向*/
-			
-			"icons" : 
-			{
-				"ios" : 
-				{
-					"prerendered" : true, /*应用图标是否已经高亮处理,在iOS6及以下设备上有效*/
-					
-					"auto" : "", /*应用图标,分辨率:512x512,用于自动生成各种尺寸程序图标*/
-					
-					"iphone" : 
-					{
-						"normal" : "", /*iPhone3/3GS程序图标,分辨率:57x57*/
-						
-						"retina" : "", /*iPhone4程序图标,分辨率:114x114*/
-						
-						"retina7" : "", /*iPhone4S/5/6程序图标,分辨率:120x120*/
-						
-						"retina8" : "", /*iPhone6 Plus程序图标,分辨率:180x180*/
-						
-						"spotlight-normal" : "", /*iPhone3/3GS Spotlight搜索程序图标,分辨率:29x29*/
-						
-						"spotlight-retina" : "", /*iPhone4 Spotlight搜索程序图标,分辨率:58x58*/
-						
-						"spotlight-retina7" : "", /*iPhone4S/5/6 Spotlight搜索程序图标,分辨率:80x80*/
-						
-						"settings-normal" : "", /*iPhone4设置页面程序图标,分辨率:29x29*/
-						
-						"settings-retina" : "", /*iPhone4S/5/6设置页面程序图标,分辨率:58x58*/
-						
-						"settings-retina8" : "", /*iPhone6Plus设置页面程序图标,分辨率:87x87*/
-						
-						"app@2x" : "unpackage/res/icons/120x120.png",
-						"app@3x" : "unpackage/res/icons/180x180.png",
-						"notification@2x" : "unpackage/res/icons/40x40.png",
-						"notification@3x" : "unpackage/res/icons/60x60.png",
-						"settings@2x" : "unpackage/res/icons/58x58.png",
-						"settings@3x" : "unpackage/res/icons/87x87.png",
-						"spotlight@2x" : "unpackage/res/icons/80x80.png",
-						"spotlight@3x" : "unpackage/res/icons/120x120.png"
-					},
-					"ipad" : 
-					{
-						"normal" : "", /*iPad普通屏幕程序图标,分辨率:72x72*/
-						
-						"retina" : "", /*iPad高分屏程序图标,分辨率:144x144*/
-						
-						"normal7" : "", /*iPad iOS7程序图标,分辨率:76x76*/
-						
-						"retina7" : "", /*iPad iOS7高分屏程序图标,分辨率:152x152*/
-						
-						"spotlight-normal" : "", /*iPad Spotlight搜索程序图标,分辨率:50x50*/
-						
-						"spotlight-retina" : "", /*iPad高分屏Spotlight搜索程序图标,分辨率:100x100*/
-						
-						"spotlight-normal7" : "", /*iPad iOS7 Spotlight搜索程序图标,分辨率:40x40*/
-						
-						"spotlight-retina7" : "", /*iPad iOS7高分屏Spotlight搜索程序图标,分辨率:80x80*/
-						
-						"settings-normal" : "", /*iPad设置页面程序图标,分辨率:29x29*/
-						
-						"settings-retina" : "", /*iPad高分屏设置页面程序图标,分辨率:58x58*/
-						
-						"app" : "unpackage/res/icons/76x76.png",
-						"app@2x" : "unpackage/res/icons/152x152.png",
-						"notification" : "unpackage/res/icons/20x20.png",
-						"notification@2x" : "unpackage/res/icons/40x40.png",
-						"proapp@2x" : "unpackage/res/icons/167x167.png",
-						"settings" : "unpackage/res/icons/29x29.png",
-						"settings@2x" : "unpackage/res/icons/58x58.png",
-						"spotlight" : "unpackage/res/icons/40x40.png",
-						"spotlight@2x" : "unpackage/res/icons/80x80.png"
-					},
-					"appstore" : "unpackage/res/icons/1024x1024.png"
-				},
-				"android" : 
-				{
-					"mdpi" : "unpackage/res/icons/48x48.png", /*普通屏程序图标,分辨率:48x48*/
-					
-					"ldpi" : "unpackage/res/icons/48x48.png", /*大屏程序图标,分辨率:48x48*/
-					
-					"hdpi" : "unpackage/res/icons/72x72.png", /*高分屏程序图标,分辨率:72x72*/
-					
-					"xhdpi" : "unpackage/res/icons/96x96.png", /*720P高分屏程序图标,分辨率:96x96*/
-					
-					"xxhdpi" : "unpackage/res/icons/144x144.png", /*1080P 高分屏程序图标,分辨率:144x144*/
-					
-					"xxxhdpi" : "unpackage/res/icons/192x192.png"
-				}
-			},
-			"splashscreen" : 
-			{
-				"ios" : 
-				{
-					"iphone" : 
-					{
-						"default" : "", /*iPhone3启动图片选,分辨率:320x480*/
-						
-						"retina35" : "", /*3.5英寸设备(iPhone4)启动图片,分辨率:640x960*/
-						
-						"retina40" : "", /*4.0 英寸设备(iPhone5/iPhone5s)启动图片,分辨率:640x1136*/
-						
-						"retina47" : "", /*4.7 英寸设备(iPhone6)启动图片,分辨率:750x1334*/
-						
-						"retina55" : "", /*5.5 英寸设备(iPhone6 Plus)启动图片,分辨率:1242x2208*/
-						
-						"retina55l" : "" /*5.5 英寸设备(iPhone6 Plus)横屏启动图片,分辨率:2208x1242*/
-						
-					},
-					"ipad" : 
-					{
-						"portrait" : "", /*iPad竖屏启动图片,分辨率:768x1004*/
-						
-						"portrait-retina" : "", /*iPad高分屏竖屏图片,分辨率:1536x2008*/
-						
-						"landscape" : "", /*iPad横屏启动图片,分辨率:1024x748*/
-						
-						"landscape-retina" : "", /*iPad高分屏横屏启动图片,分辨率:2048x1496*/
-						
-						"portrait7" : "", /*iPad iOS7竖屏启动图片,分辨率:768x1024*/
-						
-						"portrait-retina7" : "", /*iPad iOS7高分屏竖屏图片,分辨率:1536x2048*/
-						
-						"landscape7" : "", /*iPad iOS7横屏启动图片,分辨率:1024x768*/
-						
-						"landscape-retina7" : "" /*iPad iOS7高分屏横屏启动图片,分辨率:2048x1536*/
-						
-					}
-				},
-				"android" : 
-				{
-					"mdpi" : "", /*普通屏启动图片,分辨率:240x282*/
-					
-					"ldpi" : "", /*大屏启动图片,分辨率:320x442*/
-					
-					"hdpi" : "", /*高分屏启动图片,分辨率:480x762*/
-					
-					"xhdpi" : "", /*720P高分屏启动图片,分辨率:720x1242*/
-					
-					"xxhdpi" : "" /*1080P高分屏启动图片,分辨率:1080x1882*/
-					
-				}
-			},
-			"plugins" : 
-			{
-				"speech" : {},
-				"ad" : null
-			}
-		},
-		"screenOrientation" : 
-		[
-			"portrait-primary",
-			"portrait-secondary"
-		]
-	},
-	"fullscreen" : true
+    "@platforms" : [ "android", "iPhone", "iPad" ],
+    "id" : "H5052C011", /*应用的标识*/
+    "name" : "smcr-summoner", /*应用名称,程序桌面图标名称*/
+    "version" : {
+        "name" : "1.1", /*应用版本名称*/
+        "code" : ""
+    },
+    "description" : "网络版、服务器版合二为一,切换方便。", /*应用描述信息*/
+    "icons" : {
+        "72" : "icon.png"
+    },
+    "launch_path" : "index.html", /*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/
+    "developer" : {
+        "name" : "", /*开发者名称*/
+        "email" : "", /*开发者邮箱地址*/
+        "url" : "" /*开发者个人主页地址*/
+    },
+    "permissions" : {
+        "Accelerometer" : {
+            "description" : "访问加速度感应器"
+        },
+        "Audio" : {
+            "description" : "访问麦克风"
+        },
+        "Cache" : {
+            "description" : "管理应用缓存"
+        },
+        "Camera" : {
+            "description" : "访问摄像头"
+        },
+        "Console" : {
+            "description" : "跟踪调试输出日志"
+        },
+        "Device" : {
+            "description" : "访问设备信息"
+        },
+        "Downloader" : {
+            "description" : "文件下载管理"
+        },
+        "Events" : {
+            "description" : "应用扩展事件"
+        },
+        "File" : {
+            "description" : "访问本地文件系统"
+        },
+        "Gallery" : {
+            "description" : "访问系统相册"
+        },
+        "Geolocation" : {
+            "description" : "访问位置信息"
+        },
+        "Invocation" : {
+            "description" : "使用Native.js能力"
+        },
+        "Orientation" : {
+            "description" : "访问方向感应器"
+        },
+        "Proximity" : {
+            "description" : "访问距离感应器"
+        },
+        "Storage" : {
+            "description" : "管理应用本地数据"
+        },
+        "Uploader" : {
+            "description" : "管理文件上传任务"
+        },
+        "Runtime" : {
+            "description" : "访问运行期环境"
+        },
+        "XMLHttpRequest" : {
+            "description" : "跨域网络访问"
+        },
+        "Zip" : {
+            "description" : "文件压缩与解压缩"
+        },
+        "Barcode" : {
+            "description" : "管理二维码扫描插件"
+        },
+        "Webview" : {
+            "description" : "窗口管理"
+        },
+        "NativeUI" : {
+            "description" : "原生UI控件"
+        },
+        "Navigator" : {
+            "description" : "浏览器信息"
+        },
+        "NativeObj" : {
+            "description" : "原生对象"
+        }
+    },
+    "plus" : {
+        "splashscreen" : {
+            "autoclose" : true, /*是否自动关闭程序启动界面,true表示应用加载应用入口页面后自动关闭;false则需调plus.navigator.closeSplashscreen()关闭*/
+            "waiting" : false /*是否在程序启动界面显示等待雪花,true表示显示,false表示不显示。*/
+        },
+        "popGesture" : "close", /*设置应用默认侧滑返回关闭Webview窗口,"none"为无侧滑返回功能,"hide"为侧滑隐藏Webview窗口。参考http://ask.dcloud.net.cn/article/102*/
+        "runmode" : "normal", /*应用的首次启动运行模式,可取liberate或normal,liberate模式在第一次启动时将解压应用资源(Android平台File API才可正常访问_www目录)*/
+        "signature" : "Sk9JTiBVUyBtYWlsdG86aHIyMDEzQGRjbG91ZC5pbw==", /*可选,保留给应用签名,暂不使用*/
+        "distribute" : {
+            "apple" : {
+                "appid" : "", /*iOS应用标识,苹果开发网站申请的appid,如io.dcloud.HelloH5*/
+                "mobileprovision" : "", /*iOS应用打包配置文件*/
+                "password" : "", /*iOS应用打包个人证书导入密码*/
+                "p12" : "", /*iOS应用打包个人证书,打包配置文件关联的个人证书*/
+                "devices" : "universal", /*iOS应用支持的设备类型,可取值iphone/ipad/universal*/
+                "frameworks" : [] /*调用Native.js调用原生Objective-c API需要引用的FrameWork,如需调用GameCenter,则添加"GameKit.framework"*/
+            },
+            "google" : {
+                "packagename" : "", /*Android应用包名,如io.dcloud.HelloH5*/
+                "keystore" : "", /*Android应用打包使用的密钥库文件*/
+                "password" : "", /*Android应用打包使用密钥库中证书的密码*/
+                "aliasname" : "", /*Android应用打包使用密钥库中证书的别名*/
+                "permissions" : [
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.INTERNET\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /*使用Native.js调用原生安卓API需要使用到的系统权限*/
+            "orientation" : [ "portrait-primary", "portrait-secondary" ], /*应用支持的方向,portrait-primary:竖屏正方向;portrait-secondary:竖屏反方向;landscape-primary:横屏正方向;landscape-secondary:横屏反方向*/
+            "icons" : {
+                "ios" : {
+                    "prerendered" : true, /*应用图标是否已经高亮处理,在iOS6及以下设备上有效*/
+                    "auto" : "", /*应用图标,分辨率:512x512,用于自动生成各种尺寸程序图标*/
+                    "iphone" : {
+                        "normal" : "", /*iPhone3/3GS程序图标,分辨率:57x57*/
+                        "retina" : "", /*iPhone4程序图标,分辨率:114x114*/
+                        "retina7" : "", /*iPhone4S/5/6程序图标,分辨率:120x120*/
+                        "retina8" : "", /*iPhone6 Plus程序图标,分辨率:180x180*/
+                        "spotlight-normal" : "", /*iPhone3/3GS Spotlight搜索程序图标,分辨率:29x29*/
+                        "spotlight-retina" : "", /*iPhone4 Spotlight搜索程序图标,分辨率:58x58*/
+                        "spotlight-retina7" : "", /*iPhone4S/5/6 Spotlight搜索程序图标,分辨率:80x80*/
+                        "settings-normal" : "", /*iPhone4设置页面程序图标,分辨率:29x29*/
+                        "settings-retina" : "", /*iPhone4S/5/6设置页面程序图标,分辨率:58x58*/
+                        "settings-retina8" : "", /*iPhone6Plus设置页面程序图标,分辨率:87x87*/
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    },
+                    "ipad" : {
+                        "normal" : "", /*iPad普通屏幕程序图标,分辨率:72x72*/
+                        "retina" : "", /*iPad高分屏程序图标,分辨率:144x144*/
+                        "normal7" : "", /*iPad iOS7程序图标,分辨率:76x76*/
+                        "retina7" : "", /*iPad iOS7高分屏程序图标,分辨率:152x152*/
+                        "spotlight-normal" : "", /*iPad Spotlight搜索程序图标,分辨率:50x50*/
+                        "spotlight-retina" : "", /*iPad高分屏Spotlight搜索程序图标,分辨率:100x100*/
+                        "spotlight-normal7" : "", /*iPad iOS7 Spotlight搜索程序图标,分辨率:40x40*/
+                        "spotlight-retina7" : "", /*iPad iOS7高分屏Spotlight搜索程序图标,分辨率:80x80*/
+                        "settings-normal" : "", /*iPad设置页面程序图标,分辨率:29x29*/
+                        "settings-retina" : "", /*iPad高分屏设置页面程序图标,分辨率:58x58*/
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "appstore" : "unpackage/res/icons/1024x1024.png"
+                },
+                "android" : {
+                    "mdpi" : "unpackage/res/icons/48x48.png", /*普通屏程序图标,分辨率:48x48*/
+                    "ldpi" : "unpackage/res/icons/48x48.png", /*大屏程序图标,分辨率:48x48*/
+                    "hdpi" : "unpackage/res/icons/72x72.png", /*高分屏程序图标,分辨率:72x72*/
+                    "xhdpi" : "unpackage/res/icons/96x96.png", /*720P高分屏程序图标,分辨率:96x96*/
+                    "xxhdpi" : "unpackage/res/icons/144x144.png", /*1080P 高分屏程序图标,分辨率:144x144*/
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                }
+            },
+            "splashscreen" : {
+                "ios" : {
+                    "iphone" : {
+                        "default" : "", /*iPhone3启动图片选,分辨率:320x480*/
+                        "retina35" : "", /*3.5英寸设备(iPhone4)启动图片,分辨率:640x960*/
+                        "retina40" : "", /*4.0 英寸设备(iPhone5/iPhone5s)启动图片,分辨率:640x1136*/
+                        "retina47" : "", /*4.7 英寸设备(iPhone6)启动图片,分辨率:750x1334*/
+                        "retina55" : "", /*5.5 英寸设备(iPhone6 Plus)启动图片,分辨率:1242x2208*/
+                        "retina55l" : "" /*5.5 英寸设备(iPhone6 Plus)横屏启动图片,分辨率:2208x1242*/
+                    },
+                    "ipad" : {
+                        "portrait" : "", /*iPad竖屏启动图片,分辨率:768x1004*/
+                        "portrait-retina" : "", /*iPad高分屏竖屏图片,分辨率:1536x2008*/
+                        "landscape" : "", /*iPad横屏启动图片,分辨率:1024x748*/
+                        "landscape-retina" : "", /*iPad高分屏横屏启动图片,分辨率:2048x1496*/
+                        "portrait7" : "", /*iPad iOS7竖屏启动图片,分辨率:768x1024*/
+                        "portrait-retina7" : "", /*iPad iOS7高分屏竖屏图片,分辨率:1536x2048*/
+                        "landscape7" : "", /*iPad iOS7横屏启动图片,分辨率:1024x768*/
+                        "landscape-retina7" : "" /*iPad iOS7高分屏横屏启动图片,分辨率:2048x1536*/
+                    }
+                },
+                "android" : {
+                    "mdpi" : "", /*普通屏启动图片,分辨率:240x282*/
+                    "ldpi" : "", /*大屏启动图片,分辨率:320x442*/
+                    "hdpi" : "", /*高分屏启动图片,分辨率:480x762*/
+                    "xhdpi" : "", /*720P高分屏启动图片,分辨率:720x1242*/
+                    "xxhdpi" : "" /*1080P高分屏启动图片,分辨率:1080x1882*/
+                }
+            },
+            "plugins" : {
+                "speech" : {},
+                "ad" : {}
+            }
+        },
+        "screenOrientation" : [ "portrait-primary" ]
+    },
+    "fullscreen" : true
 }