wx.createSelectorQuery().select('#heart_rate_bg')
.fields({ id: true,node: true, size: true })
.exec((res) => {
if(!res[0]) return;
const canvas = res[0].node;
let {width,height} = canvas;
const ctx = canvas.getContext('2d');
ctx.beginPath()
ctx.lineWidth = 0.1
ctx.moveTo(0, height/3);
ctx.lineTo(width, height/3);
ctx.closePath();
ctx.stroke();
ctx.beginPath()
ctx.lineWidth = 1;
ctx.moveTo(0, height*2/3);
ctx.lineTo(width, height*2/3);
ctx.closePath();
ctx.stroke();
})

你好,麻烦具体描述问题流程,提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html