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.
SOP/sop-admin/sop-admin-front/assets/js/common.js

24 lines
723 B

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 {}
})();