diff --git a/src/common/SnackbarHOC.js b/src/common/SnackbarHOC.js index f92972b2..0bd266eb 100644 --- a/src/common/SnackbarHOC.js +++ b/src/common/SnackbarHOC.js @@ -38,7 +38,7 @@ export function SnackbarHOC(options = {}) { showNotification = (description, message = "提示", icon) => { const data = { message, - description + description, } if (icon) { data.icon = icon; diff --git a/src/military/index.scss b/src/military/index.scss index d3bf5f41..61b41050 100644 --- a/src/military/index.scss +++ b/src/military/index.scss @@ -229,3 +229,7 @@ width: 98%; } } + +.ant-notification{ + right: calc(50% - 200px) !important; +} \ No newline at end of file diff --git a/src/military/notice/api.js b/src/military/notice/api.js index 3bc02b78..7880f4be 100644 --- a/src/military/notice/api.js +++ b/src/military/notice/api.js @@ -10,11 +10,19 @@ export async function getNoticeList(params) { params, }); if (res.message === 'success') { + notification.open({ + message: "提示", + description: res.message || '请求错误', + placement:'topCenter', + duration:20 + }); return res.data; + } else { notification.open({ message: "提示", description: res.message || '请求错误', + placement:'top' }); } }