Failed to judge the returned value of ajax

failed to judge the return value of ajax.

function getdl(post_id,uid){
layer.load(1);
$.ajax({
type: "POST",
url:jsui.pux + "/download.php",
data: {post_id:post_id,user_id:uid},
success: function(data){
layer.closeAll("loading");
if(data==1){layer.msg("");}else{layer.msg(data);}
}
});
}

when 1 is returned, the program always pops up 1 instead of popping up your permissions are not enough.
the server-side return code echo 1; and echo"1; have both tried without

-Please help

Mar.03,2021
Menu