diff --git a/pages/portfolio/manager/_portfolio_id.vue b/pages/portfolio/manager/_portfolio_id.vue index d1826f3..621d82e 100644 --- a/pages/portfolio/manager/_portfolio_id.vue +++ b/pages/portfolio/manager/_portfolio_id.vue @@ -35,13 +35,22 @@ - + + + + + diff --git a/pages/portfolio/post/_portfolio_id.vue b/pages/portfolio/post/_portfolio_id.vue index 3dc8fdc..9cdc3d0 100644 --- a/pages/portfolio/post/_portfolio_id.vue +++ b/pages/portfolio/post/_portfolio_id.vue @@ -1,84 +1,95 @@ @@ -112,6 +123,19 @@ export default { portfolioDetail: state => state.portfolio.detail.data, uploadHeaders: state => { return {'X-Upload-Token': state.uploadHeaders} + }, + isAuthor() { + let account = this.$store.state.userInfo?.nickname; + if (account) { + if (this.$route.params.portfolio_id) { + if (account === this.portfolioDetail.portfolioAuthorName) { + return true; + } + } else { + return true; + } + } + return false; } }), idPortfolio() { @@ -366,6 +390,9 @@ export default { window.onbeforeunload = null; }, mounted() { + if (!this.isAuthor) { + return + } window.addEventListener('beforeunload', e => { e = e || window.event;