Commit c2a54a0f authored by chenqikuai's avatar chenqikuai

fix

parent a656c773
...@@ -13,6 +13,7 @@ module.exports = { ...@@ -13,6 +13,7 @@ module.exports = {
}, },
rules: { rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
"@typescript-eslint/explicit-module-boundary-types": 'off'
} }
} }
export function axios( export function axios<T>(
url: string, url: string,
config: { config: {
method: string; method: string;
params: any; params: any;
} }
): Promise<any> { ): Promise<T> {
return fetch(url, { return fetch(url, {
method: config.method, method: config.method,
body: JSON.stringify(config.params), body: JSON.stringify(config.params),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment