feat: 社交平台登录

This commit is contained in:
dhb52
2023-10-15 14:26:20 +08:00
parent 889334bc37
commit 4d77d7e136
6 changed files with 369 additions and 5 deletions

View File

@ -47,6 +47,18 @@ export const smsLogin = (data: SmsLoginVO) => {
return request.post({ url: '/system/auth/sms-login', data })
}
// 社交快捷登录,使用 code 授权码
export function socialLogin(type: string, code: string, state: string) {
return request.post({
url: '/system/auth/social-login',
data: {
type,
code,
state
}
})
}
// 社交授权的跳转
export const socialAuthRedirect = (type: number, redirectUri: string) => {
return request.get({

View File

@ -2,6 +2,9 @@ export type UserLoginVO = {
username: string
password: string
captchaVerification: string
socialType?: string
socialCode?: string
socialState?: string
}
export type TokenType = {