收藏
回答

canvasToTempFilePath 生成图片路径是blob

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug canvasToTempFilePath 客户端 6.6.0 2.5.0


setTimeout(() => {
        wx.canvasToTempFilePath({
          canvasId: 'k-canvas',
          success: function (res) {
            that.getImageInfo(res.tempFilePath);
          },
          fail: function (error) {
            console.error(`canvasToTempFilePath failed, ${JSON.stringify(error)}`);
            that.triggerEvent('imgErr', { error: error });
          },
        }, this);
      }, 300);
 
 
wx.getImageInfo({
        src: filePath,
        success: (infoRes) => {
           
        },
        fail: (error) => {
          console.error(`getImageInfo failed, ${JSON.stringify(error)}`);
          that.triggerEvent('imgErr', { error: error });
        },
      });


先保存,在通过getImageInfo获取图片信息时,发现失败了,失败信息是:getImageInfo:fail Error: ENOENT: No such file or directory., '/pages/diy/blob:http:/mmbiz.oa.com/4ef79358-f6f5-4a45-b697-57cc82c67158


生成的图片路径怎么是上面这样的,怎么还有这个域名 mmbiz.oa.com,帮忙看下

系统信息:

"SDKVersion":"2.5.0","brand":"iPhone","fontSizeSetting":16,"language":"zhCN","model":"iPhone6","pixelRatio":2,

"platform":"ios","screenHeight":700,"screenWidth":420,"statusBarHeight":20,"system":"iOS 10.0.1","version":"6.6.0","

windowHeight":700,"windowWidth":420

最后一次编辑于  2019-01-15
回答关注问题邀请回答
收藏
登录 后发表内容