把你的下载地址前缀添加到合法域名就解决了


在调试工具里成功了是因为勾选了下面这项

下面是我的下载并打开函数
methods: {downloadFileFn(data) {if (this.detailsObj.currentUserBuy) {uni.downloadFile({url: 'https://' + data,success(res) {uni.saveFile({tempFilePath: res.tempFilePath, success: function(res1) {const savedFilePath = res1.savedFilePath;uni.openDocument({filePath: savedFilePath,success: function(res) {uni.hideLoading()},fail: function(res) {console.log(res)},complete: function(res) {setTimeout(uni.hideLoading(), 4000)},});},fail: function(err) {console.log(err)}});},fail(res) {console.log(res)}})}}
}