1***@qq.com
1***@qq.com
  • 发布:2019-01-22 15:34
  • 更新:2019-02-26 11:50
  • 阅读:1496

IOS uni.canvasToTempFilePath 返回图片路径 填入image 白屏 图片没显示,什么原因

分类:HBuilderX

IOS uni.canvasToTempFilePath 返回图片路径 填入image 白屏 图片没显示,什么原因

<image :src="shareImage" class="share-image"></image>

eventDraw() {

var _self=this;

const ctx = uni.createCanvasContext('myCanvas');

ctx.setFontSize(13);

ctx.setFillStyle('white');

ctx.fillText(this.recommendationCode, 210, 330);

ctx.fillText(this.recommendationPeople, 210, 350);

ctx.fillText(this.recommendationPhone, 210, 370);

ctx.drawImage('http://47.93.223.142:9090/1.jpg', 200, 200, 100, 100);

ctx.draw(true,function(){

uni.canvasToTempFilePath({

x: 10,

y: 20,

width: 50,

height: 50,

destWidth: 100,

destHeight: 100,

fileType: 'jpg',

canvasId: 'myCanvas',

success: function(res) {

_self.shareImage=res.tempFilePath;

}

})

});

},

2019-01-22 15:34 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com (作者) - 写code真不会

求解决啊

1***@qq.com

1***@qq.com (作者) - 写code真不会

求解决啊

1***@qq.com

1***@qq.com (作者) - 写code真不会

求解决啊

是在下输了

是在下输了

你看看返回的base64是完整的base64吗

该问题目前已经被锁定, 无法添加新回复