Blame view

src/api/demo/account.ts 562 Bytes
1
2
3
4
5
import { defHttp } from '/@/utils/http/axios';
import { GetAccountInfoModel } from './model/accountModel';

enum Api {
  ACCOUNT_INFO = '/account/getAccountInfo',
6
  SESSION_TIMEOUT = '/user/sessionTimeout',
7
  TOKEN_EXPIRED = '/user/tokenExpired',
8
9
}
vben authored
10
// Get personal center-basic settings
Vben authored
11
12
export const accountInfoApi = () => defHttp.get<GetAccountInfoModel>({ url: Api.ACCOUNT_INFO });
13
14

export const sessionTimeoutApi = () => defHttp.post<void>({ url: Api.SESSION_TIMEOUT });
15
16

export const tokenExpiredApi = () => defHttp.post<void>({ url: Api.TOKEN_EXPIRED });