Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BeMount
PersonalBlog
提交
a2d51064
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 搜索 >>
提交
a2d51064
编写于
4月 11, 2020
作者:
BeMount
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(/home.vue): 增加判断个人中心
上级
d15348c2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
32 addition
and
9 deletion
+32
-9
src/apis/personalCenter.js
src/apis/personalCenter.js
+13
-0
src/router/router.js
src/router/router.js
+1
-1
src/views/Home.vue
src/views/Home.vue
+13
-5
src/views/personal-center/components/complete-info/completeInfo.vue
...personal-center/components/complete-info/completeInfo.vue
+3
-1
src/views/personal-center/components/personal-info/personalInfo.vue
...personal-center/components/personal-info/personalInfo.vue
+2
-2
未找到文件。
src/apis/personalCenter.js
0 → 100644
浏览文件 @
a2d51064
export
const
submitCompleteInfo
=
(
vm
,
name
)
=>
{
vm
.
$axios
.
request
({
data
:
vm
.
completeInfo
,
url
:
'
/personalCenter/completeUserInfo
'
,
method
:
'
post
'
}).
then
(
res
=>
{
vm
.
$Message
.
info
(
'
提交成功
'
);
vm
.
$refs
[
name
].
resetFields
();
}).
catch
(
res
=>
{
console
.
log
(
"
提交个人完整信息
"
);
})
}
src/router/router.js
浏览文件 @
a2d51064
...
...
@@ -34,7 +34,7 @@ export const otherRouters = {
path
:
'
/
'
,
component
:
Home
,
name
:
'
Home
'
,
redirect
:
'
/personalCenter
'
,
//
redirect:'/personalCenter',
children
:[
{
path
:
'
personalCenter
'
,
...
...
src/views/Home.vue
浏览文件 @
a2d51064
...
...
@@ -14,14 +14,14 @@
<span>
登录
</span>
</div>
<div
v-else
>
<Dropdown>
<Dropdown
@
on-click=
"handleRouterRedirect"
>
<a
href=
"javascript:void(0)"
>
BeMount
<Icon
type=
"ios-arrow-down"
></Icon>
</a>
<DropdownMenu
slot=
"list"
>
<DropdownItem>
个人中心
</DropdownItem>
<DropdownItem>
退出
</DropdownItem>
<DropdownMenu
slot=
"list"
>
<DropdownItem
name=
"personalCenter"
>
个人中心
</DropdownItem>
<DropdownItem
name=
"logout"
>
退出
</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
...
...
@@ -87,7 +87,6 @@ export default {
computed
:{
...
mapState
({
menuList
:
state
=>
{
// console.log("state menuList",state.app.menuList);
return
state
.
app
.
menuList
;
}
})
...
...
@@ -107,6 +106,15 @@ export default {
this
.
$refs
[
'
formData
'
].
resetFields
();
this
.
isShowlogDialog
=
true
;
},
handleRouterRedirect
(
name
){
if
(
name
==
'
personalCenter
'
){
if
(
localStorage
.
getItem
(
'
jwt
'
)
){
this
.
$router
.
push
({
name
:
name
})
}
else
{
this
.
$Message
.
info
(
"
请先登录
"
);
}
}
},
handleSubmit
(
name
){
this
.
$refs
[
name
].
validate
((
valid
)
=>
{
if
(
valid
)
{
...
...
src/views/personal-center/components/complete-info/completeInfo.vue
浏览文件 @
a2d51064
...
...
@@ -27,6 +27,8 @@
</
template
>
<
script
>
import
*
as
personalCenter
from
'
@/apis/personalCenter
'
;
export
default
{
data
(){
return
{
...
...
@@ -59,7 +61,7 @@
},
methods
:{
handleSubmit
(
name
)
{
this
.
$refs
[
name
].
resetFields
(
);
personalCenter
.
submitCompleteInfo
(
this
,
name
);
}
}
}
...
...
src/views/personal-center/components/personal-info/personalInfo.vue
浏览文件 @
a2d51064
...
...
@@ -28,7 +28,7 @@
<FormItem
prop=
'address'
>
<p>
<span>
地址:
{{
personalInfoForm
.
address
}}
</span>
<span>
学历:
{{
personalInfoForm
.
education
}}
</span>
</p>
</FormItem>
...
...
@@ -54,7 +54,7 @@
personalInfoForm
:{
nickName
:
'
bemount
'
,
avatarUrl
:
''
,
address
:
''
,
education
:
''
,
companyName
:
''
,
postName
:
''
,
realName
:
''
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录