pb-sxp-ui 1.3.8 → 1.4.0
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/LICENSE +21 -21
- package/README.md +111 -111
- package/dist/index.cjs +166 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +166 -56
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +166 -56
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -1
- package/es/core/components/SxpPageRender/index.d.ts +2 -0
- package/es/core/components/SxpPageRender/index.js +9 -4
- package/es/core/context/SxpDataSourceProvider.d.ts +2 -1
- package/es/core/context/SxpDataSourceProvider.js +22 -15
- package/es/core/hooks/useEventReport.js +9 -16
- package/es/materials/sxp/popup/AppointForm/Form.js +1 -1
- package/es/materials/sxp/popup/AppointForm/index.js +31 -8
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +3 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +19 -5
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +21 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +16 -2
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +21 -0
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +11 -1
- package/lib/core/components/SxpPageRender/index.d.ts +2 -0
- package/lib/core/components/SxpPageRender/index.js +9 -4
- package/lib/core/context/SxpDataSourceProvider.d.ts +2 -1
- package/lib/core/context/SxpDataSourceProvider.js +22 -15
- package/lib/core/hooks/useEventReport.js +9 -16
- package/lib/materials/sxp/popup/AppointForm/Form.js +1 -1
- package/lib/materials/sxp/popup/AppointForm/index.js +30 -7
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +3 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +19 -5
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +21 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +16 -2
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +21 -0
- package/package.json +111 -111
@@ -38,7 +38,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
38
38
|
const [isShowMore, setIsShowMore] = (0, react_1.useState)(false);
|
39
39
|
const [isReload, setIsReload] = (0, react_1.useState)(new Date().getTime());
|
40
40
|
const skipLinkRef = (0, react_1.useRef)(false);
|
41
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList } = (0, hooks_1.useSxpDataSource)();
|
41
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData } = (0, hooks_1.useSxpDataSource)();
|
42
42
|
const { backMainFeed, productView, jumpToWeb } = (0, useEventReport_1.useEventReport)();
|
43
43
|
const isShowFingerTip = (0, react_1.useMemo)(() => {
|
44
44
|
return data.length > 0 && !loading && ((0, localStore_1.getFeUserId)() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
|
@@ -194,8 +194,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
194
194
|
return null;
|
195
195
|
}
|
196
196
|
});
|
197
|
-
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
198
|
-
}, [data, activeIndex, waterFallData, isEditor]);
|
197
|
+
return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
|
198
|
+
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
|
199
199
|
const renderLogo = (0, react_1.useMemo)(() => {
|
200
200
|
var _a, _b, _c, _d;
|
201
201
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
@@ -509,9 +509,14 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
509
509
|
return;
|
510
510
|
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
511
511
|
if (!isLoadMore) {
|
512
|
+
let pageNum = 2;
|
512
513
|
setIsLoadMore(true);
|
513
|
-
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(
|
514
|
+
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
|
515
|
+
var _a;
|
514
516
|
setIsLoadMore(false);
|
517
|
+
if (res && ((_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
518
|
+
pageNum++;
|
519
|
+
}
|
515
520
|
});
|
516
521
|
}
|
517
522
|
}
|
@@ -25,7 +25,7 @@ export interface ISxpDataSourceContext {
|
|
25
25
|
}) => Promise<boolean>;
|
26
26
|
popupDetailData?: RecItemType;
|
27
27
|
setPopupDetailData?: React.Dispatch<React.SetStateAction<any | null>>;
|
28
|
-
loadVideos?: (page: number) => Promise<
|
28
|
+
loadVideos?: (page: number) => Promise<RecommendVideoResultType | undefined>;
|
29
29
|
getRecommendVideos?: (query?: {
|
30
30
|
maxSize?: number;
|
31
31
|
defaultSize?: number;
|
@@ -82,6 +82,7 @@ export interface ISxpDataSourceContext {
|
|
82
82
|
popupCurTimeRef?: any;
|
83
83
|
checkCommodityIndexRef?: any;
|
84
84
|
isEditor?: boolean;
|
85
|
+
isNoMoreData?: boolean;
|
85
86
|
}
|
86
87
|
export declare const SxpDataSourceContext: React.Context<ISxpDataSourceContext>;
|
87
88
|
export interface SxpDataSourceProviderProps {
|
@@ -40,6 +40,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
40
40
|
const [selectTag, setSelectTag] = (0, react_1.useState)(exports.DEFAULT_TAG);
|
41
41
|
const checkCommodityIndexRef = (0, react_1.useRef)(-1);
|
42
42
|
const popupCurTimeRef = (0, react_1.useRef)(null);
|
43
|
+
const [isNoMoreData, setIsNoMoreData] = (0, react_1.useState)(false);
|
43
44
|
const isShowConsent = (0, react_1.useMemo)(() => {
|
44
45
|
var _a, _b, _c, _d;
|
45
46
|
return (((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent;
|
@@ -96,7 +97,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
96
97
|
.catch((err) => Promise.reject(err));
|
97
98
|
}, [bffDataSource]);
|
98
99
|
const getRecommendVideos = (0, react_1.useCallback)((query) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
99
|
-
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
100
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
100
101
|
query = Object.assign(Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` })), { pageNum: query === null || query === void 0 ? void 0 : query.pageNum });
|
101
102
|
if (utmVal) {
|
102
103
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
@@ -106,9 +107,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
106
107
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
107
108
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
108
109
|
}
|
109
|
-
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
110
|
-
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_j = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _j !== void 0 ? _j : 1 });
|
111
|
-
}
|
112
110
|
if (isEditor) {
|
113
111
|
let pageNum = 1;
|
114
112
|
query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
|
@@ -119,15 +117,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
119
117
|
let list = [];
|
120
118
|
let result = null;
|
121
119
|
const recurveRecList = (query) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
122
|
-
var
|
120
|
+
var _t, _u, _v, _w, _x, _y;
|
123
121
|
query.pageNum = pageNum;
|
124
122
|
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
125
123
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
126
124
|
return undefined;
|
127
125
|
}
|
128
126
|
setLoading(false);
|
129
|
-
const isNotNullList = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.every((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
130
127
|
list = list.concat((_w = (_v = (_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.recList) === null || _u === void 0 ? void 0 : _u.filter) === null || _v === void 0 ? void 0 : _v.call(_u, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _w !== void 0 ? _w : []);
|
128
|
+
const isNotNullList = (_y = (_x = result === null || result === void 0 ? void 0 : result.data) === null || _x === void 0 ? void 0 : _x.recList) === null || _y === void 0 ? void 0 : _y.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
131
129
|
if (isNotNullList) {
|
132
130
|
pageNum = pageNum + 1;
|
133
131
|
yield recurveRecList(query);
|
@@ -135,9 +133,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
135
133
|
});
|
136
134
|
yield recurveRecList(query);
|
137
135
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
138
|
-
setCurReqInfo({ rtc: (
|
136
|
+
setCurReqInfo({ rtc: (_j = result === null || result === void 0 ? void 0 : result.data) === null || _j === void 0 ? void 0 : _j.rtc, requestId: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.requestId });
|
139
137
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
140
138
|
}
|
139
|
+
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
140
|
+
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_l = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _l !== void 0 ? _l : 1 });
|
141
|
+
}
|
141
142
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
142
143
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
143
144
|
return undefined;
|
@@ -147,19 +148,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
147
148
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
148
149
|
let list = [];
|
149
150
|
list = list.concat((_q = (_p = (_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.recList) === null || _o === void 0 ? void 0 : _o.filter) === null || _p === void 0 ? void 0 : _p.call(_o, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _q !== void 0 ? _q : []);
|
151
|
+
const isNotNullList = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
152
|
+
if (!isNotNullList) {
|
153
|
+
setIsNoMoreData(true);
|
154
|
+
}
|
150
155
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
151
156
|
}
|
152
157
|
return result === null || result === void 0 ? void 0 : result.data;
|
153
158
|
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
|
154
159
|
const loadVideos = (0, react_1.useCallback)((pageNum) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
155
|
-
var
|
160
|
+
var _z, _0, _1, _2;
|
156
161
|
if (rtcList.length <= 0) {
|
157
162
|
return;
|
158
163
|
}
|
159
164
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
160
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
165
|
+
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_z = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _z === void 0 ? void 0 : _z.itemId) && { productFilter: (_0 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _0 === void 0 ? void 0 : _0.itemId })), (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _1 === void 0 ? void 0 : _1.itemId) && { contentFilter: (_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _2 === void 0 ? void 0 : _2.itemId })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
|
161
166
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
162
167
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
168
|
+
return data;
|
163
169
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
164
170
|
const bffEventReport = (0, react_1.useCallback)(({ userInfo, eventInfo }) => {
|
165
171
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
@@ -199,7 +205,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
199
205
|
eventName,
|
200
206
|
actionSource,
|
201
207
|
eventSourceUrl,
|
202
|
-
userData: Object.assign(Object.assign(Object.assign({ externalId: fakeUserId }, (fbclid && { fbc: `fb.2.${new Date().getTime()}.${fbclid}` })), ((0, tool_1.getCookie)('_fbp') && { fbp: `fb.2.${new Date().getTime()}.${(0, tool_1.getCookie)('_fbp')}` })), {
|
208
|
+
userData: Object.assign(Object.assign(Object.assign({ externalId: fakeUserId }, (fbclid && { fbc: `fb.2.${new Date().getTime()}.${fbclid}` })), ((0, tool_1.getCookie)('_fbp') && { fbp: `fb.2.${new Date().getTime()}.${(0, tool_1.getCookie)('_fbp')}` })), { clientUserAgent: (_d = (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent) !== null && _d !== void 0 ? _d : '' })
|
203
209
|
},
|
204
210
|
type: 'beacon'
|
205
211
|
});
|
@@ -217,17 +223,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
217
223
|
return res === null || res === void 0 ? void 0 : res.success;
|
218
224
|
}), [bffFetch]);
|
219
225
|
const bffGetTagList = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
220
|
-
var
|
226
|
+
var _3, _4, _5, _6, _7;
|
221
227
|
if (!utmVal || !isShowTag)
|
222
228
|
return;
|
223
229
|
try {
|
224
|
-
const val = (
|
230
|
+
const val = (_5 = (_4 = (_3 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _3 === void 0 ? void 0 : _3.filter((val) => {
|
225
231
|
var _a, _b;
|
226
232
|
const key = val.split('=')[0];
|
227
233
|
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
228
|
-
})) === null ||
|
234
|
+
})) === null || _4 === void 0 ? void 0 : _4.join('&')) !== null && _5 !== void 0 ? _5 : '';
|
229
235
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
230
|
-
setTagList((
|
236
|
+
setTagList((_7 = (_6 = result === null || result === void 0 ? void 0 : result.data) === null || _6 === void 0 ? void 0 : _6.tags) !== null && _7 !== void 0 ? _7 : []);
|
231
237
|
}
|
232
238
|
catch (e) {
|
233
239
|
console.log('e', e);
|
@@ -374,7 +380,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
374
380
|
globalConfig,
|
375
381
|
popupCurTimeRef,
|
376
382
|
checkCommodityIndexRef,
|
377
|
-
isEditor
|
383
|
+
isEditor,
|
384
|
+
isNoMoreData
|
378
385
|
} }, isShowConsent ? (react_1.default.createElement(Consent_1.default, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (render({
|
379
386
|
rtcList,
|
380
387
|
mutateLike: bffMutateLike,
|
@@ -7,7 +7,7 @@ const SxpDataSourceProvider_1 = require("../context/SxpDataSourceProvider");
|
|
7
7
|
function useEventReport() {
|
8
8
|
const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = (0, useSxpDataSource_1.useSxpDataSource)();
|
9
9
|
const jumpToWeb = (0, react_1.useCallback)((data, product, cta, position, traceInfo) => {
|
10
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
10
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
|
11
11
|
let fromKName = '';
|
12
12
|
if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
|
13
13
|
fromKName = 'pdpPage';
|
@@ -25,22 +25,15 @@ function useEventReport() {
|
|
25
25
|
fromKName = 'productPage';
|
26
26
|
}
|
27
27
|
const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = data === null || data === void 0 ? void 0 : data.product) === null || _q === void 0 ? void 0 : _q.tags;
|
28
|
+
let contentFormat = null;
|
29
|
+
if ((_r = data === null || data === void 0 ? void 0 : data.video) === null || _r === void 0 ? void 0 : _r.url) {
|
30
|
+
contentFormat = 'video';
|
31
|
+
}
|
32
|
+
else if (((_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.imgUrls) && ((_u = (_t = data === null || data === void 0 ? void 0 : data.video) === null || _t === void 0 ? void 0 : _t.imgUrls) === null || _u === void 0 ? void 0 : _u.length)) {
|
33
|
+
contentFormat = 'image';
|
34
|
+
}
|
28
35
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
29
|
-
eventInfo: {
|
30
|
-
eventSubject: 'jumpToWeb',
|
31
|
-
eventDescription: 'User jumped to website',
|
32
|
-
productId: (_r = product === null || product === void 0 ? void 0 : product.itemId) !== null && _r !== void 0 ? _r : '',
|
33
|
-
productName: (_s = product === null || product === void 0 ? void 0 : product.title) !== null && _s !== void 0 ? _s : '',
|
34
|
-
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
35
|
-
productCollection: (_t = product === null || product === void 0 ? void 0 : product.collection) !== null && _t !== void 0 ? _t : '',
|
36
|
-
fromKName,
|
37
|
-
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
38
|
-
contentTags: contentTags ? JSON.stringify(contentTags) : '',
|
39
|
-
position: position + '',
|
40
|
-
contentId: (_v = (_u = data === null || data === void 0 ? void 0 : data.video) === null || _u === void 0 ? void 0 : _u.itemId) !== null && _v !== void 0 ? _v : '',
|
41
|
-
ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
|
42
|
-
traceInfo: (_9 = (_6 = (_4 = (_0 = (_x = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProduct) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = data === null || data === void 0 ? void 0 : data.video) === null || _1 === void 0 ? void 0 : _1.bindProducts) === null || _2 === void 0 ? void 0 : _2[0]) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_5 = data === null || data === void 0 ? void 0 : data.product) === null || _5 === void 0 ? void 0 : _5.traceInfo) !== null && _6 !== void 0 ? _6 : (_8 = (_7 = data === null || data === void 0 ? void 0 : data.video) === null || _7 === void 0 ? void 0 : _7.bindCta) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : ''
|
43
|
-
}
|
36
|
+
eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', ctatId: (_0 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _0 !== void 0 ? _0 : '', traceInfo: (_13 = (_10 = (_8 = (_4 = (_1 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _1 !== void 0 ? _1 : (_3 = (_2 = data === null || data === void 0 ? void 0 : data.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProducts) === null || _6 === void 0 ? void 0 : _6[0]) === null || _7 === void 0 ? void 0 : _7.traceInfo) !== null && _8 !== void 0 ? _8 : (_9 = data === null || data === void 0 ? void 0 : data.product) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = data === null || data === void 0 ? void 0 : data.video) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '' }, (contentFormat && { contentFormat }))
|
44
37
|
});
|
45
38
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
46
39
|
const productView = (0, react_1.useCallback)((data, product, cta, viewTime, position) => {
|
@@ -6,6 +6,6 @@ const react_2 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const Form = ({ layout, columns, onChange }) => {
|
7
7
|
return (react_2.default.createElement(react_2.default.Fragment, null, columns === null || columns === void 0 ? void 0 : columns.map((item, index) => (react_2.default.createElement("div", { key: index, className: 'pb-appoint-form-container-item', style: { flexDirection: layout === 'horizontal' ? 'row' : 'column' } },
|
8
8
|
layout !== 'inline' && react_2.default.createElement("label", { className: 'pb-appoint-form-container-label' }, item === null || item === void 0 ? void 0 : item.title),
|
9
|
-
(item === null || item === void 0 ? void 0 : item.valueType) === 'text' && (react_2.default.createElement("input", Object.assign({ className: 'pb-appoint-form-container-input', type: 'text', placeholder: layout === 'inline' ? item === null || item === void 0 ? void 0 : item.title : '请输入', name: item === null || item === void 0 ? void 0 : item.dataIndex }, (onChange && { onChange
|
9
|
+
(item === null || item === void 0 ? void 0 : item.valueType) === 'text' && (react_2.default.createElement("input", Object.assign({ className: 'pb-appoint-form-container-input', type: 'text', placeholder: layout === 'inline' ? item === null || item === void 0 ? void 0 : item.title : '请输入', name: item === null || item === void 0 ? void 0 : item.dataIndex }, (onChange && { onChange })))))))));
|
10
10
|
};
|
11
11
|
exports.default = (0, react_1.memo)(Form);
|
@@ -10,10 +10,13 @@ const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
|
10
10
|
const tool_1 = require("../../../../core/utils/tool");
|
11
11
|
const Form_1 = tslib_1.__importDefault(require("./Form"));
|
12
12
|
const AppointForm = (_a) => {
|
13
|
+
var _b, _c;
|
13
14
|
var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType = 'inline', isExternalLink, isPopup, onClick, onClose, submitButtonStyle } = _a, props = tslib_1.__rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose", "submitButtonStyle"]);
|
14
15
|
const { submitForm, popupDetailData } = (0, hooks_1.useSxpDataSource)();
|
15
16
|
const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
|
16
17
|
const [loading, setLoading] = (0, react_1.useState)(false);
|
18
|
+
const [formData, setFormData] = (0, react_1.useState)({});
|
19
|
+
const [marginTop, setMarginTop] = (0, react_1.useState)(0);
|
17
20
|
const defaultColumns = (0, react_1.useMemo)(() => [
|
18
21
|
{
|
19
22
|
title: '',
|
@@ -40,7 +43,7 @@ const AppointForm = (_a) => {
|
|
40
43
|
key: '4'
|
41
44
|
}
|
42
45
|
], []);
|
43
|
-
const
|
46
|
+
const originalHeight = ((_b = document === null || document === void 0 ? void 0 : document.documentElement) === null || _b === void 0 ? void 0 : _b.clientHeight) || ((_c = document === null || document === void 0 ? void 0 : document.body) === null || _c === void 0 ? void 0 : _c.clientHeight);
|
44
47
|
const columnsData = (0, react_1.useMemo)(() => {
|
45
48
|
return (0, lodash_1.cloneDeep)(columns) || defaultColumns;
|
46
49
|
}, [columns, defaultColumns]);
|
@@ -49,17 +52,17 @@ const AppointForm = (_a) => {
|
|
49
52
|
setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
|
50
53
|
}, [formData]);
|
51
54
|
const handleSubmit = (0, lodash_1.debounce)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
52
|
-
var
|
55
|
+
var _d, _e, _f, _g, _h;
|
53
56
|
const vals = formData;
|
54
57
|
if (!vals)
|
55
58
|
return;
|
56
|
-
const arr = (
|
59
|
+
const arr = (_e = (_d = Object.keys(vals)) === null || _d === void 0 ? void 0 : _d.map((key) => {
|
57
60
|
var _a;
|
58
61
|
return ({
|
59
62
|
name: key,
|
60
63
|
value: (_a = vals[key]) !== null && _a !== void 0 ? _a : ''
|
61
64
|
});
|
62
|
-
})) === null ||
|
65
|
+
})) === null || _e === void 0 ? void 0 : _e.filter((item) => item === null || item === void 0 ? void 0 : item.value);
|
63
66
|
if (!arr || !(arr === null || arr === void 0 ? void 0 : arr.length))
|
64
67
|
return;
|
65
68
|
setLoading(true);
|
@@ -68,8 +71,8 @@ const AppointForm = (_a) => {
|
|
68
71
|
if (res) {
|
69
72
|
if (isExternalLink) {
|
70
73
|
const data = popupDetailData;
|
71
|
-
const product = (
|
72
|
-
const cta = (
|
74
|
+
const product = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
|
75
|
+
const cta = (_h = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.bindCta;
|
73
76
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
74
77
|
jumpToWeb(data, product, cta, position);
|
75
78
|
}
|
@@ -79,11 +82,31 @@ const AppointForm = (_a) => {
|
|
79
82
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
80
83
|
}
|
81
84
|
}), 1000);
|
85
|
+
(0, react_1.useEffect)(() => {
|
86
|
+
const handleScroll = () => {
|
87
|
+
var _a, _b;
|
88
|
+
const userAgent = navigator.userAgent;
|
89
|
+
const isAndroid = userAgent.toLowerCase().includes('android');
|
90
|
+
if (!isAndroid)
|
91
|
+
return;
|
92
|
+
const resizeHeight = ((_a = document === null || document === void 0 ? void 0 : document.documentElement) === null || _a === void 0 ? void 0 : _a.clientHeight) || ((_b = document === null || document === void 0 ? void 0 : document.body) === null || _b === void 0 ? void 0 : _b.clientHeight);
|
93
|
+
if (resizeHeight < originalHeight) {
|
94
|
+
setMarginTop(50);
|
95
|
+
}
|
96
|
+
else {
|
97
|
+
setMarginTop(0);
|
98
|
+
}
|
99
|
+
};
|
100
|
+
window.addEventListener('resize', handleScroll);
|
101
|
+
return () => {
|
102
|
+
window.removeEventListener('resize', handleScroll);
|
103
|
+
};
|
104
|
+
}, []);
|
82
105
|
return (react_1.default.createElement("div", { className: 'pb-appoint-form' },
|
83
106
|
react_1.default.createElement("div", { className: `pb-appoint-form-title ${(0, css_1.css)(Object.assign({}, textStyle))}`, dangerouslySetInnerHTML: {
|
84
107
|
__html: (0, tool_1.setFontForText)(title, textStyle)
|
85
108
|
} }),
|
86
|
-
react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign({}, style)) }, props),
|
109
|
+
react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign(Object.assign({}, style), { marginTop })) }, props),
|
87
110
|
react_1.default.createElement("div", { className: 'pb-appoint-form-container' },
|
88
111
|
react_1.default.createElement(Form_1.default, { columns: columnsData, layout: layoutType, onChange: handleChange }))),
|
89
112
|
react_1.default.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
@@ -21,6 +21,9 @@ export interface ICommodityDetailProps {
|
|
21
21
|
dotsAlign: 'left' | 'center' | 'right';
|
22
22
|
delay: number;
|
23
23
|
translateY?: number;
|
24
|
+
dotsBgColor?: string;
|
25
|
+
dotsActiveColor?: string;
|
26
|
+
dotsMarginBottom?: number;
|
24
27
|
};
|
25
28
|
commodityStyles?: {
|
26
29
|
title: CSSProperties;
|
@@ -93,10 +93,10 @@ const CommodityDetail = (_a) => {
|
|
93
93
|
__html: (0, tool_1.setFontForText)((_c = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _c !== void 0 ? _c : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
|
94
94
|
} }),
|
95
95
|
react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
96
|
-
react_1.default.createElement(ExpandableText_1.default, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_d = product === null || product === void 0 ? void 0 : product.info) !== null && _d !== void 0 ? _d : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
97
|
-
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
98
|
-
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
99
|
-
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
96
|
+
react_1.default.createElement(ExpandableText_1.default, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_d = product === null || product === void 0 ? void 0 : product.info) !== null && _d !== void 0 ? _d : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
97
|
+
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
98
|
+
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
99
|
+
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
100
100
|
18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
|
101
101
|
};
|
102
102
|
const renderBtn = () => {
|
@@ -145,7 +145,21 @@ const CommodityDetail = (_a) => {
|
|
145
145
|
clickableClass: getDotsAlign
|
146
146
|
}, loop: true, autoplay: {
|
147
147
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
148
|
-
}, ref: ref },
|
148
|
+
}, ref: ref, className: (0, css_1.css)(Object.assign(Object.assign(Object.assign({}, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) && {
|
149
|
+
'.swiper-pagination': {
|
150
|
+
bottom: swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom
|
151
|
+
}
|
152
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
|
153
|
+
'.swiper-pagination-bullet': {
|
154
|
+
backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
|
155
|
+
opacity: 1
|
156
|
+
}
|
157
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
|
158
|
+
'.swipe-item-active-bullet': {
|
159
|
+
backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
|
160
|
+
opacity: 1
|
161
|
+
}
|
162
|
+
}))) },
|
149
163
|
react_1.default.createElement(react_1.default.Fragment, null, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
|
150
164
|
var _a;
|
151
165
|
return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
|
@@ -232,5 +232,18 @@ declare const _default: ({
|
|
232
232
|
name: string[];
|
233
233
|
text?: undefined;
|
234
234
|
})[];
|
235
|
+
} | {
|
236
|
+
title: string;
|
237
|
+
child: ({
|
238
|
+
label: string;
|
239
|
+
name: string[];
|
240
|
+
type: string;
|
241
|
+
addonAfter?: undefined;
|
242
|
+
} | {
|
243
|
+
label: string;
|
244
|
+
name: string[];
|
245
|
+
type: string;
|
246
|
+
addonAfter: string;
|
247
|
+
})[];
|
235
248
|
})[];
|
236
249
|
export default _default;
|
@@ -328,5 +328,26 @@ exports.default = [
|
|
328
328
|
name: ['props', 'iframeBgColor']
|
329
329
|
}
|
330
330
|
]
|
331
|
+
},
|
332
|
+
{
|
333
|
+
title: '轮播指示器',
|
334
|
+
child: [
|
335
|
+
{
|
336
|
+
label: '背景色',
|
337
|
+
name: ['props', 'swiper', 'dotsBgColor'],
|
338
|
+
type: 'Color'
|
339
|
+
},
|
340
|
+
{
|
341
|
+
label: '选中色',
|
342
|
+
name: ['props', 'swiper', 'dotsActiveColor'],
|
343
|
+
type: 'Color'
|
344
|
+
},
|
345
|
+
{
|
346
|
+
label: '底边距',
|
347
|
+
name: ['props', 'swiper', 'dotsMarginBottom'],
|
348
|
+
type: 'Number',
|
349
|
+
addonAfter: 'px'
|
350
|
+
}
|
351
|
+
]
|
331
352
|
}
|
332
353
|
];
|
@@ -21,6 +21,9 @@ export interface ICommodityDetailDiroNewProps {
|
|
21
21
|
dotsAlign: 'left' | 'center' | 'right';
|
22
22
|
delay: number;
|
23
23
|
translateY?: number;
|
24
|
+
dotsBgColor?: string;
|
25
|
+
dotsActiveColor?: string;
|
26
|
+
dotsMarginBottom?: number;
|
24
27
|
};
|
25
28
|
commodityStyles?: {
|
26
29
|
title: CSSProperties;
|
@@ -87,7 +87,7 @@ const CommodityDetailDiroNew = (_a) => {
|
|
87
87
|
const productInfoText = ({ isPost }) => {
|
88
88
|
return (react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
89
89
|
react_1.default.createElement(ExpandableText_1.default, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
|
90
|
-
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
90
|
+
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
91
91
|
Made in Italy` })));
|
92
92
|
};
|
93
93
|
const getStyle = (0, react_1.useCallback)((style) => {
|
@@ -129,7 +129,21 @@ Made in Italy` })));
|
|
129
129
|
clickableClass: getDotsAlign
|
130
130
|
}, loop: true, autoplay: {
|
131
131
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
132
|
-
}, ref: ref
|
132
|
+
}, ref: ref, className: (0, css_1.css)(Object.assign(Object.assign(Object.assign({}, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) && {
|
133
|
+
'.swiper-pagination': {
|
134
|
+
bottom: swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom
|
135
|
+
}
|
136
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
|
137
|
+
'.swiper-pagination-bullet': {
|
138
|
+
backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
|
139
|
+
opacity: 1
|
140
|
+
}
|
141
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
|
142
|
+
'.swipe-item-active-bullet': {
|
143
|
+
backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
|
144
|
+
opacity: 1
|
145
|
+
}
|
146
|
+
}))) }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
|
133
147
|
var _a;
|
134
148
|
return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
|
135
149
|
react_1.default.createElement("div", { style: {
|
@@ -220,5 +220,18 @@ declare const _default: ({
|
|
220
220
|
name: string[];
|
221
221
|
text?: undefined;
|
222
222
|
})[];
|
223
|
+
} | {
|
224
|
+
title: string;
|
225
|
+
child: ({
|
226
|
+
label: string;
|
227
|
+
name: string[];
|
228
|
+
type: string;
|
229
|
+
addonAfter?: undefined;
|
230
|
+
} | {
|
231
|
+
label: string;
|
232
|
+
name: string[];
|
233
|
+
type: string;
|
234
|
+
addonAfter: string;
|
235
|
+
})[];
|
223
236
|
})[];
|
224
237
|
export default _default;
|
@@ -311,5 +311,26 @@ exports.default = [
|
|
311
311
|
name: ['props', 'iframeBgColor']
|
312
312
|
}
|
313
313
|
]
|
314
|
+
},
|
315
|
+
{
|
316
|
+
title: '轮播指示器',
|
317
|
+
child: [
|
318
|
+
{
|
319
|
+
label: '背景色',
|
320
|
+
name: ['props', 'swiper', 'dotsBgColor'],
|
321
|
+
type: 'Color'
|
322
|
+
},
|
323
|
+
{
|
324
|
+
label: '选中色',
|
325
|
+
name: ['props', 'swiper', 'dotsActiveColor'],
|
326
|
+
type: 'Color'
|
327
|
+
},
|
328
|
+
{
|
329
|
+
label: '底边距',
|
330
|
+
name: ['props', 'swiper', 'dotsMarginBottom'],
|
331
|
+
type: 'Number',
|
332
|
+
addonAfter: 'px'
|
333
|
+
}
|
334
|
+
]
|
314
335
|
}
|
315
336
|
];
|