|
@@ -427,15 +427,31 @@ export default {
|
427
|
427
|
orderItems: [],
|
428
|
428
|
};
|
429
|
429
|
for (let item of this.goods) {
|
430
|
|
- sendData.orderItems.push({
|
431
|
|
- productId: item.id,
|
432
|
|
- // skuId:item.id,
|
433
|
|
- skuId: item._sku ? item._sku.skuId : "",
|
434
|
|
- count: item.isWeightGood
|
435
|
|
- ? parseInt(item.select_num * 1000)
|
436
|
|
- : item.select_num,
|
437
|
|
- remark: "",
|
438
|
|
- });
|
|
430
|
+ if (item._type === "-1") {
|
|
431
|
+ // 无码商品
|
|
432
|
+ sendData.orderItems.push({
|
|
433
|
+ count: item.isWeightGood
|
|
434
|
+ ? parseInt(item.select_num * 1000)
|
|
435
|
+ : item.select_num,
|
|
436
|
+ price: item.price,
|
|
437
|
+ weighingGoods: item.isWeightGood ? true : false,
|
|
438
|
+ weight: item.isWeightGood
|
|
439
|
+ ? parseInt(item.select_num * 1000)
|
|
440
|
+ : item.select_num,
|
|
441
|
+ });
|
|
442
|
+ } else {
|
|
443
|
+ sendData.orderItems.push({
|
|
444
|
+ productId: item.id,
|
|
445
|
+ skuId: item._sku ? item._sku.skuId : "",
|
|
446
|
+ count: item.isWeightGood
|
|
447
|
+ ? parseInt(item.select_num * 1000)
|
|
448
|
+ : item.select_num,
|
|
449
|
+ weighingGoods: item.isWeightGood ? true : false,
|
|
450
|
+ weight: item.isWeightGood
|
|
451
|
+ ? parseInt(item.select_num * 1000)
|
|
452
|
+ : item.select_num,
|
|
453
|
+ });
|
|
454
|
+ }
|
439
|
455
|
}
|
440
|
456
|
console.log(sendData);
|
441
|
457
|
this.submitLoading = true;
|