Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-community-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
6 years ago
Commit
069ad847cf0df6381752da51d5f5053a3f031f40
1 parent
c4b85cb0
fix author mine
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
apps/pages/userpage/author.vue
apps/pages/userpage/index.js
apps/pages/userpage/author.vue
View file @
069ad84
...
...
@@ -103,10 +103,14 @@
try {
this.$sdk.getUser().then(res => {
this.$route.params.id = res.uid;
this.autherInfo = assign({}, this.autherInfo, {
authorUid: res.uid
});
if (get(res, 'uid') > 0) {
this.$route.params.id = res.uid;
this.autherInfo = assign({}, this.autherInfo, {
authorUid: res.uid
});
} else {
this.$sdk.goLogin();
}
});
} catch(e){
console.log(e);
...
...
apps/pages/userpage/index.js
View file @
069ad84
export
default
[{
path
:
'/author/:type/:id'
,
name
:
'author'
,
component
:
()
=>
import
(
/* webpackChunkName: "author" */
'./author'
)
component
:
()
=>
import
(
/* webpackChunkName: "author" */
'./author'
),
meta
:
{
keepAlive
:
true
}
},
{
path
:
'/author/mine'
,
name
:
'author.mine'
,
component
:
()
=>
import
(
/* webpackChunkName: "author" */
'./author'
)
component
:
()
=>
import
(
/* webpackChunkName: "author" */
'./author'
),
meta
:
{
keepAlive
:
true
}
}];
...
...
Please
register
or
login
to post a comment