Commit 7bc510df by zhaochengxiang

路径跳转菜单权限判断

parent f06e389e
...@@ -174,6 +174,16 @@ export const showNotifaction = function(title, tip, duration=0) { ...@@ -174,6 +174,16 @@ export const showNotifaction = function(title, tip, duration=0) {
}); });
} }
export const showInfoNotifaction = function(title, tip, duration=0) {
notification.config({ prefixCls: "yy-notification" });
notification.info({
message: title||'提示',
description: (typeof tip === 'string' ? (<span dangerouslySetInnerHTML={{ __html: tip||''}} />) : tip),
duration: duration,
});
}
export const showErrorNotifaction = function(title, tip, duration=0) { export const showErrorNotifaction = function(title, tip, duration=0) {
notification.config({ prefixCls: "yy-notification" }); notification.config({ prefixCls: "yy-notification" });
...@@ -440,19 +450,19 @@ export function checkMenuAdmit(menuinfo) { ...@@ -440,19 +450,19 @@ export function checkMenuAdmit(menuinfo) {
if((menumessage.bit&totalbit)===menumessage.bit){ if((menumessage.bit&totalbit)===menumessage.bit){
return true return true
}else{ }else{
showNotifaction('提示', `暂无访问路由${realurl}的权限`); showInfoNotifaction('提示', `暂无访问路由${realurl}的权限`);
return false return false
} }
}else{ }else{
showNotifaction('提示', `暂无访问路由${realurl}的权限`); showInfoNotifaction('提示', `暂无访问路由${realurl}的权限`);
return false; return false;
} }
} catch (error) { } catch (error) {
showNotifaction('提示', `暂无访问路由${realurl}的权限`); showInfoNotifaction('提示', `暂无访问路由${realurl}的权限`);
return false; return false;
} }
} else { } else {
showNotifaction('提示', `暂无访问路由${realurl}的权限`); showInfoNotifaction('提示', `暂无访问路由${realurl}的权限`);
return false return false
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment