新增导出模特图

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

@@ -204,7 +204,6 @@ function removeDiv(element){
const openGuide = () =>{
let isBeginner = JSON.parse(getCookie('isBeginner'))
console.log(isBeginner);
// console.log(isBeginner);
let isBeginnerNum = JSON.parse(getCookie('isBeginnerNum')?getCookie('isBeginnerNum'):'0')
let data

View File

@@ -114,6 +114,7 @@ export const Https = {
reDesignCollection:`/api/design/reDesignCollection`,//重新设计 Conllection
countDesignProcess:'/api/design/countDesignProcess', //统计design进度
designProcess:`/api/design/designProcess`, //统计design进度
designGetModel:`/api/design/getModel`, //导出获取模特链接
getRgbByHsvBatch:`/api/element/getRgbByHsvBatch`, //通过hsv值数组批量获取潘通信息
designLike:`/api/design/like`, //Design Like

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);
},