hn_cloud_web/czl-screen/js/my/permission.js

20 lines
400 B
JavaScript
Raw Permalink Normal View History

2025-11-27 16:55:35 +08:00
function checkPermission() {
var pers = [];
$.ajax({
type : 'get',
2025-12-09 18:44:29 +08:00
url : czl_url + '/permissions/owns',
2025-11-27 16:55:35 +08:00
contentType : "application/json; charset=utf-8",
async : false,
success : function(data) {
pers = data;
$("[permission]").each(function() {
var per = $(this).attr("permission");
if ($.inArray(per, data) < 0) {
$(this).hide();
}
});
}
});
return pers;
}