perf: imporve axios logic

This commit is contained in:
Vben
2021-02-26 22:45:36 +08:00
parent 7c2f851692
commit a821d9a3a2
13 changed files with 77 additions and 74 deletions

View File

@@ -1,14 +1,12 @@
import { defHttp } from '/@/utils/http/axios';
import { GetAccountInfoModel } from './model/accountModel';
const { get } = defHttp;
enum Api {
ACCOUNT_INFO = '/account/getAccountInfo',
}
// Get personal center-basic settings
export function accountInfoApi() {
return defHttp.request<GetAccountInfoModel>({
url: Api.ACCOUNT_INFO,
method: 'GET',
});
}
export const accountInfoApi = () => get<GetAccountInfoModel>({ url: Api.ACCOUNT_INFO });