|
@@ -18,10 +18,12 @@ export const httpApi = async (obj, message = true) => {
|
|
|
const getResData = async (response, error = false) => {
|
|
|
return new Promise((resolve) => {
|
|
|
const {headers, data, config} = response
|
|
|
- const headersx = getObjValue(headers), resData = getObjValue(data);
|
|
|
+ const resData = getObjValue(data)
|
|
|
const httpData = {
|
|
|
- response, res: resData, data: resData?.data, code: resData?.code, msg: resData?.msg, status: response?.status,
|
|
|
- disposition: headersx['content-disposition'], message: getMsgVal(response), error: error
|
|
|
+ response, res: data, data: resData?.data,
|
|
|
+ code: resData?.code, msg: resData?.msg, status: response?.status,
|
|
|
+ disposition: headers['content-disposition'],
|
|
|
+ message: getMsgVal(response), error: error
|
|
|
}
|
|
|
//处理延迟响应
|
|
|
if (!error) {
|