diff --git a/components/common/comment/main.vue b/components/common/comment/main.vue index 2ec0497..5b8a41e 100644 --- a/components/common/comment/main.vue +++ b/components/common/comment/main.vue @@ -37,7 +37,8 @@ - + @@ -143,7 +144,7 @@ } ) }, - _initEditor (data) { + _initEditor(data) { let _ts = this; let toolbar; if (window.innerWidth < 768) { @@ -310,6 +311,19 @@ this.commentOriginalCommentId = 0 } }, + async mounted() { + let _ts = this; + _ts.$store.commit('setActiveMenu', 'post-article'); + if (_ts.user) { + const responseData = await _ts.$axios.$get('/api/upload/token'); + if (responseData) { + _ts.$set(_ts, 'tokenURL', { + token: responseData.uploadToken || '', + URL: responseData.uploadURL || '', + }) + } + } + }, watch: { isFetching(isFetching) { if (isFetching) {