UserSetting.api.ts
3.9 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
import { defHttp } from '/@/utils/http/axios';
enum Api {
userEdit = '/sys/user/login/setting/userEdit',
getUserData = '/sys/user/login/setting/getUserData',
queryNameByCodes = '/sys/position/queryByCodes',
updateMobile = '/sys/user/updateMobile',
updateUserPassword = '/sys/user/passwordChange',
getTenantListByUserId = '/sys/tenant/getTenantListByUserId',
cancelApplyTenant = '/sys/tenant/cancelApplyTenant',
exitUserTenant = '/sys/tenant/exitUserTenant',
changeOwenUserTenant = '/sys/tenant/changeOwenUserTenant',
getThirdAccountByUserId = '/sys/thirdApp/getThirdAccountByUserId',
bindThirdAppAccount = '/sys/thirdApp/bindThirdAppAccount',
deleteThirdAccount = '/sys/thirdApp/deleteThirdAccount',
agreeOrRefuseJoinTenant = '/sys/tenant/agreeOrRefuseJoinTenant',
//更改手机号
changePhone = '/sys/user/changePhone',
//用户注销
userLogOff = '/sys/user/userLogOff',
}
/**
* 用户编辑
* @param params
*/
export const userEdit = (params) => {
return defHttp.post({ url: Api.userEdit, params }, { isTransformResponse: false });
};
/**
* 获取用户信息
* @param params
*/
export const getUserData = () => {
return defHttp.get({ url: Api.getUserData }, { isTransformResponse: false });
};
/**
* 获取多个职务信息
* @param params
*/
export const queryNameByCodes = (params) => {
return defHttp.get({ url: Api.queryNameByCodes, params }, { isTransformResponse: false });
};
/**
* 修改手机号
* @param params
*/
export const updateMobile = (params) => {
return defHttp.put({ url: Api.updateMobile, params }, { isTransformResponse: false });
};
/**
* 修改密码
* @param params
*/
export const updateUserPassword = (params) => {
return defHttp.get({ url: Api.updateUserPassword, params }, { isTransformResponse: false });
};
/**
* 通过用户id获取租户列表
* @param params
*/
export const getTenantListByUserId = (params) => {
return defHttp.get({ url: Api.getTenantListByUserId, params }, { isTransformResponse: false });
};
/**
* 取消申请
* @param params
*/
export const cancelApplyTenant = (params) => {
return defHttp.put({ url: Api.cancelApplyTenant, data: params }, { joinParamsToUrl: true, isTransformResponse: false });
};
/**
* 用户退出租户
* @param params
*/
export const exitUserTenant = (params) => {
return defHttp.delete({ url: Api.exitUserTenant, params }, { isTransformResponse: false, joinParamsToUrl: true });
};
/**
* 变更租户拥有者
* @param params
*/
export const changeOwenUserTenant = (params) => {
return defHttp.post({ url: Api.changeOwenUserTenant, params }, { isTransformResponse: false, joinParamsToUrl: true });
};
/**
* 获取账号第三方信息通过第三方类型
* @param params
*/
export const getThirdAccountByUserId = (params) => {
return defHttp.get({ url: Api.getThirdAccountByUserId, params }, { isTransformResponse: false });
};
/**
* 根据第三方uuid绑定账号
* @param params
*/
export const bindThirdAppAccount = (params) => {
return defHttp.post({ url: Api.bindThirdAppAccount, params }, { isTransformResponse: false, joinParamsToUrl: true });
};
/**
* 根据第三方uuid绑定账号
* @param params
*/
export const deleteThirdAccount = (params) => {
return defHttp.delete({ url: Api.deleteThirdAccount, params }, { isTransformResponse: false, joinParamsToUrl: true });
};
/**
* 同意和拒绝加入租户
* @param params
*/
export const agreeOrRefuseJoinTenant = (params) => {
return defHttp.put({ url: Api.agreeOrRefuseJoinTenant, params }, { joinParamsToUrl: true });
};
/**
* 更改手机号
* @param params
*/
export const changePhone = (params) => {
return defHttp.put({ url: Api.changePhone, params }, { joinParamsToUrl: true, isTransformResponse: false });
};
/**
* 用户注销
* @param params
*/
export const userLogOff = (params) => {
return defHttp.put({ url: Api.userLogOff, params }, { isTransformResponse: false });
};