Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
d14f9c98
Commit
d14f9c98
authored
Dec 08, 2020
by
陈前坚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 修改密码
parent
c0901f32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
28 deletions
+18
-28
index.js
src/pages/user/login/index.js
+7
-4
UserManage.js
src/pages/userCenter/UserManage.js
+9
-10
api.js
src/services/userCenter/userManage/api.js
+2
-14
No files found.
src/pages/user/login/index.js
View file @
d14f9c98
...
...
@@ -59,10 +59,13 @@ const Login = props => {
}
}
if
(
userMode
===
USER_MODE
.
COMMON
)
{
const
authority
=
[
AUTHORITY
.
LOGIN
,
AUTHORITY
.
COMMON
];
setAuthority
(
authority
);
setAuth
(
authority
);
history
.
push
(
`/userCenter/UserManage`
);
// const authority = [AUTHORITY.LOGIN, AUTHORITY.COMMON];
// setAuthority(authority);
// setAuth(authority);
// history.push(`/userCenter/UserManage`);
notification
.
warning
({
message
:
msg
||
'没有权限!'
,
});
}
}
else
{
notification
.
warning
({
...
...
src/pages/userCenter/UserManage.js
View file @
d14f9c98
...
...
@@ -496,7 +496,7 @@ const UserManage = () => {
const
changePassword
=
record
=>
{
setPasswordVisible
(
true
);
passwordForm
.
setFieldsValue
({
old
p
assword
:
record
.
password
,
old
P
assword
:
record
.
password
,
newPassword
:
''
,
passwordConfirm
:
''
,
});
...
...
@@ -867,7 +867,7 @@ const UserManage = () => {
});
// 提交-修改密码
const
submitChangePassword
=
()
=>
{
const
password
=
passwordForm
.
getFieldValue
(
'p
assword'
);
const
oldPassword
=
passwordForm
.
getFieldValue
(
'oldP
assword'
);
const
newPassword
=
passwordForm
.
getFieldValue
(
'newPassword'
);
const
passwordConfirm
=
passwordForm
.
getFieldValue
(
'passwordConfirm'
);
if
(
...
...
@@ -877,14 +877,13 @@ const UserManage = () => {
newPassword
.
length
>=
6
&&
newPassword
===
passwordConfirm
)
{
updateUserPassword
(
currentUser
.
userID
,
password
,
newPassword
,
passwordConfirm
,
)
updateUserPassword
({
UserId
:
+
currentUser
.
userID
,
OldPassWord
:
oldPassword
,
NewPassWord
:
newPassword
,
})
.
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
code
===
0
)
{
setPasswordVisible
(
false
);
notification
.
success
({
message
:
'提交成功'
,
...
...
@@ -1404,7 +1403,7 @@ const UserManage = () => {
cancelText
=
"取消"
>
<
Form
form
=
{
passwordForm
}
labelCol
=
{{
span
:
4
}}
>
<
Form
.
Item
name
=
"old
p
assword"
label
=
"原始密码"
>
<
Form
.
Item
name
=
"old
P
assword"
label
=
"原始密码"
>
<
Input
disabled
/>
<
/Form.Item
>
<
Form
.
Item
...
...
src/services/userCenter/userManage/api.js
View file @
d14f9c98
...
...
@@ -110,20 +110,8 @@ export const addToOrgs = (userIDs, orgIDs, newOrgID) =>
newGroupId
:
newOrgID
,
});
export
const
updateUserPassword
=
(
userID
,
oldpassword
,
newPassword
,
passwordConfirm
,
)
=>
get
(
`/Cityinterface/rest/services/OMS.svc/U_UpdatePassword`
,
{
_version
:
9999
,
_dc
:
Date
.
now
(),
userID
,
oldpassword
,
newPassword
,
passwordConfirm
,
});
export
const
updateUserPassword
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/UserCenter/UpdateUserPassword`
,
params
);
export
const
editUser
=
(
userID
,
loginName
,
userName
,
phone
,
email
)
=>
get
(
`/Cityinterface/rest/services/OMS.svc/U_EditUser`
,
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment