1、小程序我使用weaapp-qrcode的npm包生成二维码,然后通过wxml-to-canvas生成图片,然后在image标签是读取标签,结果预览的时候使用iphone13扫码,长按图片不显示识别二维码
2、手机扫码后问题图片:
3、代码片段:<view class="share-png-box" hover-class="none" hover-stop-propagation="false"><image class="share-png" src="{{src}}" show-menu-by-longpress></image></view>
let wxml = getwxml(that.data.qrcodeUrl);
that.widget.renderToCanvas({wxml, style}).then((res) => {
that.container = res
that.extraImage()
});
extraImage() {const p2 = this.widget.canvasToTempFilePath() p2.then(res => {this.setData({src: res.tempFilePath, }) }) },
目前仅支持长按识别部分码,普通二维码不支持:https://developers.weixin.qq.com/miniprogram/dev/component/image.html