@conecli/cone-render 0.10.1-shop3.21 → 0.10.1-shop3.22

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.
@@ -1 +1 @@
1
- import React, { useMemo } from 'react';
2
1
  'https://m.360buyimg.com/imagetools/jfs/t1/170321/15/27425/230/61c1839aE0514462b/0b4d278fe18d91bb.png';
3
2
  'https://m.360buyimg.com/imagetools/jfs/t1/94671/2/26921/257/623d630aE681512e3/ded2e640c4a0a7ea.png';
4
3
  const getLogInfo = ReportContainerData.getReportClickFloorInfo(
5
4
  floorData,
6
5
  dataDefines,
7
6
  {
8
7
  clickArea: `title`,
9
8
  skuid: ``,
10
9
  tagList: [],
11
10
  labelList: [],
12
11
  pos: ``,
13
12
  },
14
13
  {
15
14
  la_p: ``,
16
15
  },
17
16
  );
18
17
  if (config) {
19
18
  JumpEventReport.jdJumpConfigUrl(config, {
20
19
  eventId: `TerminatorNew_${floorData.floorExtInfo?.moduleFlag}_Click`,
21
20
  jsonParam: getLogInfo,
22
21
  });
23
22
  }
24
23
  dataDefines,
25
24
  floorData,
26
25
  oldModuleFloorTitle,
27
26
  titleText,
28
27
  titleMoreClick,
29
28
  additionalRenderContent,
30
29
  customClassName,
31
30
  const floorTitleDataDefine = dataDefines
32
31
  ? dataDefines.filter((item) => {
33
32
  return item.type === 'floorTitle';
34
33
  })
35
34
  : [];
36
35
  const floorTitle = oldModuleFloorTitle
37
36
  ? oldModuleFloorTitle
38
37
  : (floorTitleDataDefine[0]?.nodeText?.data ?? {});
39
38
  const { detail, imageUrl, text, textBackground, type: floorTitleType = 1, subText } = floorTitle;
40
39
  if (floorTitleType === 1) {
41
40
  return null;
42
41
  }
43
42
  const bgMap = {
44
43
  '1': null,
45
44
  '2': textBackground || '',
46
45
  '3': imageUrl || '',
47
46
  };
48
47
  const useFloorTitleBgImg = bgMap[floorTitleType];
49
48
  return (
50
49
  <View
51
50
  className={classNames(styles['d-root'], customClassName)}
52
51
  onClick={floorTitleType === 3 ? gotoMPage.bind(this, dataDefines, floorData, detail) : {}}
53
52
  >
54
53
  <View
55
54
  className={classNames(styles['d-img'], {
56
55
  [styles['d-img-bg']]: useFloorTitleBgImg,
57
56
  })}
58
57
  style={useFloorTitleBgImg ? { backgroundImage: `url(${useFloorTitleBgImg})` } : {}}
59
58
  />
60
59
  <View
61
60
  className={classNames(
62
61
  styles['d-content-wrap'],
63
62
  floorTitleType === 2 && textBackground ? styles['d-has-title-bg'] : null,
64
63
  floorTitleType === 3 ? styles['d-type-is-img'] : null,
65
64
  useFloorTitleBgImg ? styles['d-content-wrap-for-img'] : null,
66
65
  )}
67
66
  >
68
67
  <View className={classNames(styles['d-content'], 'd-content')}>
69
68
  <View className={styles['d-content-left']}>
70
69
  {floorTitleType === 2 && text ? (
71
70
  <Text className={classNames(styles['d-text'], 'text-ellipsis', 'd-text')}>
72
71
  {titleText ? titleText : text}
73
72
  </Text>
74
73
  ) : null}
75
74
  {floorTitleType === 2 && subText
76
75
  ? [
77
76
  textBackground ? <View key={1} className={styles['d-vertical-line']} /> : null,
78
77
  <Text key={2} className={styles['d-sub-text']}>
79
78
  {subText}
80
79
  </Text>,
81
80
  ]
82
81
  : null}
83
82
  {additionalRenderContent ? additionalRenderContent(textBackground) : null}
84
83
  </View>
85
84
  <View className={styles['d-content-right']}>
86
85
  {titleMoreClick ? (
87
86
  <View
88
87
  className={classNames(styles['d-title-more'], 'd-title-more')}
89
88
  onClick={(e) => {
90
89
  typeof titleMoreClick === 'function' && titleMoreClick(e);
91
90
  e.stopPropagation();
92
91
  }}
93
92
  >
94
93
  <Text
95
94
  className={classNames(
96
95
  styles['d-title-more-text'],
97
96
  textBackground || floorTitleType === 3
98
97
  ? styles['d-title-more-text-white']
99
98
  : null,
100
99
  )}
101
100
  >
102
101
  更多
103
102
  </Text>
104
103
  <Image
105
104
  className={styles['d-title-more-arrow']}
106
105
  src={textBackground || floorTitleType === 3 ? ICON_ARROW_WHITE : ICON_ARROW_GRAY}
107
106
  mode="widthFix"
108
107
  />
109
108
  </View>
110
109
  ) : null}
111
110
  </View>
112
111
  </View>
113
112
  </View>
114
113
  </View>
115
114
  );
116
115
  return useMemo(() => {
117
116
  return <CommonFloorHeader {...props} />;
118
117
  }, [props.key]);
119
118
  titleText: null,
120
119
  titleMoreClick: null,
121
120
  additionalRenderContent: null,
122
121
  customClassName: null,
123
122
  key: 1,
123
+ import React, { useMemo } from 'react';
124
124
  'https://m.360buyimg.com/imagetools/jfs/t1/170321/15/27425/230/61c1839aE0514462b/0b4d278fe18d91bb.png';
125
125
  'https://m.360buyimg.com/imagetools/jfs/t1/94671/2/26921/257/623d630aE681512e3/ded2e640c4a0a7ea.png';
126
126
  const getLogInfo = ReportContainerData.getReportClickFloorInfo(
127
127
  floorData,
128
128
  dataDefines,
129
129
  {
130
130
  clickArea: `title`,
131
131
  skuid: ``,
132
132
  tagList: [],
133
133
  labelList: [],
134
134
  pos: ``,
135
135
  },
136
136
  {
137
137
  la_p: ``,
138
138
  },
139
139
  );
140
140
  if (config) {
141
141
  JumpEventReport.jdJumpConfigUrl(config, {
142
142
  eventId: `TerminatorNew_${floorData.floorExtInfo?.moduleFlag}_Click`,
143
143
  jsonParam: getLogInfo,
144
144
  });
145
145
  }
146
146
  dataDefines,
147
147
  floorData,
148
148
  oldModuleFloorTitle,
149
149
  titleText,
150
150
  titleMoreClick,
151
151
  additionalRenderContent,
152
152
  customClassName,
153
153
  const floorTitleDataDefine = dataDefines
154
154
  ? dataDefines.filter((item) => {
155
155
  return item.type === 'floorTitle';
156
156
  })
157
157
  : [];
158
158
  const floorTitle = oldModuleFloorTitle
159
159
  ? oldModuleFloorTitle
160
160
  : floorTitleDataDefine[0]?.nodeText?.data ?? {};
161
161
  const { detail, imageUrl, text, textBackground, type: floorTitleType = 1, subText } = floorTitle;
162
162
  if (floorTitleType === 1) {
163
163
  return null;
164
164
  }
165
165
  const bgMap = {
166
166
  '1': null,
167
167
  '2': textBackground || '',
168
168
  '3': imageUrl || '',
169
169
  };
170
170
  const useFloorTitleBgImg = bgMap[floorTitleType];
171
171
  return (
172
172
  <View
173
173
  className={classNames(styles['d-root'], customClassName)}
174
174
  onClick={floorTitleType === 3 ? gotoMPage.bind(this, dataDefines, floorData, detail) : {}}
175
175
  >
176
176
  <View
177
177
  className={classNames(styles['d-img'], {
178
178
  [styles['d-img-bg']]: useFloorTitleBgImg,
179
179
  })}
180
180
  style={useFloorTitleBgImg ? { backgroundImage: `url(${useFloorTitleBgImg})` } : {}}
181
181
  />
182
182
  <View
183
183
  className={classNames(
184
184
  styles['d-content-wrap'],
185
185
  floorTitleType === 2 && textBackground ? styles['d-has-title-bg'] : null,
186
186
  floorTitleType === 3 ? styles['d-type-is-img'] : null,
187
187
  useFloorTitleBgImg ? styles['d-content-wrap-for-img'] : null,
188
188
  )}
189
189
  >
190
190
  <View className={classNames(styles['d-content'], 'd-content')}>
191
191
  <View className={styles['d-content-left']}>
192
192
  {floorTitleType === 2 && text ? (
193
193
  <Text className={classNames(styles['d-text'], 'text-ellipsis', 'd-text')}>
194
194
  {titleText ? titleText : text}
195
195
  </Text>
196
196
  ) : null}
197
197
  {floorTitleType === 2 && subText
198
198
  ? [
199
199
  textBackground ? <View key={1} className={styles['d-vertical-line']} /> : null,
200
200
  <Text key={2} className={styles['d-sub-text']}>
201
201
  {subText}
202
202
  </Text>,
203
203
  ]
204
204
  : null}
205
205
  {additionalRenderContent ? additionalRenderContent(textBackground) : null}
206
206
  </View>
207
207
  <View className={styles['d-content-right']}>
208
208
  {titleMoreClick ? (
209
209
  <View
210
210
  className={classNames(styles['d-title-more'], 'd-title-more')}
211
211
  onClick={(e) => {
212
212
  typeof titleMoreClick === 'function' && titleMoreClick(e);
213
213
  e.stopPropagation();
214
214
  }}
215
215
  >
216
216
  <Text
217
217
  className={classNames(
218
218
  styles['d-title-more-text'],
219
219
  textBackground || floorTitleType === 3
220
220
  ? styles['d-title-more-text-white']
221
221
  : null,
222
222
  )}
223
223
  >
224
224
  更多
225
225
  </Text>
226
226
  <Image
227
227
  className={styles['d-title-more-arrow']}
228
228
  src={textBackground || floorTitleType === 3 ? ICON_ARROW_WHITE : ICON_ARROW_GRAY}
229
229
  mode="widthFix"
230
230
  />
231
231
  </View>
232
232
  ) : null}
233
233
  </View>
234
234
  </View>
235
235
  </View>
236
236
  </View>
237
237
  );
238
238
  props = {
239
239
  titleText: null,
240
240
  titleMoreClick: null,
241
241
  additionalRenderContent: null,
242
242
  customClassName: null,
243
243
  key: 1,
244
244
  },
245
245
  return useMemo(() => {
246
246
  return <CommonFloorHeader {...props} />;
247
247
  }, [props.key]);