diff --git a/common/manageServer.js b/common/manageServer.js index ee9d15b..9b1fc4d 100644 --- a/common/manageServer.js +++ b/common/manageServer.js @@ -74,10 +74,15 @@ async function handleResponse({ param, coreParams }) { - // 图片类型数据特殊处理 - if(header['content-type']?.indexOf?.("image/") > -1) { + // 图片类型数据特殊处理 + if((header['content-type'] || header['Content-Type'])?.indexOf?.("image/") > -1) { const base64 = "data:image/png;base64," + uni.arrayBufferToBase64(data) - let { tempFilePath } = await downloadFile(base64) + let tempFilePath = base64 + try{ + let dFile = await downloadFile(base64) + tempFilePath = dFile.tempFilePath + }catch(e){ + } resolve({ data: { fileUrl: tempFilePath } }) return }