<img :src="imgList[0]" alt="" style="width: 100%; z-index: 999; background-color: #fff" v-if="imgList[0]" />
<view style="width: 100%; height: 100vh; text-align: center; z-index: 99; position: absolute" v-if="isloading"></view>
<view id="container" class="container" v-if="!imgList[0]"><image :src="this.poster" class="aaimg" style="height: 523px"></image>
<uv-qrcode ref="qrcode" canvas-id="qrcode" :value="value" size="185rpx" :loading="loading" :options="options" class="qrcode"></uv-qrcode>
</view>
async lover(index) {
let node = document.getElementById('container');
// 设置图片的宽度和高度
const width = 200; // 设置图片宽度为300像素
const height = 100; // 设置图片高度为200像素
let that = this;
domtoimage
.toPng(node, { width: width, height: height })
.then(function (dataUrl) {
console.log('dataUrl', dataUrl);
that.imgList[index] = dataUrl;
uni.hideLoading();
})
.catch(function (error) {
console.error('生成失败', error);
});
},