部分优化
This commit is contained in:
@@ -118,6 +118,7 @@ export default defineComponent({
|
||||
createProbject:inject('createProbject',()=>{}) as any,
|
||||
likeDesignList:[],
|
||||
canvasSelectList:[] as any,
|
||||
videoList:[] as any,
|
||||
canvasDetailData:null as any,
|
||||
unLikeList:[],
|
||||
locale:null as any,
|
||||
@@ -159,20 +160,17 @@ export default defineComponent({
|
||||
});
|
||||
});
|
||||
}else if(value == 'relight' || value == 'poseTransfer'){
|
||||
console.log(list)
|
||||
list.forEach((item:any) => {
|
||||
if(item.childList){
|
||||
item.childList.forEach((child:any) => {
|
||||
if(child.resultType == 'ToProductImage' || child.resultType == 'Relight'){
|
||||
fileList.push(child)
|
||||
}
|
||||
console.log(fileList)
|
||||
if(child.resultType == 'Relight' && value == 'relight'){
|
||||
likeList.push(child)
|
||||
}else if(child.resultType == 'PoseTransfer' && value == 'poseTransfer'){
|
||||
likeList.push(child)
|
||||
}
|
||||
console.log(likeList)
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -187,7 +185,6 @@ export default defineComponent({
|
||||
}else if(data.openType == 'relight'){
|
||||
store.commit("setRelightList", likeData);
|
||||
}else if(data.openType == 'poseTransfer'){
|
||||
console.log(likeData)
|
||||
store.commit("setPoseTransfer", likeData);
|
||||
}
|
||||
if(dataDom[value]?.openSetData)dataDom[value]?.openSetData(fileList)
|
||||
@@ -261,7 +258,7 @@ export default defineComponent({
|
||||
let obj = {
|
||||
value:itemStr.value,
|
||||
type:data.locale == "ENGLISH"?itemStr.name:itemStr.nameCn,
|
||||
imgList:list,
|
||||
imgList:list,
|
||||
}
|
||||
if(list.length > 0){
|
||||
data.canvasSelectList.push(obj)
|
||||
@@ -274,7 +271,11 @@ export default defineComponent({
|
||||
list.push({url:item.designOutfitUrl || item.url})
|
||||
if(item.childList.length > 0){
|
||||
item.childList.forEach((childItem)=>{
|
||||
list.push({url:childItem.designOutfitUrl || childItem.url})
|
||||
if(childItem.relationType == "PoseTransfer"){
|
||||
data.videoList.push({url:childItem.videoUrl})
|
||||
}else{
|
||||
list.push({url:(childItem?.designOutfitUrl || childItem?.url)})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -348,7 +349,14 @@ export default defineComponent({
|
||||
})
|
||||
})
|
||||
}
|
||||
console.log(img)
|
||||
data.videoList.forEach((imgItem:any,index:any)=>{
|
||||
let nameTail = imgItem.url?.split(".").pop().split("?").shift();
|
||||
img.push({
|
||||
imgUrl:imgItem.url,
|
||||
name:`video${index}.${nameTail?nameTail:'mp4'}`
|
||||
})
|
||||
})
|
||||
|
||||
if(img.length>0)downImg(img);
|
||||
}
|
||||
let getImgArrayBuffer = (url) => {
|
||||
@@ -412,7 +420,6 @@ export default defineComponent({
|
||||
const share = async ()=>{
|
||||
var imageDataURL = '';
|
||||
imageDataURL = await dataDom.editCanvas.exportImage({isContainBg:true,isContainFixed:false})
|
||||
console.log(imageDataURL)
|
||||
let value = {
|
||||
imgUrl:imageDataURL,
|
||||
userlikeGroupId:'',
|
||||
|
||||
Reference in New Issue
Block a user