收藏
回答

wx.canvasToTempFilePath 图片不完整?

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)
   


回答关注问题邀请回答
收藏

3 个回答

登录 后发表内容
问题标签