@kmkf-fe-packages/basic-components 1.8.0-beta.4 → 1.8.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -9082,6 +9082,8 @@ var Goods = function Goods(props) {
9082
9082
  outerSkuId = _ref3.outerSkuId;
9083
9083
  if (numIndex < 0) return;
9084
9084
  var newList = JSON.parse(JSON.stringify(imgList));
9085
+ // 判断抖音是否需要用code覆盖商品编码
9086
+ var needSetOuterId = !newList[numIndex].outerId || newList[numIndex].outerId === newList[numIndex].outerSkuId;
9085
9087
  if (type === 4) {
9086
9088
  newList[numIndex].itemId = enableItemId;
9087
9089
  newList[numIndex].supplierName = enableSupplierName;
@@ -9091,7 +9093,7 @@ var Goods = function Goods(props) {
9091
9093
  if (type === 1 && outerSkuId) {
9092
9094
  newList[numIndex].outerId = outerSkuId;
9093
9095
  }
9094
- if (type === 1 && code) {
9096
+ if (type === 1 && code && needSetOuterId) {
9095
9097
  newList[numIndex].outerId = code;
9096
9098
  }
9097
9099
  //替换成sku的图片
@@ -9454,6 +9456,8 @@ var GoodItem = function GoodItem(props) {
9454
9456
  skuId = _ref3.skuId;
9455
9457
  if (numIndex < 0) return;
9456
9458
  var newList = JSON.parse(JSON.stringify(imgList));
9459
+ // 判断抖音是否需要用code覆盖商品编码
9460
+ var needSetOuterId = !newList[numIndex].outerId || newList[numIndex].outerId === newList[numIndex].outerSkuId;
9457
9461
  if (type === 4) {
9458
9462
  newList[numIndex].itemId = enableItemId;
9459
9463
  newList[numIndex].supplierName = enableSupplierName;
@@ -9464,7 +9468,7 @@ var GoodItem = function GoodItem(props) {
9464
9468
  if (outerSkuId) newList[numIndex].outerSkuId = outerSkuId;
9465
9469
  if (skuId) newList[numIndex].skuId = skuId;
9466
9470
  }
9467
- if (type === 1 && code) {
9471
+ if (type === 1 && code && needSetOuterId) {
9468
9472
  newList[numIndex].outerId = code;
9469
9473
  }
9470
9474
  //替换成sku的图片
package/dist/index.js CHANGED
@@ -9094,6 +9094,8 @@ var Goods = function Goods(props) {
9094
9094
  outerSkuId = _ref3.outerSkuId;
9095
9095
  if (numIndex < 0) return;
9096
9096
  var newList = JSON.parse(JSON.stringify(imgList));
9097
+ // 判断抖音是否需要用code覆盖商品编码
9098
+ var needSetOuterId = !newList[numIndex].outerId || newList[numIndex].outerId === newList[numIndex].outerSkuId;
9097
9099
  if (type === 4) {
9098
9100
  newList[numIndex].itemId = enableItemId;
9099
9101
  newList[numIndex].supplierName = enableSupplierName;
@@ -9103,7 +9105,7 @@ var Goods = function Goods(props) {
9103
9105
  if (type === 1 && outerSkuId) {
9104
9106
  newList[numIndex].outerId = outerSkuId;
9105
9107
  }
9106
- if (type === 1 && code) {
9108
+ if (type === 1 && code && needSetOuterId) {
9107
9109
  newList[numIndex].outerId = code;
9108
9110
  }
9109
9111
  //替换成sku的图片
@@ -9466,6 +9468,8 @@ var GoodItem = function GoodItem(props) {
9466
9468
  skuId = _ref3.skuId;
9467
9469
  if (numIndex < 0) return;
9468
9470
  var newList = JSON.parse(JSON.stringify(imgList));
9471
+ // 判断抖音是否需要用code覆盖商品编码
9472
+ var needSetOuterId = !newList[numIndex].outerId || newList[numIndex].outerId === newList[numIndex].outerSkuId;
9469
9473
  if (type === 4) {
9470
9474
  newList[numIndex].itemId = enableItemId;
9471
9475
  newList[numIndex].supplierName = enableSupplierName;
@@ -9476,7 +9480,7 @@ var GoodItem = function GoodItem(props) {
9476
9480
  if (outerSkuId) newList[numIndex].outerSkuId = outerSkuId;
9477
9481
  if (skuId) newList[numIndex].skuId = skuId;
9478
9482
  }
9479
- if (type === 1 && code) {
9483
+ if (type === 1 && code && needSetOuterId) {
9480
9484
  newList[numIndex].outerId = code;
9481
9485
  }
9482
9486
  //替换成sku的图片
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "1.8.0-beta.4",
3
+ "version": "1.8.0-beta.6",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "e3f33239c3c1950ab3b3bc53658c09aa3cdb8b54"
68
+ "gitHead": "04b97d0e42072c5fe31ec0cf0a7751768ff13aa9"
69
69
  }