fix(http): 修改http请求返回数据为responseData.data
之前直接返回整个responseData,现在改为只返回data字段以符合业务需求
This commit is contained in:
@@ -101,8 +101,7 @@ export function http<T>(options: CustomRequestOptions) {
|
||||
title: responseData.msg || responseData.message || '请求错误',
|
||||
})
|
||||
}
|
||||
// TODO: check 如果不满足业务要求,也可以改为 reject(responseData as T)
|
||||
return resolve(responseData as T)
|
||||
return resolve(responseData.data)
|
||||
}
|
||||
|
||||
// 处理其他错误
|
||||
|
||||
Reference in New Issue
Block a user