wx.downloadFile下载失败问题
发布于 5 年前 作者 egong 13794 次浏览 来自 问答

还请官方人员尽快协助看下是不是bug,或者是我使用的有问题,目前在生产环境中,ios系统中大概率出现,以下是相关代码:

wx.downloadFile({

url: url,

success: function (res) {

console.log("文档下载成功返回:", res);

},

fail(res) {

console.log("下载失败:", res);

wx.showToast({

title: '文件下载失败',

icon: 'none'

})

},

// complete: function () {

// wx.hideLoading();

// }

})

测试url:https://img.cdeledu.com/downloadFile?fileUrl=file/CWARE/2019/1208/1575769553647-0.docx&origin=CWARE&securecode=73c03954c544d1dd&fileName=%E3%80%8A%E4%B8%AD%E7%BA%A7%E7%BB%8F%E6%B5%8E%E6%B3%95%E3%80%8B%E5%9F%BA%E7%A1%80%E9%A2%84%E8%AE%B22-%E7%AC%AC%E4%BA%8C%E7%AB%A0%E5%85%AC%E5%8F%B8%E6%B3%95%E5%BE%8B%E5%88%B6%E5%BA%A6191209

,微信返回值{“errMsg”:“downloadFile:fail file data is empty”}

复现的相关手机信息:

1 回复

中文的问题吧,你换成英文试试,在测试环境看看

回到顶部