This commit is contained in:
X1627315083
2023-12-21 17:49:41 +08:00
parent 70e2fe094b
commit 22856aa281
2 changed files with 34 additions and 6 deletions

View File

@@ -408,20 +408,39 @@ export default defineComponent({
item.scale = front?.imageSize?Number(((front?.style?.width.replace(/px/g,'')*ratio)/front?.imageSize[0]).toFixed(2)):1
}
})
// return
Https.axiosPost(Https.httpUrls.designSingle, data).then(
(rv) => {
this.$parent.loadingShow = false
// this.$parent.loadingShow = false
// let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
// designItemDetail.designItemUrl = rv.designItemUrl
// designItemDetail.ifSubmit = true
// designItemDetail.currentFullBodyView = rv.currentFullBodyView
// rv.clothes.forEach((item)=>{
// designItemDetail.clothes.forEach((i)=>{
// if(item.id === i.id){
// i.layersObject = item.layersObject
// i.priority = item.layersObject[0].priority
// }
// })
// })
console.log();
this.$parent.loadingShow = false
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
designItemDetail.clothes.forEach((i)=>{
item.similarity = false//新增衣服传的是衣服id会存在两件衣服id相同所以设置为false让每次赋值都是不一样的
})
designItemDetail.designItemUrl = rv.designItemUrl
designItemDetail.ifSubmit = true
designItemDetail.currentFullBodyView = rv.currentFullBodyView
rv.clothes.forEach((item)=>{
designItemDetail.clothes.forEach((i)=>{
if(item.id === i.id){
i.layersObject = item.layersObject
i.priority = item.layersObject[0].priority
for (let index = 0; index < designItemDetail.clothes.length; index++) {
if(item.id === designItemDetail.clothes[index].id && !designItemDetail.clothes[index].similarity){
designItemDetail.clothes[index].layersObject = item.layersObject
designItemDetail.clothes[index].priority = item.layersObject[0].priority
break
}
})
}
})
this.$emit('setDesignCoverage');
this.store.commit("setDesignItemDetail", designItemDetail);