enc-manager
Version:
enc-manager 核心组件.
50 lines (46 loc) • 1.56 kB
JavaScript
//用户信息服务
import AjmHttp from 'enc-framework/core/utils/ajm-http';
import AjmConfig from 'enc-framework/core/utils/ajm-config';
import {
URLSearchParams
} from 'enc-framework/core/utils/ajm-objects';
// http请求对象
let $http = new AjmHttp({
contextPath: AjmConfig.get("MANAGER_CONTEXT_PATH")
}).getHttpClient();
let userInfoService = {
//查询用户信息分页列表
findUserInfoListByPage(params){
if(!params){
params = {};
}
return $http.post('/api/userInfo/findUserInfoListByPage', params).then(res => res.data);
},
//查询部门负责人列表
findUserInfoList(params) {
if (!params) {
params = {};
}
return $http.post('/api/userInfo/findUserInfoList', params).then(res => res.data);
},
//保存或更新用户
saveOrUpdateUser(params) {
return $http.post('/api/userInfo/saveOrUpdate', params).then(res => res.data);
},
//更新用户部门信息
updateDepartment(params) {
return $http.post('/api/userInfo/updateDepartment', params).then(res => res.data);
},
//用户解除锁定/api/user/unlockUser
unlockUser(userId) {
return $http.get("/api/user/unlockUser/" + userId).then(res => res.data);
},
//重置密码
resetPassword(params) {
if (!params) {
params = {};
}
return $http.post('/api/user/resetPassword',params).then(res => res.data);
},
}
export default userInfoService;