You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
723 B
24 lines
723 B
6 years ago
|
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 {}
|
||
|
})();
|