<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
<title>{echo admin_title()}</title>
<!--header-->
{template _:header}
</head>
<body>
<div class="layui-layout layui-layout-admin">
<!--top-->
{template _main_top}
<!--nav-->
{template _main_nav}
	<div class="position">
		<h1>会员列表</h1>
	</div>
	<div class="layui-body admin-body">
		<div class="admin-content">
			<div class="searcher">
				<form name="sch_form" id="sch_form" method="get" action="{echo \befen\get_url()}">
					<div class="layui-input-inline"><input type="text" name="wd" id="wd" class="layui-input" value="{echo input('param.wd')}" placeholder="姓名/电话/卡号"></div>
					<div class="layui-input-inline layui-left-margin"><button type="submit" id="search" class="layui-btn">查询</button></div>
				</form>
				<div class="clear"></div>
			</div>
			<form name="theform" id="theform" method="post" action="{echo \befen\get_url()}">
			<table class="layui-table">
				<thead>
					<tr>
						<th>会员ID</th>
						<th>卡号</th>
						<th>余额</th>
						<th>积分</th>
						<th>姓名</th>
						<th>渠道</th>
						<th>管理操作</th>
					</tr>
				</thead>
				<tbody>
					<!--{loop $list $key $val}-->
					<tr id="">
						<td>{$val[id]}</td>
						<td>{$val[card_no]}</td>
						<td>{$val[balance]}</td>
						<td>{$val[credit]}</td>
						<td>{$val[username]}</td>
						<td>
							<!--{if $val['user_id']}--><span class="layui-badge" style="background:#1677FF;">支付宝</span> <!--{/if}-->
							<!--{if $val['mini_openid']}--><span class="layui-badge" style="background:#22AC38;">微信</span> <!--{/if}-->
						</td>
						<td class="op">
							<a op="detail" lay-url="{echo url('user/detail', ['mch_uid' => $val['id']])}" class="layui-btn layui-btn-xs layui-btn-normal">会员详情</a>
							<a op="update" lay-url="{echo url('user/update', ['mch_uid' => $val['id']])}" class="layui-btn layui-btn-xs layui-btn-danger">会员调账</a>
						</td>
					</tr>
					<!--{/loop}-->
				</tbody>
			</table>
			</form>
			<div class="listpages">{$pagenav}</div>
		</div>
	</div>
</div>
<!--footer-->
{template _:footer}
<script type="text/javascript">
$("a[op=detail]").click(function(){
	showWindow('', $(this).attr('lay-url'), '600px');
});
$("a[op=update]").click(function(){
	showWindow('', $(this).attr('lay-url'), '400px');
});
</script>
</body>
</html>