@fonixtree/magic-design 2.0.106 → 2.0.108
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/common/LinkModal/AffiliateProductTable/index.js +3 -4
- package/es/common/LinkModal/AffiliateStore/index.js +3 -4
- package/es/common/LinkModal/BundleCampaign/index.js +4 -5
- package/es/common/LinkModal/CatgTable/index.js +3 -4
- package/es/common/LinkModal/CouponTable/index.js +3 -4
- package/es/common/LinkModal/CustomTable/index.js +4 -4
- package/es/common/LinkModal/FilteredProductModal/index.js +7 -6
- package/es/common/LinkModal/FunctionTable/index.js +4 -4
- package/es/common/LinkModal/MiniAppTable/index.js +4 -4
- package/es/common/LinkModal/ProductDetailPage/index.js +6 -5
- package/es/common/LinkModal/StoreTable/index.js +3 -4
- package/es/common/LinkModal/index.js +39 -18
- package/es/common/UrlPicker/index.js +5 -1
- package/es/composite-comp/common/components/MonpayProductItem/imgs/coupon-orange.png +0 -0
- package/es/composite-comp/common/components/MonpayProductItem/imgs/coupon-red.png +0 -0
- package/es/composite-comp/common/components/MonpayProductItem/index.js +33 -2
- package/es/composite-comp/common/components/MonpayProductItem/index.less +36 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +1 -1
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +1 -0
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +3 -3
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +3 -5
- package/es/composite-comp/monpay/components/InterestProducts/mobile/index.js +7 -4
- package/es/composite-comp/monpay/components/MerchantSales/defaultJSON.js +2 -1
- package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +26 -4
- package/es/composite-comp/monpay/components/MerchantSales/mobile/index.js +2 -1
- package/es/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +2 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +4 -2
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +99 -58
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +4 -12
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +1 -1
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +1 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +1 -1
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +7 -6
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +5 -5
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +1 -3
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +1 -1
- package/es/core/SelectUrl/index.js +36 -0
- package/es/index.js +16 -0
- package/es/locale/en/en.json +1 -1
- package/es/locale/id/id.json +1 -1
- package/es/meta-comp/config-panels/TextConfig/index.js +1 -0
- package/lib/common/LinkModal/AffiliateProductTable/index.js +3 -4
- package/lib/common/LinkModal/AffiliateStore/index.js +3 -4
- package/lib/common/LinkModal/BundleCampaign/index.js +4 -5
- package/lib/common/LinkModal/CatgTable/index.js +3 -4
- package/lib/common/LinkModal/CouponTable/index.js +3 -4
- package/lib/common/LinkModal/CustomTable/index.js +4 -4
- package/lib/common/LinkModal/FilteredProductModal/index.js +7 -6
- package/lib/common/LinkModal/FunctionTable/index.js +4 -4
- package/lib/common/LinkModal/MiniAppTable/index.js +4 -4
- package/lib/common/LinkModal/ProductDetailPage/index.js +6 -5
- package/lib/common/LinkModal/StoreTable/index.js +3 -4
- package/lib/common/LinkModal/index.js +39 -18
- package/lib/common/UrlPicker/index.js +5 -1
- package/lib/composite-comp/common/components/MonpayProductItem/imgs/coupon-orange.png +0 -0
- package/lib/composite-comp/common/components/MonpayProductItem/imgs/coupon-red.png +0 -0
- package/lib/composite-comp/common/components/MonpayProductItem/index.js +33 -2
- package/lib/composite-comp/common/components/MonpayProductItem/index.less +36 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +1 -1
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +1 -0
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +3 -3
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +3 -5
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.js +7 -4
- package/lib/composite-comp/monpay/components/MerchantSales/defaultJSON.js +2 -1
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +26 -4
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.js +2 -1
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +2 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +4 -2
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +99 -58
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +4 -12
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +1 -1
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +1 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +1 -1
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +7 -6
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +5 -5
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +1 -3
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +1 -1
- package/lib/core/SelectUrl/index.js +36 -0
- package/lib/index.js +16 -0
- package/lib/locale/en/en.json +1 -1
- package/lib/locale/id/id.json +1 -1
- package/lib/meta-comp/config-panels/TextConfig/index.js +1 -0
- package/package.json +1 -1
|
@@ -153,6 +153,42 @@
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
.coupons-list {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-wrap: wrap;
|
|
159
|
+
margin-top: 8px;
|
|
160
|
+
|
|
161
|
+
.item {
|
|
162
|
+
width: 53px;
|
|
163
|
+
height: 20px;
|
|
164
|
+
color: #F47A46;
|
|
165
|
+
background: url('./imgs/coupon-orange.png') no-repeat center;
|
|
166
|
+
background-size: 100%;
|
|
167
|
+
margin-right: 6px;
|
|
168
|
+
margin-bottom: 4px;
|
|
169
|
+
line-height: 1;
|
|
170
|
+
text-align: center;
|
|
171
|
+
padding: 2px 0;
|
|
172
|
+
|
|
173
|
+
&.DISC {
|
|
174
|
+
color: #FF5757;
|
|
175
|
+
background: url('./imgs/coupon-red.png') no-repeat center;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.name {
|
|
179
|
+
font-size: 5px;
|
|
180
|
+
width: 40px;
|
|
181
|
+
margin-bottom: 1px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.num {
|
|
185
|
+
font-size: 10px;
|
|
186
|
+
font-weight: 800;
|
|
187
|
+
width: 40px;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
156
192
|
.progress-wrap {
|
|
157
193
|
margin-top: 10px;
|
|
158
194
|
|
package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js
CHANGED
|
@@ -75,7 +75,7 @@ function (_super) {
|
|
|
75
75
|
SearchBarConfigContent.prototype.render = function () {
|
|
76
76
|
var _this = this;
|
|
77
77
|
|
|
78
|
-
var _a, _b, _c, _d
|
|
78
|
+
var _a, _b, _c, _d;
|
|
79
79
|
|
|
80
80
|
var panelProps = this.props.panelProps;
|
|
81
81
|
var source = [{
|
|
@@ -126,7 +126,7 @@ function (_super) {
|
|
|
126
126
|
metaOption: panelProps.box,
|
|
127
127
|
toggleType: 'switch'
|
|
128
128
|
}, {
|
|
129
|
-
key:
|
|
129
|
+
key: 'search3',
|
|
130
130
|
name: (0, _locale.i18n)('SEARCH_BAR_KEYWORD'),
|
|
131
131
|
toggleType: 'switch',
|
|
132
132
|
value: /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -139,7 +139,7 @@ function (_super) {
|
|
|
139
139
|
})),
|
|
140
140
|
metaOption: panelProps.keyword
|
|
141
141
|
}, {
|
|
142
|
-
key:
|
|
142
|
+
key: 'search4',
|
|
143
143
|
name: (0, _locale.i18n)('ICON'),
|
|
144
144
|
toggleType: 'triangle',
|
|
145
145
|
value: /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -111,9 +111,7 @@ function (_super) {
|
|
|
111
111
|
value: "select"
|
|
112
112
|
}, (0, _locale.i18n)('SELECT_PRODUCT')), _this.hasSource('A') && /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
113
113
|
value: "recommend"
|
|
114
|
-
}, (0, _locale.i18n)('AI_RECOMMENDATION')), /*#__PURE__*/_react["default"].createElement(
|
|
115
|
-
value: "cross"
|
|
116
|
-
}, "Cross Selling"))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
114
|
+
}, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
117
115
|
className: "greyBg"
|
|
118
116
|
}, panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
|
|
119
117
|
onChange: function onChange(ids, type) {
|
|
@@ -124,7 +122,7 @@ function (_super) {
|
|
|
124
122
|
},
|
|
125
123
|
prodType: panelProps.prodType,
|
|
126
124
|
value: panelProps.prodIds
|
|
127
|
-
}),
|
|
125
|
+
}), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_AIRecommendation["default"], {
|
|
128
126
|
onChange: function onChange(val) {
|
|
129
127
|
panelProps.intelligentType = val.intelligentType;
|
|
130
128
|
panelProps.intelligentValue = val.intelligentValue;
|
|
@@ -135,7 +133,7 @@ function (_super) {
|
|
|
135
133
|
intelligentType: panelProps.intelligentType,
|
|
136
134
|
intelligentValue: panelProps.intelligentValue
|
|
137
135
|
}
|
|
138
|
-
}),
|
|
136
|
+
}), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
139
137
|
title: (0, _locale.i18n)('PRODUCT_QUANTITY')
|
|
140
138
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
|
|
141
139
|
onChange: function onChange(e) {
|
|
@@ -314,7 +314,7 @@ function (_super) {
|
|
|
314
314
|
interestName: res.interest.interestName,
|
|
315
315
|
list: list
|
|
316
316
|
});
|
|
317
|
-
this.getMacy();
|
|
317
|
+
if (list.length > 0) this.getMacy();
|
|
318
318
|
(0, _storeUtil.setMagicStore)("interestProducts_" + (window.magicDesign.pageId || '') + "_" + this.props.panelProps.id, list);
|
|
319
319
|
return [2
|
|
320
320
|
/*return*/
|
|
@@ -331,7 +331,10 @@ function (_super) {
|
|
|
331
331
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
332
332
|
this.getData();
|
|
333
333
|
} else {
|
|
334
|
-
this.getMacy();
|
|
334
|
+
if (this.state.list.length > 0) this.getMacy();
|
|
335
|
+
this.setState({
|
|
336
|
+
interestName: 'Interest Name'
|
|
337
|
+
});
|
|
335
338
|
}
|
|
336
339
|
};
|
|
337
340
|
|
|
@@ -340,7 +343,7 @@ function (_super) {
|
|
|
340
343
|
var _a = this.state,
|
|
341
344
|
interestName = _a.interestName,
|
|
342
345
|
list = _a.list;
|
|
343
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
346
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, list.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
344
347
|
className: "monpay-interest-products-mobile"
|
|
345
348
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
346
349
|
className: "interest-products-title"
|
|
@@ -361,7 +364,7 @@ function (_super) {
|
|
|
361
364
|
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
362
365
|
}
|
|
363
366
|
});
|
|
364
|
-
})));
|
|
367
|
+
}))));
|
|
365
368
|
};
|
|
366
369
|
|
|
367
370
|
InterestProductsMobile.defaultProps = {
|
|
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
var _commonUtil = require("../../../../../../utils/commonUtil");
|
|
13
13
|
|
|
14
|
+
var _components = require("../../../../../../meta-comp/components");
|
|
15
|
+
|
|
14
16
|
var _common = require("../../../../../../common");
|
|
15
17
|
|
|
16
18
|
require("./index.less");
|
|
@@ -45,6 +47,22 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
45
47
|
};
|
|
46
48
|
}();
|
|
47
49
|
|
|
50
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
51
|
+
__assign = Object.assign || function (t) {
|
|
52
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
53
|
+
s = arguments[i];
|
|
54
|
+
|
|
55
|
+
for (var p in s) {
|
|
56
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return t;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return __assign.apply(this, arguments);
|
|
64
|
+
};
|
|
65
|
+
|
|
48
66
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
49
67
|
var t = {};
|
|
50
68
|
|
|
@@ -73,8 +91,9 @@ function (_super) {
|
|
|
73
91
|
ProductItem.prototype.render = function () {
|
|
74
92
|
var _a = this.props,
|
|
75
93
|
data = _a.data,
|
|
94
|
+
panelProps = _a.panelProps,
|
|
76
95
|
onItemClick = _a.onItemClick,
|
|
77
|
-
rest = __rest(_a, ["data", "onItemClick"]);
|
|
96
|
+
rest = __rest(_a, ["data", "panelProps", "onItemClick"]);
|
|
78
97
|
|
|
79
98
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
80
99
|
className: (0, _classnames["default"])('monpay-merchant-product-item-wrap'),
|
|
@@ -89,9 +108,12 @@ function (_super) {
|
|
|
89
108
|
src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent)
|
|
90
109
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
110
|
className: "sale-tag"
|
|
92
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
93
|
-
className: "prodName"
|
|
94
|
-
|
|
111
|
+
})), panelProps.merchantName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
112
|
+
className: "prodName",
|
|
113
|
+
data: __assign(__assign({}, panelProps.merchantName), {
|
|
114
|
+
text: data.offerName
|
|
115
|
+
})
|
|
116
|
+
}));
|
|
95
117
|
};
|
|
96
118
|
|
|
97
119
|
ProductItem.defaultProps = {
|
|
@@ -284,7 +284,8 @@ function (_super) {
|
|
|
284
284
|
data: item,
|
|
285
285
|
onItemClick: function onItemClick() {
|
|
286
286
|
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
287
|
-
}
|
|
287
|
+
},
|
|
288
|
+
panelProps: panelProps.content
|
|
288
289
|
});
|
|
289
290
|
}))));
|
|
290
291
|
};
|
|
@@ -115,6 +115,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
115
115
|
hover: null
|
|
116
116
|
},
|
|
117
117
|
sessionTime: {
|
|
118
|
+
id: (0, _uuid.v4)(),
|
|
118
119
|
open: false
|
|
119
120
|
}
|
|
120
121
|
},
|
|
@@ -284,6 +285,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
284
285
|
color: '#FF8650'
|
|
285
286
|
},
|
|
286
287
|
stock: {
|
|
288
|
+
id: (0, _uuid.v4)(),
|
|
287
289
|
open: true
|
|
288
290
|
}
|
|
289
291
|
},
|
|
@@ -305,7 +305,8 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
305
305
|
fontFamily: 'Open Sans',
|
|
306
306
|
fontWeight: 400,
|
|
307
307
|
fontSize: 10,
|
|
308
|
-
color: '#545454'
|
|
308
|
+
color: '#545454',
|
|
309
|
+
urlDisabled: true
|
|
309
310
|
},
|
|
310
311
|
underline: {
|
|
311
312
|
open: false,
|
|
@@ -328,7 +329,8 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
328
329
|
fontFamily: 'Open Sans',
|
|
329
330
|
fontWeight: 400,
|
|
330
331
|
fontSize: 10,
|
|
331
|
-
color: '#545454'
|
|
332
|
+
color: '#545454',
|
|
333
|
+
urlDisabled: true
|
|
332
334
|
},
|
|
333
335
|
underline: {
|
|
334
336
|
open: false,
|
|
@@ -238,9 +238,7 @@ var defaultData = [{
|
|
|
238
238
|
salesPrice: 18000000,
|
|
239
239
|
specialPrice: 18000000,
|
|
240
240
|
marketPrice: 19000000,
|
|
241
|
-
|
|
242
|
-
salePercent: 500,
|
|
243
|
-
sppType: '2'
|
|
241
|
+
salePercent: 500
|
|
244
242
|
}, {
|
|
245
243
|
imgUrlContent: {
|
|
246
244
|
url: _card["default"]
|
|
@@ -249,9 +247,7 @@ var defaultData = [{
|
|
|
249
247
|
salesPrice: 18000000,
|
|
250
248
|
specialPrice: 18000000,
|
|
251
249
|
marketPrice: 19000000,
|
|
252
|
-
|
|
253
|
-
salePercent: 500,
|
|
254
|
-
sppType: '2'
|
|
250
|
+
salePercent: 500
|
|
255
251
|
}, {
|
|
256
252
|
imgUrlContent: {
|
|
257
253
|
url: _card["default"]
|
|
@@ -260,9 +256,7 @@ var defaultData = [{
|
|
|
260
256
|
salesPrice: 18000000,
|
|
261
257
|
specialPrice: 18000000,
|
|
262
258
|
marketPrice: 19000000,
|
|
263
|
-
|
|
264
|
-
salePercent: 500,
|
|
265
|
-
sppType: '2'
|
|
259
|
+
salePercent: 500
|
|
266
260
|
}, {
|
|
267
261
|
imgUrlContent: {
|
|
268
262
|
url: _card["default"]
|
|
@@ -271,9 +265,7 @@ var defaultData = [{
|
|
|
271
265
|
salesPrice: 18000000,
|
|
272
266
|
specialPrice: 18000000,
|
|
273
267
|
marketPrice: 19000000,
|
|
274
|
-
|
|
275
|
-
salePercent: 500,
|
|
276
|
-
sppType: '2'
|
|
268
|
+
salePercent: 500
|
|
277
269
|
}];
|
|
278
270
|
var LAYOUT_IMAGE_SIZE = {
|
|
279
271
|
'layout1-2': {
|
|
@@ -364,14 +356,14 @@ function (_super) {
|
|
|
364
356
|
|
|
365
357
|
_this.getProductList = function (index, filterParams) {
|
|
366
358
|
return __awaiter(_this, void 0, void 0, function () {
|
|
367
|
-
var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, prodType, _e, intelligentType, _f, intelligentValue, _g, maxProdNum, newData, params, res,
|
|
359
|
+
var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, prodType, _e, intelligentType, _f, intelligentValue, _g, maxProdNum, newData, params, res, _h, list, serviceIds, brandIds, catgIds, offerAttrValues, _j, pageInfo, serviceIds, brandIds, catgIds, offerAttrValues, _k, pageInfo, serviceIds, brandIds, catgIds, offerAttrValues, e_1, _cache;
|
|
368
360
|
|
|
369
|
-
var
|
|
361
|
+
var _l, _m, _o;
|
|
370
362
|
|
|
371
363
|
var _this = this;
|
|
372
364
|
|
|
373
|
-
return __generator(this, function (
|
|
374
|
-
switch (
|
|
365
|
+
return __generator(this, function (_p) {
|
|
366
|
+
switch (_p.label) {
|
|
375
367
|
case 0:
|
|
376
368
|
panelProps = this.props.panelProps;
|
|
377
369
|
groupSource = this.state.groupSource;
|
|
@@ -383,7 +375,7 @@ function (_super) {
|
|
|
383
375
|
|
|
384
376
|
if (cache) {
|
|
385
377
|
if ("products" + index in cache) {
|
|
386
|
-
this.setState((
|
|
378
|
+
this.setState((_l = {}, _l["products" + index] = cache["products" + index], _l), function () {
|
|
387
379
|
_this.resetLayout();
|
|
388
380
|
});
|
|
389
381
|
/** 如果数据未过期 */
|
|
@@ -397,14 +389,14 @@ function (_super) {
|
|
|
397
389
|
|
|
398
390
|
_a = groupSource[index] || {}, _b = _a.sourceType, sourceType = _b === void 0 ? '' : _b, _c = _a.prodIds, prodIds = _c === void 0 ? '' : _c, _d = _a.prodType, prodType = _d === void 0 ? '' : _d, _e = _a.intelligentType, intelligentType = _e === void 0 ? '' : _e, _f = _a.intelligentValue, intelligentValue = _f === void 0 ? [] : _f, _g = _a.maxProdNum, maxProdNum = _g === void 0 ? 10 : _g;
|
|
399
391
|
newData = [];
|
|
400
|
-
|
|
392
|
+
_p.label = 1;
|
|
401
393
|
|
|
402
394
|
case 1:
|
|
403
|
-
|
|
395
|
+
_p.trys.push([1, 18,, 19]);
|
|
404
396
|
|
|
405
397
|
if (!(groupSource.length > 0)) return [3
|
|
406
398
|
/*break*/
|
|
407
|
-
,
|
|
399
|
+
, 16];
|
|
408
400
|
if (!(sourceType === 'select')) return [3
|
|
409
401
|
/*break*/
|
|
410
402
|
, 3];
|
|
@@ -426,16 +418,16 @@ function (_super) {
|
|
|
426
418
|
, (0, _commonUtil.commonFetch)('/designer/v1/h5/products', params, 'GET')];
|
|
427
419
|
|
|
428
420
|
case 2:
|
|
429
|
-
res =
|
|
421
|
+
res = _p.sent();
|
|
430
422
|
newData = __spreadArrays(res.list);
|
|
431
423
|
return [3
|
|
432
424
|
/*break*/
|
|
433
|
-
,
|
|
425
|
+
, 15];
|
|
434
426
|
|
|
435
427
|
case 3:
|
|
436
428
|
if (!(sourceType === 'recommend')) return [3
|
|
437
429
|
/*break*/
|
|
438
|
-
,
|
|
430
|
+
, 14];
|
|
439
431
|
if (!(intelligentType === 'Recently')) return [3
|
|
440
432
|
/*break*/
|
|
441
433
|
, 7];
|
|
@@ -444,28 +436,75 @@ function (_super) {
|
|
|
444
436
|
, 5];
|
|
445
437
|
return [4
|
|
446
438
|
/*yield*/
|
|
447
|
-
, (0, _commonUtil.commonFetch)('/designer/v1/h5/viewlog/recent/list', {
|
|
439
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/viewlog/recent/list', __assign({
|
|
448
440
|
pageIndex: 1,
|
|
449
441
|
pageSize: maxProdNum
|
|
450
|
-
}, 'GET')];
|
|
442
|
+
}, filterParams), 'GET')];
|
|
451
443
|
|
|
452
444
|
case 4:
|
|
453
|
-
|
|
454
|
-
|
|
445
|
+
_h = _p.sent(), list = _h.list, serviceIds = _h.serviceIds, brandIds = _h.brandIds, catgIds = _h.catgIds, offerAttrValues = _h.offerAttrValues;
|
|
446
|
+
this.setState({
|
|
447
|
+
filterObj: {
|
|
448
|
+
serviceIds: serviceIds,
|
|
449
|
+
brandIds: brandIds,
|
|
450
|
+
catgIds: catgIds,
|
|
451
|
+
offerAttrValues: offerAttrValues
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
newData = __spreadArrays(list);
|
|
455
455
|
return [3
|
|
456
456
|
/*break*/
|
|
457
457
|
, 6];
|
|
458
458
|
|
|
459
459
|
case 5:
|
|
460
460
|
newData = defaultData;
|
|
461
|
-
|
|
461
|
+
_p.label = 6;
|
|
462
462
|
|
|
463
463
|
case 6:
|
|
464
464
|
return [3
|
|
465
465
|
/*break*/
|
|
466
|
-
,
|
|
466
|
+
, 13];
|
|
467
467
|
|
|
468
468
|
case 7:
|
|
469
|
+
if (!(intelligentType === 'Coupon')) return [3
|
|
470
|
+
/*break*/
|
|
471
|
+
, 11];
|
|
472
|
+
if (!!(0, _coreUtil.isDesignMode)()) return [3
|
|
473
|
+
/*break*/
|
|
474
|
+
, 9];
|
|
475
|
+
return [4
|
|
476
|
+
/*yield*/
|
|
477
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/offers', __assign({
|
|
478
|
+
pageIndex: 1,
|
|
479
|
+
pageSize: maxProdNum,
|
|
480
|
+
qryUserCoupon: true
|
|
481
|
+
}, filterParams), 'POST')];
|
|
482
|
+
|
|
483
|
+
case 8:
|
|
484
|
+
_j = _p.sent(), pageInfo = _j.pageInfo, serviceIds = _j.serviceIds, brandIds = _j.brandIds, catgIds = _j.catgIds, offerAttrValues = _j.offerAttrValues;
|
|
485
|
+
this.setState({
|
|
486
|
+
filterObj: {
|
|
487
|
+
serviceIds: serviceIds,
|
|
488
|
+
brandIds: brandIds,
|
|
489
|
+
catgIds: catgIds,
|
|
490
|
+
offerAttrValues: offerAttrValues
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
newData = __spreadArrays(pageInfo.list);
|
|
494
|
+
return [3
|
|
495
|
+
/*break*/
|
|
496
|
+
, 10];
|
|
497
|
+
|
|
498
|
+
case 9:
|
|
499
|
+
newData = defaultData;
|
|
500
|
+
_p.label = 10;
|
|
501
|
+
|
|
502
|
+
case 10:
|
|
503
|
+
return [3
|
|
504
|
+
/*break*/
|
|
505
|
+
, 13];
|
|
506
|
+
|
|
507
|
+
case 11:
|
|
469
508
|
return [4
|
|
470
509
|
/*yield*/
|
|
471
510
|
, (0, _commonUtil.commonFetch)('/designer/v1/h5/offers', __assign({
|
|
@@ -478,8 +517,8 @@ function (_super) {
|
|
|
478
517
|
storeId: window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''
|
|
479
518
|
}, filterParams), 'POST')];
|
|
480
519
|
|
|
481
|
-
case
|
|
482
|
-
|
|
520
|
+
case 12:
|
|
521
|
+
_k = _p.sent(), pageInfo = _k.pageInfo, serviceIds = _k.serviceIds, brandIds = _k.brandIds, catgIds = _k.catgIds, offerAttrValues = _k.offerAttrValues;
|
|
483
522
|
this.setState({
|
|
484
523
|
filterObj: {
|
|
485
524
|
serviceIds: serviceIds,
|
|
@@ -489,45 +528,45 @@ function (_super) {
|
|
|
489
528
|
}
|
|
490
529
|
});
|
|
491
530
|
newData = __spreadArrays(pageInfo.list);
|
|
492
|
-
|
|
531
|
+
_p.label = 13;
|
|
493
532
|
|
|
494
|
-
case
|
|
533
|
+
case 13:
|
|
495
534
|
return [3
|
|
496
535
|
/*break*/
|
|
497
|
-
,
|
|
536
|
+
, 15];
|
|
498
537
|
|
|
499
|
-
case
|
|
538
|
+
case 14:
|
|
500
539
|
newData = [];
|
|
501
|
-
|
|
540
|
+
_p.label = 15;
|
|
502
541
|
|
|
503
|
-
case
|
|
542
|
+
case 15:
|
|
504
543
|
return [3
|
|
505
544
|
/*break*/
|
|
506
|
-
,
|
|
545
|
+
, 17];
|
|
507
546
|
|
|
508
|
-
case
|
|
547
|
+
case 16:
|
|
509
548
|
newData = [];
|
|
510
|
-
|
|
549
|
+
_p.label = 17;
|
|
511
550
|
|
|
512
|
-
case
|
|
551
|
+
case 17:
|
|
513
552
|
return [3
|
|
514
553
|
/*break*/
|
|
515
|
-
,
|
|
554
|
+
, 19];
|
|
516
555
|
|
|
517
|
-
case
|
|
518
|
-
e_1 =
|
|
556
|
+
case 18:
|
|
557
|
+
e_1 = _p.sent();
|
|
519
558
|
newData = [];
|
|
520
559
|
return [3
|
|
521
560
|
/*break*/
|
|
522
|
-
,
|
|
561
|
+
, 19];
|
|
523
562
|
|
|
524
|
-
case
|
|
563
|
+
case 19:
|
|
525
564
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
526
565
|
_cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
|
|
527
|
-
(0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (
|
|
566
|
+
(0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_m = {}, _m["products" + index] = newData, _m.endTime = Date.now() + 3 * 60 * 1000, _m)));
|
|
528
567
|
}
|
|
529
568
|
|
|
530
|
-
this.setState((
|
|
569
|
+
this.setState((_o = {}, _o["products" + index] = newData, _o), function () {
|
|
531
570
|
_this.resetLayout();
|
|
532
571
|
});
|
|
533
572
|
return [2
|
|
@@ -676,16 +715,18 @@ function (_super) {
|
|
|
676
715
|
RecommendMobile.prototype.render = function () {
|
|
677
716
|
var _this = this;
|
|
678
717
|
|
|
718
|
+
var _a;
|
|
719
|
+
|
|
679
720
|
var panelProps = this.props.panelProps;
|
|
680
|
-
var
|
|
681
|
-
tabIndex =
|
|
682
|
-
tabLeft =
|
|
683
|
-
tabWidth =
|
|
684
|
-
groupSource =
|
|
685
|
-
hideTabs =
|
|
686
|
-
contentWidth =
|
|
687
|
-
filterObj =
|
|
688
|
-
searchParams =
|
|
721
|
+
var _b = this.state,
|
|
722
|
+
tabIndex = _b.tabIndex,
|
|
723
|
+
tabLeft = _b.tabLeft,
|
|
724
|
+
tabWidth = _b.tabWidth,
|
|
725
|
+
groupSource = _b.groupSource,
|
|
726
|
+
hideTabs = _b.hideTabs,
|
|
727
|
+
contentWidth = _b.contentWidth,
|
|
728
|
+
filterObj = _b.filterObj,
|
|
729
|
+
searchParams = _b.searchParams;
|
|
689
730
|
var products = this.state["products" + tabIndex] || [];
|
|
690
731
|
|
|
691
732
|
var _products = products.length === 0 && (0, _coreUtil.isDesignMode)() ? defaultData : products;
|
|
@@ -751,7 +792,7 @@ function (_super) {
|
|
|
751
792
|
transform: "translateX(" + tabLeft + "px)",
|
|
752
793
|
background: this.getTabBarActiveColor(panelProps)
|
|
753
794
|
}
|
|
754
|
-
})), /*#__PURE__*/_react["default"].createElement(_SearchCondition["default"], {
|
|
795
|
+
})), ((_a = panelProps.content.filter) === null || _a === void 0 ? void 0 : _a.open) && /*#__PURE__*/_react["default"].createElement(_SearchCondition["default"], {
|
|
755
796
|
filterObj: filterObj,
|
|
756
797
|
onChange: this.onSearchCondChange,
|
|
757
798
|
value: searchParams
|
|
@@ -242,9 +242,7 @@ var defaultData = [{
|
|
|
242
242
|
salesPrice: 18000000,
|
|
243
243
|
specialPrice: 18000000,
|
|
244
244
|
marketPrice: 19000000,
|
|
245
|
-
|
|
246
|
-
salePercent: 500,
|
|
247
|
-
sppType: '2'
|
|
245
|
+
salePercent: 500
|
|
248
246
|
}, {
|
|
249
247
|
imgUrlContent: {
|
|
250
248
|
url: _card["default"]
|
|
@@ -253,9 +251,7 @@ var defaultData = [{
|
|
|
253
251
|
salesPrice: 18000000,
|
|
254
252
|
specialPrice: 18000000,
|
|
255
253
|
marketPrice: 19000000,
|
|
256
|
-
|
|
257
|
-
salePercent: 500,
|
|
258
|
-
sppType: '2'
|
|
254
|
+
salePercent: 500
|
|
259
255
|
}, {
|
|
260
256
|
imgUrlContent: {
|
|
261
257
|
url: _card["default"]
|
|
@@ -264,9 +260,7 @@ var defaultData = [{
|
|
|
264
260
|
salesPrice: 18000000,
|
|
265
261
|
specialPrice: 18000000,
|
|
266
262
|
marketPrice: 19000000,
|
|
267
|
-
|
|
268
|
-
salePercent: 500,
|
|
269
|
-
sppType: '2'
|
|
263
|
+
salePercent: 500
|
|
270
264
|
}, {
|
|
271
265
|
imgUrlContent: {
|
|
272
266
|
url: _card["default"]
|
|
@@ -275,9 +269,7 @@ var defaultData = [{
|
|
|
275
269
|
salesPrice: 18000000,
|
|
276
270
|
specialPrice: 18000000,
|
|
277
271
|
marketPrice: 19000000,
|
|
278
|
-
|
|
279
|
-
salePercent: 500,
|
|
280
|
-
sppType: '2'
|
|
272
|
+
salePercent: 500
|
|
281
273
|
}];
|
|
282
274
|
|
|
283
275
|
var RecommendMobile =
|
|
@@ -73,7 +73,7 @@ function (_super) {
|
|
|
73
73
|
onRefresh: this.reRender,
|
|
74
74
|
source: [{
|
|
75
75
|
key: '1',
|
|
76
|
-
name: (0, _locale.i18n)('
|
|
76
|
+
name: (0, _locale.i18n)('HEADER_IMAGE'),
|
|
77
77
|
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
78
78
|
data: panelProps.headerImage
|
|
79
79
|
}),
|
|
@@ -73,7 +73,7 @@ function (_super) {
|
|
|
73
73
|
onRefresh: this.reRender,
|
|
74
74
|
source: [{
|
|
75
75
|
key: '1',
|
|
76
|
-
name: (0, _locale.i18n)('
|
|
76
|
+
name: (0, _locale.i18n)('HEADER_IMAGE'),
|
|
77
77
|
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
78
78
|
data: panelProps.headerImage
|
|
79
79
|
}),
|