如题:用canvas生成二维码,手机上和模拟器上显示正常,但是在华为手机上只显示一半的二维码
代码如下:
wxml:
<canvas canvas-id="iQrcode"></canvas>
<view>
<text>\n\n</text>
<view class="codeText"><text>请向商家出示红包二维码进行验核</text></view>
</view>
js:
var qrcode=require('../../utils/weapp.qrcode.min.js');
Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var _id=options._id;
var that=this;
wx.getSystemInfo({
success: function(res){
qrcode({
width:130,
height:130,
x:(res.windowWidth-130)/2,
y:20,
canvasId:'iQrcode',
text:_id
})
},
})
},
})

机型:华为平板 matepad pro 10.8 寸
微信版本:8.0.15
系统:鸿蒙OS2.0
出现问题片段:
代码如下:
wxml:
<canvas canvas-id="iQrcode"></canvas>
<view>
<text>\n\n</text>
<view class="codeText"><text>请向商家出示红包二维码进行验核</text></view>
</view>
js:
var qrcode=require('../../utils/weapp.qrcode.min.js');
Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var _id=options._id;
var that=this;
wx.getSystemInfo({
success: function(res){
qrcode({
width:130,
height:130,
x:(res.windowWidth-130)/2,
y:20,
canvasId:'iQrcode',
text:_id
})
},
})
},
})
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)