@fonixtree/magic-design 2.0.177 → 2.0.178

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.
@@ -89,6 +89,15 @@ function (_super) {
89
89
  }
90
90
 
91
91
  var soldNumber = data.salesCnt > 250 ? data.salesCnt - data.salesCnt % 250 + "+" : data.salesCnt || 0;
92
+ var isGift = false;
93
+
94
+ if (data.promotType && data.promotType !== '[]') {
95
+ // 赠品
96
+ if (data.promotType.includes('G')) {
97
+ isGift = true;
98
+ }
99
+ }
100
+
92
101
  return /*#__PURE__*/_react["default"].createElement("div", _extends({
93
102
  className: (0, _classnames["default"])('monpay-interest-product-item-wrap'),
94
103
  onClick: function onClick() {
@@ -100,7 +109,14 @@ function (_super) {
100
109
  className: "product-img",
101
110
  lazy: true,
102
111
  src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent)
103
- }), data.discountPercent && /*#__PURE__*/_react["default"].createElement("div", {
112
+ }), isGift && /*#__PURE__*/_react["default"].createElement("div", {
113
+ className: "discount-tag giftL-tag"
114
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
115
+ className: "icon",
116
+ color: "#fff",
117
+ size: 18,
118
+ type: "icon-a-EssentionalUI"
119
+ }), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('GIFT'))), data.discountPercent && !isGift && /*#__PURE__*/_react["default"].createElement("div", {
104
120
  className: "discount-tag"
105
121
  }, data.discountPercent, "% ", (0, _locale.i18n)('OFF'))), /*#__PURE__*/_react["default"].createElement("div", {
106
122
  className: "content-wrap"
@@ -28,6 +28,19 @@
28
28
  top: 0.3rem;
29
29
  left: 0;
30
30
  }
31
+ .monpay-interest-product-item-wrap .img-wrap .giftL-tag {
32
+ font-size: 0.24rem;
33
+ font-weight: 700;
34
+ color: #fff;
35
+ background-color: #FA7373;
36
+ padding: 0.1rem;
37
+ border-radius: 0 0.1rem 0.1rem 0;
38
+ display: flex;
39
+ align-items: center;
40
+ }
41
+ .monpay-interest-product-item-wrap .img-wrap .giftL-tag .icon {
42
+ margin-right: 0.08rem;
43
+ }
31
44
  .monpay-interest-product-item-wrap .content-wrap {
32
45
  padding: 0.24rem;
33
46
  }
@@ -89,6 +89,15 @@ function (_super) {
89
89
  }
90
90
 
91
91
  var soldNumber = data.salesCnt > 250 ? data.salesCnt - data.salesCnt % 250 + "+" : data.salesCnt || 0;
92
+ var isGift = false;
93
+
94
+ if (data.promotType && data.promotType !== '[]') {
95
+ // 赠品
96
+ if (data.promotType.includes('G')) {
97
+ isGift = true;
98
+ }
99
+ }
100
+
92
101
  return /*#__PURE__*/_react["default"].createElement("div", _extends({
93
102
  className: (0, _classnames["default"])('monpay-interest-product-item-wrap'),
94
103
  onClick: function onClick() {
@@ -100,7 +109,14 @@ function (_super) {
100
109
  className: "product-img",
101
110
  lazy: true,
102
111
  src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent)
103
- }), data.discountPercent && /*#__PURE__*/_react["default"].createElement("div", {
112
+ }), isGift && /*#__PURE__*/_react["default"].createElement("div", {
113
+ className: "discount-tag giftL-tag"
114
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
115
+ className: "icon",
116
+ color: "#fff",
117
+ size: 18,
118
+ type: "icon-a-EssentionalUI"
119
+ }), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('GIFT'))), data.discountPercent && !isGift && /*#__PURE__*/_react["default"].createElement("div", {
104
120
  className: "discount-tag"
105
121
  }, data.discountPercent, "% ", (0, _locale.i18n)('OFF'))), /*#__PURE__*/_react["default"].createElement("div", {
106
122
  className: "content-wrap"
@@ -28,6 +28,19 @@
28
28
  top: 0.3rem;
29
29
  left: 0;
30
30
  }
31
+ .monpay-interest-product-item-wrap .img-wrap .giftL-tag {
32
+ font-size: 0.24rem;
33
+ font-weight: 700;
34
+ color: #fff;
35
+ background-color: #FA7373;
36
+ padding: 0.1rem;
37
+ border-radius: 0 0.1rem 0.1rem 0;
38
+ display: flex;
39
+ align-items: center;
40
+ }
41
+ .monpay-interest-product-item-wrap .img-wrap .giftL-tag .icon {
42
+ margin-right: 0.08rem;
43
+ }
31
44
  .monpay-interest-product-item-wrap .content-wrap {
32
45
  padding: 0.24rem;
33
46
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "2.0.177",
4
+ "version": "2.0.178",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",
Binary file
Binary file