Commit 2c1201d5 authored by 邓晓峰's avatar 邓晓峰

fix: login template

parent 1a8bf461
Pipeline #23856 passed with stages
in 29 minutes 18 seconds
This diff was suppressed by a .gitattributes entry.
import {
Modal,
notification,
} from 'antd';
import { Modal, notification } from 'antd';
import {
instanceRequest,
service,
} from '@wisdom-utils/utils';
import { instanceRequest, service } from '@wisdom-utils/utils';
import AppService from './service/base';
import notificationService from './service/notification';
......@@ -39,8 +33,8 @@ instanceRequest.setErrorHandler(error => {
if (response && response.status) {
const errorText = codeMessage[response.status] || response.statusText;
const { status, config } = response;
if(status === 401) {
if(!instance) {
if (status === 401) {
if (!instance) {
instance = warning({
title: '错误信息',
content: `${codeMessage[status]}`,
......@@ -50,16 +44,16 @@ instanceRequest.setErrorHandler(error => {
window.share.event &&
window.share.event.emit('triggerLoginout');
close();
}
},
});
}
} else {
notification.error({
message: `请求错误 ${status}: ${config.url}`,
description: errorText,
});
// notification.error({
// message: `请求错误 ${status}: ${config.url}`,
// description: errorText,
// });
console.log(errorText);
}
} else if (!response) {
notification.error({
description: '您的网络发生异常,无法连接服务器',
......
......@@ -9,9 +9,10 @@ export default () => {
switch(loginTemplate) {
case '新春 - 智联.html':
return <NewYear/>
case 'Dark - IOTMultiLogin.html':
case 'Dark.html':
return <BaseLogin/>
default:
return <></>;
return <BaseLogin/>;
}
};
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