From 1d052b4b9dd45a2be73b8416aea61c9b6b2519bc Mon Sep 17 00:00:00 2001 From: wangjz Date: Wed, 18 Oct 2017 19:52:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=8F=90=E7=A4=BA=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/request/index.js | 4 ++-- package.json | 2 +- src/request/index.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/request/index.js b/lib/request/index.js index 4156e51..58f5be9 100755 --- a/lib/request/index.js +++ b/lib/request/index.js @@ -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); } diff --git a/package.json b/package.json index 33151f6..69d1db1 100755 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/request/index.js b/src/request/index.js index 9a70788..b87b289 100755 --- a/src/request/index.js +++ b/src/request/index.js @@ -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); }