|
@@ -415,12 +415,13 @@ export default {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
//skuMap拼接
|
|
//skuMap拼接
|
|
|
- debugger
|
|
|
|
|
let skuPicMapArr = this.cartesianProduct(this.skuTags);
|
|
let skuPicMapArr = this.cartesianProduct(this.skuTags);
|
|
|
if(skuPicMapArr.length > 0){
|
|
if(skuPicMapArr.length > 0){
|
|
|
for(let i = 0; i < this.dataForm.skuList.length; i++){
|
|
for(let i = 0; i < this.dataForm.skuList.length; i++){
|
|
|
- this.dataForm.skuList[i].skuPicMap = skuPicMapArr[i]
|
|
|
|
|
- this.dataForm.skuList[i].pic = skuPicMapArr[i].split(",")[0]
|
|
|
|
|
|
|
+ if(skuPicMapArr[i]){
|
|
|
|
|
+ this.dataForm.skuList[i].skuPicMap = skuPicMapArr[i]
|
|
|
|
|
+ this.dataForm.skuList[i].pic = skuPicMapArr[i].split(",")[0]
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
this.dataForm.prodName = this.dataForm.prodNameCn
|
|
this.dataForm.prodName = this.dataForm.prodNameCn
|
|
@@ -524,18 +525,22 @@ export default {
|
|
|
return result;
|
|
return result;
|
|
|
} else {
|
|
} else {
|
|
|
let tempResult = skuTags[0].tagItems.map(item => item.pic);
|
|
let tempResult = skuTags[0].tagItems.map(item => item.pic);
|
|
|
- for (let i = 1; i < skuTags.length; i++) {
|
|
|
|
|
- let newResult = [];
|
|
|
|
|
- tempResult.forEach(arr =>{
|
|
|
|
|
- skuTags[i].tagItems.forEach(item =>{
|
|
|
|
|
- if(!item.pic){
|
|
|
|
|
- item.pic = ''
|
|
|
|
|
- }
|
|
|
|
|
- let newArr = arr.concat(',').concat(item.pic);
|
|
|
|
|
- newResult.push(newArr);
|
|
|
|
|
|
|
+ if(tempResult.length > 0){
|
|
|
|
|
+ for (let i = 1; i < skuTags.length; i++) {
|
|
|
|
|
+ let newResult = [];
|
|
|
|
|
+ tempResult.forEach(arr =>{
|
|
|
|
|
+ skuTags[i].tagItems.forEach(item =>{
|
|
|
|
|
+ if(!item.pic){
|
|
|
|
|
+ item.pic = ''
|
|
|
|
|
+ }
|
|
|
|
|
+ if(arr){
|
|
|
|
|
+ let newArr = arr.concat(',').concat(item.pic);
|
|
|
|
|
+ newResult.push(newArr);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
- })
|
|
|
|
|
- tempResult = newResult;
|
|
|
|
|
|
|
+ tempResult = newResult;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return tempResult;
|
|
return tempResult;
|
|
|
}
|
|
}
|