From 933898be6cdb5c26937054c4a34c8eb6dd8a4b80 Mon Sep 17 00:00:00 2001 From: x ronger Date: Sun, 2 Aug 2020 22:45:24 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=B8=8A=E4=BC=A0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/common/comment/main.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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) {