@conecli/cone-render 0.10.1-shop3.76 → 0.10.1-shop3.79

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