Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BeMount
PersonalBlog
提交
d15348c2
P
PersonalBlog
项目概览
BeMount
/
PersonalBlog
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PersonalBlog
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d15348c2
编写于
4月 08, 2020
作者:
BeMount
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(/personal-center): 完善个人中心页面
上级
b75363cc
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
232 addition
and
18 deletion
+232
-18
src/router/router.js
src/router/router.js
+6
-0
src/views/Home.vue
src/views/Home.vue
+3
-3
src/views/personal-center/components/complete-info/completeInfo.less
...ersonal-center/components/complete-info/completeInfo.less
+0
-0
src/views/personal-center/components/complete-info/completeInfo.vue
...personal-center/components/complete-info/completeInfo.vue
+70
-0
src/views/personal-center/components/my-collection/myCollection.vue
...personal-center/components/my-collection/myCollection.vue
+6
-3
src/views/personal-center/components/personal-info/personalInfo.vue
...personal-center/components/personal-info/personalInfo.vue
+58
-4
src/views/personal-center/components/update-avatar/updateAvatar.vue
...personal-center/components/update-avatar/updateAvatar.vue
+23
-3
src/views/personal-center/components/update-password/updatePassword.vue
...onal-center/components/update-password/updatePassword.vue
+62
-5
src/views/personal-center/personalCenter.vue
src/views/personal-center/personalCenter.vue
+4
-0
未找到文件。
src/router/router.js
浏览文件 @
d15348c2
...
...
@@ -40,6 +40,7 @@ export const otherRouters = {
path
:
'
personalCenter
'
,
name
:
'
personalCenter
'
,
title
:
'
个人中心
'
,
redirect
:
'
/personalCenter/personalInfo
'
,
component
:
personalCenter
=>
import
(
'
@/views/personal-center/personalCenter
'
),
children
:[
{
...
...
@@ -57,6 +58,11 @@ export const otherRouters = {
name
:
'
updatePassword
'
,
component
:
updatePassword
=>
import
(
'
@/views/personal-center/components/update-password/updatePassword
'
)
},
{
path
:
'
completeInfo
'
,
name
:
'
completeInfo
'
,
component
:
completeInfo
=>
import
(
"
@/views/personal-center/components/complete-info/completeInfo
"
)
},
{
path
:
'
myCollection
'
,
name
:
"
myCollection
"
,
...
...
src/views/Home.vue
浏览文件 @
d15348c2
...
...
@@ -30,12 +30,12 @@
v-model=
"isShowlogDialog"
title=
"登录"
>
<Form
ref=
"formData"
:model=
"formData"
:rules=
"rules"
label-position=
"left"
>
<Form
ref=
"formData"
:model=
"formData"
:rules=
"rules"
label-position=
"left"
:label-width=
"80"
>
<FormItem
prop=
"user"
label=
"用户名:"
>
<Input
type=
"text"
v-model=
"formData.user"
placeholder=
"用户名"
/>
</FormItem>
<FormItem
prop=
"password"
label=
"密码:"
>
<Input
type=
"password"
v-model=
"formData.password"
placeholder=
"密码"
/>
<Input
type=
"password"
v-model=
"formData.password"
placeholder=
"密码"
password
/>
</FormItem>
</Form>
<div
slot=
"footer"
>
...
...
@@ -87,7 +87,7 @@ export default {
computed
:{
...
mapState
({
menuList
:
state
=>
{
console
.
log
(
"
state menuList
"
,
state
.
app
.
menuList
);
//
console.log("state menuList",state.app.menuList);
return
state
.
app
.
menuList
;
}
})
...
...
src/views/personal-center/components/complete-info/completeInfo.less
0 → 100644
浏览文件 @
d15348c2
src/views/personal-center/components/complete-info/completeInfo.vue
0 → 100644
浏览文件 @
d15348c2
<
template
>
<Card>
<p
slot=
"title"
>
<Icon
type=
"ios-film-outline"
></Icon>
完善个人信息
</p>
<Form
ref=
'completeInfo'
:model=
'completeInfo'
:label-width=
"80"
label-position=
"left"
>
<FormItem
prop=
'realName'
label=
"真实姓名"
>
<Input
type=
"text"
v-model=
"completeInfo.realName"
/>
</FormItem>
<FormItem
prop=
"education"
label=
"学历"
>
<Select
v-model=
"completeInfo.education"
style=
"width:200px"
>
<Option
v-for=
"item in educationList"
:value=
"item.label"
:key=
"item.label"
>
{{
item
.
label
}}
</Option>
</Select>
</FormItem>
<FormItem
prop=
"companyName"
label =
"公司名称"
>
<Input
type=
"text"
v-model=
"completeInfo.companyName"
/>
</FormItem>
<FormItem
prop=
"postName"
label =
"岗位"
>
<Input
type=
"text"
v-model=
"completeInfo.postName"
/>
</FormItem>
<FormItem
>
<Button
type=
"primary"
@
click=
"handleSubmit('completeInfo')"
>
提交
</Button>
</FormItem>
</Form>
</Card>
</
template
>
<
script
>
export
default
{
data
(){
return
{
completeInfo
:{
education
:
''
,
companyName
:
''
,
postName
:
''
,
realName
:
''
},
educationList
:[
{
label
:
'
博士
'
},
{
label
:
'
硕士
'
},
{
label
:
'
本科
'
,
},
{
label
:
'
专科
'
},
{
label
:
'
其他
'
}
]
}
},
methods
:{
handleSubmit
(
name
)
{
this
.
$refs
[
name
].
resetFields
();
}
}
}
</
script
>
<
style
scoped
>
@import
'./completeInfo.less'
;
</
style
>
\ No newline at end of file
src/views/personal-center/components/my-collection/myCollection.vue
浏览文件 @
d15348c2
<
template
>
<div>
myCollection
</div>
<Card>
<p
slot=
"title"
>
<Icon
type=
"ios-film-outline"
></Icon>
我的收藏
</p>
</Card>
</
template
>
<
script
>
...
...
src/views/personal-center/components/personal-info/personalInfo.vue
浏览文件 @
d15348c2
<
template
>
<div>
personalInfo
</div>
<Card>
<p
slot=
"title"
>
<Icon
type=
"ios-film-outline"
></Icon>
个人资料
</p>
<Form
ref=
'personalInfo'
:model=
'personalInfoForm'
>
<FormItem
prop=
'avatarUrl'
>
<div>
个人头像:
<Avatar
src=
"https://i.loli.net/2017/08/21/599a521472424.jpg"
size=
'large'
style=
"margin-left:10px"
></Avatar>
</div>
</FormItem>
<FormItem
prop=
'nickName'
>
<p>
<span>
真实姓名:
{{
personalInfoForm
.
realName
}}
</span>
</p>
</FormItem>
<FormItem
prop=
'nickName'
>
<p>
<span>
用户名:
{{
personalInfoForm
.
nickName
}}
</span>
</p>
</FormItem>
<FormItem
prop=
'address'
>
<p>
<span>
地址:
{{
personalInfoForm
.
address
}}
</span>
</p>
</FormItem>
<FormItem
prop=
"companyName"
>
<p>
<span>
所在公司:
{{
personalInfoForm
.
companyName
}}
</span>
</p>
</FormItem>
<FormItem
prop=
"postName"
>
<p>
<span>
岗位:
{{
personalInfoForm
.
postName
}}
</span>
</p>
</FormItem>
</Form>
</Card>
</
template
>
<
script
>
export
default
{
data
(){
return
{
personalInfoForm
:{
nickName
:
'
bemount
'
,
avatarUrl
:
''
,
address
:
''
,
companyName
:
''
,
postName
:
''
,
realName
:
''
}
}
}
}
</
script
>
...
...
src/views/personal-center/components/update-avatar/updateAvatar.vue
浏览文件 @
d15348c2
<
template
>
<div>
updateAvatar
</div>
<Card>
<p
slot=
"title"
>
<Icon
type=
"ios-film-outline"
></Icon>
头像修改
</p>
<div>
AvatarUrl:
<Input
v-model=
"avatarUrl"
>
<Icon
type=
"ios-camera-outline"
slot=
'prefix'
/>
</Input>
<span
style=
"color:red;font-size:5px"
>
(为线上图片格式)
</span>
</div>
<div
style=
"margin-top:50px"
>
<Button
type=
"info"
>
提交
</Button>
</div>
</Card>
</
template
>
<
script
>
export
default
{
data
(){
return
{
avatarUrl
:
''
}
},
methods
:{
}
}
</
script
>
...
...
src/views/personal-center/components/update-password/updatePassword.vue
浏览文件 @
d15348c2
<
template
>
<div>
updatePassword
</div>
<Card>
<p
slot=
"title"
>
<Icon
type=
"ios-film-outline"
></Icon>
更改密码
</p>
<Form
ref=
"updatePasswordInfo"
:model=
"updatePasswordInfo"
:label-width=
'80'
label-position=
'left'
:rules=
"rules"
>
<FormItem
label=
'原密码'
prop=
"oldPassword"
>
<Input
type=
'password'
password
v-model=
"updatePasswordInfo.oldPassword"
>
<Icon
type=
"ios-lock-outline"
slot=
"prepend"
></Icon>
</Input>
</FormItem>
<FormItem
label=
"新密码"
prop=
'newPassword'
>
<Input
type=
'password'
password
v-model=
"updatePasswordInfo.newPassword"
>
<Icon
type=
"ios-lock-outline"
slot=
"prepend"
></Icon>
</Input>
</FormItem>
<FormItem
label=
"确认密码"
prop=
"reNewPassword"
>
<Input
type=
'password'
password
v-model=
"updatePasswordInfo.reNewPassword"
>
<Icon
type=
"ios-lock-outline"
slot=
"prepend"
></Icon>
</Input>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit('updatePasswordInfo')"
>
更改
</Button>
</FormItem>
</Form>
</Card>
</
template
>
<
script
>
export
default
{
data
(){
return
{
updatePasswordInfo
:{
oldPassword
:
''
,
newPassword
:
''
,
reNewPassword
:
''
},
rules
:{
newPassword
:
[
{
required
:
true
,
message
:
'
Please fill in the password.
'
,
trigger
:
'
blur
'
},
{
type
:
'
string
'
,
min
:
6
,
message
:
'
The password length cannot be less than 6 bits
'
,
trigger
:
'
blur
'
}
],
reNewPassword
:[
{
required
:
true
,
message
:
'
Please fill in the password.
'
,
trigger
:
'
blur
'
},
{
type
:
'
string
'
,
min
:
6
,
message
:
'
The password length cannot be less than 6 bits
'
,
trigger
:
'
blur
'
}
],
oldPassword
:
[
{
required
:
true
,
message
:
'
Please fill in the password.
'
,
trigger
:
'
blur
'
},
{
type
:
'
string
'
,
min
:
6
,
message
:
'
The password length cannot be less than 6 bits
'
,
trigger
:
'
blur
'
}
]
}
}
},
methods
:{
handleSubmit
(
name
){
this
.
$refs
[
name
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$Message
.
success
(
'
Success!
'
);
}
else
{
this
.
$Message
.
error
(
'
Fail!
'
);
}
})
this
.
$refs
[
name
].
resetFields
();
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './updatePassword.less';
</
style
>
\ No newline at end of file
src/views/personal-center/personalCenter.vue
浏览文件 @
d15348c2
...
...
@@ -18,6 +18,10 @@
<Icon
type=
"md-color-filter"
/>
修改头像
</MenuItem>
<MenuItem
name=
"completeInfo"
>
<Icon
type=
"ios-briefcase-outline"
/>
完善信息
</MenuItem>
</Menu>
</Col>
<Col
span=
"15"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录