00016-layui 동적 로드 메뉴 laytpl
12205 단어 layui
layui.config({
base: '${ctxLayui}/layuiadmin/' //
,version:new Date().getTime()
}).extend({
index: 'lib/index' //
}).use(['index','laytpl','common','form','dict','laydate'],function () {
var $ = layui.$;
var admin = layui.admin;
var laytpl = layui.laytpl;
var element = layui.element;
var form = layui.form;
var dict = layui.dict;
var laydate = layui.laydate;
var menuTpl = top.layui.view('TPL_layout');
menuTpl.container.attr('lay-url', ctx+'/business/businessUser/getMenuList?v='+layui.admin.v);// url
menuTpl.refresh();
});
인터페이스:business/businessUser/getMenuList의 반환 구조는:BusinessMenuPo/**
*
*/
private String name;
/**
*
*/
private String code;
/**
* ID
*/
private Long parentId;
/**
* ;1- ;2- ;3- ;4-
*/
private Integer type;
/**
* URL
*/
private String url;
/**
*
*/
private Integer sortOrder;
private List children;