@{
    ViewBag.Title = "";
    Layout = "~/Areas/Admin/Shared/_Layout.cshtml";
}
<div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree" lay-filter="test">
            <li class="layui-nav-item layui-nav-itemed">
                <a class="" href="javascript:;">论坛管理</a>
                <dl class="layui-nav-child menu-item">
                    <dd><a href="javascript:void(0);" datajson="{}" path="/Admin/BBS/Index">论坛文章</a></dd>
                    <dd><a href="javascript:void(0);" datajson="{}" path="/Admin/BBS/Index">论坛标签</a></dd>
                    <dd><a href="javascript:void(0);" datajson="{}" path="/Admin/BBS/Index">论坛内容分析</a></dd>
                    <dd><a href="/BBS/BBS/Index" target="_blank">查看论坛</a></dd>
                </dl>
            </li>
        </ul>
    </div>
</div>

<div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;" id="page_content">

    </div>
</div>

<script>
    var showLoading = function (obj) {

        var index = layer.msg(obj.msg, {
            icon: 16,
            shade: 0.1,
            shadeClose: false,
        });
        return index;
    };

    var closeLoading = function (index) {
        layer.close(index);
    };

    $(".menu-item>dd>a").click(function () {
        var path_item = $(this).attr("path");
        var path_json = $(this).attr("datajson");

        var index = showLoading({ msg: "数据加载中......" });
        $("#page_content").load(path_item, $.parseJSON(path_json), function () {
            //初始化绑定页面的时间，例如时间控件
            closeLoading(index);
            index = -1;
        });

        //如果出现长时间未关闭，定时关闭loading
        setTimeout(function () {
            if (index >= 0) closeLoading(index);
        }, 5000);
    });

</script>