Solon v3.0.3

FaaS - 实战观摩 - 模板执行器

</> markdown

模板函数,可以直接执行。也可以被调用 modelAndView(path, {})

<#assign tag  = ctx.param('tag','') />
<#assign list = db.table("a_config").groupBy('tag').selectMapList("tag,count(*) num") />
<!doctype html>
<html>
<head>
    <title>配置</title>
    <link rel="stylesheet" href="${XUtil.cfgGet('cdn_durian1')}" />
    <script src="${XUtil.cfgGet('cdn_jquery')}"></script>
    <script src="${XUtil.cfgGet('cdn_jtadmin')}"></script>
    <script>
        $(function () {
            treeBind("_admin:tag","./list",'${tag}');
        });
    </script>
</head>
<body>
<main>
    <left>
        <tree>
            <ul>
                <#list list as f1>
                    <li id="${f1.tag}">${f1.tag}(${f1.num})</li>
                </#list>
            </ul>
        </tree>
    </left>
    <right class="frm">
        <iframe id="table"></iframe>
    </right>
</main>
</body>
</html>