flat: zanc

This commit is contained in:
Apcallover
2024-04-15 16:26:25 +08:00
parent 4afc5100ae
commit db4a3f118e
4 changed files with 140 additions and 142 deletions

View File

@@ -1,70 +1,70 @@
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, token) => 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,
token
},
});
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'
});
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, ticket) => 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,
ticket
},
});
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'
});