@fonixtree/magic-design 2.0.95 → 2.0.98
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/assets/images/layout-icon/banner-slide-layout1.png +0 -0
- package/es/assets/images/layout-icon/banner-slide-layout1.svg +6 -0
- package/es/assets/images/layout-icon/banner-slide-layout2.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
- package/es/common/Collapse/index.js +10 -8
- package/es/common/FontStyles/index.less +3 -1
- package/es/common/LinkModal/MiniAppApi/const.js +637 -0
- package/es/common/LinkModal/MiniAppApi/index.js +61 -0
- package/es/common/LinkModal/index.js +6 -0
- package/es/common/MonpayCountDown/index.js +160 -0
- package/es/common/RatingText/index.js +105 -0
- package/es/common/RatingText/index.less +12 -0
- package/es/common/index.js +8 -0
- package/es/composite-comp/bol/components/Banner/defaultJSON.js +1 -0
- package/es/composite-comp/bol/components/Banner/mobile/index.js +2 -1
- package/es/composite-comp/bol/components/Banner/mobile/index.less +8 -4
- package/es/composite-comp/bol/components/Banner/pc/index.js +2 -1
- package/es/composite-comp/bol/components/Banner/pc/index.less +9 -3
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +11 -11
- package/es/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +1 -1
- package/es/composite-comp/common/components/MonpayProductItem/index.js +283 -0
- package/es/composite-comp/common/components/MonpayProductItem/index.less +211 -0
- package/es/composite-comp/common/components/ProductItem/index.js +5 -11
- package/es/composite-comp/common/components/ProductItem/index.less +10 -0
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/es/composite-comp/{bol/config-panels/NewsletterConfig → common/config-panels}/InputField/index.js +18 -10
- package/es/composite-comp/dito/components/GroupBuy/defaultJSON.js +0 -4
- package/es/composite-comp/dito/components/GroupBuy/mobile/index.js +3 -3
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +14 -1
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +98 -33
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +11 -1
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +78 -6
- package/es/composite-comp/dito/components/SearchBar/pc/index.less +1 -0
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +4 -3
- package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +5 -9
- package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +2 -0
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +36 -6
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.less +7 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.js +212 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.less +21 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +322 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/index.js +90 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +462 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +104 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +582 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +385 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/index.js +90 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +714 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +81 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +763 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.less +124 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +177 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +171 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/index.js +73 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +141 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.js +149 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.js +93 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.less +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/index.js +150 -0
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.js +258 -0
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.less +15 -0
- package/es/constants/component-types.js +13 -3
- package/es/constants/index.js +10 -1
- package/es/constants/layout.js +43 -4
- package/es/core/Designer/ConfigPanel/index.js +1 -1
- package/es/core/Designer/index.js +5 -2
- package/es/locale/en/en.json +11 -0
- package/es/locale/es/es.json +11 -0
- package/es/locale/id/id.json +11 -0
- package/es/utils/businessUtil.js +12 -0
- package/es/utils/dateUtil.js +13 -0
- package/lib/assets/images/layout-icon/banner-slide-layout1.png +0 -0
- package/lib/assets/images/layout-icon/banner-slide-layout1.svg +6 -0
- package/lib/assets/images/layout-icon/banner-slide-layout2.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
- package/lib/common/Collapse/index.js +10 -8
- package/lib/common/FontStyles/index.less +3 -1
- package/lib/common/LinkModal/MiniAppApi/const.js +637 -0
- package/lib/common/LinkModal/MiniAppApi/index.js +61 -0
- package/lib/common/LinkModal/index.js +6 -0
- package/lib/common/MonpayCountDown/index.js +160 -0
- package/lib/common/RatingText/index.js +105 -0
- package/lib/common/RatingText/index.less +12 -0
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/bol/components/Banner/defaultJSON.js +1 -0
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +2 -1
- package/lib/composite-comp/bol/components/Banner/mobile/index.less +8 -4
- package/lib/composite-comp/bol/components/Banner/pc/index.js +2 -1
- package/lib/composite-comp/bol/components/Banner/pc/index.less +9 -3
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +11 -11
- package/lib/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +1 -1
- package/lib/composite-comp/common/components/MonpayProductItem/index.js +283 -0
- package/lib/composite-comp/common/components/MonpayProductItem/index.less +211 -0
- package/lib/composite-comp/common/components/ProductItem/index.js +5 -11
- package/lib/composite-comp/common/components/ProductItem/index.less +10 -0
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/lib/composite-comp/{bol/config-panels/NewsletterConfig → common/config-panels}/InputField/index.js +18 -10
- package/lib/composite-comp/dito/components/GroupBuy/defaultJSON.js +0 -4
- package/lib/composite-comp/dito/components/GroupBuy/mobile/index.js +3 -3
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +14 -1
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +98 -33
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +11 -1
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +78 -6
- package/lib/composite-comp/dito/components/SearchBar/pc/index.less +1 -0
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +4 -3
- package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +5 -9
- package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +2 -0
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +36 -6
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.less +7 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.js +212 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.less +21 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +322 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/index.js +90 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +462 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +104 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +582 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +385 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/index.js +90 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +714 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +81 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +763 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.less +124 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +177 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +171 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/index.js +73 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +141 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.js +149 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.js +93 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.less +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/index.js +150 -0
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.js +258 -0
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.less +15 -0
- package/lib/constants/component-types.js +13 -3
- package/lib/constants/index.js +10 -1
- package/lib/constants/layout.js +43 -4
- package/lib/core/Designer/ConfigPanel/index.js +1 -1
- package/lib/core/Designer/index.js +5 -2
- package/lib/locale/en/en.json +11 -0
- package/lib/locale/es/es.json +11 -0
- package/lib/locale/id/id.json +11 -0
- package/lib/utils/businessUtil.js +12 -0
- package/lib/utils/dateUtil.js +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _commonUtil = require("../../../../utils/commonUtil");
|
|
13
|
+
|
|
14
|
+
var _currencyUtil = require("../../../../utils/currencyUtil");
|
|
15
|
+
|
|
16
|
+
var _common = require("../../../../common");
|
|
17
|
+
|
|
18
|
+
var _ImageLabel = _interopRequireDefault(require("../ImageLabel"));
|
|
19
|
+
|
|
20
|
+
var _components = require("../../../../meta-comp/components");
|
|
21
|
+
|
|
22
|
+
var _businessUtil = require("../../../../utils/businessUtil");
|
|
23
|
+
|
|
24
|
+
var _locale = require("../../../../locale");
|
|
25
|
+
|
|
26
|
+
require("./index.less");
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
|
+
|
|
30
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
+
|
|
32
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
33
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
34
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
35
|
+
__proto__: []
|
|
36
|
+
} instanceof Array && function (d, b) {
|
|
37
|
+
d.__proto__ = b;
|
|
38
|
+
} || function (d, b) {
|
|
39
|
+
for (var p in b) {
|
|
40
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return _extendStatics(d, b);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return function (d, b) {
|
|
48
|
+
_extendStatics(d, b);
|
|
49
|
+
|
|
50
|
+
function __() {
|
|
51
|
+
this.constructor = d;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
55
|
+
};
|
|
56
|
+
}();
|
|
57
|
+
|
|
58
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
59
|
+
__assign = Object.assign || function (t) {
|
|
60
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
61
|
+
s = arguments[i];
|
|
62
|
+
|
|
63
|
+
for (var p in s) {
|
|
64
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return t;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return __assign.apply(this, arguments);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
75
|
+
var t = {};
|
|
76
|
+
|
|
77
|
+
for (var p in s) {
|
|
78
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
82
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
83
|
+
}
|
|
84
|
+
return t;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
var ProductItem =
|
|
88
|
+
/** @class */
|
|
89
|
+
function (_super) {
|
|
90
|
+
__extends(ProductItem, _super);
|
|
91
|
+
|
|
92
|
+
function ProductItem() {
|
|
93
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
94
|
+
|
|
95
|
+
_this.state = {};
|
|
96
|
+
return _this;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
ProductItem.prototype.render = function () {
|
|
100
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
101
|
+
|
|
102
|
+
var _m = this.props,
|
|
103
|
+
data = _m.data,
|
|
104
|
+
panelProps = _m.panelProps,
|
|
105
|
+
onItemClick = _m.onItemClick,
|
|
106
|
+
showProName = _m.showProName,
|
|
107
|
+
showProgress = _m.showProgress,
|
|
108
|
+
fixHeight = _m.fixHeight,
|
|
109
|
+
layout = _m.layout,
|
|
110
|
+
imgHeight = _m.imgHeight,
|
|
111
|
+
imgWidth = _m.imgWidth,
|
|
112
|
+
unknownPrice = _m.unknownPrice,
|
|
113
|
+
rest = __rest(_m, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice"]);
|
|
114
|
+
|
|
115
|
+
var promotions = (0, _businessUtil.getPromotionList)(data);
|
|
116
|
+
var price = (0, _currencyUtil.formatCurrency)(data.salesPrice);
|
|
117
|
+
/** 当是拼团时 显示价格 */
|
|
118
|
+
|
|
119
|
+
if (data.sppType && promotions.length) {
|
|
120
|
+
price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrency)(data.specialPrice) : (0, _currencyUtil.formatCurrency)(data.salesPrice);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
var integerPart = price;
|
|
124
|
+
var decimalPart = null;
|
|
125
|
+
|
|
126
|
+
if (unknownPrice) {
|
|
127
|
+
if (price.length > 5) {
|
|
128
|
+
integerPart = price.slice(0, -5).replace(/\d/g, '? ') + price.slice(-5);
|
|
129
|
+
} else {
|
|
130
|
+
integerPart = price.replace(/\d/, '? ');
|
|
131
|
+
}
|
|
132
|
+
} else if (Array.isArray(price)) {
|
|
133
|
+
integerPart = price[0];
|
|
134
|
+
decimalPart = price[1];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
138
|
+
return window.systemParams.prefix;
|
|
139
|
+
}, 'Rp');
|
|
140
|
+
|
|
141
|
+
var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
|
|
142
|
+
|
|
143
|
+
var oldPrice = data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null;
|
|
144
|
+
var discount = Number(data.discountPercent) || 0;
|
|
145
|
+
var salePercent = Number(data.salePercent) / 100 || 0;
|
|
146
|
+
var imgStyle = {};
|
|
147
|
+
if (imgWidth) imgStyle.width = imgWidth;
|
|
148
|
+
if (imgHeight) imgStyle.height = imgHeight;
|
|
149
|
+
var imgLabels = ((_a = data.labels) === null || _a === void 0 ? void 0 : _a.filter(function (f) {
|
|
150
|
+
return f.position !== '6' && f.position !== '7';
|
|
151
|
+
})) || [];
|
|
152
|
+
var prodLabels = ((_b = data.labels) === null || _b === void 0 ? void 0 : _b.filter(function (f) {
|
|
153
|
+
return f.position === '6';
|
|
154
|
+
})) || [];
|
|
155
|
+
var priceLabels = ((_c = data.labels) === null || _c === void 0 ? void 0 : _c.filter(function (f) {
|
|
156
|
+
return f.position === '7';
|
|
157
|
+
})) || [];
|
|
158
|
+
var soldNumber = data.salesCnt - data.salesCnt % 250;
|
|
159
|
+
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
160
|
+
className: (0, _classnames["default"])('monpay-product-item-wrap', {
|
|
161
|
+
fixHeight: fixHeight,
|
|
162
|
+
horizontal: layout === 'horizontal'
|
|
163
|
+
}),
|
|
164
|
+
onClick: function onClick() {
|
|
165
|
+
return onItemClick();
|
|
166
|
+
},
|
|
167
|
+
style: {
|
|
168
|
+
width: imgWidth + 2
|
|
169
|
+
}
|
|
170
|
+
}, rest), /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
|
+
className: "img-wrap"
|
|
172
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.NewImg, {
|
|
173
|
+
className: "product-img",
|
|
174
|
+
lazy: true,
|
|
175
|
+
src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent),
|
|
176
|
+
style: imgStyle
|
|
177
|
+
}), /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
178
|
+
labels: imgLabels,
|
|
179
|
+
small: true
|
|
180
|
+
}), ((_d = panelProps.discount) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
181
|
+
className: "discount-tag"
|
|
182
|
+
}, data.discountPercent, "% off")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
183
|
+
className: "content-wrap"
|
|
184
|
+
}, panelProps.label.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
185
|
+
className: "promotions-wrap"
|
|
186
|
+
}, promotions.map(function (promot, index) {
|
|
187
|
+
return /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
188
|
+
key: index,
|
|
189
|
+
className: "promotion-item",
|
|
190
|
+
data: __assign(__assign({}, panelProps.label), {
|
|
191
|
+
text: promot
|
|
192
|
+
}),
|
|
193
|
+
readonly: true
|
|
194
|
+
});
|
|
195
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
196
|
+
className: "product-name-wrap"
|
|
197
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
198
|
+
className: "box"
|
|
199
|
+
}, prodLabels.length > 0 && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
200
|
+
labels: prodLabels,
|
|
201
|
+
small: true
|
|
202
|
+
}), showProName && panelProps.productName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
203
|
+
data: __assign(__assign({}, panelProps.productName), {
|
|
204
|
+
text: data.offerName
|
|
205
|
+
}),
|
|
206
|
+
readonly: true
|
|
207
|
+
}))), panelProps.activityPrice.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
208
|
+
className: "price-wrap"
|
|
209
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
210
|
+
className: "price",
|
|
211
|
+
data: __assign(__assign({}, panelProps.activityPrice), {
|
|
212
|
+
text: _price
|
|
213
|
+
}),
|
|
214
|
+
readonly: true
|
|
215
|
+
}), priceLabels.length > 0 && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
|
|
216
|
+
labels: priceLabels,
|
|
217
|
+
small: true
|
|
218
|
+
})), panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
219
|
+
className: "price-sold-wrap"
|
|
220
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
+
className: "old-price-wrap"
|
|
222
|
+
}, !!discount && /*#__PURE__*/_react["default"].createElement("span", {
|
|
223
|
+
className: "discount"
|
|
224
|
+
}, "-", discount, "%"), oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
225
|
+
className: "old-price",
|
|
226
|
+
data: __assign(__assign({}, panelProps.salesPrice), {
|
|
227
|
+
text: oldPrice
|
|
228
|
+
}),
|
|
229
|
+
readonly: true,
|
|
230
|
+
style: {
|
|
231
|
+
color: panelProps.salesPrice.content.color
|
|
232
|
+
}
|
|
233
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
234
|
+
className: "rate-sold-wrap"
|
|
235
|
+
}, ((_e = panelProps.evaluationScore) === null || _e === void 0 ? void 0 : _e.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
236
|
+
className: "evaluation-score"
|
|
237
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
238
|
+
color: "#FF8650",
|
|
239
|
+
size: 12,
|
|
240
|
+
type: "icon-star"
|
|
241
|
+
}), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
242
|
+
className: "rate-text",
|
|
243
|
+
data: __assign(__assign({}, panelProps.evaluationScore), {
|
|
244
|
+
text: (0, _currencyUtil.numberToFixed)(Number(data.evaluationAvg), 1)
|
|
245
|
+
}),
|
|
246
|
+
readonly: true
|
|
247
|
+
})), ((_f = panelProps.evaluationScore) === null || _f === void 0 ? void 0 : _f.open) && ((_g = panelProps.sold) === null || _g === void 0 ? void 0 : _g.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
248
|
+
className: "line"
|
|
249
|
+
}), ((_h = panelProps.sold) === null || _h === void 0 ? void 0 : _h.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
250
|
+
className: "sold"
|
|
251
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
252
|
+
data: __assign(__assign({}, panelProps.sold), {
|
|
253
|
+
text: "Sold " + soldNumber + "+"
|
|
254
|
+
}),
|
|
255
|
+
readonly: true
|
|
256
|
+
}))), showProgress && /*#__PURE__*/_react["default"].createElement("div", {
|
|
257
|
+
className: "progress-wrap"
|
|
258
|
+
}, ((_j = panelProps.salesProgress) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
259
|
+
className: "progress-container"
|
|
260
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
261
|
+
className: "progress",
|
|
262
|
+
style: {
|
|
263
|
+
width: salePercent + "%",
|
|
264
|
+
backgroundColor: (_k = panelProps.salesProgress) === null || _k === void 0 ? void 0 : _k.color
|
|
265
|
+
}
|
|
266
|
+
})), ((_l = panelProps.stock) === null || _l === void 0 ? void 0 : _l.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
267
|
+
className: "text"
|
|
268
|
+
}, data.saleNum || 0, "/", data.stockNum || 0, " ", (0, _locale.i18n)('STOCK')))));
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
ProductItem.defaultProps = {
|
|
272
|
+
data: {},
|
|
273
|
+
panelProps: {},
|
|
274
|
+
showProName: true,
|
|
275
|
+
showProgress: true,
|
|
276
|
+
fixHeight: false,
|
|
277
|
+
layout: 'vertical'
|
|
278
|
+
};
|
|
279
|
+
return ProductItem;
|
|
280
|
+
}(_react["default"].Component);
|
|
281
|
+
|
|
282
|
+
var _default = ProductItem;
|
|
283
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
.monpay-product-item-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
background: #FFFFFF;
|
|
5
|
+
border: 1px solid #D2D9E5;
|
|
6
|
+
width: 142px;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
position: relative;
|
|
9
|
+
margin-right: 12px;
|
|
10
|
+
|
|
11
|
+
.img-wrap {
|
|
12
|
+
position: relative;
|
|
13
|
+
|
|
14
|
+
.product-img {
|
|
15
|
+
width: 140px;
|
|
16
|
+
height: 140px;
|
|
17
|
+
object-fit: cover;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.discount-tag {
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
font-weight: 700;
|
|
23
|
+
color: #fff;
|
|
24
|
+
background-color: #ff8650;
|
|
25
|
+
padding: 5px;
|
|
26
|
+
border-radius: 0 5px 5px 0;
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 15px;
|
|
29
|
+
left: 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.content-wrap {
|
|
34
|
+
padding: 12px;
|
|
35
|
+
|
|
36
|
+
.promotions-wrap {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-wrap: wrap;
|
|
39
|
+
|
|
40
|
+
.promotion-item {
|
|
41
|
+
margin-right: 5px;
|
|
42
|
+
margin-bottom: 5px;
|
|
43
|
+
|
|
44
|
+
&:last-child {
|
|
45
|
+
margin-right: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.group-num {
|
|
51
|
+
display: inline-block;
|
|
52
|
+
|
|
53
|
+
.m-meta-button .btnContent img {
|
|
54
|
+
height: 14px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.product-name-wrap {
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
display: -webkit-box;
|
|
62
|
+
-webkit-box-orient: vertical;
|
|
63
|
+
-webkit-line-clamp: 2;
|
|
64
|
+
line-height: 18px;
|
|
65
|
+
max-height: 40px;
|
|
66
|
+
white-space: wrap;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.price-wrap {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
flex-wrap: wrap;
|
|
73
|
+
margin-top: 6px;
|
|
74
|
+
margin-bottom: 4px;
|
|
75
|
+
|
|
76
|
+
.price {
|
|
77
|
+
width: auto !important;
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
text-overflow: ellipsis;
|
|
81
|
+
margin-right: 6px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.price-sold-wrap {
|
|
86
|
+
display: flex;
|
|
87
|
+
margin-top: 0;
|
|
88
|
+
align-items: center;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
text-overflow: ellipsis;
|
|
92
|
+
flex-wrap: wrap;
|
|
93
|
+
line-height: 15px;
|
|
94
|
+
|
|
95
|
+
.old-price-wrap {
|
|
96
|
+
display: flex;
|
|
97
|
+
line-height: 13px;
|
|
98
|
+
|
|
99
|
+
.discount {
|
|
100
|
+
margin-right: 3px;
|
|
101
|
+
font-family: 'Montserrat';
|
|
102
|
+
font-style: normal;
|
|
103
|
+
font-weight: 700;
|
|
104
|
+
font-size: 8px;
|
|
105
|
+
line-height: 15px;
|
|
106
|
+
color: #fff;
|
|
107
|
+
padding: 0 4px;
|
|
108
|
+
background-color: #CE1126;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.old-price {
|
|
112
|
+
text-decoration: line-through;
|
|
113
|
+
width: fit-content;
|
|
114
|
+
margin-left: 4px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.sold-count {
|
|
119
|
+
color: #7b7b7b;
|
|
120
|
+
font-size: 12px;
|
|
121
|
+
text-align: right;
|
|
122
|
+
flex-grow: 1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.rate-sold-wrap {
|
|
127
|
+
margin-top: 5px;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
|
|
131
|
+
.evaluation-score {
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
|
|
135
|
+
.rate-text {
|
|
136
|
+
margin-left: 4px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.line {
|
|
141
|
+
display: inline-block;
|
|
142
|
+
width: 1px;
|
|
143
|
+
height: 16px;
|
|
144
|
+
background-color: #545454;
|
|
145
|
+
margin: 0 5px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.sold {
|
|
149
|
+
display: inline-block;
|
|
150
|
+
color: #545454;
|
|
151
|
+
font-size: 12px;
|
|
152
|
+
font-weight: 400;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.progress-wrap {
|
|
157
|
+
margin-top: 10px;
|
|
158
|
+
|
|
159
|
+
.text {
|
|
160
|
+
font-family: 'Montserrat';
|
|
161
|
+
font-style: normal;
|
|
162
|
+
font-weight: 400;
|
|
163
|
+
font-size: 12px;
|
|
164
|
+
line-height: 12px;
|
|
165
|
+
color: #848484;
|
|
166
|
+
margin-top: 6px;
|
|
167
|
+
text-align: left;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.progress-container {
|
|
171
|
+
width: 100%;
|
|
172
|
+
height: 3px;
|
|
173
|
+
background-color: #D9D9D9;
|
|
174
|
+
|
|
175
|
+
.progress {
|
|
176
|
+
background: #FF8650;
|
|
177
|
+
height: 100%;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&.fixHeight {
|
|
185
|
+
.promotions-wrap {
|
|
186
|
+
height: 30px;
|
|
187
|
+
flex-wrap: nowrap;
|
|
188
|
+
overflow: hidden;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.product-name-wrap {
|
|
192
|
+
height: 38px;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&.horizontal {
|
|
197
|
+
flex-direction: row;
|
|
198
|
+
|
|
199
|
+
.product-img {
|
|
200
|
+
width: 100px;
|
|
201
|
+
height: 100%;
|
|
202
|
+
min-height: 100px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.content-wrap {
|
|
206
|
+
display: flex;
|
|
207
|
+
flex-direction: column;
|
|
208
|
+
justify-content: center;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -140,9 +140,6 @@ function (_super) {
|
|
|
140
140
|
var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
|
|
141
141
|
|
|
142
142
|
var oldPrice = data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null;
|
|
143
|
-
|
|
144
|
-
var _oldPrice = type === 'groupBuy' && data.sppMarketPrice ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.sppMarketPrice) : oldPrice;
|
|
145
|
-
|
|
146
143
|
var discount = Number(data.discountPercent) || 0;
|
|
147
144
|
var salePercent = Number(data.salePercent) / 100 || 0;
|
|
148
145
|
var imgStyle = {};
|
|
@@ -157,9 +154,6 @@ function (_super) {
|
|
|
157
154
|
var priceLabels = ((_c = data.labels) === null || _c === void 0 ? void 0 : _c.filter(function (f) {
|
|
158
155
|
return f.position === '7';
|
|
159
156
|
})) || [];
|
|
160
|
-
var shareByNum = (0, _commonUtil.ensure)(function () {
|
|
161
|
-
return data.campaigns.cmpShareBuys[0].shareByNum;
|
|
162
|
-
}, 0);
|
|
163
157
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
164
158
|
className: (0, _classnames["default"])('m-product-item-wrap', {
|
|
165
159
|
fixHeight: fixHeight,
|
|
@@ -197,7 +191,7 @@ function (_super) {
|
|
|
197
191
|
})), type === 'groupBuy' && panelProps.label.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
198
192
|
className: "group-num",
|
|
199
193
|
data: __assign(__assign({}, panelProps.label), {
|
|
200
|
-
text: shareByNum
|
|
194
|
+
text: data.shareByNum
|
|
201
195
|
}),
|
|
202
196
|
readonly: true
|
|
203
197
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -228,17 +222,17 @@ function (_super) {
|
|
|
228
222
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
229
223
|
className: "old-price-wrap"
|
|
230
224
|
}, !!discount && /*#__PURE__*/_react["default"].createElement("span", {
|
|
231
|
-
className:
|
|
232
|
-
}, "-", discount, "%"),
|
|
225
|
+
className: type === 'groupBuy' ? 'discount2' : 'discount'
|
|
226
|
+
}, "-", discount, "%"), oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
233
227
|
className: "old-price",
|
|
234
228
|
data: __assign(__assign({}, panelProps.salesPrice), {
|
|
235
|
-
text:
|
|
229
|
+
text: oldPrice
|
|
236
230
|
}),
|
|
237
231
|
readonly: true,
|
|
238
232
|
style: {
|
|
239
233
|
color: panelProps.salesPrice.content.color
|
|
240
234
|
}
|
|
241
|
-
})), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
235
|
+
})), type !== 'groupBuy' && !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
242
236
|
className: "sold-count"
|
|
243
237
|
}, (0, _commonUtil.convertCount)(data.salesCnt), " sold")), showProgress && ((_d = panelProps.salesProgress) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
244
238
|
className: "progress-wrap"
|
|
@@ -94,6 +94,16 @@
|
|
|
94
94
|
background-color: #CE1126;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
.discount2 {
|
|
98
|
+
margin-right: 3px;
|
|
99
|
+
font-family: 'Montserrat';
|
|
100
|
+
font-style: normal;
|
|
101
|
+
font-weight: 700;
|
|
102
|
+
font-size: 12px;
|
|
103
|
+
line-height: 15px;
|
|
104
|
+
color: #2F3043;
|
|
105
|
+
}
|
|
106
|
+
|
|
97
107
|
.old-price {
|
|
98
108
|
text-decoration: line-through;
|
|
99
109
|
width: fit-content;
|
|
@@ -148,6 +148,19 @@ function (_super) {
|
|
|
148
148
|
showRowNum: true
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
+
} // monpayRecommend
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
if (component === 'monpayRecommend') {
|
|
155
|
+
if (v === 'layout2' || v === 'layout4') {
|
|
156
|
+
_this.setState({
|
|
157
|
+
showRowNum: false
|
|
158
|
+
});
|
|
159
|
+
} else {
|
|
160
|
+
_this.setState({
|
|
161
|
+
showRowNum: true
|
|
162
|
+
});
|
|
163
|
+
}
|
|
151
164
|
} // 移动端导航特殊处理
|
|
152
165
|
// 更改需求,两个布局都需 可选行数
|
|
153
166
|
// if (component == 'mobileNavigation') {
|
|
@@ -9,15 +9,15 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _antd = require("antd");
|
|
11
11
|
|
|
12
|
-
var _FontStyles = _interopRequireDefault(require("
|
|
12
|
+
var _FontStyles = _interopRequireDefault(require("../../../../common/FontStyles"));
|
|
13
13
|
|
|
14
|
-
var _common = require("
|
|
14
|
+
var _common = require("../../../../common");
|
|
15
15
|
|
|
16
|
-
var _businessUtil = require("
|
|
16
|
+
var _businessUtil = require("../../../../utils/businessUtil");
|
|
17
17
|
|
|
18
|
-
var _TextConfig = require("
|
|
18
|
+
var _TextConfig = require("../../../../meta-comp/config-panels/TextConfig");
|
|
19
19
|
|
|
20
|
-
var _locale = require("
|
|
20
|
+
var _locale = require("../../../../locale");
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
@@ -87,15 +87,18 @@ function (_super) {
|
|
|
87
87
|
TextConfig.prototype.render = function () {
|
|
88
88
|
var _this = this;
|
|
89
89
|
|
|
90
|
-
var
|
|
90
|
+
var _a = this.props,
|
|
91
|
+
data = _a.data,
|
|
92
|
+
inputLabel = _a.inputLabel;
|
|
91
93
|
var textData = data.content;
|
|
92
94
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
95
|
className: "m-text-config",
|
|
94
96
|
style: {
|
|
95
|
-
paddingTop:
|
|
97
|
+
paddingTop: 12,
|
|
98
|
+
borderRadius: 6
|
|
96
99
|
}
|
|
97
100
|
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
98
|
-
title: (0, _locale.i18n)('PLACEHOLDER')
|
|
101
|
+
title: inputLabel || (0, _locale.i18n)('PLACEHOLDER')
|
|
99
102
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
100
103
|
onChange: function onChange(e) {
|
|
101
104
|
data.placeholder = e.target.value;
|
|
@@ -158,13 +161,18 @@ function (_super) {
|
|
|
158
161
|
}, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
|
|
159
162
|
onChange: function onChange(_a) {
|
|
160
163
|
var count = _a.count;
|
|
161
|
-
|
|
164
|
+
|
|
165
|
+
if (window.magicDesign.device == 'pc') {
|
|
166
|
+
textData.pcFontSize = count;
|
|
167
|
+
} else {
|
|
168
|
+
textData.fontSize = count;
|
|
169
|
+
}
|
|
162
170
|
|
|
163
171
|
_this.selfRender();
|
|
164
172
|
},
|
|
165
173
|
unit: "px",
|
|
166
174
|
value: {
|
|
167
|
-
count: textData.fontSize
|
|
175
|
+
count: window.magicDesign.device == 'pc' ? textData.pcFontSize : textData.fontSize
|
|
168
176
|
}
|
|
169
177
|
}))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
170
178
|
title: ""
|
|
@@ -251,10 +251,9 @@ function (_super) {
|
|
|
251
251
|
case 0:
|
|
252
252
|
return [4
|
|
253
253
|
/*yield*/
|
|
254
|
-
, (0, _commonUtil.commonFetch)('/designer/v1/h5/
|
|
255
|
-
campaignType: '4',
|
|
254
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/sharebuy/offer/page', {
|
|
256
255
|
sortType: this.sortType
|
|
257
|
-
}, '
|
|
256
|
+
}, 'GET')];
|
|
258
257
|
|
|
259
258
|
case 1:
|
|
260
259
|
res = _a.sent();
|
|
@@ -326,6 +325,7 @@ function (_super) {
|
|
|
326
325
|
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || ''));
|
|
327
326
|
},
|
|
328
327
|
panelProps: panelProps.content,
|
|
328
|
+
showProgress: false,
|
|
329
329
|
type: "groupBuy"
|
|
330
330
|
});
|
|
331
331
|
}))));
|