@fonixtree/magic-design 1.0.119 → 1.0.121
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/Recommend/mobile/imgs/card.png +0 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +29 -4
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +1 -0
- package/es/composite-comp/dito/components/SearchBanner/defaultJSON.js +59 -61
- package/es/composite-comp/dito/components/SearchBanner/mobile/index.js +8 -9
- package/es/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.js +21 -41
- package/lib/composite-comp/dito/components/Recommend/mobile/imgs/card.png +0 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +29 -4
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +1 -0
- package/lib/composite-comp/dito/components/SearchBanner/defaultJSON.js +59 -61
- package/lib/composite-comp/dito/components/SearchBanner/mobile/index.js +8 -9
- package/lib/composite-comp/dito/config-panels/SearchBannerConfig/ConfigContent/index.js +21 -41
- package/package.json +1 -1
|
Binary file
|
|
@@ -13,6 +13,8 @@ require("./index.less");
|
|
|
13
13
|
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
|
|
16
|
+
var _card = _interopRequireDefault(require("./imgs/card.png"));
|
|
17
|
+
|
|
16
18
|
var _mobx = require("../../../../../mobx");
|
|
17
19
|
|
|
18
20
|
var _ProductItem = _interopRequireDefault(require("../../../../common/components/ProductItem"));
|
|
@@ -226,6 +228,26 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
226
228
|
return r;
|
|
227
229
|
};
|
|
228
230
|
|
|
231
|
+
var defaultData = [{
|
|
232
|
+
imgUrlContent: {
|
|
233
|
+
url: _card["default"]
|
|
234
|
+
},
|
|
235
|
+
offerName: 'Product Name Long Long Long Long Long',
|
|
236
|
+
salesPrice: 10000,
|
|
237
|
+
specialPrice: null,
|
|
238
|
+
marketPrice: 20000,
|
|
239
|
+
salePercent: 500,
|
|
240
|
+
discountPercent: 90
|
|
241
|
+
}, {
|
|
242
|
+
imgUrlContent: {
|
|
243
|
+
url: _card["default"]
|
|
244
|
+
},
|
|
245
|
+
offerName: 'Product Name',
|
|
246
|
+
salesPrice: 10000,
|
|
247
|
+
specialPrice: null,
|
|
248
|
+
marketPrice: 20000,
|
|
249
|
+
salePercent: 500
|
|
250
|
+
}];
|
|
229
251
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
252
|
layout1: {
|
|
231
253
|
w: '100%',
|
|
@@ -572,6 +594,9 @@ function (_super) {
|
|
|
572
594
|
hideTabs = _a.hideTabs,
|
|
573
595
|
contentWidth = _a.contentWidth;
|
|
574
596
|
var products = this.state["products" + tabIndex] || [];
|
|
597
|
+
|
|
598
|
+
var _products = products.length === 0 && (0, _coreUtil.isDesignMode)() ? defaultData : products;
|
|
599
|
+
|
|
575
600
|
var isDivide = groupSource.length <= 3;
|
|
576
601
|
var layout = panelProps.customize.layout.h5Layout;
|
|
577
602
|
|
|
@@ -645,7 +670,7 @@ function (_super) {
|
|
|
645
670
|
})), ['layout1', 'layout2', 'layout3'].includes(layout) ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
646
671
|
key: "macyContainer",
|
|
647
672
|
className: "macyContainer macyContainer_" + panelProps.id
|
|
648
|
-
},
|
|
673
|
+
}, _products.map(function (item) {
|
|
649
674
|
return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
650
675
|
key: item.productId,
|
|
651
676
|
data: item // fixHeight={layout === 'layout3'}
|
|
@@ -669,7 +694,7 @@ function (_super) {
|
|
|
669
694
|
panelProps: panelProps.content,
|
|
670
695
|
showProgress: false
|
|
671
696
|
});
|
|
672
|
-
})), _seeAll.open &&
|
|
697
|
+
})), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
673
698
|
className: "btnSeeAll",
|
|
674
699
|
data: _seeAll
|
|
675
700
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -679,7 +704,7 @@ function (_super) {
|
|
|
679
704
|
})
|
|
680
705
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
681
706
|
className: "scrollProductList"
|
|
682
|
-
},
|
|
707
|
+
}, _products.map(function (item) {
|
|
683
708
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
684
709
|
className: "productCard"
|
|
685
710
|
}, /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
@@ -700,7 +725,7 @@ function (_super) {
|
|
|
700
725
|
panelProps: panelProps.content,
|
|
701
726
|
showProgress: false
|
|
702
727
|
}));
|
|
703
|
-
})), _seeAll.open &&
|
|
728
|
+
})), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
704
729
|
className: "btnSeeAll",
|
|
705
730
|
data: _seeAll
|
|
706
731
|
})));
|
|
@@ -75,72 +75,70 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
75
75
|
mobile: 'transparent'
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
value: '/main/cart'
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
hover: {
|
|
94
|
-
open: false,
|
|
95
|
-
backgroundType: 'enlarge',
|
|
96
|
-
magnification: 1.5,
|
|
97
|
-
pcImgHoverUrl: '',
|
|
98
|
-
h5ImgHoverUrl: ''
|
|
78
|
+
cartIcon: {
|
|
79
|
+
id: (0, _uuid.v4)(),
|
|
80
|
+
open: true,
|
|
81
|
+
type: 'IMAGE',
|
|
82
|
+
content: {
|
|
83
|
+
h5Name: 'name2',
|
|
84
|
+
pcName: 'name2',
|
|
85
|
+
h5ImgSrc: _base.searchCartIcon,
|
|
86
|
+
pcImgSrc: '',
|
|
87
|
+
clickUrl: {
|
|
88
|
+
name: '/main/cart',
|
|
89
|
+
value: '/main/cart'
|
|
99
90
|
}
|
|
100
91
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
92
|
+
hover: {
|
|
93
|
+
open: false,
|
|
94
|
+
backgroundType: 'enlarge',
|
|
95
|
+
magnification: 1.5,
|
|
96
|
+
pcImgHoverUrl: '',
|
|
97
|
+
h5ImgHoverUrl: ''
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
chatbotIcon: {
|
|
101
|
+
id: (0, _uuid.v4)(),
|
|
102
|
+
open: true,
|
|
103
|
+
type: 'IMAGE',
|
|
104
|
+
content: {
|
|
105
|
+
h5Name: 'name2',
|
|
106
|
+
pcName: 'name2',
|
|
107
|
+
h5ImgSrc: _base.searchChatbotIcon,
|
|
108
|
+
pcImgSrc: '',
|
|
109
|
+
clickUrl: {
|
|
110
|
+
name: '/new-chat',
|
|
111
|
+
value: '/new-chat'
|
|
121
112
|
}
|
|
122
113
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
114
|
+
hover: {
|
|
115
|
+
open: false,
|
|
116
|
+
backgroundType: 'enlarge',
|
|
117
|
+
magnification: 1.5,
|
|
118
|
+
pcImgHoverUrl: '',
|
|
119
|
+
h5ImgHoverUrl: ''
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
messageIcon: {
|
|
123
|
+
id: (0, _uuid.v4)(),
|
|
124
|
+
open: true,
|
|
125
|
+
type: 'IMAGE',
|
|
126
|
+
content: {
|
|
127
|
+
h5Name: 'name2',
|
|
128
|
+
pcName: 'name2',
|
|
129
|
+
h5ImgSrc: _base.searchMessageIcon,
|
|
130
|
+
pcImgSrc: '',
|
|
131
|
+
clickUrl: {
|
|
132
|
+
name: '/message-center',
|
|
133
|
+
value: '/message-center'
|
|
143
134
|
}
|
|
135
|
+
},
|
|
136
|
+
hover: {
|
|
137
|
+
open: false,
|
|
138
|
+
backgroundType: 'enlarge',
|
|
139
|
+
magnification: 1.5,
|
|
140
|
+
pcImgHoverUrl: '',
|
|
141
|
+
h5ImgHoverUrl: ''
|
|
144
142
|
}
|
|
145
143
|
}
|
|
146
144
|
},
|
|
@@ -147,10 +147,9 @@ function (_super) {
|
|
|
147
147
|
SearchBannerMobile.prototype.render = function () {
|
|
148
148
|
var _this = this;
|
|
149
149
|
|
|
150
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
150
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
151
151
|
|
|
152
152
|
var data = this.props.data;
|
|
153
|
-
console.log('data', data);
|
|
154
153
|
var GAData = (0, _commonUtil.getGAData)(data);
|
|
155
154
|
var carouseIndex = this.state.carouseIndex;
|
|
156
155
|
var autoplay = data.setting.autoplay.open;
|
|
@@ -179,16 +178,16 @@ function (_super) {
|
|
|
179
178
|
color: (_g = (_f = data.content.box) === null || _f === void 0 ? void 0 : _f.color) === null || _g === void 0 ? void 0 : _g.mobile,
|
|
180
179
|
size: (0, _commonUtil.convertToRem)(20),
|
|
181
180
|
type: "icon-search2"
|
|
182
|
-
})),
|
|
181
|
+
})), data.content && ((_h = data.content.cartIcon) === null || _h === void 0 ? void 0 : _h.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
183
182
|
className: "right-icon",
|
|
184
|
-
data:
|
|
185
|
-
}),
|
|
183
|
+
data: data.content.cartIcon
|
|
184
|
+
}), data.content && ((_j = data.content.chatbotIcon) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
186
185
|
className: "right-icon",
|
|
187
|
-
data:
|
|
188
|
-
}),
|
|
186
|
+
data: data.content.chatbotIcon
|
|
187
|
+
}), data.content && ((_k = data.content.messageIcon) === null || _k === void 0 ? void 0 : _k.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
189
188
|
className: "right-icon",
|
|
190
|
-
data:
|
|
191
|
-
})), data.content && ((
|
|
189
|
+
data: data.content.messageIcon
|
|
190
|
+
})), data.content && ((_l = data.content.logo) === null || _l === void 0 ? void 0 : _l.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
192
191
|
className: "logo",
|
|
193
192
|
onClick: function onClick() {
|
|
194
193
|
var _a, _b;
|
|
@@ -65,49 +65,13 @@ function (_super) {
|
|
|
65
65
|
_this.setState({});
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
_this.getIconPanel = function () {
|
|
69
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
70
|
-
|
|
71
|
-
var panelProps = _this.props.panelProps;
|
|
72
|
-
var source = [{
|
|
73
|
-
key: (_b = (_a = panelProps.icons) === null || _a === void 0 ? void 0 : _a.cartIcon) === null || _b === void 0 ? void 0 : _b.id,
|
|
74
|
-
name: (0, _locale.i18n)('CART_ICON'),
|
|
75
|
-
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
76
|
-
data: (_c = panelProps.icons) === null || _c === void 0 ? void 0 : _c.cartIcon
|
|
77
|
-
}),
|
|
78
|
-
metaOption: (_d = panelProps.icons) === null || _d === void 0 ? void 0 : _d.cartIcon
|
|
79
|
-
}, {
|
|
80
|
-
key: (_f = (_e = panelProps.icons) === null || _e === void 0 ? void 0 : _e.chatbotIcon) === null || _f === void 0 ? void 0 : _f.id,
|
|
81
|
-
name: (0, _locale.i18n)('CHATBOT_ICON'),
|
|
82
|
-
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
83
|
-
data: (_g = panelProps.icons) === null || _g === void 0 ? void 0 : _g.chatbotIcon
|
|
84
|
-
}),
|
|
85
|
-
metaOption: (_h = panelProps.icons) === null || _h === void 0 ? void 0 : _h.chatbotIcon
|
|
86
|
-
}, {
|
|
87
|
-
key: (_k = (_j = panelProps.icons) === null || _j === void 0 ? void 0 : _j.messageIcon) === null || _k === void 0 ? void 0 : _k.id,
|
|
88
|
-
name: (0, _locale.i18n)('MESSAGE_ICON'),
|
|
89
|
-
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
90
|
-
data: (_l = panelProps.icons) === null || _l === void 0 ? void 0 : _l.messageIcon
|
|
91
|
-
}),
|
|
92
|
-
metaOption: (_m = panelProps.icons) === null || _m === void 0 ? void 0 : _m.messageIcon
|
|
93
|
-
}];
|
|
94
|
-
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
95
|
-
headerSize: "middle",
|
|
96
|
-
onRefresh: function onRefresh() {
|
|
97
|
-
return (0, _coreUtil.renderPreview)();
|
|
98
|
-
},
|
|
99
|
-
source: source,
|
|
100
|
-
type: "switch"
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
|
|
104
68
|
return _this;
|
|
105
69
|
}
|
|
106
70
|
|
|
107
71
|
SearchBarConfigContent.prototype.render = function () {
|
|
108
72
|
var _this = this;
|
|
109
73
|
|
|
110
|
-
var _a, _b, _c, _d;
|
|
74
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
111
75
|
|
|
112
76
|
var panelProps = this.props.panelProps;
|
|
113
77
|
var source = [{
|
|
@@ -158,10 +122,26 @@ function (_super) {
|
|
|
158
122
|
metaOption: panelProps.box,
|
|
159
123
|
toggleType: 'switch'
|
|
160
124
|
}, {
|
|
161
|
-
key:
|
|
162
|
-
name: (0, _locale.i18n)('
|
|
163
|
-
|
|
164
|
-
|
|
125
|
+
key: (_e = panelProps.cartIcon) === null || _e === void 0 ? void 0 : _e.id,
|
|
126
|
+
name: (0, _locale.i18n)('CART_ICON'),
|
|
127
|
+
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
128
|
+
data: panelProps.cartIcon
|
|
129
|
+
}),
|
|
130
|
+
metaOption: panelProps.cartIcon
|
|
131
|
+
}, {
|
|
132
|
+
key: (_f = panelProps.chatbotIcon) === null || _f === void 0 ? void 0 : _f.id,
|
|
133
|
+
name: (0, _locale.i18n)('CHATBOT_ICON'),
|
|
134
|
+
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
135
|
+
data: panelProps.chatbotIcon
|
|
136
|
+
}),
|
|
137
|
+
metaOption: panelProps.chatbotIcon
|
|
138
|
+
}, {
|
|
139
|
+
key: (_g = panelProps.messageIcon) === null || _g === void 0 ? void 0 : _g.id,
|
|
140
|
+
name: (0, _locale.i18n)('MESSAGE_ICON'),
|
|
141
|
+
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
142
|
+
data: panelProps.messageIcon
|
|
143
|
+
}),
|
|
144
|
+
metaOption: panelProps.messageIcon
|
|
165
145
|
}];
|
|
166
146
|
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
167
147
|
headerSize: "middle",
|
|
@@ -13,6 +13,8 @@ require("./index.less");
|
|
|
13
13
|
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
|
|
16
|
+
var _card = _interopRequireDefault(require("./imgs/card.png"));
|
|
17
|
+
|
|
16
18
|
var _mobx = require("../../../../../mobx");
|
|
17
19
|
|
|
18
20
|
var _ProductItem = _interopRequireDefault(require("../../../../common/components/ProductItem"));
|
|
@@ -226,6 +228,26 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
226
228
|
return r;
|
|
227
229
|
};
|
|
228
230
|
|
|
231
|
+
var defaultData = [{
|
|
232
|
+
imgUrlContent: {
|
|
233
|
+
url: _card["default"]
|
|
234
|
+
},
|
|
235
|
+
offerName: 'Product Name Long Long Long Long Long',
|
|
236
|
+
salesPrice: 10000,
|
|
237
|
+
specialPrice: null,
|
|
238
|
+
marketPrice: 20000,
|
|
239
|
+
salePercent: 500,
|
|
240
|
+
discountPercent: 90
|
|
241
|
+
}, {
|
|
242
|
+
imgUrlContent: {
|
|
243
|
+
url: _card["default"]
|
|
244
|
+
},
|
|
245
|
+
offerName: 'Product Name',
|
|
246
|
+
salesPrice: 10000,
|
|
247
|
+
specialPrice: null,
|
|
248
|
+
marketPrice: 20000,
|
|
249
|
+
salePercent: 500
|
|
250
|
+
}];
|
|
229
251
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
252
|
layout1: {
|
|
231
253
|
w: '100%',
|
|
@@ -572,6 +594,9 @@ function (_super) {
|
|
|
572
594
|
hideTabs = _a.hideTabs,
|
|
573
595
|
contentWidth = _a.contentWidth;
|
|
574
596
|
var products = this.state["products" + tabIndex] || [];
|
|
597
|
+
|
|
598
|
+
var _products = products.length === 0 && (0, _coreUtil.isDesignMode)() ? defaultData : products;
|
|
599
|
+
|
|
575
600
|
var isDivide = groupSource.length <= 3;
|
|
576
601
|
var layout = panelProps.customize.layout.h5Layout;
|
|
577
602
|
|
|
@@ -645,7 +670,7 @@ function (_super) {
|
|
|
645
670
|
})), ['layout1', 'layout2', 'layout3'].includes(layout) ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
646
671
|
key: "macyContainer",
|
|
647
672
|
className: "macyContainer macyContainer_" + panelProps.id
|
|
648
|
-
},
|
|
673
|
+
}, _products.map(function (item) {
|
|
649
674
|
return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
650
675
|
key: item.productId,
|
|
651
676
|
data: item // fixHeight={layout === 'layout3'}
|
|
@@ -669,7 +694,7 @@ function (_super) {
|
|
|
669
694
|
panelProps: panelProps.content,
|
|
670
695
|
showProgress: false
|
|
671
696
|
});
|
|
672
|
-
})), _seeAll.open &&
|
|
697
|
+
})), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
673
698
|
className: "btnSeeAll",
|
|
674
699
|
data: _seeAll
|
|
675
700
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -679,7 +704,7 @@ function (_super) {
|
|
|
679
704
|
})
|
|
680
705
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
681
706
|
className: "scrollProductList"
|
|
682
|
-
},
|
|
707
|
+
}, _products.map(function (item) {
|
|
683
708
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
684
709
|
className: "productCard"
|
|
685
710
|
}, /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
@@ -700,7 +725,7 @@ function (_super) {
|
|
|
700
725
|
panelProps: panelProps.content,
|
|
701
726
|
showProgress: false
|
|
702
727
|
}));
|
|
703
|
-
})), _seeAll.open &&
|
|
728
|
+
})), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
704
729
|
className: "btnSeeAll",
|
|
705
730
|
data: _seeAll
|
|
706
731
|
})));
|
|
@@ -75,72 +75,70 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
75
75
|
mobile: 'transparent'
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
value: '/main/cart'
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
hover: {
|
|
94
|
-
open: false,
|
|
95
|
-
backgroundType: 'enlarge',
|
|
96
|
-
magnification: 1.5,
|
|
97
|
-
pcImgHoverUrl: '',
|
|
98
|
-
h5ImgHoverUrl: ''
|
|
78
|
+
cartIcon: {
|
|
79
|
+
id: (0, _uuid.v4)(),
|
|
80
|
+
open: true,
|
|
81
|
+
type: 'IMAGE',
|
|
82
|
+
content: {
|
|
83
|
+
h5Name: 'name2',
|
|
84
|
+
pcName: 'name2',
|
|
85
|
+
h5ImgSrc: _base.searchCartIcon,
|
|
86
|
+
pcImgSrc: '',
|
|
87
|
+
clickUrl: {
|
|
88
|
+
name: '/main/cart',
|
|
89
|
+
value: '/main/cart'
|
|
99
90
|
}
|
|
100
91
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
92
|
+
hover: {
|
|
93
|
+
open: false,
|
|
94
|
+
backgroundType: 'enlarge',
|
|
95
|
+
magnification: 1.5,
|
|
96
|
+
pcImgHoverUrl: '',
|
|
97
|
+
h5ImgHoverUrl: ''
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
chatbotIcon: {
|
|
101
|
+
id: (0, _uuid.v4)(),
|
|
102
|
+
open: true,
|
|
103
|
+
type: 'IMAGE',
|
|
104
|
+
content: {
|
|
105
|
+
h5Name: 'name2',
|
|
106
|
+
pcName: 'name2',
|
|
107
|
+
h5ImgSrc: _base.searchChatbotIcon,
|
|
108
|
+
pcImgSrc: '',
|
|
109
|
+
clickUrl: {
|
|
110
|
+
name: '/new-chat',
|
|
111
|
+
value: '/new-chat'
|
|
121
112
|
}
|
|
122
113
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
114
|
+
hover: {
|
|
115
|
+
open: false,
|
|
116
|
+
backgroundType: 'enlarge',
|
|
117
|
+
magnification: 1.5,
|
|
118
|
+
pcImgHoverUrl: '',
|
|
119
|
+
h5ImgHoverUrl: ''
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
messageIcon: {
|
|
123
|
+
id: (0, _uuid.v4)(),
|
|
124
|
+
open: true,
|
|
125
|
+
type: 'IMAGE',
|
|
126
|
+
content: {
|
|
127
|
+
h5Name: 'name2',
|
|
128
|
+
pcName: 'name2',
|
|
129
|
+
h5ImgSrc: _base.searchMessageIcon,
|
|
130
|
+
pcImgSrc: '',
|
|
131
|
+
clickUrl: {
|
|
132
|
+
name: '/message-center',
|
|
133
|
+
value: '/message-center'
|
|
143
134
|
}
|
|
135
|
+
},
|
|
136
|
+
hover: {
|
|
137
|
+
open: false,
|
|
138
|
+
backgroundType: 'enlarge',
|
|
139
|
+
magnification: 1.5,
|
|
140
|
+
pcImgHoverUrl: '',
|
|
141
|
+
h5ImgHoverUrl: ''
|
|
144
142
|
}
|
|
145
143
|
}
|
|
146
144
|
},
|
|
@@ -147,10 +147,9 @@ function (_super) {
|
|
|
147
147
|
SearchBannerMobile.prototype.render = function () {
|
|
148
148
|
var _this = this;
|
|
149
149
|
|
|
150
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
150
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
151
151
|
|
|
152
152
|
var data = this.props.data;
|
|
153
|
-
console.log('data', data);
|
|
154
153
|
var GAData = (0, _commonUtil.getGAData)(data);
|
|
155
154
|
var carouseIndex = this.state.carouseIndex;
|
|
156
155
|
var autoplay = data.setting.autoplay.open;
|
|
@@ -179,16 +178,16 @@ function (_super) {
|
|
|
179
178
|
color: (_g = (_f = data.content.box) === null || _f === void 0 ? void 0 : _f.color) === null || _g === void 0 ? void 0 : _g.mobile,
|
|
180
179
|
size: (0, _commonUtil.convertToRem)(20),
|
|
181
180
|
type: "icon-search2"
|
|
182
|
-
})),
|
|
181
|
+
})), data.content && ((_h = data.content.cartIcon) === null || _h === void 0 ? void 0 : _h.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
183
182
|
className: "right-icon",
|
|
184
|
-
data:
|
|
185
|
-
}),
|
|
183
|
+
data: data.content.cartIcon
|
|
184
|
+
}), data.content && ((_j = data.content.chatbotIcon) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
186
185
|
className: "right-icon",
|
|
187
|
-
data:
|
|
188
|
-
}),
|
|
186
|
+
data: data.content.chatbotIcon
|
|
187
|
+
}), data.content && ((_k = data.content.messageIcon) === null || _k === void 0 ? void 0 : _k.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
189
188
|
className: "right-icon",
|
|
190
|
-
data:
|
|
191
|
-
})), data.content && ((
|
|
189
|
+
data: data.content.messageIcon
|
|
190
|
+
})), data.content && ((_l = data.content.logo) === null || _l === void 0 ? void 0 : _l.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
192
191
|
className: "logo",
|
|
193
192
|
onClick: function onClick() {
|
|
194
193
|
var _a, _b;
|
|
@@ -65,49 +65,13 @@ function (_super) {
|
|
|
65
65
|
_this.setState({});
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
_this.getIconPanel = function () {
|
|
69
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
70
|
-
|
|
71
|
-
var panelProps = _this.props.panelProps;
|
|
72
|
-
var source = [{
|
|
73
|
-
key: (_b = (_a = panelProps.icons) === null || _a === void 0 ? void 0 : _a.cartIcon) === null || _b === void 0 ? void 0 : _b.id,
|
|
74
|
-
name: (0, _locale.i18n)('CART_ICON'),
|
|
75
|
-
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
76
|
-
data: (_c = panelProps.icons) === null || _c === void 0 ? void 0 : _c.cartIcon
|
|
77
|
-
}),
|
|
78
|
-
metaOption: (_d = panelProps.icons) === null || _d === void 0 ? void 0 : _d.cartIcon
|
|
79
|
-
}, {
|
|
80
|
-
key: (_f = (_e = panelProps.icons) === null || _e === void 0 ? void 0 : _e.chatbotIcon) === null || _f === void 0 ? void 0 : _f.id,
|
|
81
|
-
name: (0, _locale.i18n)('CHATBOT_ICON'),
|
|
82
|
-
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
83
|
-
data: (_g = panelProps.icons) === null || _g === void 0 ? void 0 : _g.chatbotIcon
|
|
84
|
-
}),
|
|
85
|
-
metaOption: (_h = panelProps.icons) === null || _h === void 0 ? void 0 : _h.chatbotIcon
|
|
86
|
-
}, {
|
|
87
|
-
key: (_k = (_j = panelProps.icons) === null || _j === void 0 ? void 0 : _j.messageIcon) === null || _k === void 0 ? void 0 : _k.id,
|
|
88
|
-
name: (0, _locale.i18n)('MESSAGE_ICON'),
|
|
89
|
-
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
90
|
-
data: (_l = panelProps.icons) === null || _l === void 0 ? void 0 : _l.messageIcon
|
|
91
|
-
}),
|
|
92
|
-
metaOption: (_m = panelProps.icons) === null || _m === void 0 ? void 0 : _m.messageIcon
|
|
93
|
-
}];
|
|
94
|
-
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
95
|
-
headerSize: "middle",
|
|
96
|
-
onRefresh: function onRefresh() {
|
|
97
|
-
return (0, _coreUtil.renderPreview)();
|
|
98
|
-
},
|
|
99
|
-
source: source,
|
|
100
|
-
type: "switch"
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
|
|
104
68
|
return _this;
|
|
105
69
|
}
|
|
106
70
|
|
|
107
71
|
SearchBarConfigContent.prototype.render = function () {
|
|
108
72
|
var _this = this;
|
|
109
73
|
|
|
110
|
-
var _a, _b, _c, _d;
|
|
74
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
111
75
|
|
|
112
76
|
var panelProps = this.props.panelProps;
|
|
113
77
|
var source = [{
|
|
@@ -158,10 +122,26 @@ function (_super) {
|
|
|
158
122
|
metaOption: panelProps.box,
|
|
159
123
|
toggleType: 'switch'
|
|
160
124
|
}, {
|
|
161
|
-
key:
|
|
162
|
-
name: (0, _locale.i18n)('
|
|
163
|
-
|
|
164
|
-
|
|
125
|
+
key: (_e = panelProps.cartIcon) === null || _e === void 0 ? void 0 : _e.id,
|
|
126
|
+
name: (0, _locale.i18n)('CART_ICON'),
|
|
127
|
+
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
128
|
+
data: panelProps.cartIcon
|
|
129
|
+
}),
|
|
130
|
+
metaOption: panelProps.cartIcon
|
|
131
|
+
}, {
|
|
132
|
+
key: (_f = panelProps.chatbotIcon) === null || _f === void 0 ? void 0 : _f.id,
|
|
133
|
+
name: (0, _locale.i18n)('CHATBOT_ICON'),
|
|
134
|
+
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
135
|
+
data: panelProps.chatbotIcon
|
|
136
|
+
}),
|
|
137
|
+
metaOption: panelProps.chatbotIcon
|
|
138
|
+
}, {
|
|
139
|
+
key: (_g = panelProps.messageIcon) === null || _g === void 0 ? void 0 : _g.id,
|
|
140
|
+
name: (0, _locale.i18n)('MESSAGE_ICON'),
|
|
141
|
+
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
142
|
+
data: panelProps.messageIcon
|
|
143
|
+
}),
|
|
144
|
+
metaOption: panelProps.messageIcon
|
|
165
145
|
}];
|
|
166
146
|
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
167
147
|
headerSize: "middle",
|