From 09c97ee9423622b918e49233610a59b0b19ad0b1 Mon Sep 17 00:00:00 2001 From: yanzai Date: Wed, 9 Oct 2024 08:53:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E6=8A=A5=E5=91=8A=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 北京仁仁体检小程序/api/api.js | 2 +- 北京仁仁体检小程序/api/index.js | 2 +- 北京仁仁体检小程序/pages.json | 8 ++ 北京仁仁体检小程序/pages/test/test.vue | 92 +++++++++++++++++++ .../components/report/type3.vue | 76 ++++++++++++++- 北京仁仁体检平台报告对比/package.json | 3 +- 北京仁仁体检平台报告对比/pnpm-lock.yaml | 11 +++ 7 files changed, 186 insertions(+), 8 deletions(-) create mode 100644 北京仁仁体检小程序/pages/test/test.vue diff --git a/北京仁仁体检小程序/api/api.js b/北京仁仁体检小程序/api/api.js index 810c645..c6701b0 100644 --- a/北京仁仁体检小程序/api/api.js +++ b/北京仁仁体检小程序/api/api.js @@ -1,7 +1,7 @@ let url_ = "https://bjrrtj-api.sixinyun.com"; let report_url_ = "https://bjrrtj-api.sixinyun.com"; let h5_url_ = "https://bjrrtj-api.sixinyun.com"; -const dev = 1; +const dev = 0; if (dev === 1) { url_ = "http://localbeijingrenren"; report_url_ = "http://192.168.31.106:5173"; diff --git a/北京仁仁体检小程序/api/index.js b/北京仁仁体检小程序/api/index.js index 8e19466..f90115e 100644 --- a/北京仁仁体检小程序/api/index.js +++ b/北京仁仁体检小程序/api/index.js @@ -3,7 +3,7 @@ import { } from '@/lu/axios.js' import $api from './api.js' let url_ = "https://bjrrtj-api.sixinyun.com"; -const dev =1 +const dev =0 if (dev === 1) { url_ = "http://localbeijingrenren" } diff --git a/北京仁仁体检小程序/pages.json b/北京仁仁体检小程序/pages.json index b550d50..932198e 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..efce0e1 --- /dev/null +++ b/北京仁仁体检小程序/pages/test/test.vue @@ -0,0 +1,92 @@ + + + + + \ No newline at end of file diff --git a/北京仁仁体检平台报告对比/components/report/type3.vue b/北京仁仁体检平台报告对比/components/report/type3.vue index feb5c00..9394156 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,11 @@ } } }); + 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 +43,8 @@ uni.hideLoading() $response(response, () => { url.value = $image(response.data.url) - jianqieban(url.value) + popup.value.open() + //jianqieban(url.value) }) } const jianqieban = (url) => { @@ -82,10 +85,51 @@ } }); } + 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) + } + }