Commit cfead008 authored by 杨思琦's avatar 杨思琦

feat: 增加无菜单判定

parent 07584e38
Pipeline #71496 waiting for manual action with stages
......@@ -4,7 +4,6 @@ import { message } from 'antd';
import { decode, encode } from 'js-base64';
import Cookies from 'js-cookie';
import sha1 from 'sha1';
import { SlideVerify } from '@wisdom-utils/components';
import { appService, noticeService } from '@/api';
import { getUserInfo, getWebSiteConfig } from '@/api/service/base';
......@@ -454,17 +453,31 @@ class Login {
self.updateConfig && self.updateConfig(self.globalConfig);
}
if (self.globalConfig.widgets.length === 0) {
message.error({
duration: 3,
content: '当前账号未配置菜单',
});
self.events.emit('loginError', '当前账号未配置菜单');
self.handleLoginError();
return;
}
window.share.event = self.events;
self.callback && self.callback();
// console.log("===loginSuccess===")
getIndustry ? self.events.emit('toggleIndustry') : self.events.emit('loginSuccess', self.history);
});
} else {
// loginSuccess
self.updateConfig && self.updateConfig(self.globalConfig);
// console.log("===loginSuccess===")
if (self.globalConfig.widgets.length === 0) {
message.error({
duration: 3,
content: '当前账号未配置菜单',
});
self.events.emit('loginError', '当前账号未配置菜单');
self.handleLoginError();
return;
}
getIndustry ? self.events.emit('toggleIndustry') : self.events.emit('loginSuccess', self.history);
window.share.event = self.events;
self.callback && self.callback();
......
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