downloadFile openDocument success 打不开? |
您所在的位置:网站首页 › pages文稿安卓手机打不开 › downloadFile openDocument success 打不开? |
小程序:wxa3c2e245be15493d 页面(首页->顶部 周报关键字->市场周报): 路径:pages/market/markets 手机:IOS 14.0、13、12 打开时候出现95%失败,任何都没有打开。5%成功率。 安卓则出现打开后,白屏。 首先配置了下载域名是对的。 均真机调试过,都成功openDocument 的success. 文件特点:500KB-2MB 然后,长达1年正常。突然今天开始不正常。 检查了所有https ssl 均正常未过期。 能正常接收到openDocument的success并输出 打开文档成功,但实际却无法打开。 openDocument(url) { const downloadTask = uni.downloadFile({ url: url, success: (res) => { uni.openDocument({ filePath: res.tempFilePath, fileType: "pdf", success: () => { console.log("打开文档成功"); uni.hideLoading(); }, fail: (res) => { console.log("打开文档失败", res); }, }); }, fail: (res) => { console.log("文件下载失败", res); }, }); downloadTask.onProgressUpdate((res) => { uni.showLoading({ title: `加载中...${res.progress}%`, mask: true, }); console.log("下载进度", res.progress); console.log("已经下载的数据长度", res.totalBytesWritten); console.log("预期需要下载的数据总长度", res.totalBytesExpectedToWrite); }); }, |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |