From 5025901e459ae49d85210573ad38fb3f3c1d9230 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 25 六月 2023 18:48:54 +0800 Subject: [PATCH] 2023-06-25 --- src/tabviews/custom/index.jsx | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index aa1aab3..581fc64 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { notification, Spin, Row, Col } from 'antd' +import { notification, Spin, Row, Col, Modal } from 'antd' import Api from '@/api' import zhCN from '@/locales/zh-CN/main.js' @@ -1087,6 +1087,20 @@ Api.genericInterface(param).then(result => { if (result.status) { + if (result.message) { + if (result.ErrCode === 'Y') { + Modal.success({ + title: result.message + }) + } else if (result.ErrCode === 'S') { + notification.success({ + top: 92, + message: result.message, + duration: 2 + }) + } + } + delete result.status delete result.message delete result.ErrMesg @@ -1111,11 +1125,19 @@ data: '', loading: false }) - notification.error({ - top: 92, - message: result.message, - duration: 10 - }) + + if (!result.message) return + if (result.ErrCode === 'N') { + Modal.error({ + title: result.message, + }) + } else if (result.ErrCode !== '-2') { + notification.error({ + top: 92, + message: result.message, + duration: 10 + }) + } } }) } -- Gitblit v1.8.0