@fonixtree/magic-design 1.0.42 → 1.0.43

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.
@@ -19,8 +19,6 @@ var _ImageLabel = _interopRequireDefault(require("../ImageLabel"));
19
19
 
20
20
  var _components = require("../../../../meta-comp/components");
21
21
 
22
- var _businessUtil = require("../../../../utils/businessUtil");
23
-
24
22
  require("./index.less");
25
23
 
26
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -95,26 +93,26 @@ function (_super) {
95
93
  }
96
94
 
97
95
  ProductItem.prototype.render = function () {
98
- var _a, _b, _c;
99
-
100
- var _d = this.props,
101
- data = _d.data,
102
- panelProps = _d.panelProps,
103
- onItemClick = _d.onItemClick,
104
- showProName = _d.showProName,
105
- showProgress = _d.showProgress,
106
- fixHeight = _d.fixHeight,
107
- layout = _d.layout,
108
- imgHeight = _d.imgHeight,
109
- imgWidth = _d.imgWidth,
110
- unknownPrice = _d.unknownPrice,
111
- rest = __rest(_d, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice"]);
112
-
113
- var promotions = (0, _businessUtil.getPromotionList)(data);
96
+ var _a, _b, _c, _d;
97
+
98
+ var _e = this.props,
99
+ data = _e.data,
100
+ panelProps = _e.panelProps,
101
+ onItemClick = _e.onItemClick,
102
+ showProName = _e.showProName,
103
+ showProgress = _e.showProgress,
104
+ fixHeight = _e.fixHeight,
105
+ layout = _e.layout,
106
+ imgHeight = _e.imgHeight,
107
+ imgWidth = _e.imgWidth,
108
+ unknownPrice = _e.unknownPrice,
109
+ rest = __rest(_e, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice"]); // const promotions = getPromotionList(data);
110
+
111
+
114
112
  var price = (0, _currencyUtil.formatCurrency)(data.salesPrice);
115
113
  /** 当是拼团时 显示价格 */
116
114
 
117
- if (data.sppType && promotions.length) {
115
+ if (data.sppType) {
118
116
  price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrency)(data.specialPrice) : (0, _currencyUtil.formatCurrency)(data.salesPrice);
119
117
  }
120
118
 
@@ -176,9 +174,9 @@ function (_super) {
176
174
  small: true
177
175
  })), /*#__PURE__*/_react["default"].createElement("div", {
178
176
  className: "content-wrap"
179
- }, panelProps.label.open && /*#__PURE__*/_react["default"].createElement("div", {
177
+ }, panelProps.label.open && ((_d = data === null || data === void 0 ? void 0 : data.cmpBuygetnLabels) === null || _d === void 0 ? void 0 : _d.length) > 0 && /*#__PURE__*/_react["default"].createElement("div", {
180
178
  className: "promotions-wrap"
181
- }, promotions.map(function (promot, index) {
179
+ }, data.cmpBuygetnLabels.map(function (promot, index) {
182
180
  return /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
183
181
  key: index,
184
182
  className: "promotion-item",
@@ -19,8 +19,6 @@ var _ImageLabel = _interopRequireDefault(require("../ImageLabel"));
19
19
 
20
20
  var _components = require("../../../../meta-comp/components");
21
21
 
22
- var _businessUtil = require("../../../../utils/businessUtil");
23
-
24
22
  require("./index.less");
25
23
 
26
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -95,26 +93,26 @@ function (_super) {
95
93
  }
96
94
 
97
95
  ProductItem.prototype.render = function () {
98
- var _a, _b, _c;
99
-
100
- var _d = this.props,
101
- data = _d.data,
102
- panelProps = _d.panelProps,
103
- onItemClick = _d.onItemClick,
104
- showProName = _d.showProName,
105
- showProgress = _d.showProgress,
106
- fixHeight = _d.fixHeight,
107
- layout = _d.layout,
108
- imgHeight = _d.imgHeight,
109
- imgWidth = _d.imgWidth,
110
- unknownPrice = _d.unknownPrice,
111
- rest = __rest(_d, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice"]);
112
-
113
- var promotions = (0, _businessUtil.getPromotionList)(data);
96
+ var _a, _b, _c, _d;
97
+
98
+ var _e = this.props,
99
+ data = _e.data,
100
+ panelProps = _e.panelProps,
101
+ onItemClick = _e.onItemClick,
102
+ showProName = _e.showProName,
103
+ showProgress = _e.showProgress,
104
+ fixHeight = _e.fixHeight,
105
+ layout = _e.layout,
106
+ imgHeight = _e.imgHeight,
107
+ imgWidth = _e.imgWidth,
108
+ unknownPrice = _e.unknownPrice,
109
+ rest = __rest(_e, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice"]); // const promotions = getPromotionList(data);
110
+
111
+
114
112
  var price = (0, _currencyUtil.formatCurrency)(data.salesPrice);
115
113
  /** 当是拼团时 显示价格 */
116
114
 
117
- if (data.sppType && promotions.length) {
115
+ if (data.sppType) {
118
116
  price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrency)(data.specialPrice) : (0, _currencyUtil.formatCurrency)(data.salesPrice);
119
117
  }
120
118
 
@@ -176,9 +174,9 @@ function (_super) {
176
174
  small: true
177
175
  })), /*#__PURE__*/_react["default"].createElement("div", {
178
176
  className: "content-wrap"
179
- }, panelProps.label.open && /*#__PURE__*/_react["default"].createElement("div", {
177
+ }, panelProps.label.open && ((_d = data === null || data === void 0 ? void 0 : data.cmpBuygetnLabels) === null || _d === void 0 ? void 0 : _d.length) > 0 && /*#__PURE__*/_react["default"].createElement("div", {
180
178
  className: "promotions-wrap"
181
- }, promotions.map(function (promot, index) {
179
+ }, data.cmpBuygetnLabels.map(function (promot, index) {
182
180
  return /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
183
181
  key: index,
184
182
  className: "promotion-item",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.42",
4
+ "version": "1.0.43",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",
Binary file
Binary file