<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE html>
<html>
 <head>
<title></title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="stylesheet" href="${contextPath}/static/weixin/ssdb/css/weui.min.css">
<link rel="stylesheet" href="${contextPath}/static/weixin/ssdb/css/jquery-weui.css">
<link rel="stylesheet" href="${contextPath}/static/weixin/ssdb/css/ssdb.css">
  </head>
  <body>
  		<section id="orderList">
  		<!-- <div class="weui_cells_access">
        <a class="weui_cell" href="javascript:;">
          <div class="weui_cell_bd weui_cell_primary fs-18">
            <p>诉讼保全担保</p>
          </div>
          <div class="weui_cell_ft fs-16"><span class="fc-333">订单号:</span>&nbsp;<span class="fc-333 ">111111111</span></div>
        </a>
        <div><div style="margin-left: 0.6rem;" class="retinabb"></div></div>
        <a href="javascript:void(0);" class="weui_media_box weui_media_appmsg">
          <div class="weui_media_hd">
            <img class="weui_media_appmsg_thumb" style="width: 4rem;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAMAAAAOusbgAAAAeFBMVEUAwAD///+U5ZTc9twOww7G8MYwzDCH4YcfyR9x23Hw+/DY9dhm2WZG0kbT9NP0/PTL8sux7LFe115T1VM+zz7i+OIXxhes6qxr2mvA8MCe6J6M4oz6/frr+us5zjn2/fa67rqB4IF13XWn6ad83nxa1loqyirn+eccHxx4AAAC/klEQVRo3u2W2ZKiQBBF8wpCNSCyLwri7v//4bRIFVXoTBBB+DAReV5sG6lTXDITiGEYhmEYhmEYhmEYhmEY5v9i5fsZGRx9PyGDne8f6K9cfd+mKXe1yNG/0CcqYE86AkBMBh66f20deBc7wA/1WFiTwvSEpBMA2JJOBsSLxe/4QEEaJRrASP8EVF8Q74GbmevKg0saa0B8QbwBdjRyADYxIhqxAZ++IKYtciPXLQVG+imw+oo4Bu56rjEJ4GYsvPmKOAB+xlz7L5aevqUXuePWVhvWJ4eWiwUQ67mK51qPj4dFDMlRLBZTqF3SDvmr4BwtkECu5gHWPkmDfQh02WLxXuvbvC8ku8F57GsI5e0CmUwLz1kq3kD17R1In5816rGvQ5VMk5FEtIiWislTffuDpl/k/PzscdQsv8r9qWq4LRWX6tQYtTxvI3XyrwdyQxChXioOngH3dLgOFjk0all56XRi/wDFQrGQU3Os5t0wJu1GNtNKHdPqYaGYQuRDfbfDf26AGLYSyGS3ZAK4S8XuoAlxGSdYMKwqZKM9XJMtyqXi7HX/CiAZS6d8bSVUz5J36mEMFDTlAFQzxOT1dzLRljjB6+++ejFqka+mXIe6F59mw22OuOw1F4T6lg/9VjL1rLDoI9Xzl1MSYDNHnPQnt3D1EE7PrXjye/3pVpr1Z45hMUdcACc5NVQI0bOdS1WA0wuz73e7/5TNqBPhQXPEFGJNV2zNqWI7QKBd2Gn6AiBko02zuAOXeWIXjV0jNqdKegaE/kJQ6Bfs4aju04lMLkA2T5wBSYPKDGF3RKhFYEa6A1L1LG2yacmsaZ6YPOSAMKNsO+N5dNTfkc5Aqe26uxHpx7ZirvgCwJpWq/lmX1hA7LyabQ34tt5RiJKXSwQ+0KU0V5xg+hZrd4Bn1n4EID+WkQdgLfRNtvil9SPfwy+WQ7PFBWQz6dGWZBLkeJFXZGCfLUjCgGgqXo5TuSu3cugdcTv/HjqnBTEMwzAMwzAMwzAMwzAMw/zf/AFbXiOA6frlMAAAAABJRU5ErkJggg==" alt="">
          </div>
          <div style="margin-left: 1.5rem;padding-top: 0;">
            <p class="weui_media_desc" style="font-size: 16px;">大通湖管理区人民法院</p>
            <p class="weui_media_desc" ><span>保费:</span><span >1620元</span>&nbsp;<span>积分:0</span></p>
          </div>
        </a>
        <div><div style="margin-left: 0.6rem;" class="retinabb"></div> </div>
        <div>
        <div class="weui_cell">
          <div class="weui_cell_bd weui_cell_primary">
            <p>2016-11-10 15:30:00</p>
          </div>
          <div style="color: #ff9900;">待付款</div>
        </div>
        <div class="retinabb"></div>
      </div>
      </div> -->
  	</section>
    <div id='couniter'></div>
  </body>
    <script type="text/javascript" src="${contextPath}/static/js/jquery-1.12.0.min.js"></script>
  <script type="text/javascript" src="${contextPath}/static/js/layer/layer.js"></script>
  <script type="text/javascript" src="${contextPath}/static/js/jstorage.js"></script>
  <script type="text/javascript" src="${contextPath}/static/js/requestutil.js"></script>
  <script type="text/javascript" src="${contextPath}/static/js/laypage.js"></script>
  <script type="text/javascript">
 	$(document).ready(function() {
 				var baseURL='<%=com.fadu.app.util.AppConfig.url_duowenapp_b%>';
 				token=$.jStorage.get("token");
 				if(!token){
	 				 layer.msg('没有登录,请登录!!');
	  				 var url="${contextPath}/web/ssdb/toLogin";
					 location.href=url;  	
 				}
  				var jsonReq={};
  				jsonReq.token=token;
		  		jsonReq.actionCode="B510";
		  		var url=baseURL+"/B/android/";
		  		console.log(jsonReq);
		  		requestData(url,jsonReq,success,fail);
		  		function success(json){
  				console.log(json);
  			    if(json){
	  					if(json.success==true){
	  						var rownum=json.total;
	  						var nums = 10; //每页出现的数量
							var pages = rownum/10; //得到总页数
							//调用分页
							laypage({
							    cont: 'couniter',
							    pages: pages,
							    jump: function(obj){
							    console.log(obj);
							    	var jsonBcode={};
									jsonBcode.token=token;
									jsonBcode.actionCode="B510";
									//jsonBcode.pageSize=0;
									jsonBcode.page=obj.curr;
									console.log(jsonBcode);
									requestData(url,jsonBcode,function(e){
									console.log(e);
									if(e.success==true){
									var orders=e.orders;
									var html='';
									$.each(orders,function(index,value){
										html=html+'<div class="weui_cells_access" attr-id="'+value.orderId+'" attr-step="'+value.maxStep+'" id="detailID"  > <a class="weui_cell" href="javascript:;"><div class="weui_cell_bd weui_cell_primary fs-18">';
										html=html+'<p>'+value.companyName+'</p></div>';
										html=html+'<div class="weui_cell_ft fs-16"><span class="fc-333">订单号:</span>&nbsp;<span class="fc-333 ">'+value.orderId+'</span></div></a>';
										html=html+'<div><div style="margin-left: 0.6rem;" class="retinabb"></div></div>';
										html=html+'<a href="javascript:void(0);" class="weui_media_box weui_media_appmsg">';
										html=html+'<div class="weui_media_hd">';
										html=html+'<img class="weui_media_appmsg_thumb" style="width: 4rem;" src="'+value.path+'" alt=""> </div>';
										html=html+'<div style="margin-left: 1.5rem;padding-top: 0;">';
										html=html+'<p class="weui_media_desc" style="font-size: 16px;">'+value.courtName+'</p>';
										html=html+'<p class="weui_media_desc" ><span>保费:</span><span >'+value.bf+'元</span>&nbsp;<span>积分:'+value.points+'</span></p></div> </a>';
										html=html+'<div><div style="margin-left: 0.6rem;" class="retinabb"></div> </div><div><div class="weui_cell"><div class="weui_cell_bd weui_cell_primary">';
										html=html+' <p>'+value.createDate+'</p> </div><div style="color: #ff9900;">'+value.state+'</div></div> <div class="retinabb"></div></div></div>';
										});
										$("#orderList").append(html);
									}else{
										layer.msg(e.message);	
										console.log(e);
									 }
									},B510Fail);
							    }
							});
	  					}else{
	  						layer.msg(json.message);	
	  					}
	  				}else{
	  					layer.msg("获取信息失败!!");
	  				}	
  			}
  			$(document).on('click', '#detailID', function () {
  				var _this=$(this);
  				var orderId=_this.attr("attr-id");
  				var step=_this.attr("attr-step");
				if(step==3){
					var url="${contextPath}/web/ssdb/ssdbpay/"+orderId+"/"+token;
			  		location.href=url;
				}else if(step==4){
					var url="${contextPath}/web/ssdb/toLetter?orderId="+orderId;
			  		location.href=url;
				}else if(step==2){
					var url="${contextPath}/web/ssdb/toConfirm?orderId="+orderId;
	  				location.href=url;
				}else{
					var url="${contextPath}/web/ssdb/search";
		  			location.href=url;
				}
		    });
  			function B510Fail(resp){
  				console.log(resp);
  			}
  			function fail(resp){
  				console.log(resp);
  			}
   });
  </script>
</html>
