Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a22ff4fc
authored
Feb 10, 2023
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
首页头像、个人中心问题修复
1 parent
a17bccc7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
48 deletions
linkwe-pc/src/router/index.js
linkwe-pc/src/views/index/index.vue
linkwe-pc/src/views/system/user/profile/resetPwd.vue
linkwe-pc/src/router/index.js
View file @
a22ff4f
...
@@ -79,7 +79,20 @@ export const constantRoutes = [
...
@@ -79,7 +79,20 @@ export const constantRoutes = [
},
},
],
],
},
},
{
path
:
'/user'
,
component
:
Layout
,
hidden
:
true
,
redirect
:
'noredirect'
,
children
:
[
{
path
:
'profile'
,
component
:
(
resolve
)
=>
require
([
'@/views/system/user/profile/index'
],
resolve
),
name
:
'Profile'
,
meta
:
{
title
:
'个人中心'
,
icon
:
'user'
},
},
],
},
{
{
path
:
''
,
path
:
''
,
component
:
visitor
,
component
:
visitor
,
...
...
linkwe-pc/src/views/index/index.vue
View file @
a22ff4f
...
@@ -441,6 +441,7 @@
...
@@ -441,6 +441,7 @@
.userinfo
{
.userinfo
{
display
:
flex
;
display
:
flex
;
.portrait
{
.portrait
{
flex-shrink
:
0
;
width
:
120px
;
width
:
120px
;
height
:
120px
;
height
:
120px
;
border-radius
:
120px
;
border-radius
:
120px
;
...
@@ -465,6 +466,12 @@
...
@@ -465,6 +466,12 @@
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
space-between
;
justify-content
:
space-between
;
padding
:
10px
0
;
padding
:
10px
0
;
max-width
:
200px
;
span
{
white-space
:
nowrap
;
/*强制单行显示*/
text-overflow
:
ellipsis
;
/*超出部分省略号表示*/
overflow
:
hidden
;
/*超出部分隐藏*/
}
span
:nth-child
(
1
)
{
span
:nth-child
(
1
)
{
font-size
:
16px
;
font-size
:
16px
;
}
}
...
...
linkwe-pc/src/views/system/user/profile/resetPwd.vue
View file @
a22ff4f
...
@@ -17,58 +17,54 @@
...
@@ -17,58 +17,54 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
updateUserPwd
}
from
"@/api/system/user"
;
import
{
updateUserPwd
}
from
'@/api/system/user'
export
default
{
export
default
{
data
()
{
data
()
{
const
equalToPassword
=
(
rule
,
value
,
callback
)
=>
{
const
equalToPassword
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
user
.
newPassword
!==
value
)
{
if
(
this
.
user
.
newPassword
!==
value
)
{
callback
(
new
Error
(
"两次输入的密码不一致"
));
callback
(
new
Error
(
'两次输入的密码不一致'
))
}
else
{
}
else
{
callback
();
callback
()
}
}
}
};
return
{
return
{
test
:
'1test'
,
test
:
"1test"
,
user
:
{
user
:
{
oldPassword
:
undefined
,
oldPassword
:
undefined
,
newPassword
:
undefined
,
newPassword
:
undefined
,
confirmPassword
:
undefined
confirmPassword
:
undefined
},
},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
oldPassword
:
[{
required
:
true
,
message
:
'旧密码不能为空'
,
trigger
:
'blur'
}],
oldPassword
:
[
newPassword
:
[
{
required
:
true
,
message
:
"旧密码不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
'新密码不能为空'
,
trigger
:
'blur'
},
],
{
min
:
6
,
max
:
20
,
message
:
'长度在 6 到 20 个字符'
,
trigger
:
'blur'
}
newPassword
:
[
],
{
required
:
true
,
message
:
"新密码不能为空"
,
trigger
:
"blur"
},
confirmPassword
:
[
{
min
:
6
,
max
:
20
,
message
:
"长度在 6 到 20 个字符"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
'确认密码不能为空'
,
trigger
:
'blur'
},
],
{
required
:
true
,
validator
:
equalToPassword
,
trigger
:
'blur'
}
confirmPassword
:
[
]
{
required
:
true
,
message
:
"确认密码不能为空"
,
trigger
:
"blur"
},
}
{
required
:
true
,
validator
:
equalToPassword
,
trigger
:
"blur"
}
]
}
}
};
},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
updateUserPwd
(
this
.
user
.
oldPassword
,
this
.
user
.
newPassword
).
then
((
response
)
=>
{
updateUserPwd
(
this
.
user
.
oldPassword
,
this
.
user
.
newPassword
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
if
(
response
.
code
===
200
)
{
this
.
msgSuccess
(
"修改成功"
);
this
.
msgSuccess
(
'修改成功'
)
}
}
}
}
)
);
}
}
}
)
}
);
}
,
},
close
()
{
close
()
{
this
.
$store
.
dispatch
(
'tagsView/delView'
,
this
.
$route
)
this
.
$store
.
dispatch
(
"tagsView/delView"
,
this
.
$route
);
this
.
$router
.
back
()
this
.
$router
.
push
({
path
:
"/index"
});
}
}
}
}
}
};
</
script
>
</
script
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment