新增导出模特图

This commit is contained in:
X1627315083
2023-12-14 12:09:29 +08:00
parent 73ab435830
commit 421f98090f
3 changed files with 12 additions and 13 deletions

View File

@@ -912,7 +912,7 @@ export default defineComponent({
// this.isShowMark = true;
let img:any = []
await html2canvas(collectionReview, { useCORS: true, scale: 3 }).then(
(canvas) => {
async (canvas) => {
let blob: any = dataURLtoBlob(
canvas.toDataURL("image/png")
);
@@ -963,15 +963,17 @@ export default defineComponent({
index++;
})
let mannequinList:any = []
// Https.axiosPost(Https.httpUrls.designLike, dataList)
// .then((rv: any) => {
// })
// .catch((rv) => {
// });
await Https.axiosPost(Https.httpUrls.designGetModel, dataList)
.then((rv: any) => {
mannequinList = rv
})
.catch((rv) => {
});
mannequinList.forEach((item:any) => {
let nameTail = item?.imgUrl?.split(".").pop().split("?").shift();
let nameTail = item?.split(".").pop().split("?").shift();
let data = {
imgUrl: item.imgUrl,
imgUrl: item,
name:
'mannequin' +
index +
@@ -981,10 +983,6 @@ export default defineComponent({
img.push(data);
index++;
});
// a.setAttribute('href', URL.createObjectURL(blob));
// a.setAttribute('download', `collection.png`);
// a.click();
@@ -1012,6 +1010,7 @@ export default defineComponent({
// });
// }
// );
// return
this.downImg(img);
},