:bugs: 头像显示及昵称获取问题修复
This commit is contained in:
parent
c5afbd0a60
commit
ce2ff27f8f
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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(
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
<el-row class="wrapper">
|
||||
<el-col v-if="isEdit" style="margin-bottom: 1rem;">
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||
<el-breadcrumb-item :to="{ path: '/portfolio-manager/' + idPortfolio }">{{ portfolio.portfolioTitle }}
|
||||
<el-breadcrumb-item :to="{ path: '/portfolio/manager/' + idPortfolio }">{{ portfolio.portfolioTitle }}
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>更新作品集</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user