This commit is contained in:
18500206848
2024-02-02 14:44:30 +08:00
parent 6647042acb
commit 91172a730c
255 changed files with 24805 additions and 0 deletions

69
api/user.js Normal file
View File

@@ -0,0 +1,69 @@
import {
request
} from '@/untils/AxiosUtils.js';
import {
getStore
} from '@/untils/store.js'
import website from "@/config/website";
export const loginByUsername = (tenantId, username, password, type, key, code) => request({
url: '/api/jobslink-auth/oauth/token',
method: 'post',
headers: {
'Login-Type': 'Type-U',
'Captcha-Key': key,
'Captcha-Code': code,
'Platform-Id': getStore({
name: 'platformId'
}) || ''
},
params: {
tenantId,
username,
password,
grant_type: (website.captchaMode ? "captcha" : "password"),
scope: "all",
type
}
});
export const refreshToken = (refresh_token, tenantId) => request({
url: '/api/jobslink-auth/oauth/token',
method: 'post',
headers: {
'Tenant-Id': tenantId,
'Login-Type': 'Type-U',
},
params: {
tenantId,
refresh_token,
grant_type: "refresh_token",
scope: "all",
}
});
export const getCaptcha = () => request({
url: '/api/jobslink-auth/oauth/captcha',
method: 'get'
});
export const logout = () => request({
url: '/api/jobslink-auth/oauth/logout',
method: 'get'
});
export const getUserInfo = () => request({
url: '/api/jobslink-auth/oauth/user-info',
method: 'get'
});
export const sendLogs = (list) => request({
url: '/api/jobslink-auth/oauth/logout',
method: 'post',
data: list
});
export const clearCache = () => request({
url: '/api/jobslink-auth/oauth/clear-cache',
method: 'get'
});