<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() == '/agent/merchant/check'}-->layui-this<!--{/if}-->"><a href="{echo url('merchant/check')}">商户进件</a></dd>
					<dd class="<!--{if url() == '/agent/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() == '/agent/agent/index'}-->layui-this<!--{/if}-->"><a href="{echo url('agent/index')}">代理列表</a></dd>
					<dd class="<!--{if url() == '/agent/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() == '/agent/trade/index'}-->layui-this<!--{/if}-->"><a href="{echo url('trade/index')}">交易列表</a></dd>
					<dd style="display:none" class="<!--{if url() == '/agent/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() == '/agent/store/index'}-->layui-this<!--{/if}-->"><a href="{echo url('store/index')}">门店列表</a></dd>
					<dd class="<!--{if url() == '/agent/person/index'}-->layui-this<!--{/if}-->"><a href="{echo url('person/index')}">店员列表</a></dd>
					<dd class="<!--{if url() == '/agent/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(), ['Profile'])}-->layui-nav-itemed<!--{/if}-->">
				<a class="layui-nav-parent" href="javascript:;">基本信息</a>
				<dl class="layui-nav-child">
					<dd class="<!--{if url() == '/agent/profile/index'}-->layui-this<!--{/if}-->"><a href="{echo url('profile/index')}">基本资料</a></dd>
				</dl>
			</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>
