mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-15 19:35:07 +08:00
feat: 社交平台登录
This commit is contained in:
@ -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({
|
||||
|
@ -2,6 +2,9 @@ export type UserLoginVO = {
|
||||
username: string
|
||||
password: string
|
||||
captchaVerification: string
|
||||
socialType?: string
|
||||
socialCode?: string
|
||||
socialState?: string
|
||||
}
|
||||
|
||||
export type TokenType = {
|
||||
|
Reference in New Issue
Block a user