wx.download如何传参?
wx.downloadfile中data传出的数据在服务器接收不到,而且官方文档也没有data的描述,有什么别的解决方法吗?
wx.downloadfile中data传出的数据在服务器接收不到,而且官方文档也没有data的描述,有什么别的解决方法吗?
wx.showLoading({
title: ‘下载中…’,
})
wx.downloadFile({
url: ‘****’,//文件在服务器上的全路径
success: function (reg) {
var filePath = reg.tempFilePath;
//页面显示加载动画
wx.openDocument({
filePath: filePath,
success: function (res) {
that.setData({
loadingHidden: true
})
console.log(‘打开文档成功’)
}
})
wx.hideLoading()
}
})