@conecli/cone-render 0.10.1-shop3.121 → 0.10.1-shop3.123

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, { useEffect, useMemo, useState } from 'react';
2
1
  const getThisLeGaoTagKey = `${tagId}-${tagText}}`;
3
2
  const getLeGaoTagCacheNode = shopLeGaoTagNodeMap.get(getThisLeGaoTagKey) || false;
4
3
  return getLeGaoTagCacheNode
5
4
  ? getLeGaoTagCacheNode
6
5
  : useMemo(() => {
7
6
  const createCanVasTag = (
8
7
  <canvas-tag
9
8
  className={classNames(shopTagStyle['d-tag-item-canvas'])}
10
9
  tagId={tagId}
11
10
  text={tagText}
12
11
  appVersion={getJdAppVersionStr}
13
12
  lang={languageNowType}
14
13
  />
15
14
  );
16
15
  shopLeGaoTagNodeMap.set(getThisLeGaoTagKey, createCanVasTag);
17
16
  return createCanVasTag;
18
17
  }, [tagId, tagText]);
19
18
  const {
20
19
  tagInfoList = [],
21
20
  className,
22
21
  itemClassName,
23
22
  isSkuBaseTag = false,
24
23
  itemClickCallback,
25
24
  } = props;
26
25
  const getTagInfoList = Array.isArray(tagInfoList) ? tagInfoList : [];
27
26
  const getTagInfoListNum = getTagInfoList.length;
28
27
  const isCallBackFn = typeof itemClickCallback === 'function';
29
28
  const needAsyncLoad = useMemo(() => {
30
29
  if (window.CanvasTag) return false;
31
30
  const h5TagJs = taroJdBaseInfo.loadJsSdkList.find((e) => e.fileName === 'h5TagJs');
32
31
  return !!(h5TagJs && h5TagJs.initTriggerType === LoadJsInitTriggerType.NRXT_TICK);
33
32
  }, []);
34
33
  const [loadOver, setLoadOver] = useState(!needAsyncLoad);
35
34
  useEffect(() => {
36
35
  async function loadTagSdk() {
37
36
  try {
38
37
  await taroJdBaseInfo.loadH5tagReayPromise();
39
38
  } catch (error) {}
40
39
  setLoadOver(true);
41
40
  }
42
41
  needAsyncLoad && loadTagSdk();
43
42
  }, []);
44
43
  if (!loadOver) return null;
45
44
  return getTagInfoListNum > 0 ? (
46
45
  <View
47
46
  className={classNames(
48
47
  shopTagStyle['d-shop-tag-list'],
49
48
  {
50
49
  [shopTagStyle['d-shop-sku-tag-list']]: isSkuBaseTag,
51
50
  },
52
51
  className,
53
52
  )}
54
53
  >
55
54
  {}
56
55
  <View style={{ width: '1px', height: '100%' }} />
57
56
  {getTagInfoList.map((item, index) => {
58
57
  const { tagId, tabIconId, tagText, type, tabIconType, tabText } = item;
59
58
  const getTagId = tagId || tabIconId;
60
59
  const getTagType = type || tabIconType;
61
60
  const getTagText = tagText || tabText;
62
61
  return getTagId ? (
63
62
  <View
64
63
  role="text"
65
64
  tabindex="0"
66
65
  aria-label={getTagText}
67
66
  key={getTagId + getTagType + index}
68
67
  className={classNames(shopTagStyle['d-tag-item'], itemClassName)}
69
68
  onClick={isCallBackFn && itemClickCallback.bind(this, item, index)}
70
69
  >
71
70
  <LeGaoTagComponent tagId={getTagId} tagText={getTagText} />
72
71
  </View>
73
72
  ) : null;
74
73
  })}
75
74
  </View>
76
75
  ) : null;
76
+ import React, { useEffect, useMemo, useState } from 'react';
77
77
  const getThisLeGaoTagKey = `${tagId}-${tagText}}`;
78
78
  const getLeGaoTagCacheNode = shopLeGaoTagNodeMap.get(getThisLeGaoTagKey) || false;
79
79
  return getLeGaoTagCacheNode
80
80
  ? getLeGaoTagCacheNode
81
81
  : useMemo(() => {
82
82
  const createCanVasTag = (
83
83
  <canvas-tag
84
84
  className={classNames(shopTagStyle['d-tag-item-canvas'])}
85
85
  tagId={tagId}
86
86
  text={tagText}
87
87
  appVersion={getJdAppVersionStr}
88
88
  lang={languageNowType}
89
89
  />
90
90
  );
91
91
  shopLeGaoTagNodeMap.set(getThisLeGaoTagKey, createCanVasTag);
92
92
  return createCanVasTag;
93
93
  }, [tagId, tagText]);
94
94
  const {
95
95
  tagInfoList = [],
96
96
  className,
97
97
  itemClassName,
98
98
  isSkuBaseTag = false,
99
99
  itemClickCallback,
100
100
  } = props;
101
101
  const getTagInfoList = Array.isArray(tagInfoList) ? tagInfoList : [];
102
102
  const getTagInfoListNum = getTagInfoList.length;
103
103
  const isCallBackFn = typeof itemClickCallback === 'function';
104
104
  const needAsyncLoad = useMemo(() => {
105
105
  if (window.CanvasTag) return false;
106
106
  const h5TagJs = taroJdBaseInfo.loadJsSdkList.find((e) => e.fileName === 'h5TagJs');
107
107
  return !!(h5TagJs && h5TagJs.initTriggerType === LoadJsInitTriggerType.NRXT_TICK);
108
108
  }, []);
109
109
  const [loadOver, setLoadOver] = useState(!needAsyncLoad);
110
110
  useEffect(() => {
111
111
  async function loadTagSdk() {
112
112
  try {
113
113
  await taroJdBaseInfo.loadH5tagReayPromise();
114
114
  } catch (error) {}
115
115
  setLoadOver(true);
116
116
  }
117
117
  needAsyncLoad && loadTagSdk();
118
118
  }, []);
119
119
  if (!loadOver) return null;
120
120
  return getTagInfoListNum > 0 ? (
121
121
  <View
122
122
  className={classNames(
123
123
  shopTagStyle['d-shop-tag-list'],
124
124
  {
125
125
  [shopTagStyle['d-shop-sku-tag-list']]: isSkuBaseTag,
126
126
  },
127
127
  className,
128
128
  )}
129
129
  >
130
130
  {}
131
131
  <View style={{ width: '1px', height: '100%' }} className="d-shop-tag-hide" />
132
132
  {getTagInfoList.map((item, index) => {
133
133
  const { tagId, tabIconId, tagText, type, tabIconType, tabText } = item;
134
134
  const getTagId = tagId || tabIconId;
135
135
  const getTagType = type || tabIconType;
136
136
  const getTagText = tagText || tabText;
137
137
  return getTagId ? (
138
138
  <View
139
139
  role="text"
140
140
  tabindex="0"
141
141
  aria-label={getTagText}
142
142
  key={getTagId + getTagType + index}
143
143
  className={classNames(shopTagStyle['d-tag-item'], itemClassName)}
144
144
  onClick={isCallBackFn && itemClickCallback.bind(this, item, index)}
145
145
  >
146
146
  <LeGaoTagComponent tagId={getTagId} tagText={getTagText} />
147
147
  </View>
148
148
  ) : null;
149
149
  })}
150
150
  </View>
151
151
  ) : null;
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro';
2
1
  export interface BaseConfigInfo {
3
2
  abTestLabels: {
4
3
  [key: string]: any;
5
4
  };
6
5
  nonSellableSkuids: {
7
6
  [key: string]: number;
8
7
  };
9
8
  loginState: boolean;
10
9
  cookiesStr: string;
11
10
  isImmersive: boolean;
12
11
  baseAddCartSwitch: boolean;
13
12
  isJingGouMiniViewState?: boolean;
14
13
  isJingxiMiniViewState?: boolean;
15
14
  shopInfo: {
16
15
  shopId?: string | number;
17
16
  venderId?: string | number;
18
17
  };
19
18
  pageInfo: {
20
19
  appId?: string;
21
20
  shopId?: string | number;
22
21
  venderId?: string | number;
23
22
  logoSquare?: string;
24
23
  logoUrl?: string;
25
24
  address?: string | null;
26
25
  addressCommaStr?: string | null;
27
26
  fullAddress?: string | null;
28
27
  un_area?: string | null;
29
28
  userLbsAddress?: string;
30
29
  shopName?: string;
31
30
  jumpTab?: string;
32
31
  sourceType?: string;
33
32
  sourceValue?: string;
34
33
  moduleId?: string;
35
34
  entrance?: string;
36
35
  EA_PTAG?: string;
37
36
  ptag?: string;
38
37
  originReferer?: string;
39
38
  recBroker?: string;
40
39
  rcmdRelateSkuId?: string;
41
40
  tabSpm?: string;
42
41
  skuId?: string;
43
42
  keywords?: string;
44
43
  sceneId?: string;
45
44
  miniScrollInfo?: {
46
45
  scrollLeft: number;
47
46
  scrollTop: number;
48
47
  scrollHeight: number;
49
48
  scrollWidth: number;
50
49
  deltaX: number;
51
50
  deltaY: number;
52
51
  };
53
52
  tabsLoadAllDataInfo: {
54
53
  [key: string]: boolean;
55
54
  };
56
55
  wxBusinessType: string;
57
56
  vapptype: string;
58
57
  pageType: string;
59
58
  dataType: string;
60
59
  floorExposureInfo: object;
61
60
  floorVideInfo: object;
62
61
  isExposureState?: boolean;
63
62
  appLazyContainerList?: string[];
64
63
  appLazyFinishContainerList?: [];
65
64
  shopStickyAndToTopInfo?: {
66
65
  toTop: boolean;
67
66
  sticky: boolean;
68
67
  };
69
68
  isVipShop?: boolean;
70
69
  isJdShowNativeImmersivePlayer?: boolean;
71
70
  isSuperBrandShop?: boolean;
72
71
  updateShopInfosState?: boolean;
73
72
  pageScrollTop: number;
74
73
  shopNavBarHeight: number;
75
74
  isFloorInfoDataByPage?: boolean;
76
75
  };
77
76
  lazyContainer?: {
78
77
  wellChosen: {
79
78
  appLazyContainerList?: string[];
80
79
  appLazyFinishContainerList?: string[];
81
80
  };
82
81
  };
83
82
  queryLogInfo?: {
84
83
  sourceType: string;
85
84
  sourceValue: string;
86
85
  moduleId?: string;
87
86
  entrance?: string;
88
87
  };
89
88
  queryInfo: {
90
89
  shopId?: string | number;
91
90
  venderId?: string | number;
92
91
  shopName?: string;
93
92
  [key: string]: any;
94
93
  };
95
94
  originQueryInfo: {
96
95
  shopId?: string | number;
97
96
  venderId?: string | number;
98
97
  shopName?: string;
99
98
  [key: string]: any;
100
99
  };
101
100
  sysInfo: {
102
101
  [key: string]: any;
103
102
  };
104
103
  userInfo: {
105
104
  pin?: string;
106
105
  encodePin?: string;
107
106
  ptkey?: string;
108
107
  wqCookie?: string | null;
109
108
  wxappVersion?: string;
110
109
  wqAuthToken?: string;
111
110
  wqVisitkey?: string;
112
111
  };
113
112
  openAppData?: {
114
113
  [key: string]: any;
115
114
  };
116
115
  }
117
116
 
118
117
  export interface OneKeyJoinMemberParamInfo {
119
118
  title?: string;
120
119
  shopId?: string | number;
121
120
  venderId?: string | number;
122
121
  businessSource?: keyof OneKeyJoinMemberBusinessSource;
123
122
  }
124
123
  export interface OneKeyJoinMemberBusinessSource {
125
124
  isv;
126
125
  lv0;
127
126
  }
128
127
  export type lazyContainer = {
129
128
  [key in 'string']?: {
130
129
  appLazyFinishContainerList: any[];
131
130
  appLazyContainerList: any[];
132
131
  };
133
132
  };
134
133
  export type renderedIsvComponents = {
135
134
  [key in 'string']?: any;
136
135
  };
137
136
  export type MiniApplogUtil = any;
138
137
  export type MiniAppLog = any;
139
138
  export type WxAppLogin = any;
140
139
  export type WxAppUserInfo = any;
141
140
  export type wxAppReportManage = any;
142
141
  export type WxAppReportGDT = any;
143
142
  export type WxAppNavigator = any;
144
143
  export type wxAppParamsSign = any;
145
144
  export type wxAppFingerReportInstance = any;
146
145
  export type wxAppSubsGuider = any;
147
146
  export type wxAppAddressV2api = any;
148
147
  [key: string]: any;
148
+ import Taro from '@tarojs/taro';
149
149
  export interface BaseConfigInfo {
150
150
  abTestLabels: {
151
151
  [key: string]: any;
152
152
  };
153
153
  nonSellableSkuids: {
154
154
  [key: string]: number;
155
155
  };
156
156
  loginState: boolean;
157
157
  cookiesStr: string;
158
158
  isImmersive: boolean;
159
159
  baseAddCartSwitch: boolean;
160
160
  isJingGouMiniViewState?: boolean;
161
161
  isJingxiMiniViewState?: boolean;
162
162
  shopInfo: {
163
163
  shopId?: string | number;
164
164
  venderId?: string | number;
165
165
  };
166
166
  pageInfo: {
167
167
  appId?: string;
168
168
  shopId?: string | number;
169
169
  venderId?: string | number;
170
170
  logoSquare?: string;
171
171
  logoUrl?: string;
172
172
  address?: string | null;
173
173
  addressCommaStr?: string | null;
174
174
  fullAddress?: string | null;
175
175
  un_area?: string | null;
176
176
  userLbsAddress?: string;
177
177
  shopName?: string;
178
178
  jumpTab?: string;
179
179
  sourceType?: string;
180
180
  sourceValue?: string;
181
181
  moduleId?: string;
182
182
  entrance?: string;
183
183
  EA_PTAG?: string;
184
184
  ptag?: string;
185
185
  originReferer?: string;
186
186
  recBroker?: string;
187
187
  rcmdRelateSkuId?: string;
188
188
  tabSpm?: string;
189
189
  skuId?: string;
190
190
  keywords?: string;
191
191
  sceneId?: string;
192
192
  miniScrollInfo?: {
193
193
  scrollLeft: number;
194
194
  scrollTop: number;
195
195
  scrollHeight: number;
196
196
  scrollWidth: number;
197
197
  deltaX: number;
198
198
  deltaY: number;
199
199
  };
200
200
  tabsLoadAllDataInfo: {
201
201
  [key: string]: boolean;
202
202
  };
203
203
  wxBusinessType: string;
204
204
  vapptype: string;
205
205
  pageType: string;
206
206
  dataType: string;
207
207
  floorExposureInfo: object;
208
208
  floorVideInfo: object;
209
209
  isExposureState?: boolean;
210
210
  appLazyContainerList?: string[];
211
211
  appLazyFinishContainerList?: [];
212
212
  shopStickyAndToTopInfo?: {
213
213
  toTop: boolean;
214
214
  sticky: boolean;
215
215
  };
216
216
  isVipShop?: boolean;
217
217
  isJdShowNativeImmersivePlayer?: boolean;
218
218
  isSuperBrandShop?: boolean;
219
219
  updateShopInfosState?: boolean;
220
220
  pageScrollTop: number;
221
221
  shopNavBarHeight: number;
222
222
  isFloorInfoDataByPage?: boolean;
223
223
  isScanPreview?: boolean;
224
224
  };
225
225
  lazyContainer?: {
226
226
  wellChosen: {
227
227
  appLazyContainerList?: string[];
228
228
  appLazyFinishContainerList?: string[];
229
229
  };
230
230
  };
231
231
  queryLogInfo?: {
232
232
  sourceType: string;
233
233
  sourceValue: string;
234
234
  moduleId?: string;
235
235
  entrance?: string;
236
236
  };
237
237
  queryInfo: {
238
238
  shopId?: string | number;
239
239
  venderId?: string | number;
240
240
  shopName?: string;
241
241
  [key: string]: any;
242
242
  };
243
243
  originQueryInfo: {
244
244
  shopId?: string | number;
245
245
  venderId?: string | number;
246
246
  shopName?: string;
247
247
  [key: string]: any;
248
248
  };
249
249
  sysInfo: {
250
250
  [key: string]: any;
251
251
  };
252
252
  userInfo: {
253
253
  pin?: string;
254
254
  encodePin?: string;
255
255
  ptkey?: string;
256
256
  wqCookie?: string | null;
257
257
  wxappVersion?: string;
258
258
  wqAuthToken?: string;
259
259
  wqVisitkey?: string;
260
260
  };
261
261
  openAppData?: {
262
262
  [key: string]: any;
263
263
  };
264
264
  }
265
265
 
266
266
  export interface OneKeyJoinMemberParamInfo {
267
267
  title?: string;
268
268
  shopId?: string | number;
269
269
  venderId?: string | number;
270
270
  businessSource?: keyof OneKeyJoinMemberBusinessSource;
271
271
  }
272
272
  export interface OneKeyJoinMemberBusinessSource {
273
273
  isv;
274
274
  lv0;
275
275
  }
276
276
  export type lazyContainer = {
277
277
  [key in 'string']?: {
278
278
  appLazyFinishContainerList: any[];
279
279
  appLazyContainerList: any[];
280
280
  };
281
281
  };
282
282
  export type renderedIsvComponents = {
283
283
  [key in 'string']?: any;
284
284
  };
285
285
  export type MiniApplogUtil = any;
286
286
  export type MiniAppLog = any;
287
287
  export type WxAppLogin = any;
288
288
  export type WxAppUserInfo = any;
289
289
  export type wxAppReportManage = any;
290
290
  export type WxAppReportGDT = any;
291
291
  export type WxAppNavigator = any;
292
292
  export type wxAppParamsSign = any;
293
293
  export type wxAppFingerReportInstance = any;
294
294
  export type wxAppSubsGuider = any;
295
295
  export type wxAppAddressV2api = any;
296
296
  [key: string]: any;