fix
This commit is contained in:
@@ -11,6 +11,14 @@ interface DesignDetail{
|
||||
templateImgUrl:any,
|
||||
designId:any,
|
||||
showSketchList:any,
|
||||
|
||||
toProductImageList:any,// 产品图片
|
||||
relightList:any,// 灯光列表
|
||||
|
||||
poseTransfer:any,// 姿态转换
|
||||
deReconstruction:any,// 拼贴
|
||||
patternMaking3D:any,//3d
|
||||
canvasData:any,// 拼贴canvas
|
||||
}
|
||||
|
||||
const HomeStoreModule : Module<DesignDetail,RootState> = {
|
||||
@@ -24,6 +32,21 @@ const HomeStoreModule : Module<DesignDetail,RootState> = {
|
||||
templateImgUrl:'',
|
||||
designId:'',
|
||||
showSketchList:[],
|
||||
toProductImageList:[],
|
||||
relightList:[],
|
||||
poseTransfer:[],
|
||||
deReconstruction:[{
|
||||
isLike:false,
|
||||
url:'',
|
||||
category:'123',
|
||||
categoryValue:'23',
|
||||
categoryShow:false
|
||||
}],
|
||||
patternMaking3D:null,
|
||||
canvasData:{
|
||||
deReconstruction:null,
|
||||
canvas:null
|
||||
}
|
||||
},
|
||||
mutations:{
|
||||
setshowSketchList(state,data){
|
||||
@@ -34,6 +57,47 @@ const HomeStoreModule : Module<DesignDetail,RootState> = {
|
||||
},
|
||||
setLikeDesignCollectionList(state,data){
|
||||
state.likeDesignCollectionList = data
|
||||
},
|
||||
setRelightList(state,data){
|
||||
if(data.str == 'add'){
|
||||
state.relightList.unshift(...data.list)
|
||||
}else{
|
||||
state.relightList.splice(data.index,1)
|
||||
}
|
||||
},
|
||||
setPoseTransfer(state,data){
|
||||
data.list.forEach((item:any) => {
|
||||
item.url = item.firstFrameUrl
|
||||
});
|
||||
if(data.str == 'add'){
|
||||
state.poseTransfer.unshift(...data.list)
|
||||
}else{
|
||||
state.poseTransfer.splice(data.index,1)
|
||||
}
|
||||
},
|
||||
setDeReconstruction(state,data){
|
||||
if(data.str == 'add'){
|
||||
state.deReconstruction = []
|
||||
let obj = {
|
||||
...data.list[0],
|
||||
}
|
||||
state.deReconstruction.unshift(obj)
|
||||
}else{
|
||||
state.deReconstruction.splice(data.index,1)
|
||||
}
|
||||
},
|
||||
setPatternMaking3D(state,data){
|
||||
state.patternMaking3D = data
|
||||
},
|
||||
setCanvasData(state,data){
|
||||
state.canvasData[data.type] = data.file
|
||||
},
|
||||
setToProductImage(state,data){
|
||||
if(data.str == 'add'){
|
||||
state.toProductImageList.unshift(...data.list)
|
||||
}else{
|
||||
state.toProductImageList.splice(data.index,1)
|
||||
}
|
||||
},
|
||||
setDeleteDesignCollectionList(state,data){
|
||||
let obj = state.designCollectionList.splice(data,1)
|
||||
@@ -41,8 +105,6 @@ const HomeStoreModule : Module<DesignDetail,RootState> = {
|
||||
},
|
||||
cancelDeleteDesignCollectionList(state,data){
|
||||
let obj = state.deleteDesignCollectionList.splice(data,1)
|
||||
console.log(obj);
|
||||
|
||||
state.designCollectionList.unshift(...obj)
|
||||
},
|
||||
setSingleDesignCollectionList(state,data){
|
||||
@@ -86,6 +148,15 @@ const HomeStoreModule : Module<DesignDetail,RootState> = {
|
||||
state.likeDesignCollectionList = []
|
||||
state.designCollectionId = ''
|
||||
state.deleteDesignCollectionList = []
|
||||
state.relightList = []
|
||||
state.toProductImageList = []
|
||||
state.poseTransfer = []
|
||||
state.deReconstruction = null
|
||||
state.patternMaking3D = null
|
||||
state.canvasData = {
|
||||
deReconstruction:null,
|
||||
canvas:null
|
||||
}
|
||||
},
|
||||
setTemplateData(state,data){
|
||||
state.templateId=data.id
|
||||
|
||||
Reference in New Issue
Block a user