From dbd735c12ad3871e98dfc22b71a9e45a595ad7d6 Mon Sep 17 00:00:00 2001 From: kylin L <452061493@qq.com> Date: Sat, 14 Sep 2024 17:54:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/enforce/enforcementPlanAdd.vue | 71 ++++++++++++------------ 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/src/views/enforce/enforcementPlanAdd.vue b/src/views/enforce/enforcementPlanAdd.vue index f216582..656deed 100644 --- a/src/views/enforce/enforcementPlanAdd.vue +++ b/src/views/enforce/enforcementPlanAdd.vue @@ -384,40 +384,43 @@ } const downloadFile = async () => { - var url = 'http://192.168.110.41:3301/#/pdfView?url=/profile/upload/2024/09/09/df8d2b5a9615603bdff8cf7fe0e2d836.pdf'; - console.log(url); - szyptGetToken(param, success => { - let resMsg = success.data; - console.log(resMsg); - wx.config({ - // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 - debug: false, - // 必填,公众号的唯一标识 - appId: resMsg.corpid, - // 必填,生成签名的时间戳 - timestamp: resMsg.timestamp, - // 必填,生成签名的随机串 - nonceStr: resMsg.nonceStr, - // 必填,签名,见附录1 - signature: resMsg.signature, - // 必填,需要使用的JS接口列表,所有JS接口列表见附录2 - jsApiList: ["scanQRCode"], - }); - wx.ready(() => { - //微信扫一扫请求操作 - wx.downloadImage({ - serverId: '', // 需要下载的图片的服务器端ID,由uploadImage接口获得 - isShowProgressTips: 1, // 默认为1,显示进度提示 - success: function (res) { - var localId = res.localId; // 返回图片下载后的本地ID - } - }); - }); - wx.error((res) => { - console.log("获取失败"); - }); - }, error => { - }); + // var url = 'http://127.0.0.1:85/profile//EnforcementInspectionPlanTemplate.xlsx'; + var url = 'http://jdm.szssfj.cn/jdmApi/profile//EnforcementInspectionPlanTemplate.xlsx'; + // var url = 'http://10.132.108.3:85/profile//EnforcementInspectionPlanTemplate.xlsx'; + window.location.href = url; + // console.log(url); + // szyptGetToken(param, success => { + // let resMsg = success.data; + // console.log(resMsg); + // wx.config({ + // // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 + // debug: false, + // // 必填,公众号的唯一标识 + // appId: resMsg.corpid, + // // 必填,生成签名的时间戳 + // timestamp: resMsg.timestamp, + // // 必填,生成签名的随机串 + // nonceStr: resMsg.nonceStr, + // // 必填,签名,见附录1 + // signature: resMsg.signature, + // // 必填,需要使用的JS接口列表,所有JS接口列表见附录2 + // jsApiList: ["scanQRCode"], + // }); + // wx.ready(() => { + // //微信扫一扫请求操作 + // wx.downloadImage({ + // serverId: '', // 需要下载的图片的服务器端ID,由uploadImage接口获得 + // isShowProgressTips: 1, // 默认为1,显示进度提示 + // success: function (res) { + // var localId = res.localId; // 返回图片下载后的本地ID + // } + // }); + // }); + // wx.error((res) => { + // console.log("获取失败"); + // }); + // }, error => { + // }); } const uploadFiles = (file) => { uploadFile(file, (res) => {