ios微信客户端升级7.0.4后, openDocument回调显示成功却不展示
发布于 6 年前 作者 xiangyan 1218 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)
  • 预期表现

openDocument成功后打开对应文档

  • 复现路径
  • 提供一个最简复现 Demo
wx.downloadFile({
    url: 'xxx.xxxx.com/Authorization=' + app.globalData.token + '?id=' + id,
    success(res) {
    let FileSys = wx.getFileSystemManager();
    FileSys.saveFile({
      tempFilePath: res.tempFilePath,
         success: function (res) {
         wx.openDocument({
                    filePath: res.savedFilePath,
                    success: function(res) {
                      console.log('openDocument', res);
                    },
                    fail: function (res) {
                      wx.showToast({
                        title: '文件打开失败',
                        icon: 'none'
                      })
                    }
                  });
         }
    })
  }
 
    
 
})

1 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部