diff --git a/common/manageServer.js b/common/manageServer.js index 9b1fc4d..5d7885f 100644 --- a/common/manageServer.js +++ b/common/manageServer.js @@ -77,13 +77,7 @@ async function handleResponse({ // 图片类型数据特殊处理 if((header['content-type'] || header['Content-Type'])?.indexOf?.("image/") > -1) { const base64 = "data:image/png;base64," + uni.arrayBufferToBase64(data) - let tempFilePath = base64 - try{ - let dFile = await downloadFile(base64) - tempFilePath = dFile.tempFilePath - }catch(e){ - } - resolve({ data: { fileUrl: tempFilePath } }) + resolve({ data: { fileUrl: base64 } }) return } data = data || {} diff --git a/common/untool.js b/common/untool.js index 0644560..f25cd68 100644 --- a/common/untool.js +++ b/common/untool.js @@ -90,7 +90,8 @@ const downloadFile = (url)=> { uni.downloadFile({ url: url, success: (res) => { - if (res.statusCode === 200) { + console.log("downloadFile:success:res======", res) + if (res.statusCode === 200 || res.statusCode === 400) { console.log('下载成功'); resolve(res) } diff --git a/pages/print/courierNote.vue b/pages/print/courierNote.vue index 20e51dc..3862d85 100644 --- a/pages/print/courierNote.vue +++ b/pages/print/courierNote.vue @@ -150,12 +150,8 @@ }, methods: { initData() { - // uni.showLoading({ - // title: '加载中' - // }); }, handleScanValChange: debounce(function(val){ - // val && () }), async handleSubmit() { let res = await this.getRealGetWaybillPrintData()