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

fix: 免登修改

parent b9465cdf
Pipeline #73670 passed with stages
...@@ -23,12 +23,10 @@ const Login = forwardRef((props, _ref) => { ...@@ -23,12 +23,10 @@ const Login = forwardRef((props, _ref) => {
const param = params.getParams('token')?.replaceAll(';', '&'); const param = params.getParams('token')?.replaceAll(';', '&');
return param ? decodeURIComponent(escape(param)) : null; return param ? decodeURIComponent(escape(param)) : null;
}); });
const [authCode] = useState(() => { const [authCode] = useState(() => {
const param = params.getParams('authCode')?.replaceAll(';', '&'); const param = params.getParams('authCode')?.replaceAll(';', '&');
return param ? decodeURIComponent(escape(param)) : null; return param ? decodeURIComponent(escape(param)) : null;
}); });
// 需要在 GetGateWay 和 GetConfig 之后再执行登录。避免信息错落乱 // 需要在 GetGateWay 和 GetConfig 之后再执行登录。避免信息错落乱
const hasLogin = useRef(); const hasLogin = useRef();
useEffect(() => { useEffect(() => {
...@@ -40,13 +38,6 @@ const Login = forwardRef((props, _ref) => { ...@@ -40,13 +38,6 @@ const Login = forwardRef((props, _ref) => {
hasLogin.current !== true && hasLogin.current !== true &&
window.hasLogin !== true window.hasLogin !== true
) { ) {
appService
.checkFreeLogin({
token,
authCode,
})
.then(response => {
if (response?.data) {
hasLogin.current = true; hasLogin.current = true;
window.hasLogin = true; window.hasLogin = true;
if (window.globalConfig && window.globalConfig.hasGateWay) { if (window.globalConfig && window.globalConfig.hasGateWay) {
...@@ -81,15 +72,6 @@ const Login = forwardRef((props, _ref) => { ...@@ -81,15 +72,6 @@ const Login = forwardRef((props, _ref) => {
} else { } else {
action.init(); action.init();
} }
return response?.data;
}
message.error({
duration: 3,
content: `授权失败`,
});
action && action.events.emit('loginError', '授权失败');
return Promise.reject(response);
});
} }
}, [action, action.globalConfig, props.global]); }, [action, action.globalConfig, props.global]);
......
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