mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 01:46:44 +08:00
调整修改密码
This commit is contained in:
66
api/boe/userbasic.js
Normal file
66
api/boe/userbasic.js
Normal 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
|
||||||
|
}
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import accountApi from '@/api/account';
|
import accountApi from '@/api/account';
|
||||||
import apiLogin from '@/api/boe/login.js';
|
import apiLogin from '@/api/boe/login.js';
|
||||||
|
import apiUserBasic from '@/api/boe/userbasic.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
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}$/;
|
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,
|
newPassword: this.model.newPass,
|
||||||
confirmPassword: this.model.confirmPass
|
confirmPassword: this.model.confirmPass
|
||||||
};
|
};
|
||||||
apiLogin.modifyPassword(params).then(res => {
|
//apiLogin 修改为 apiUserBasic
|
||||||
|
apiUserBasic.modifyPassword(params).then(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
let loginPath = this.$config.loginPath;
|
let loginPath = this.$config.loginPath;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user