路由管理优化

This commit is contained in:
tanghc
2019-03-17 23:02:13 +08:00
parent a5b2d9c51b
commit 5d436081a5
47 changed files with 1037 additions and 291 deletions

View File

@@ -0,0 +1,24 @@
var Common = (function () {
function initProfiles() {
var $profileList = $('#profileList');
if ($profileList.length > 0) {
ApiUtil.post('system.profile.list', {}, function (resp) {
var list = resp.data;
var html = [];
for (var i = 0; i < list.length; i++) {
html.push('<li' + (i == 0 ? ' class="layui-this"' : '') + '>' + list[i] + '</li>');
}
$profileList.html(html.join(''))
$profileList.find('li').on('click', function () {
window.profile = $(this).text();
});
});
}
}
initProfiles();
return {}
})();