|
|
@ -14,56 +14,60 @@ export interface SmsLoginVO { |
|
|
|
|
|
|
|
|
|
|
|
// 登录
|
|
|
|
// 登录
|
|
|
|
export const login = (data: UserLoginVO) => { |
|
|
|
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 = () => { |
|
|
|
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) => { |
|
|
|
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 = () => { |
|
|
|
export const loginOut = () => { |
|
|
|
return request.post({ url: '/system/auth/logout' }) |
|
|
|
return request.post({ url: '/admin-api/system/auth/logout' }) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 获取用户权限信息
|
|
|
|
// 获取用户权限信息
|
|
|
|
export const getInfo = (data) => { |
|
|
|
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) => { |
|
|
|
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) => { |
|
|
|
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) => { |
|
|
|
export const socialAuthRedirect = (type: number, redirectUri: string) => { |
|
|
|
return request.get({ |
|
|
|
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
|
|
|
|
// 获取验证图片以及 token
|
|
|
|
export const getCode = (data) => { |
|
|
|
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) => { |
|
|
|
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) => { |
|
|
|
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 |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|