chore: utils

This commit is contained in:
yangsy
2025-08-20 15:55:04 +08:00
parent 965e0ee0a1
commit c83fea6dec

View File

@@ -90,12 +90,11 @@ export class Request {
this.instance
.post(url, data, { ...reqConfig, headers: { 'content-type': upload ? 'multipart/form-data' : 'application/json' }, signal: this.abortController.signal })
.then((res) => {
const resData = res.data;
if (retRaw) {
const data = res as T;
resolve([null, data, null]);
resolve([null, resData as T, null]);
} else {
const resp = res as AxiosResponse<Result<T>>;
resolve([null, resp.data.data, resp.data]);
resolve([null, resData.data as T, resData as Result<T>]);
}
})
.catch((err) => {