From 5ac8513ca9a98ff7c07c74c69a218b8c1ba4d0e1 Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Wed, 15 Jun 2022 14:28:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?pdf=E5=8A=A0=E8=BD=BD=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PdfPreview/view.vue | 24 +++++------------------- src/views/Index.vue | 2 -- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/src/components/PdfPreview/view.vue b/src/components/PdfPreview/view.vue index a5b1d4ec..623b3c6d 100644 --- a/src/components/PdfPreview/view.vue +++ b/src/components/PdfPreview/view.vue @@ -1,5 +1,5 @@ @@ -64,6 +54,7 @@ export default { }, data() { return { + loading:false, src: "", showPages: undefined, totalPages:0, @@ -79,6 +70,7 @@ export default { mounted() { // /case/demo.pdf if(this.filePath){ + this.loading = true; this.loadInitPdf(this.filePath); } window.addEventListener( @@ -129,6 +121,7 @@ export default { let loadingTask = pdf.createLoadingTask(url); this.src=loadingTask; loadingTask.promise.then((pdf) =>{ + this.loading = false; this.totalPages=pdf.numPages; if(pdf.numPages>this.initNum){ this.showPages = this.initNum; @@ -136,6 +129,7 @@ export default { this.showPages =pdf.numPages; } }).catch((err) =>{ + this.loading = false; this.$message.error("加载内容失败,请联系管理员"); }); }, @@ -157,15 +151,7 @@ export default { if(this.isscroll){ this.showPages++ this.moreState = 2; - // this.debounce(this.loadInitPdf($this.filePath),5000); - // this.debounce(,200000); } - - // if(scrollTop > 400) { - // document.querySelector('#articleAnking').style.cssText = "position: fixed;top: 0;width:242.5px"; - // } else { - // document.querySelector('#articleAnking').style.cssText = "position: static"; - // } }, debounce(func, wait) {// 非立即执行 let timeout; diff --git a/src/views/Index.vue b/src/views/Index.vue index 0ef393aa..8ab80d51 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -369,7 +369,6 @@ export default { }; }, mounted() { - //console.log(this.$Constants.fileBaseUrl,'fileBaseUrl地址'); this.getCourseData(1); this.getCaseData(); this.getArticleData(); @@ -380,7 +379,6 @@ export default { window.open('https://m.qingxuetang.com/x/?appId=qxtcorp306130','_blank'); }, toCourseDetail(item) { - if (item.type == 10) { return this.webBaseUrl + '/course/micro?id=' + item.id; } else if (item.type == 20) { From af9be97044f07d0e59f48289504eec860f857f39 Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Wed, 15 Jun 2022 14:43:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=86=E4=BA=AB=E4=BC=A0title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Portal/interactBar.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Portal/interactBar.vue b/src/components/Portal/interactBar.vue index 12f68ec2..5598bd6d 100644 --- a/src/components/Portal/interactBar.vue +++ b/src/components/Portal/interactBar.vue @@ -459,7 +459,6 @@ export default { } }, submitShare(){ - if(this.shareUsers.length==0){ this.$message.error('请选择分享人'); return; @@ -472,7 +471,7 @@ export default { let postData={ objType:this.type, objId:this.data.id, - content:'', + content:this.data.title, isRead:false, toAid:'', toAname:'',