Comparing version 0.2.3 to 0.2.4
@@ -10,3 +10,3 @@ var BetterAPI = require('better-api') | ||
}, | ||
output: function (res) { | ||
output: function (res, req) { | ||
return res | ||
@@ -21,2 +21,3 @@ }, | ||
callback.$net.fail.apply(null, arguments) | ||
// var getUser = $.ajax(); getUser.abort() | ||
} else if (arguments[1] !== 'abort') { | ||
@@ -38,3 +39,3 @@ alert('网络错误,请刷新重试') | ||
settings: { | ||
url: 'http://echo.onface.cc/onface/better-api/master/doc/mock/pass', | ||
url: 'http://echo.onface.live/onface/better-api/master/doc/mock/pass', | ||
type: 'get' | ||
@@ -45,3 +46,3 @@ } | ||
settings: { | ||
url: 'http://echo.onface.cc/onface/better-api/master/doc/mock/fail', | ||
url: 'http://echo.onface.live/onface/better-api/master/doc/mock/fail', | ||
type: 'get' | ||
@@ -86,2 +87,2 @@ } | ||
}) | ||
// http://echo.onface.cc/onface/better-api/master/doc/mock/pass | ||
// http://echo.onface.live/onface/better-api/master/doc/mock/pass |
@@ -9,3 +9,3 @@ "use strict"; | ||
}, | ||
output: function output(res) { | ||
output: function output(res, req) { | ||
return res; | ||
@@ -20,3 +20,3 @@ } | ||
}, | ||
output: function output(res) { | ||
output: function output(res, req) { | ||
return res; | ||
@@ -23,0 +23,0 @@ } |
@@ -33,4 +33,4 @@ "use strict"; | ||
res = self.settings.output(res); | ||
res = createSettings.output(res); | ||
res = self.settings.output(res, sendData); | ||
res = createSettings.output(res, sendData); | ||
userCallbackDone.apply(null, [res]); | ||
@@ -37,0 +37,0 @@ var responseType = (0, _extend2.default)(true, {}, self.settings.defaultResponseType, callback); |
{ | ||
"name": "better-api", | ||
"main": "lib/index.js", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "api encapsulation manage", | ||
@@ -6,0 +6,0 @@ "keywords": "", |
17990
159