Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea-resources-web
Project
Project
Details
Activity
Releases
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
张伯涛
tea-resources-web
Commits
72528d8d
Commit
72528d8d
authored
Aug 02, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
涉及到密码修改的地方多调用一个接口
parent
f2b71fe3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
8 deletions
+35
-8
user.js
src/api/system/user.js
+7
-1
getters.js
src/store/getters.js
+1
-0
user.js
src/store/modules/user.js
+5
-0
reSetPsw.vue
src/views/reSetPsw.vue
+15
-6
index.vue
src/views/system/user/index.vue
+7
-1
No files found.
src/api/system/user.js
View file @
72528d8d
...
...
@@ -128,7 +128,13 @@ export function resetUserPwd(businessId, password) {
params
:
data
})
}
export
function
updatePassword
(
query
)
{
return
request
({
url
:
'/pc/sysuser/updatePassword'
,
method
:
'get'
,
params
:
query
})
}
// 11.用户状态修改
export
function
changeUserStatus
(
businessId
,
flag
)
{
const
data
=
{
...
...
src/store/getters.js
View file @
72528d8d
...
...
@@ -4,6 +4,7 @@ const getters = {
token
:
state
=>
state
.
user
.
token
,
avatar
:
state
=>
state
.
user
.
avatar
,
name
:
state
=>
state
.
user
.
name
,
loginId
:
state
=>
state
.
user
.
loginId
,
specialTag
:
state
=>
state
.
user
.
specialTag
,
roles
:
state
=>
state
.
user
.
roles
,
introduction
:
state
=>
state
.
user
.
introduction
,
...
...
src/store/modules/user.js
View file @
72528d8d
...
...
@@ -7,6 +7,7 @@ const user = {
state
:
{
token
:
getToken
(),
name
:
''
,
loginId
:
''
,
avatar
:
''
,
roles
:
[],
permissions
:
[],
...
...
@@ -24,6 +25,9 @@ const user = {
SET_NAME
:
(
state
,
name
)
=>
{
state
.
name
=
name
},
SET_LOGINID
:
(
state
,
loginId
)
=>
{
state
.
loginId
=
loginId
},
SET_SPECIALTAG
:
(
state
,
specialTag
)
=>
{
state
.
specialTag
=
specialTag
},
...
...
@@ -71,6 +75,7 @@ const user = {
}
commit
(
'SET_PERMISSIONS'
,
res
.
data
.
permissions
)
commit
(
'SET_NAME'
,
user
.
username
)
commit
(
'SET_LOGINID'
,
user
.
businessId
)
const
type
=
'1'
// 1是开启,2是关闭
commit
(
'SET_TYPE'
,
type
)
commit
(
'SET_SPECIALTAG'
,
user
.
specialTag
)
...
...
src/views/reSetPsw.vue
View file @
72528d8d
<
template
>
<section
class=
"forget-pwd-content"
>
<!--
<page-divider
/>
-->
<!--
<page-divider
/>
-->
<div
class=
"title"
>
修改密码
</div>
<el-form
ref=
"pwdForm"
...
...
@@ -45,7 +45,7 @@
</section>
</
template
>
<
script
>
import
{
updateUserPwd
}
from
'@/api/system/user.js'
import
{
update
Password
,
update
UserPwd
}
from
'@/api/system/user.js'
import
{
encryptTwo
}
from
'@/utils/jsencrypt'
export
default
{
name
:
'ReSetPsw'
,
...
...
@@ -110,10 +110,19 @@ export default {
newPassword
:
encryptTwo
(
this
.
pwdList
.
pass
)
}
updateUserPwd
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'密码修改成功!'
)
this
.
$store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
location
.
reload
()
})
if
(
res
.
code
===
200
)
{
const
params
=
{
businessId
:
this
.
$store
.
getters
.
loginId
}
console
.
log
(
'11111111'
,
this
.
$store
.
getters
.
loginId
)
updatePassword
(
params
).
then
(
res
=>
{
})
this
.
$message
.
success
(
'密码修改成功!'
)
// this.$store.dispatch('FedLogOut').then(() => {
// location.reload()
// })
}
})
}
else
{
return
false
...
...
src/views/system/user/index.vue
View file @
72528d8d
...
...
@@ -407,7 +407,7 @@ import {
changeUserStatus
,
importExcel
,
uploadFalseFile
,
importTemplate
importTemplate
,
updatePassword
}
from
'@/api/system/user'
import
{
getToken
}
from
'@/utils/auth'
import
{
treeSelect
}
from
'@/api/system/dept'
...
...
@@ -856,6 +856,12 @@ export default {
type
:
'success'
})
this
.
resetPwdDiaLog
=
false
const
params
=
{
businessId
:
this
.
ruleForm
.
row
}
updatePassword
(
params
).
then
(
res
=>
{
})
}
this
.
userRestLoading
=
false
}).
catch
(
e
=>
{
this
.
userRestLoading
=
false
})
...
...
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