From 4a90b21059a9652803da1b3b2ee6d09b2046400a Mon Sep 17 00:00:00 2001 From: yanzai Date: Wed, 17 Apr 2024 14:03:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8A=A5=E5=91=8A=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 秦皇岛第三医院小程序/pages.json | 8 ++ 秦皇岛第三医院小程序/pages/test/test.vue | 91 +++++++++++++++++++ .../components/report/type3.vue | 84 +++++++++++++++-- 秦皇岛第三医院报告对比/package-lock.json | 10 +- 秦皇岛第三医院报告对比/package.json | 3 +- 5 files changed, 187 insertions(+), 9 deletions(-) create mode 100644 秦皇岛第三医院小程序/pages/test/test.vue diff --git a/秦皇岛第三医院小程序/pages.json b/秦皇岛第三医院小程序/pages.json index c953fc1..8277008 100644 --- a/秦皇岛第三医院小程序/pages.json +++ b/秦皇岛第三医院小程序/pages.json @@ -34,6 +34,14 @@ "enablePullDownRefresh": false } + },{ + "path" : "pages/test/test", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + }], "subPackages": [{ "root": "pages/buy", diff --git a/秦皇岛第三医院小程序/pages/test/test.vue b/秦皇岛第三医院小程序/pages/test/test.vue new file mode 100644 index 0000000..3d568ff --- /dev/null +++ b/秦皇岛第三医院小程序/pages/test/test.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/秦皇岛第三医院报告对比/components/report/type3.vue b/秦皇岛第三医院报告对比/components/report/type3.vue index d32da15..a45c3f9 100644 --- a/秦皇岛第三医院报告对比/components/report/type3.vue +++ b/秦皇岛第三医院报告对比/components/report/type3.vue @@ -5,7 +5,8 @@ * date:2023年3月19日 13:38:24 */ import { - ref + ref, + onMounted } from 'vue' import { $image, @@ -15,7 +16,7 @@ import { onShow } from '@dcloudio/uni-app' - + import wx from 'weixin-js-sdk' const props = defineProps({ list: { type: Object, @@ -28,10 +29,12 @@ } } }); + const popup=ref(null) let url = ref('') + const ReportDown = async (id) => { uni.showLoading({ - title: '正在下载,请打开弹窗拦截' + title: '正在查询报告...' }) const response = await ReportDownAction({ rid: props.list.info.id, @@ -41,7 +44,9 @@ uni.hideLoading() $response(response, () => { url.value = $image(response.data.url) - jianqieban(url.value) + + popup.value.open() + // jianqieban(url.value) }) } const jianqieban = (url) => { @@ -51,6 +56,7 @@ showToast: false, success: () => { uni.$lu.toast("链接已复制到剪切板,请前往浏览器下载") + // tiao(url) }, fail: (e) => { console.log(e) @@ -67,7 +73,9 @@ //data:"fdfdfdfs", showToast: false, success: () => { - uni.$lu.toast("链接已复制到剪切板,请前往浏览器下载") + + uni.$lu.toast("链接已复制到剪切板,请前往浏览器下载.") + } }); } else if (res.cancel) { @@ -82,11 +90,53 @@ } }); } + let Env = '' + onMounted(() => { + console.log(props.list) + if(props.list && props.list.list.length>0){ + + }else{ + uni.$lu.toast("暂无报告可下载") + } + Env = uni.getSystemInfoSync().platform + console.log(Env) + }) + const tiao = (url) => { + console.log(url) + wx.miniProgram.navigateTo({ + url: '/pages/test/test?url=' + url + }) + } + const preview=()=>{ + if(Env=='ios'){ + //window.location.href = url.value + tiao(url.value) + } + if(Env=='android'){ + tiao(url.value) + } + }