调整修改密码

This commit is contained in:
daihh
2023-01-30 10:24:17 +08:00
parent bf65868a3d
commit 0fe6b908ce
2 changed files with 69 additions and 1 deletions

66
api/boe/userbasic.js Normal file
View File

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

View File

@@ -35,6 +35,7 @@
<script>
import accountApi from '@/api/account';
import apiLogin from '@/api/boe/login.js';
import apiUserBasic from '@/api/boe/userbasic.js'
export default {
data() {
var testPassword = /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_!@#$%^&*`~()-+=]+$)(?![a-z0-9]+$)(?![a-z\W_!@#$%^&*`~()-+=]+$)(?![0-9\W_!@#$%^&*`~()-+=]+$)[a-zA-Z0-9\W_!@#$%^&*`~()-+=]{8,16}$/;
@@ -101,7 +102,8 @@ export default {
newPassword: this.model.newPass,
confirmPassword: this.model.confirmPass
};
apiLogin.modifyPassword(params).then(res => {
//apiLogin 修改为 apiUserBasic
apiUserBasic.modifyPassword(params).then(res => {
if (res.status == 200) {
let loginPath = this.$config.loginPath;