Skip to content

Commit

Permalink
修改服务器异常提示消息
Browse files Browse the repository at this point in the history
  • Loading branch information
www3com committed Oct 18, 2017
1 parent b641959 commit 1d052b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/request/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ var ajax = function ajax(param) {
if (!p.url) throw new Error("缺失ajax必要参数url");
var sourceCallback = p.success;
var callback = function callback(result) {
if (!result.success && result.code == 'sessionExpire') {
_message2.default.info('session过期,请重新登录!', 3);
if (!result.success && (result.code == '10000' || result.code == '500')) {
_message2.default.info(result.msg, 3);
} else {
sourceCallback(result);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "uadp-react",
"description": "uadp component",
"main": "lib/index.js",
"version": "1.5.2",
"version": "1.5.3",
"repository": {
"type": "git",
"url": "https://github.com/www3com/uadp-react"
Expand Down
4 changes: 2 additions & 2 deletions src/request/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ let ajax = function (param) {
if (!p.url) throw new Error("缺失ajax必要参数url");
let sourceCallback = p.success;
let callback = function (result) {
if(!result.success && result.code == 'sessionExpire') {
message.info('session过期,请重新登录!', 3);
if(!result.success && (result.code == '10000' || result.code == '500')) {
message.info(result.msg, 3);
}else {
sourceCallback(result);
}
Expand Down

0 comments on commit 1d052b4

Please sign in to comment.