lick(function(){ var url=$(this).attr("href"); return checkPermisson(url); }); }); function checkPermisson(url ){ var permission=true; var type=""; if(url.indexOf("fxbg")>-1){ type="fxbg"; var target="分析报告"; }else if(url.indexOf("/issue/questions.jspx")>-1){ type="questions"; var target="我要提问" }else if(url.indexOf("/issue/issuemainMyPage.jspx")>-1){ type="issuemainMyPage"; var target="我的问题"; }else if(url.indexOf("/knowledge/search.jspx")>-1){ type="knowledge"; var target="知识库"; }else if (url.indexOf("/third/thirdInfoMainPage.jspx")>-1) { type="bbsq"; var target="报备申请"; }else if (url.indexOf("/third/thirdInfoCheckPage.jspx")>-1) { type="xxcx"; var target="信息查询"; } if(type!==""){ $.ajax({ url: '/membermanager/getPermissionFront.jspx', type: 'POST', async: false, data:{"type":type}, dataType: 'json', success: function(data) { if(data.flag=="false"){ alert("没有查看"+ target +"的权限"); permission=false; }else if (data.flag=="login") { if(confirm("您尚未登录无法访问"+target+",是否跳转到登录页面")){ window.location.href="/membermanager/memlogin.jspx"; }else { permission=false; } } } }); } return permission; }