收藏
回答

wx.openDocument在pc端时文件打不开?

wx.openDocument在真机上打不开的次数居多,但每次都返回“文档打开成功”

             const downTaskwx.downloadFile({

              url: e//仅为示例,并非真实的资源

              success: (res=> {

                  if (res.statusCode === 200) {

                      console.log(res);

                      var filePath = res.tempFilePath;

                      wx.openDocument({

                      filePath:filePath,

                        fileType: this.filetype,

                        success: function (res) {

                        console.log('打开文档成功');

                         },   

                    });

                  }

              }

          });



最后一次编辑于  11-13
回答关注问题邀请回答
收藏

1 个回答

问题标签