!16 扩展第三方登录授权功能

* add 第三方授权
* add 第三方授权登录
This commit is contained in:
三个三
2023-06-20 04:12:49 +00:00
committed by 疯狂的狮子Li
parent 41d140af11
commit aae6bb7505
10 changed files with 359 additions and 74 deletions

View File

@ -60,6 +60,24 @@ export function getCodeImg(): AxiosPromise<VerifyCodeResult> {
timeout: 20000
});
}
/**
* 第三方登录
* @param source 第三方登录类型
* */
export function socialLogin(source: string, code: any, state: any): AxiosPromise<any> {
const data = {
code,
state
};
return request({
url: '/auth/social-login/' + source,
method: 'get',
headers: {
isToken: true
},
params: data
});
}
// 获取用户详细信息
export function getInfo(): AxiosPromise<UserInfo> {