<canvas id="canvas" canvas-id="canvas" type="2d"></canvas>
onReady() {
const canavsItem = wx.createSelectorQuery().select("#canvas");
canavsItem
.node((res) => {
console.log(3333333333, res);
const canvas = res.node;
lottie.setup(canvas);
lottie.loadAnimation({
loop: true,
autoplay: true,
// animationData: require('../../json/redbao.js'),
path: `${IMG_URL}/static/lottie/queren.json`,
rendererSettings: {
context: context,
},
});
})
.exec();
},
0 个回复