From 03e94973de4a8892a59d3f365b07411dd66bf6d6 Mon Sep 17 00:00:00 2001 From: xjb <20397795@qq.com> Date: Mon, 21 Aug 2023 21:20:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Da=E6=A0=87=E7=AD=BE=E6=89=93?= =?UTF-8?q?=E5=BC=80=E6=96=87=E6=A1=A3=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mp-cu/colorUI/components/ui-swiper/ui-swiper.js | 3 ++- pages/about/about.js | 8 ++++---- pages/detail/detail.js | 11 ++++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/mp-cu/colorUI/components/ui-swiper/ui-swiper.js b/mp-cu/colorUI/components/ui-swiper/ui-swiper.js index 1227453..6785eae 100644 --- a/mp-cu/colorUI/components/ui-swiper/ui-swiper.js +++ b/mp-cu/colorUI/components/ui-swiper/ui-swiper.js @@ -87,7 +87,8 @@ Component({ { wx.openEmbeddedMiniProgram({ appId: appid, - path: path + path: path, + allowFullScreen:true }) } diff --git a/pages/about/about.js b/pages/about/about.js index 611d1c0..737d58e 100644 --- a/pages/about/about.js +++ b/pages/about/about.js @@ -149,7 +149,7 @@ Page({ let isDoc = /\.(doc|docx|xls|xlsx|ppt|pptx|pdf)$/.test(href) if (isDoc) { - this.openLinkDoc(e) + this.openLinkDoc(e.detail) return } @@ -287,7 +287,7 @@ Page({ let fileType // 如果是a标签href中插入的文档 - let src = e.currentTarget.dataset.src + let src = e.src || e.href var n=0; for (var i = 0; i < self.data.downloadFileDomain.length; i++) { @@ -310,8 +310,8 @@ Page({ url = src fileType = /doc|docx|xls|xlsx|ppt|pptx|pdf$/.exec(src)[0] } else { - url = e.currentTarget.dataset.filelink - fileType = e.currentTarget.dataset.filetype + url = e.filelink || e.href + fileType = e.filetype } wx.downloadFile({ diff --git a/pages/detail/detail.js b/pages/detail/detail.js index 54e2aa7..bf8ec44 100644 --- a/pages/detail/detail.js +++ b/pages/detail/detail.js @@ -668,7 +668,7 @@ Page({ let isDoc = /\.(doc|docx|xls|xlsx|ppt|pptx|pdf)$/.test(href) if (isDoc) { - this.openLinkDoc(e) + this.openLinkDoc(e.detail) return } @@ -697,7 +697,8 @@ Page({ { wx.openEmbeddedMiniProgram({ appId: appid, - path: path + path: path, + allowFullScreen:true }) } @@ -816,7 +817,7 @@ Page({ let fileType // 如果是a标签href中插入的文档 - let src = e.currentTarget.dataset.src + let src = e.src || e.href var n=0; for (var i = 0; i < self.data.downloadFileDomain.length; i++) { @@ -839,8 +840,8 @@ Page({ url = src fileType = /doc|docx|xls|xlsx|ppt|pptx|pdf$/.exec(src)[0] } else { - url = e.currentTarget.dataset.filelink - fileType = e.currentTarget.dataset.filetype + url = e.filelink || e.href + fileType = e.filetype } wx.downloadFile({ -- GitLab