<div class="layui-side admin-side" id="admin-side">
	<div class="layui-side-scroll" id="admin-navbar">
		<ul class="layui-nav layui-nav-tree" lay-filter="navbar">
			<li class="layui-nav-item <!--{if in_array(request()->controller(), ['Index'])}-->layui-nav-itemed<!--{/if}-->">
				<a class="layui-nav-parent" href="{echo url('index/index')}">控制台</a>
			</li>
			<li class="layui-nav-item <!--{if in_array(request()->controller(), ['Merchant'])}-->layui-nav-itemed<!--{/if}-->">
				<a class="layui-nav-parent" href="javascript:;">商户管理</a>
				<dl class="layui-nav-child">
					<dd class="<!--{if url() == '/console/merchant/check'}-->layui-this<!--{/if}-->"><a href="{echo url('merchant/check')}">商户进件</a></dd>
					<dd class="<!--{if url() == '/console/merchant/index'}-->layui-this<!--{/if}-->"><a href="{echo url('merchant/index')}">商户列表</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item <!--{if in_array(request()->controller(), ['Agent'])}-->layui-nav-itemed<!--{/if}-->">
				<a class="layui-nav-parent" href="javascript:;">渠道管理</a>
				<dl class="layui-nav-child">
					<dd class="<!--{if url() == '/console/agent/index'}-->layui-this<!--{/if}-->"><a href="{echo url('agent/index')}">代理列表</a></dd>
					<dd class="<!--{if url() == '/console/agent/profit'}-->layui-this<!--{/if}-->"><a href="{echo url('agent/profit')}">代理分润</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item <!--{if in_array(request()->controller(), ['Trade'])}-->layui-nav-itemed<!--{/if}-->">
				<a class="layui-nav-parent" href="javascript:;">交易管理</a>
				<dl class="layui-nav-child">
					<dd class="<!--{if url() == '/console/trade/index'}-->layui-this<!--{/if}-->"><a href="{echo url('trade/index')}">交易列表</a></dd>
					<dd style="display:none" class="<!--{if url() == '/console/trade/profit'}-->layui-this<!--{/if}-->"><a href="{echo url('trade/profit')}">交易分润</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item <!--{if in_array(request()->controller(), ['Store', 'Person', 'Device'])}-->layui-nav-itemed<!--{/if}-->">
				<a class="layui-nav-parent" href="javascript:;">门店管理</a>
				<dl class="layui-nav-child">
					<dd class="<!--{if url() == '/console/store/index'}-->layui-this<!--{/if}-->"><a href="{echo url('store/index')}">门店列表</a></dd>
					<dd class="<!--{if url() == '/console/person/index'}-->layui-this<!--{/if}-->"><a href="{echo url('person/index')}">店员列表</a></dd>
					<dd class="<!--{if url() == '/console/device/index'}-->layui-this<!--{/if}-->"><a href="{echo url('device/index')}">终端设备</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item <!--{if in_array(request()->controller(), ['PayWeixin', 'PayAlipay', 'SubpaySuixing'])}-->layui-nav-itemed<!--{/if}-->">
				<a class="layui-nav-parent" href="javascript:;">支付配置</a>
				<dl class="layui-nav-child">
					<dd class="<!--{if preg_match('/^\/console\/pay_weixin/', url())}-->layui-this<!--{/if}-->"><a href="{echo url('PayWeixin/index')}">微信</a></dd>
					<dd class="<!--{if preg_match('/^\/console\/pay_alipay/', url())}-->layui-this<!--{/if}-->"><a href="{echo url('PayAlipay/index')}">支付宝</a></dd>
					<dd class="<!--{if preg_match('/^\/console\/subpay_suixing/', url())}-->layui-this<!--{/if}-->"><a href="{echo url('SubpaySuixing/index')}">随行付</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item <!--{if in_array(request()->controller(), ['Config'])}-->layui-nav-itemed<!--{/if}-->">
				<a class="layui-nav-parent" href="javascript:;">系统设置</a>
				<dl class="layui-nav-child">
					<dd class="<!--{if url() == '/console/config/agent'}-->layui-this<!--{/if}-->"><a href="{echo url('config/agent')}">分润设置</a></dd>
					<dd class="<!--{if url() == '/console/config/notify'}-->layui-this<!--{/if}-->"><a href="{echo url('config/notify')}">通知设置</a></dd>
					<dd class="<!--{if url() == '/console/config/other'}-->layui-this<!--{/if}-->"><a href="{echo url('config/other')}">其他设置</a></dd>
					<dd class="<!--{if url() == '/console/config/weixin_template'}-->layui-this<!--{/if}-->"><a href="{echo url('config/weixin_template')}">微信模板消息</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item <!--{if in_array(request()->controller(), ['Admin'])}-->layui-nav-itemed<!--{/if}-->">
				<a class="layui-nav-parent" href="{echo url('admin/index')}">用户管理</a>
			</li>
			<li class="layui-nav-item <!--{if in_array(request()->controller(), ['Profit'])}-->layui-nav-itemed<!--{/if}-->">
				<a class="layui-nav-parent" href="{echo url('profit/index')}">分润汇总</a>
			</li>
		</ul>
	</div>
</div>
<script type="text/javascript">
layui.use("element", function(){
	var element = layui.element;
	element.on("nav(navbar)", function(data){

	});
});
$("#admin-navbar").find("li.layui-nav-item").click(function(){
	$(this).siblings().removeClass("layui-nav-itemed");
});
</script>
