wx.canvasToTempFilePath 图片不完整?
发布于 5 年前 作者 mengxiuying 6130 次浏览 来自 官方Issues

wx.canvasToTempFilePath的问题

在开发工具没问题,在真机出现问题(oppo ) ,使用“微信开发者工具”->“真机调试” 也没有问题。


wx.canvasToTempFilePath({

            x: 0,
            y: 0,
            fileType: 'jpg',
            width: _this.data.canvasWidth,
            height: _this.data.canvasHeight,
            destWidth: _this.data.imgWidth,
            destHeight: _this.data.imgHeight,//图片真实高度
            // destHeight: _this.data.canvasHeight,
            canvasId: 'billCanvas',
            success(resinfo) {
              wx.hideLoading();
              console.log(resinfo.tempFilePath);
              _this.setData({
                happensImage: resinfo.tempFilePath,
                url: resinfo.tempFilePath
              })
              // 下载
              wx.saveImageToPhotosAlbum({
                filePath: _this.data.happensImage,
                success(result) {
                  console.log(result);
       
                }
              })
            }
          }, _this)
   

2 回复

图片不完整指的是?

回到顶部