Authored by yyq

fix author mine

... ... @@ -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);
... ...
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
}
}];
... ...