From 6928ef4fefba0d6d76ca71400b2d47c8fea7759f Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Fri, 31 Jul 2020 20:53:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=98=85=E8=AF=BB=E8=AE=BA?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/document.vue | 18 ++++++------------ pages/index/read.vue | 1 + 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/pages/index/document.vue b/pages/index/document.vue index a2843de..74ce24e 100644 --- a/pages/index/document.vue +++ b/pages/index/document.vue @@ -136,22 +136,16 @@ fileId:item.fileId },function(res) { if(res.code==='200'){ - fetch(`${that.GLOBAL.server_address}${res.msg}`).then(res=>res.text()).then(res=>{ - item.content=res - loadingInstance.close() - that.$store.commit('menus/read') - that.$store.commit('read/open', item) - that.$router.push(that.localePath('/read')) - }).catch(err=>{ - console.error(err) - loadingInstance.close() - }) - }else{ + item.content=res.msg + that.$store.commit('menus/read') + that.$store.commit('read/open', item) + that.$router.push(that.localePath('/read')) loadingInstance.close() + }else{ that.$message.error(that.$t('error_500').toString()) } + loadingInstance.close() }) - }, query(){ let that=this diff --git a/pages/index/read.vue b/pages/index/read.vue index e3d1a5d..84ab291 100644 --- a/pages/index/read.vue +++ b/pages/index/read.vue @@ -493,6 +493,7 @@ noteContent: this.note_form.note_content, paperId: that.activeContent.id, fileId: that.activeContent.fileId, + originalText:that.note_form.original_text, content: that.pre.innerHTML },function(res) { if(res.code==='200'){