@fonixtree/magic-design 2.0.182 → 2.0.184
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/es/composite-comp/common/components/MonpayProductItem/index.js +8 -4
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +1 -0
- package/lib/composite-comp/common/components/MonpayProductItem/index.js +8 -4
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +1 -0
- package/package.json +1 -1
|
@@ -134,12 +134,13 @@ function (_super) {
|
|
|
134
134
|
showProName = _h.showProName,
|
|
135
135
|
showProgress = _h.showProgress,
|
|
136
136
|
intelligentType = _h.intelligentType,
|
|
137
|
+
isRecommend = _h.isRecommend,
|
|
137
138
|
fixHeight = _h.fixHeight,
|
|
138
139
|
layout = _h.layout,
|
|
139
140
|
imgHeight = _h.imgHeight,
|
|
140
141
|
imgWidth = _h.imgWidth,
|
|
141
142
|
isWill = _h.isWill,
|
|
142
|
-
rest = __rest(_h, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "intelligentType", "fixHeight", "layout", "imgHeight", "imgWidth", "isWill"]);
|
|
143
|
+
rest = __rest(_h, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "intelligentType", "isRecommend", "fixHeight", "layout", "imgHeight", "imgWidth", "isWill"]);
|
|
143
144
|
|
|
144
145
|
var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
|
|
145
146
|
var oldPrice = null;
|
|
@@ -163,6 +164,8 @@ function (_super) {
|
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
|
|
167
|
+
var _discountPercent = isRecommend ? data.sppDiscountPercent : data.discountPercent;
|
|
168
|
+
|
|
166
169
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
167
170
|
className: (0, _classnames["default"])('monpay-product-item-wrap', {
|
|
168
171
|
fixHeight: fixHeight,
|
|
@@ -189,10 +192,10 @@ function (_super) {
|
|
|
189
192
|
size: 18,
|
|
190
193
|
type: "icon-a-EssentionalUI"
|
|
191
194
|
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('GIFT'))), // panelProps.label?.open && data.discountPercent && !isGift && (
|
|
192
|
-
this.isSpecialPrice() && !isGift &&
|
|
195
|
+
this.isSpecialPrice() && !isGift && _discountPercent && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
193
196
|
className: "discount-tag",
|
|
194
197
|
data: __assign(__assign({}, panelProps.label), {
|
|
195
|
-
text: isWill ? (0, _locale.i18n)('COMING_SOON') :
|
|
198
|
+
text: isWill ? (0, _locale.i18n)('COMING_SOON') : _discountPercent + "% " + (0, _locale.i18n)('OFF')
|
|
196
199
|
})
|
|
197
200
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
198
201
|
className: "content-wrap"
|
|
@@ -284,7 +287,8 @@ function (_super) {
|
|
|
284
287
|
showProName: true,
|
|
285
288
|
showProgress: true,
|
|
286
289
|
fixHeight: false,
|
|
287
|
-
layout: 'vertical'
|
|
290
|
+
layout: 'vertical',
|
|
291
|
+
isRecommend: false
|
|
288
292
|
};
|
|
289
293
|
return ProductItem;
|
|
290
294
|
}(_react["default"].Component);
|
|
@@ -862,6 +862,7 @@ function (_super) {
|
|
|
862
862
|
imgHeight: imgHeight,
|
|
863
863
|
imgWidth: imgWidth,
|
|
864
864
|
intelligentType: (_a = groupSource[tabIndex]) === null || _a === void 0 ? void 0 : _a.intelligentType,
|
|
865
|
+
isRecommend: true,
|
|
865
866
|
onItemClick: function onItemClick() {
|
|
866
867
|
/** PTO 定制GA */
|
|
867
868
|
if (window.magicDesign.pushGA) {
|
|
@@ -134,12 +134,13 @@ function (_super) {
|
|
|
134
134
|
showProName = _h.showProName,
|
|
135
135
|
showProgress = _h.showProgress,
|
|
136
136
|
intelligentType = _h.intelligentType,
|
|
137
|
+
isRecommend = _h.isRecommend,
|
|
137
138
|
fixHeight = _h.fixHeight,
|
|
138
139
|
layout = _h.layout,
|
|
139
140
|
imgHeight = _h.imgHeight,
|
|
140
141
|
imgWidth = _h.imgWidth,
|
|
141
142
|
isWill = _h.isWill,
|
|
142
|
-
rest = __rest(_h, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "intelligentType", "fixHeight", "layout", "imgHeight", "imgWidth", "isWill"]);
|
|
143
|
+
rest = __rest(_h, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "intelligentType", "isRecommend", "fixHeight", "layout", "imgHeight", "imgWidth", "isWill"]);
|
|
143
144
|
|
|
144
145
|
var price = (0, _currencyUtil.formatCurrencyWithSymbol)(data.salesPrice);
|
|
145
146
|
var oldPrice = null;
|
|
@@ -163,6 +164,8 @@ function (_super) {
|
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
|
|
167
|
+
var _discountPercent = isRecommend ? data.sppDiscountPercent : data.discountPercent;
|
|
168
|
+
|
|
166
169
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
167
170
|
className: (0, _classnames["default"])('monpay-product-item-wrap', {
|
|
168
171
|
fixHeight: fixHeight,
|
|
@@ -189,10 +192,10 @@ function (_super) {
|
|
|
189
192
|
size: 18,
|
|
190
193
|
type: "icon-a-EssentionalUI"
|
|
191
194
|
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('GIFT'))), // panelProps.label?.open && data.discountPercent && !isGift && (
|
|
192
|
-
this.isSpecialPrice() && !isGift &&
|
|
195
|
+
this.isSpecialPrice() && !isGift && _discountPercent && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
193
196
|
className: "discount-tag",
|
|
194
197
|
data: __assign(__assign({}, panelProps.label), {
|
|
195
|
-
text: isWill ? (0, _locale.i18n)('COMING_SOON') :
|
|
198
|
+
text: isWill ? (0, _locale.i18n)('COMING_SOON') : _discountPercent + "% " + (0, _locale.i18n)('OFF')
|
|
196
199
|
})
|
|
197
200
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
198
201
|
className: "content-wrap"
|
|
@@ -284,7 +287,8 @@ function (_super) {
|
|
|
284
287
|
showProName: true,
|
|
285
288
|
showProgress: true,
|
|
286
289
|
fixHeight: false,
|
|
287
|
-
layout: 'vertical'
|
|
290
|
+
layout: 'vertical',
|
|
291
|
+
isRecommend: false
|
|
288
292
|
};
|
|
289
293
|
return ProductItem;
|
|
290
294
|
}(_react["default"].Component);
|
|
@@ -862,6 +862,7 @@ function (_super) {
|
|
|
862
862
|
imgHeight: imgHeight,
|
|
863
863
|
imgWidth: imgWidth,
|
|
864
864
|
intelligentType: (_a = groupSource[tabIndex]) === null || _a === void 0 ? void 0 : _a.intelligentType,
|
|
865
|
+
isRecommend: true,
|
|
865
866
|
onItemClick: function onItemClick() {
|
|
866
867
|
/** PTO 定制GA */
|
|
867
868
|
if (window.magicDesign.pushGA) {
|