Files
learning-system-mobile/api/boe/userbasic.js
2023-03-01 16:27:38 +08:00

74 lines
1.5 KiB
JavaScript

/**对应用户中心新的接口*/
import ajax from '@/api/boe/boeUserbasic.js'
/**
* 获取用户的组织机构
* organization_id
*/
const userParentOrg = function() {
return ajax.post('/org/userParentOrg',{});
}
//https://u-pre.boe.com/userbasic/org/list
/**
* 根据关键字查询机构
*/
const findOrgsByKeyword = function(keyword) {
return ajax.postJson('/org/list',{keyword});
}
const findOrgTreeByOrgId = function(orgId) {
return ajax.postJson('/org/childOrgs',{orgId});
}
const getOrgInfo = function(orgId) {
return ajax.postJson('/org/info',{orgId});
}
/**根据用户id获取用户的信息*/
const getUserInfoById = function(id) {
return ajax.postJson('/user/list',{id});
}
/**
* https://u-pre.boe.com/userbasic/audience/userAudiences
* 获取当前用户受众信息
*/
const getUserCrowds = function() {
return ajax.postJson('/audience/userAudiences',{});
}
/**
* 获取hrbp数据
*/
const getOrgHrbpInfo = function(orgId) {
return ajax.postJson('/org/orgHrbpInfo',{orgId});
}
/**
* 修改密码
* {newPassword:'',oldPassword:''}
*/
const modifyPassword = function(data) {
return ajax.postJson('/user/resetPassword',data);
}
/**获取加入的受众的id集合*/
const getInAudienceIds = function() {
return ajax.post(baseURL,'/audience/audienceByUser',{});
}
export default {
userParentOrg,
findOrgsByKeyword,
getOrgInfo,
findOrgTreeByOrgId,
getUserInfoById,
getUserCrowds,
getOrgHrbpInfo,
modifyPassword,
getInAudienceIds
}