添加 h5

This commit is contained in:
saplf
2019-09-07 14:39:03 +08:00
parent 71a3719bcf
commit 49fe983181
9 changed files with 507 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ const errorMap = {
};
const baseURL = 'https://server.fiv.tacever.org/v1';
// const baseURL = '//yapi.faronear.org/mock/20/v1';
// const baseURL = 'http://yapi.faronear.org/mock/20/v1';
const instance = axios.create({
baseURL,
});
@@ -57,7 +57,8 @@ async function filter<T>(
} else {
instance.defaults.headers = _.omit(instance.defaults.headers, 'token');
}
const { status, data } = await (instance[method] as (...args: any[]) => Promise<AxiosResponse<AppResp>>)(...args);
const { status, data } =
await (instance[method] as (...args: any[]) => Promise<AxiosResponse<AppResp>>)(...args);
replaceId(data);
ret = {
ok: status >= 200 && status < 300 && data && data.code === 0,