mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat: 新增单点登录回调页面
This commit is contained in:
@ -35,6 +35,15 @@ export function fetchLogin(data: Api.Auth.PwdLoginForm) {
|
||||
});
|
||||
}
|
||||
|
||||
/** social login callback */
|
||||
export function fetchSocialLoginCallback(data: Api.Auth.SocialLoginForm) {
|
||||
return request({
|
||||
url: '/auth/social/callback',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** Register */
|
||||
export function fetchRegister(data: Api.Auth.RegisterForm) {
|
||||
return request<Api.Auth.LoginToken>({
|
||||
|
@ -4,3 +4,4 @@ export * from './user';
|
||||
export * from './dept';
|
||||
export * from './role';
|
||||
export * from './post';
|
||||
export * from './social';
|
||||
|
13
src/service/api/system/social.ts
Normal file
13
src/service/api/system/social.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { request } from '../../request';
|
||||
|
||||
/** 绑定账户 */
|
||||
export function fetchSocialAuthBinding(source: Api.System.SocialSource, tenantId: string = '000000') {
|
||||
return request<string>({
|
||||
url: `/auth/binding/${source}`,
|
||||
method: 'get',
|
||||
params: {
|
||||
tenantId,
|
||||
domain: window.location.host
|
||||
}
|
||||
});
|
||||
}
|
@ -136,6 +136,7 @@ export const request = createFlatRequest<App.Service.Response, RequestInstanceSt
|
||||
if (response.data.rows) {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
return response.data.data;
|
||||
},
|
||||
onError(error) {
|
||||
|
Reference in New Issue
Block a user