diff --git a/components/widget/share.vue b/components/widget/share.vue index 98eea73..77ab78f 100644 --- a/components/widget/share.vue +++ b/components/widget/share.vue @@ -41,7 +41,7 @@ }, methods: { share(url) { - let path = url + '?s=' + this.$store.state.oauth.nickname + let path = url + '?s=' + this.$store.state.userInfo?.nickname return path; } } diff --git a/pages/article/_article_id.vue b/pages/article/_article_id.vue index f53a3de..d7526a7 100644 --- a/pages/article/_article_id.vue +++ b/pages/article/_article_id.vue @@ -102,10 +102,10 @@ isFetching: state => state.article.detail.fetching, isMobile: state => state.global.isMobile, user: state => state.oauth, - avatar: state => state.oauth?.avatarURL + avatar: state => state.userInfo?.avatarURL }), hasPermissions() { - let account = this.$store.state.oauth?.nickname; + let account = this.$store.state.userInfo?.nickname; if (account) { if (account === this.article.articleAuthor.userNickname) { return true; diff --git a/pages/draft/_draft_id.vue b/pages/draft/_draft_id.vue index f9ad7bc..176f8e1 100644 --- a/pages/draft/_draft_id.vue +++ b/pages/draft/_draft_id.vue @@ -89,10 +89,10 @@ isFetching: state => state.draft.detail.fetching, isMobile: state => state.global.isMobile, user: state => state.oauth, - avatar: state => state.oauth?.avatarURL + avatar: state => state.userInfo?.avatarURL }), hasPermissions() { - let account = this.$store.state.oauth?.nickname; + let account = this.$store.state.userInfo?.nickname; if (account) { if (account === this.article?.articleAuthor?.userNickname) { return true; diff --git a/pages/portfolio/_portfolio_id.vue b/pages/portfolio/_portfolio_id.vue index 55946a6..22a23f0 100644 --- a/pages/portfolio/_portfolio_id.vue +++ b/pages/portfolio/_portfolio_id.vue @@ -61,10 +61,10 @@ isFetching: state => state.portfolio.detail.fetching, isMobile: state => state.global.isMobile, user: state => state.oauth, - avatar: state => state.oauth?.avatarURL + avatar: state => state.userInfo?.avatarURL }), isAuthor() { - let account = this.$store.state.oauth?.nickname; + let account = this.$store.state.userInfo?.nickname; if (account) { if (account === this.portfolio.portfolioAuthor.userNickname) { return true; diff --git a/pages/portfolio/manager/_portfolio_id.vue b/pages/portfolio/manager/_portfolio_id.vue index 8a6c48f..6fd7ba7 100644 --- a/pages/portfolio/manager/_portfolio_id.vue +++ b/pages/portfolio/manager/_portfolio_id.vue @@ -69,7 +69,7 @@ portfolio: state => state.portfolio.detail.data }), isAuthor() { - let account = this.$store.state.oauth?.nickname; + let account = this.$store.state.userInfo?.nickname; if (account) { if (account === this.portfolio.portfolioAuthorName) { return true; @@ -84,6 +84,12 @@ this.$router.push({ path: data }) + } else if (name === 'user') { + this.$router.push( + { + path: '/user/' + data + } + ) } else { this.$router.push( { diff --git a/pages/portfolio/post/_portfolio_id.vue b/pages/portfolio/post/_portfolio_id.vue index eb8cc44..9398a9c 100644 --- a/pages/portfolio/post/_portfolio_id.vue +++ b/pages/portfolio/post/_portfolio_id.vue @@ -2,7 +2,7 @@ - {{ portfolio.portfolioTitle }} + {{ portfolio.portfolioTitle }} 更新作品集 @@ -259,7 +259,7 @@ _ts.$message(res.message); } else { _ts.$router.push({ - path: '/user/' + _ts.$store.state.oauth.nickname + path: '/user/' + _ts.$store.state.userInfo?.nickname }) } }