mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 12:56:28 +08:00
24 lines
723 B
JavaScript
24 lines
723 B
JavaScript
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 {}
|
|
})(); |