Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
2070b8f8
Commit
2070b8f8
authored
Jul 07, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
弹框统一
parent
b7bcf014
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
index.js
src/model/index.js
+2
-2
index.js
src/util/index.js
+10
-0
No files found.
src/model/index.js
View file @
2070b8f8
...
...
@@ -3,7 +3,7 @@ import createSagaMiddleware from 'redux-saga'
import
{
all
,
call
,
takeLatest
,
takeEvery
,
cancelled
}
from
'redux-saga/effects'
import
{
SetSource
,
Cancel
}
from
'../util/axios'
import
{
Connect
,
show
Message
}
from
'../util'
;
import
{
Connect
,
show
ErrorNotifaction
}
from
'../util'
;
import
{
reducers
}
from
'./reducer'
;
import
*
as
user
from
'./user'
;
import
*
as
datasource
from
'./datasource'
;
...
...
@@ -23,7 +23,7 @@ function* request(args) {
yield
call
(
callback
,
rs
)
}
catch
(
ex
)
{
if
(
ex
)
{
ex
.
ApiError
&&
ex
.
ApiError
.
cnMessage
&&
show
Message
(
'error'
,
ex
.
ApiError
.
cnMessage
);
ex
.
ApiError
&&
ex
.
ApiError
.
cnMessage
&&
show
ErrorNotifaction
(
'系统异常'
,
ex
.
ApiError
.
cnMessage
,
5
);
error
&&
error
(
ex
);
}
}
finally
{
...
...
src/util/index.js
View file @
2070b8f8
...
...
@@ -124,6 +124,16 @@ export const showNotifaction = function(title, tip, duration=0) {
});
}
export
const
showErrorNotifaction
=
function
(
title
,
tip
,
duration
=
0
)
{
notification
.
config
({
prefixCls
:
"yy-notification"
});
notification
.
error
({
message
:
title
||
'提示'
,
description
:
(
typeof
tip
===
'string'
?
(
<
span
dangerouslySetInnerHTML
=
{{
__html
:
tip
||
''
}}
/>
)
: tip
)
,
duration
:
duration
,
});
}
export
function
generateList
(
data
,
dataList
){
if
(
data
[
0
]
===
undefined
)
return
data
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment