接口对接修改

This commit is contained in:
仲么了
2023-07-24 08:47:20 +08:00
parent 2104bc0c4c
commit 689436759f
31 changed files with 1070 additions and 448 deletions

View File

@@ -29,13 +29,15 @@ export default {
methods: {
// 生成图片需要调用的方法
generateImage(domId) {
console.log(123);
// 获取设备dpi
setTimeout(() => {
let dom = document.getElementById(domId);
console.log(dom.offsetWidth, dom.offsetHeight);
html2canvas(dom, {
scale: 8,
useCORS: true,
width: dom.offsetWidth,
height: dom.offsetHeight,
}).then((canvas) => {
// this.$refs.header.appendChild(canvas);
const posterImg = canvas.toDataURL()
@@ -45,7 +47,7 @@ export default {
}).catch((err) => {
console.log(err)
})
}, 300);
}, 200);
}
}
}