xuruiqian
2025-06-04 17ce21955b4e3402d3d5868b52e50bfdd55bc572
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import {postRequest, getRequest} from '@/utils/axioshttp';
 
let base = WGURL.appDomain;
 
export const getVerifyCodeUrl = (params) => {
    return base + 'api/admin/oauth/getverifycode?account=' + params + '&&time=' + new Date()
}
 
export const doLogin = (data) => {
    return postRequest(base + 'api/admin/oauth/login', data)
}
export const doLoginOut = (accountid) => {
    return getRequest(base + 'api/admin/oauth/logout?accountid=' + accountid);
}
export const loginBySMSCode = (data) => {
    return postRequest(base + 'api/admin/oauth/loginBySMSCode', data)
}
export const SendSMSCode = (cellphone) => {
    return getRequest(base + 'api/admin/oauth/sendsmscode?cellphone=' + cellphone)
}
export const GetAccountWithRolesAndPermissions = (accountid) => {
    return getRequest(base + 'api/admin/oauth/getaccountwithrolesandpermissions?accountid=' + accountid)
}
 
//Account
export const UpdateAccountPassword = (data) => {
    return postRequest(base + 'api/admin/security/account/pass', data)
}
export const UpdateUserProfile = (data) => {
    return postRequest(base + 'api/admin/security/account/update/profile', data)
}
export const GetUserApplications = (accountid) => {
    return getRequest(base + 'api/admin/security/application/accountapps?accountid=' + accountid);
}
export const GetAllRoles = () => {
    return getRequest(base + 'api/admin/security/role/all')
}
export const GetEmployeePositionWithOrganizationsByEmployeeId = (employeeid) => {
    return getRequest(base + 'api/admin/security/employee/positionwithorganization?employeeid=' + employeeid)
}
export const GetEmployeePositionsByEmployeeId = (employeeid) => {
    return getRequest(base + 'api/admin/security/employee/positions?employeeid=' + employeeid)
}
 
export const GetRoleAll = (permissionLevel) => {
    return getRequest(base + 'api/admin/security/role/all?permissionLevel=' + permissionLevel);
}
export const GetRolesByAccountId = (accountid) => {
    return getRequest(base + 'api/admin/security/role/listbyaccountid?accountid=' + accountid)
}
export const GetRolesByPositionId = (positionid) => {
    return getRequest(base + 'api/admin/security/role/listbypositionid?positionid=' + positionid)
}