|
|
|
@ -14,56 +14,60 @@ export interface SmsLoginVO { |
|
|
|
|
|
|
|
|
|
// 登录
|
|
|
|
|
export const login = (data: UserLoginVO) => { |
|
|
|
|
return request.post({ url: '/system/auth/login', data }) |
|
|
|
|
return request.post({ url: '/admin-api/system/auth/login', data }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 刷新访问令牌
|
|
|
|
|
export const refreshToken = () => { |
|
|
|
|
return request.post({ url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken() }) |
|
|
|
|
return request.post({ |
|
|
|
|
url: '/admin-api/system/auth/refresh-token?refreshToken=' + getRefreshToken() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 使用租户名,获得租户编号
|
|
|
|
|
export const getTenantIdByName = (name: string) => { |
|
|
|
|
return request.get({ url: '/system/tenant/get-id-by-name?name=' + name }) |
|
|
|
|
return request.get({ url: '/admin-api/system/tenant/get-id-by-name?name=' + name }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 登出
|
|
|
|
|
export const loginOut = () => { |
|
|
|
|
return request.post({ url: '/system/auth/logout' }) |
|
|
|
|
return request.post({ url: '/admin-api/system/auth/logout' }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 获取用户权限信息
|
|
|
|
|
export const getInfo = (data) => { |
|
|
|
|
return request.get({ url: '/system/auth/get-permission-info', data }) |
|
|
|
|
return request.get({ url: '/admin-api/system/auth/get-permission-info', data }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取登录验证码
|
|
|
|
|
export const sendSmsCode = (data: SmsCodeVO) => { |
|
|
|
|
return request.post({ url: '/system/auth/send-sms-code', data }) |
|
|
|
|
return request.post({ url: '/admin-api/system/auth/send-sms-code', data }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 短信验证码登录
|
|
|
|
|
export const smsLogin = (data: SmsLoginVO) => { |
|
|
|
|
return request.post({ url: '/system/auth/sms-login', data }) |
|
|
|
|
return request.post({ url: '/admin-api/system/auth/sms-login', data }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 社交授权的跳转
|
|
|
|
|
export const socialAuthRedirect = (type: number, redirectUri: string) => { |
|
|
|
|
return request.get({ |
|
|
|
|
url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri |
|
|
|
|
url: '/admin-api/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// 获取验证图片以及 token
|
|
|
|
|
export const getCode = (data) => { |
|
|
|
|
return request.postOriginal({ url: 'system/captcha/get', data }) |
|
|
|
|
return request.postOriginal({ url: '/admin-api/system/captcha/get', data }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 滑动或者点选验证
|
|
|
|
|
export const reqCheck = (data) => { |
|
|
|
|
return request.postOriginal({ url: 'system/captcha/check', data }) |
|
|
|
|
return request.postOriginal({ url: '/admin-api/system/captcha/check', data }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 获取应用信息
|
|
|
|
|
export const getAppInfo = (instanceId: number) => { |
|
|
|
|
return request.get({ url: 'system/serviceInstance/getInstanceInfo?instanceId=' + instanceId }) |
|
|
|
|
return request.get({ |
|
|
|
|
url: '/admin-api/system/serviceInstance/getInstanceInfo?instanceId=' + instanceId |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|