@fonixtree/magic-design 0.0.169 → 0.0.171
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/dito/components/FlashDeal/mobile/index.js +3 -4
- package/es/composite-comp/dito/components/FlashDeal/pc/index.js +3 -4
- package/es/composite-comp/dito/components/PcNavigation/pc/index.js +11 -8
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +17 -21
- package/es/composite-comp/dito/components/Recommend/pc/index.js +6 -4
- package/es/meta-comp/components/Text/index.js +7 -9
- package/es/utils/businessUtil.js +2 -1
- package/es/utils/commonUtil.js +1 -1
- package/es/utils/coreUtil.js +5 -6
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +3 -4
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +3 -4
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +11 -8
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +17 -21
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +6 -4
- package/lib/meta-comp/components/Text/index.js +7 -9
- package/lib/utils/businessUtil.js +2 -1
- package/lib/utils/commonUtil.js +1 -1
- package/lib/utils/coreUtil.js +5 -6
- package/package.json +1 -1
|
@@ -418,11 +418,10 @@ function (_super) {
|
|
|
418
418
|
key: item.id,
|
|
419
419
|
data: __assign(__assign({}, item), {
|
|
420
420
|
salePercent: isWill ? 0 : item.salePercent
|
|
421
|
-
})
|
|
421
|
+
}) // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId ?? ''}`)}
|
|
422
|
+
,
|
|
422
423
|
onItemClick: function onItemClick() {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + ((_a = item.sppProductId) !== null && _a !== void 0 ? _a : ''));
|
|
424
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || '') + "}");
|
|
426
425
|
},
|
|
427
426
|
panelProps: panelProps.content,
|
|
428
427
|
unknownPrice: isWill
|
|
@@ -536,11 +536,10 @@ function (_super) {
|
|
|
536
536
|
}),
|
|
537
537
|
fixHeight: true,
|
|
538
538
|
imgHeight: imgHeight,
|
|
539
|
-
imgWidth: imgWidth
|
|
539
|
+
imgWidth: imgWidth // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId ?? ''}`)}
|
|
540
|
+
,
|
|
540
541
|
onItemClick: function onItemClick() {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + ((_a = item.sppProductId) !== null && _a !== void 0 ? _a : ''));
|
|
542
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || '') + "}");
|
|
544
543
|
},
|
|
545
544
|
panelProps: panelProps.content,
|
|
546
545
|
unknownPrice: isWill
|
|
@@ -229,22 +229,25 @@ var jumpUrlConfig = function jumpUrlConfig(item) {
|
|
|
229
229
|
|
|
230
230
|
switch (objType) {
|
|
231
231
|
case 'Category':
|
|
232
|
-
jumpUrl =
|
|
232
|
+
// jumpUrl = `/product/list/${objValue.objId}`;
|
|
233
|
+
jumpUrl = "catg-" + objValue.objId;
|
|
233
234
|
break;
|
|
234
235
|
|
|
235
236
|
case 'ProductDetail':
|
|
236
237
|
{
|
|
237
238
|
var offerId = objValue.objId && objValue.objId.split(',')[0];
|
|
238
|
-
var productId = objValue.objId && objValue.objId.split(',')[1];
|
|
239
|
-
|
|
239
|
+
var productId = objValue.objId && objValue.objId.split(',')[1]; // jumpUrl = `/product/detail/${offerId}?productId=${productId}`;
|
|
240
|
+
|
|
241
|
+
jumpUrl = "proDetail-" + offerId + "-" + productId;
|
|
240
242
|
break;
|
|
241
243
|
}
|
|
242
244
|
|
|
243
245
|
case 'FilteredProducts':
|
|
244
246
|
{
|
|
245
247
|
var params = JsonToUrl(objValue.filteredProductsRela);
|
|
246
|
-
params = params.replace('productName', 'q');
|
|
247
|
-
|
|
248
|
+
params = params.replace('productName', 'q'); // jumpUrl = `/product/list/null?${params}`;
|
|
249
|
+
|
|
250
|
+
jumpUrl = "filter-" + params;
|
|
248
251
|
break;
|
|
249
252
|
}
|
|
250
253
|
|
|
@@ -256,8 +259,8 @@ var jumpUrlConfig = function jumpUrlConfig(item) {
|
|
|
256
259
|
}
|
|
257
260
|
|
|
258
261
|
case 'CustomizedPage':
|
|
259
|
-
jumpUrl =
|
|
260
|
-
|
|
262
|
+
// jumpUrl = `/poster/${objValue.objId}`;
|
|
263
|
+
jumpUrl = "customized-" + objValue.objId;
|
|
261
264
|
break;
|
|
262
265
|
|
|
263
266
|
case 'URL':
|
|
@@ -271,7 +274,7 @@ var jumpUrlConfig = function jumpUrlConfig(item) {
|
|
|
271
274
|
}
|
|
272
275
|
|
|
273
276
|
window.location.href = lastUrl;
|
|
274
|
-
|
|
277
|
+
return;
|
|
275
278
|
}
|
|
276
279
|
|
|
277
280
|
default:
|
|
@@ -486,23 +486,17 @@ function (_super) {
|
|
|
486
486
|
return _this;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
-
RecommendMobile.prototype.componentDidMount = function () {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}, function () {
|
|
501
|
-
_this.initTab(0);
|
|
502
|
-
|
|
503
|
-
_this.getProductList(0);
|
|
504
|
-
});
|
|
505
|
-
this.listenWidth();
|
|
489
|
+
RecommendMobile.prototype.componentDidMount = function () {// const { panelProps } = this.props;
|
|
490
|
+
// const source = [];
|
|
491
|
+
// panelProps.groupSource.map(m => {
|
|
492
|
+
// const show = m.image.open || m.groupName.open;
|
|
493
|
+
// if (show) source.push(m);
|
|
494
|
+
// });
|
|
495
|
+
// this.setState({ groupSource: source }, () => {
|
|
496
|
+
// this.initTab(0);
|
|
497
|
+
// this.getProductList(0);
|
|
498
|
+
// });
|
|
499
|
+
// this.listenWidth();
|
|
506
500
|
};
|
|
507
501
|
|
|
508
502
|
RecommendMobile.prototype.componentWillReceiveProps = function (nextProps) {
|
|
@@ -637,9 +631,10 @@ function (_super) {
|
|
|
637
631
|
fixHeight: layout === 'layout3',
|
|
638
632
|
imgHeight: imgHeight,
|
|
639
633
|
imgWidth: imgWidth,
|
|
640
|
-
layout: layout === 'layout2' ? 'horizontal' : 'vertical'
|
|
634
|
+
layout: layout === 'layout2' ? 'horizontal' : 'vertical' // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
635
|
+
,
|
|
641
636
|
onItemClick: function onItemClick() {
|
|
642
|
-
return (0, _coreUtil.clickUrl)("
|
|
637
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
643
638
|
},
|
|
644
639
|
panelProps: panelProps.content,
|
|
645
640
|
showProgress: false
|
|
@@ -662,9 +657,10 @@ function (_super) {
|
|
|
662
657
|
data: item,
|
|
663
658
|
fixHeight: true,
|
|
664
659
|
imgHeight: imgHeight,
|
|
665
|
-
imgWidth: imgWidth
|
|
660
|
+
imgWidth: imgWidth // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
661
|
+
,
|
|
666
662
|
onItemClick: function onItemClick() {
|
|
667
|
-
return (0, _coreUtil.clickUrl)("
|
|
663
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || '') + "}");
|
|
668
664
|
},
|
|
669
665
|
panelProps: panelProps.content,
|
|
670
666
|
showProgress: false
|
|
@@ -699,9 +699,10 @@ function (_super) {
|
|
|
699
699
|
data: item,
|
|
700
700
|
fixHeight: true,
|
|
701
701
|
imgHeight: imgSize,
|
|
702
|
-
imgWidth: "100%"
|
|
702
|
+
imgWidth: "100%" // onItemClick={() => clickUrl(`/product/detail/${item.offerId}`)}
|
|
703
|
+
,
|
|
703
704
|
onItemClick: function onItemClick() {
|
|
704
|
-
return (0, _coreUtil.clickUrl)("
|
|
705
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId);
|
|
705
706
|
},
|
|
706
707
|
panelProps: panelProps.content,
|
|
707
708
|
showProgress: false
|
|
@@ -727,9 +728,10 @@ function (_super) {
|
|
|
727
728
|
data: item,
|
|
728
729
|
fixHeight: true,
|
|
729
730
|
imgHeight: imgSize,
|
|
730
|
-
imgWidth: imgSize
|
|
731
|
+
imgWidth: imgSize // onItemClick={() => clickUrl(`/product/detail/${item.offerId}`)}
|
|
732
|
+
,
|
|
731
733
|
onItemClick: function onItemClick() {
|
|
732
|
-
return (0, _coreUtil.clickUrl)("
|
|
734
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId);
|
|
733
735
|
},
|
|
734
736
|
panelProps: panelProps.content,
|
|
735
737
|
showProgress: false
|
|
@@ -319,7 +319,8 @@ function (_super) {
|
|
|
319
319
|
node.appendChild(closeNode);
|
|
320
320
|
};
|
|
321
321
|
|
|
322
|
-
_this.renderText = function (data
|
|
322
|
+
_this.renderText = function (data) {
|
|
323
|
+
var mode = window.magicDesign.mode;
|
|
323
324
|
var outputType = _this.props.outputType || window.magicDesign.outputType;
|
|
324
325
|
if (!_this.textRef.current) return;
|
|
325
326
|
|
|
@@ -437,14 +438,14 @@ function (_super) {
|
|
|
437
438
|
Text.prototype.componentDidMount = function () {
|
|
438
439
|
var _this = this;
|
|
439
440
|
|
|
440
|
-
this.renderText(this.props.data
|
|
441
|
+
this.renderText(this.props.data);
|
|
441
442
|
initSelectionEvent();
|
|
442
443
|
appendSelectionTarget({
|
|
443
444
|
target: this.textRef.current,
|
|
444
445
|
data: this.props.data,
|
|
445
446
|
selectionRefMap: this.selectionRefMap,
|
|
446
447
|
refresh: function refresh() {
|
|
447
|
-
_this.renderText(_this.props.data
|
|
448
|
+
_this.renderText(_this.props.data);
|
|
448
449
|
}
|
|
449
450
|
});
|
|
450
451
|
};
|
|
@@ -456,7 +457,7 @@ function (_super) {
|
|
|
456
457
|
var result = should1 || should2 || should3;
|
|
457
458
|
|
|
458
459
|
if (result) {
|
|
459
|
-
this.renderText(nextProps.data
|
|
460
|
+
this.renderText(nextProps.data);
|
|
460
461
|
}
|
|
461
462
|
|
|
462
463
|
return result;
|
|
@@ -473,8 +474,8 @@ function (_super) {
|
|
|
473
474
|
data = _a.data,
|
|
474
475
|
className = _a.className,
|
|
475
476
|
readonly = _a.readonly,
|
|
476
|
-
onTextInput = _a.onTextInput
|
|
477
|
-
|
|
477
|
+
onTextInput = _a.onTextInput;
|
|
478
|
+
var mode = window.magicDesign.mode;
|
|
478
479
|
var style = contentStyle(data.content);
|
|
479
480
|
|
|
480
481
|
if (data.underline) {
|
|
@@ -498,8 +499,6 @@ function (_super) {
|
|
|
498
499
|
// textDecorationColor: data?.underline.textDecorationColor,
|
|
499
500
|
// textDecorationStyle: data?.underline.textDecorationStyle,
|
|
500
501
|
// };
|
|
501
|
-
// mode == 'designer' && !readonly
|
|
502
|
-
// console.log('!readonly: ', mode, readonly);
|
|
503
502
|
|
|
504
503
|
|
|
505
504
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -534,7 +533,6 @@ function (_super) {
|
|
|
534
533
|
|
|
535
534
|
Text.defaultProps = {
|
|
536
535
|
readonly: false,
|
|
537
|
-
mode: 'designer',
|
|
538
536
|
onTextInput: function onTextInput() {}
|
|
539
537
|
};
|
|
540
538
|
Text = __decorate([_decorator.metaDecorator], Text);
|
package/es/utils/businessUtil.js
CHANGED
|
@@ -128,7 +128,8 @@ var parseUrl = function parseUrl(url) {
|
|
|
128
128
|
'/main/social-commerce': 'SOCIAL_COMMERCE',
|
|
129
129
|
'/social-commerce/my-cashback': 'CASHBACK',
|
|
130
130
|
'/account/wallet': 'WALLET',
|
|
131
|
-
'/product/GroupBuy': 'GROUP'
|
|
131
|
+
'/product/GroupBuy': 'GROUP',
|
|
132
|
+
'/search-page': 'SEARCH_PAGE'
|
|
132
133
|
};
|
|
133
134
|
link = url;
|
|
134
135
|
params = {
|
package/es/utils/commonUtil.js
CHANGED
package/es/utils/coreUtil.js
CHANGED
|
@@ -289,16 +289,15 @@ var getCoupon = function getCoupon(couponId) {
|
|
|
289
289
|
var clickUrl = function clickUrl(url) {
|
|
290
290
|
console.log('clickUrl...', url);
|
|
291
291
|
|
|
292
|
+
if (window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
|
|
292
296
|
var _a = (0, _businessUtil.parseUrl)(url),
|
|
293
297
|
link = _a.link,
|
|
294
298
|
data = _a.data;
|
|
295
299
|
|
|
296
|
-
var params = data.params;
|
|
297
|
-
|
|
298
|
-
if (window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
299
|
-
return;
|
|
300
|
-
} // 如果是video 放开return
|
|
301
|
-
|
|
300
|
+
var params = data.params; // 如果是video 放开return
|
|
302
301
|
|
|
303
302
|
if (params.type !== 'VIDEO' && window.magicDesign.readOnly) {
|
|
304
303
|
return;
|
|
@@ -418,11 +418,10 @@ function (_super) {
|
|
|
418
418
|
key: item.id,
|
|
419
419
|
data: __assign(__assign({}, item), {
|
|
420
420
|
salePercent: isWill ? 0 : item.salePercent
|
|
421
|
-
})
|
|
421
|
+
}) // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId ?? ''}`)}
|
|
422
|
+
,
|
|
422
423
|
onItemClick: function onItemClick() {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + ((_a = item.sppProductId) !== null && _a !== void 0 ? _a : ''));
|
|
424
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || '') + "}");
|
|
426
425
|
},
|
|
427
426
|
panelProps: panelProps.content,
|
|
428
427
|
unknownPrice: isWill
|
|
@@ -536,11 +536,10 @@ function (_super) {
|
|
|
536
536
|
}),
|
|
537
537
|
fixHeight: true,
|
|
538
538
|
imgHeight: imgHeight,
|
|
539
|
-
imgWidth: imgWidth
|
|
539
|
+
imgWidth: imgWidth // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId ?? ''}`)}
|
|
540
|
+
,
|
|
540
541
|
onItemClick: function onItemClick() {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + ((_a = item.sppProductId) !== null && _a !== void 0 ? _a : ''));
|
|
542
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || '') + "}");
|
|
544
543
|
},
|
|
545
544
|
panelProps: panelProps.content,
|
|
546
545
|
unknownPrice: isWill
|
|
@@ -229,22 +229,25 @@ var jumpUrlConfig = function jumpUrlConfig(item) {
|
|
|
229
229
|
|
|
230
230
|
switch (objType) {
|
|
231
231
|
case 'Category':
|
|
232
|
-
jumpUrl =
|
|
232
|
+
// jumpUrl = `/product/list/${objValue.objId}`;
|
|
233
|
+
jumpUrl = "catg-" + objValue.objId;
|
|
233
234
|
break;
|
|
234
235
|
|
|
235
236
|
case 'ProductDetail':
|
|
236
237
|
{
|
|
237
238
|
var offerId = objValue.objId && objValue.objId.split(',')[0];
|
|
238
|
-
var productId = objValue.objId && objValue.objId.split(',')[1];
|
|
239
|
-
|
|
239
|
+
var productId = objValue.objId && objValue.objId.split(',')[1]; // jumpUrl = `/product/detail/${offerId}?productId=${productId}`;
|
|
240
|
+
|
|
241
|
+
jumpUrl = "proDetail-" + offerId + "-" + productId;
|
|
240
242
|
break;
|
|
241
243
|
}
|
|
242
244
|
|
|
243
245
|
case 'FilteredProducts':
|
|
244
246
|
{
|
|
245
247
|
var params = JsonToUrl(objValue.filteredProductsRela);
|
|
246
|
-
params = params.replace('productName', 'q');
|
|
247
|
-
|
|
248
|
+
params = params.replace('productName', 'q'); // jumpUrl = `/product/list/null?${params}`;
|
|
249
|
+
|
|
250
|
+
jumpUrl = "filter-" + params;
|
|
248
251
|
break;
|
|
249
252
|
}
|
|
250
253
|
|
|
@@ -256,8 +259,8 @@ var jumpUrlConfig = function jumpUrlConfig(item) {
|
|
|
256
259
|
}
|
|
257
260
|
|
|
258
261
|
case 'CustomizedPage':
|
|
259
|
-
jumpUrl =
|
|
260
|
-
|
|
262
|
+
// jumpUrl = `/poster/${objValue.objId}`;
|
|
263
|
+
jumpUrl = "customized-" + objValue.objId;
|
|
261
264
|
break;
|
|
262
265
|
|
|
263
266
|
case 'URL':
|
|
@@ -271,7 +274,7 @@ var jumpUrlConfig = function jumpUrlConfig(item) {
|
|
|
271
274
|
}
|
|
272
275
|
|
|
273
276
|
window.location.href = lastUrl;
|
|
274
|
-
|
|
277
|
+
return;
|
|
275
278
|
}
|
|
276
279
|
|
|
277
280
|
default:
|
|
@@ -486,23 +486,17 @@ function (_super) {
|
|
|
486
486
|
return _this;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
-
RecommendMobile.prototype.componentDidMount = function () {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}, function () {
|
|
501
|
-
_this.initTab(0);
|
|
502
|
-
|
|
503
|
-
_this.getProductList(0);
|
|
504
|
-
});
|
|
505
|
-
this.listenWidth();
|
|
489
|
+
RecommendMobile.prototype.componentDidMount = function () {// const { panelProps } = this.props;
|
|
490
|
+
// const source = [];
|
|
491
|
+
// panelProps.groupSource.map(m => {
|
|
492
|
+
// const show = m.image.open || m.groupName.open;
|
|
493
|
+
// if (show) source.push(m);
|
|
494
|
+
// });
|
|
495
|
+
// this.setState({ groupSource: source }, () => {
|
|
496
|
+
// this.initTab(0);
|
|
497
|
+
// this.getProductList(0);
|
|
498
|
+
// });
|
|
499
|
+
// this.listenWidth();
|
|
506
500
|
};
|
|
507
501
|
|
|
508
502
|
RecommendMobile.prototype.componentWillReceiveProps = function (nextProps) {
|
|
@@ -637,9 +631,10 @@ function (_super) {
|
|
|
637
631
|
fixHeight: layout === 'layout3',
|
|
638
632
|
imgHeight: imgHeight,
|
|
639
633
|
imgWidth: imgWidth,
|
|
640
|
-
layout: layout === 'layout2' ? 'horizontal' : 'vertical'
|
|
634
|
+
layout: layout === 'layout2' ? 'horizontal' : 'vertical' // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
635
|
+
,
|
|
641
636
|
onItemClick: function onItemClick() {
|
|
642
|
-
return (0, _coreUtil.clickUrl)("
|
|
637
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
643
638
|
},
|
|
644
639
|
panelProps: panelProps.content,
|
|
645
640
|
showProgress: false
|
|
@@ -662,9 +657,10 @@ function (_super) {
|
|
|
662
657
|
data: item,
|
|
663
658
|
fixHeight: true,
|
|
664
659
|
imgHeight: imgHeight,
|
|
665
|
-
imgWidth: imgWidth
|
|
660
|
+
imgWidth: imgWidth // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
661
|
+
,
|
|
666
662
|
onItemClick: function onItemClick() {
|
|
667
|
-
return (0, _coreUtil.clickUrl)("
|
|
663
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || '') + "}");
|
|
668
664
|
},
|
|
669
665
|
panelProps: panelProps.content,
|
|
670
666
|
showProgress: false
|
|
@@ -699,9 +699,10 @@ function (_super) {
|
|
|
699
699
|
data: item,
|
|
700
700
|
fixHeight: true,
|
|
701
701
|
imgHeight: imgSize,
|
|
702
|
-
imgWidth: "100%"
|
|
702
|
+
imgWidth: "100%" // onItemClick={() => clickUrl(`/product/detail/${item.offerId}`)}
|
|
703
|
+
,
|
|
703
704
|
onItemClick: function onItemClick() {
|
|
704
|
-
return (0, _coreUtil.clickUrl)("
|
|
705
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId);
|
|
705
706
|
},
|
|
706
707
|
panelProps: panelProps.content,
|
|
707
708
|
showProgress: false
|
|
@@ -727,9 +728,10 @@ function (_super) {
|
|
|
727
728
|
data: item,
|
|
728
729
|
fixHeight: true,
|
|
729
730
|
imgHeight: imgSize,
|
|
730
|
-
imgWidth: imgSize
|
|
731
|
+
imgWidth: imgSize // onItemClick={() => clickUrl(`/product/detail/${item.offerId}`)}
|
|
732
|
+
,
|
|
731
733
|
onItemClick: function onItemClick() {
|
|
732
|
-
return (0, _coreUtil.clickUrl)("
|
|
734
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId);
|
|
733
735
|
},
|
|
734
736
|
panelProps: panelProps.content,
|
|
735
737
|
showProgress: false
|
|
@@ -319,7 +319,8 @@ function (_super) {
|
|
|
319
319
|
node.appendChild(closeNode);
|
|
320
320
|
};
|
|
321
321
|
|
|
322
|
-
_this.renderText = function (data
|
|
322
|
+
_this.renderText = function (data) {
|
|
323
|
+
var mode = window.magicDesign.mode;
|
|
323
324
|
var outputType = _this.props.outputType || window.magicDesign.outputType;
|
|
324
325
|
if (!_this.textRef.current) return;
|
|
325
326
|
|
|
@@ -437,14 +438,14 @@ function (_super) {
|
|
|
437
438
|
Text.prototype.componentDidMount = function () {
|
|
438
439
|
var _this = this;
|
|
439
440
|
|
|
440
|
-
this.renderText(this.props.data
|
|
441
|
+
this.renderText(this.props.data);
|
|
441
442
|
initSelectionEvent();
|
|
442
443
|
appendSelectionTarget({
|
|
443
444
|
target: this.textRef.current,
|
|
444
445
|
data: this.props.data,
|
|
445
446
|
selectionRefMap: this.selectionRefMap,
|
|
446
447
|
refresh: function refresh() {
|
|
447
|
-
_this.renderText(_this.props.data
|
|
448
|
+
_this.renderText(_this.props.data);
|
|
448
449
|
}
|
|
449
450
|
});
|
|
450
451
|
};
|
|
@@ -456,7 +457,7 @@ function (_super) {
|
|
|
456
457
|
var result = should1 || should2 || should3;
|
|
457
458
|
|
|
458
459
|
if (result) {
|
|
459
|
-
this.renderText(nextProps.data
|
|
460
|
+
this.renderText(nextProps.data);
|
|
460
461
|
}
|
|
461
462
|
|
|
462
463
|
return result;
|
|
@@ -473,8 +474,8 @@ function (_super) {
|
|
|
473
474
|
data = _a.data,
|
|
474
475
|
className = _a.className,
|
|
475
476
|
readonly = _a.readonly,
|
|
476
|
-
onTextInput = _a.onTextInput
|
|
477
|
-
|
|
477
|
+
onTextInput = _a.onTextInput;
|
|
478
|
+
var mode = window.magicDesign.mode;
|
|
478
479
|
var style = contentStyle(data.content);
|
|
479
480
|
|
|
480
481
|
if (data.underline) {
|
|
@@ -498,8 +499,6 @@ function (_super) {
|
|
|
498
499
|
// textDecorationColor: data?.underline.textDecorationColor,
|
|
499
500
|
// textDecorationStyle: data?.underline.textDecorationStyle,
|
|
500
501
|
// };
|
|
501
|
-
// mode == 'designer' && !readonly
|
|
502
|
-
// console.log('!readonly: ', mode, readonly);
|
|
503
502
|
|
|
504
503
|
|
|
505
504
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -534,7 +533,6 @@ function (_super) {
|
|
|
534
533
|
|
|
535
534
|
Text.defaultProps = {
|
|
536
535
|
readonly: false,
|
|
537
|
-
mode: 'designer',
|
|
538
536
|
onTextInput: function onTextInput() {}
|
|
539
537
|
};
|
|
540
538
|
Text = __decorate([_decorator.metaDecorator], Text);
|
|
@@ -128,7 +128,8 @@ var parseUrl = function parseUrl(url) {
|
|
|
128
128
|
'/main/social-commerce': 'SOCIAL_COMMERCE',
|
|
129
129
|
'/social-commerce/my-cashback': 'CASHBACK',
|
|
130
130
|
'/account/wallet': 'WALLET',
|
|
131
|
-
'/product/GroupBuy': 'GROUP'
|
|
131
|
+
'/product/GroupBuy': 'GROUP',
|
|
132
|
+
'/search-page': 'SEARCH_PAGE'
|
|
132
133
|
};
|
|
133
134
|
link = url;
|
|
134
135
|
params = {
|
package/lib/utils/commonUtil.js
CHANGED
package/lib/utils/coreUtil.js
CHANGED
|
@@ -289,16 +289,15 @@ var getCoupon = function getCoupon(couponId) {
|
|
|
289
289
|
var clickUrl = function clickUrl(url) {
|
|
290
290
|
console.log('clickUrl...', url);
|
|
291
291
|
|
|
292
|
+
if (window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
|
|
292
296
|
var _a = (0, _businessUtil.parseUrl)(url),
|
|
293
297
|
link = _a.link,
|
|
294
298
|
data = _a.data;
|
|
295
299
|
|
|
296
|
-
var params = data.params;
|
|
297
|
-
|
|
298
|
-
if (window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
299
|
-
return;
|
|
300
|
-
} // 如果是video 放开return
|
|
301
|
-
|
|
300
|
+
var params = data.params; // 如果是video 放开return
|
|
302
301
|
|
|
303
302
|
if (params.type !== 'VIDEO' && window.magicDesign.readOnly) {
|
|
304
303
|
return;
|