7 |
14 | }
15 | >
16 | {t('LOGIN.WITH.GITHUB')}
17 |
18 |
25 | }
26 | >
27 | {t('LOGIN.WITH.GOOGLE')}
28 |
29 |
30 | >
31 | )
32 | }
33 |
--------------------------------------------------------------------------------
/src/api/auth.ts:
--------------------------------------------------------------------------------
1 | import { LoginType } from '@/features/auth'
2 |
3 | import type { LoginModel, SignupModel, Tokens } from './auth.type'
4 |
5 | export class AuthAPI {
6 | private static AUTH_API_PREFIX = '/auth'
7 |
8 | static REFRESH_API_URL = `${this.AUTH_API_PREFIX}/refresh`
9 |
10 | /**
11 | * 登录
12 | */
13 | static login(data: LoginModel) {
14 | return httpRequest.post