Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
other-project
frontend
Commits
59186984
Commit
59186984
authored
Jan 17, 2020
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成登陆和修改密码功能
parent
2cd01905
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
main-navbar-update-password.vue
src/views/main-navbar-update-password.vue
+5
-5
main-navbar.vue
src/views/main-navbar.vue
+4
-4
No files found.
src/views/main-navbar-update-password.vue
View file @
59186984
...
...
@@ -78,14 +78,16 @@
this
.
$refs
[
'dataForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/sys/user/password'
),
url
:
this
.
$http
.
adornUrl
(
'/
api/
sys/user/password'
),
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
'password'
:
this
.
dataForm
.
password
,
'newPassword'
:
this
.
dataForm
.
newPassword
})
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
200
)
{
if
(
data
&&
data
.
errorCode
)
{
this
.
$message
.
error
(
data
.
message
)
}
else
{
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
,
...
...
@@ -99,9 +101,7 @@
})
}
})
}
else
{
this
.
$message
.
error
(
data
.
msg
)
}
}
})
}
})
...
...
src/views/main-navbar.vue
View file @
59186984
...
...
@@ -84,14 +84,14 @@
type
:
'warning'
}).
then
(()
=>
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/sys/logout'
),
method
:
'
pos
t'
,
url
:
this
.
$http
.
adornUrl
(
'/
api/
sys/logout'
),
method
:
'
ge
t'
,
data
:
this
.
$http
.
adornData
()
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
200
)
{
clearLoginInfo
()
this
.
$router
.
push
({
name
:
'login'
})
}
})
}).
catch
(()
=>
{})
}
...
...
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