czl-web/js/my/permission.js

20 lines
403 B
JavaScript
Raw Normal View History

2025-05-20 13:54:27 +08:00
function checkPermission() {
var pers = [];
$.ajax({
type : 'get',
url : ctxPath + '/permissions/owns',
2025-05-22 09:52:12 +08:00
// contentType : "application/json; charset=utf-8",
2025-05-20 13:54:27 +08:00
async : false,
success : function(data) {
pers = data;
$("[permission]").each(function() {
var per = $(this).attr("permission");
if ($.inArray(per, data) < 0) {
$(this).hide();
}
});
}
});
return pers;
}