<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/html5.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/respond.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/PIE_IE678.js"></script>
<![endif]-->
<link href="${pageContext.request.contextPath }/common/css/bootstrap.min-3.3.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/lib/select2/select2.min.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<style>
#datainit{
 margin-left:5px;
}

</style>
<title>分销商管理操作</title>
</head>
<body>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/select2/select2.min.js"></script>
<div class="codeView">
			<form class="form form-horizontal" id="form-Validform" novalidate="novalidate">
				<input type="hidden" name="initCode" id="initCode" value="${initCode}">
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-3">openId：</label>
					<div class="formControls col-xs-6 col-sm-6">
						<input type="text" class="input-text" datatype="*2-10" placeholder="openId" nullmsg="openId不能为空" value="" name="openId" id="openId">
					</div>
				</div>
				<div class="row cl">
					<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
						 <input class="btn btn-primary" type="button" onclick ="binding();" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
					     <input class="btn btn-primary" type="button" onclick="closeWindow()"  value="&nbsp;&nbsp;取消&nbsp;&nbsp;">
					</div>
				</div>
			</form>
		</div>

<div class="pd-20">
	<form action="${pageContext.request.contextPath }/admin/drp/bindingPlaceInfo" method="post" id="form-admin-add">
	<div class="text-c"> 
		<input type="text" class="input-text" style="width:250px" placeholder="输入会员昵称、电话" value="${userInput }" id="" name="userInput">
		<button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>
	</div>
	</form>
	<!-- <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> <a href="javascript:;" onclick="member_add('添加用户','member-add.html','','510')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加用户</a></span> <span class="r">共有数据：<strong>88</strong> 条</span> </div> -->
	<div class="mt-20">
	<table class="table table-border table-bordered table-hover table-bg table-sort" id="showMember">
		<thead>
			<tr class="text-c">
				<th width="100">用户头像</th>
				<th width="100">昵称</th>
				<th width="100">OpenID</th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${!(empty memberList) }">
				<c:forEach items="${memberList }" var="user">
					<tr class="text-c">
						<td>
							<img alt="用户头像" src="${user.userHead }" style="width:50px;height: 50px">
						</td>
						<td>${user.userNickname }</td>
						<td>${user.userOpenid }</td>
				</tr>
				</c:forEach>
			</c:if>
			<c:if test="${empty memberList }">
				<tr class="text-c">
					<td colspan="11">没有查询到数据</td>
				</tr>
			</c:if>
		</tbody>
	</table>
	</div>
</div>
<div align="right">
	<%@include file="/common/other/paper/pager.jsp"%>
</div>

<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/laypage/1.2/laypage.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/My97DatePicker/WdatePicker.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript"> 
function binding(){
	$.ajax({
        "type" : "post",
        "url" : "/watero/admin/drp/bindingPlaceInfoSubmit",
        "dataType" : "json",
        "data" :{
       	 "initCode":$("#initCode").val(), "openId":$("#openId").val()
        },
        "success" : function(data) {
       		if(data.result == "200"){
       			alert("绑定成功！");
		       var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
		       	  parent.layer.close(index);
       		}else{
       			alert("绑定失败！");
       		}
        },
        "error":function(data){
 			  alert(data.message);
 			  alert("操作失败，请联系管理员！");
 		  }
	 });
}
  
//关闭窗口
function closeWindow(){
	  var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
	  parent.layer.close(index);
}

</script> 


</body>
</html>