This commit is contained in:
zuiidea
2017-04-27 20:26:30 +08:00
parent fbd0fcb5c4
commit 1b7c076057
16 changed files with 4313 additions and 97 deletions
+4073
View File
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -101,14 +101,16 @@ export default function request (options) {
const { response } = error
let msg
let status
let otherData = {}
if (response) {
status = response.status
const { data, statusText } = response
otherData = data
status = response.status
msg = data.message || statusText
} else {
status = 600
msg = 'Network Error'
}
return { success: false, status, message: msg }
return { success: false, status, message: msg, ...otherData }
})
}