@conecli/cone-render 0.8.20-beta.0 → 0.8.20-beta.2

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.
Files changed (160) hide show
  1. package/README.md +7 -1
  2. package/dist/api/index.ts +1 -1
  3. package/dist/assets/icon_blue_info.svg +1 -0
  4. package/dist/common/const.ts +1 -1
  5. package/dist/common/environmentType.ts +1 -0
  6. package/dist/common/index.h5.ts +1 -1
  7. package/dist/common/index.jd.ts +1 -1
  8. package/dist/common/index.ts +1 -1
  9. package/dist/common/index.weapp.ts +1 -1
  10. package/dist/common/jdplayerSdk.ts +1 -0
  11. package/dist/common/jssdk.ts +1 -0
  12. package/dist/common/pageType.ts +1 -0
  13. package/dist/common/sgmCustomCode.ts +1 -0
  14. package/dist/common/token/index.h5.ts +1 -1
  15. package/dist/common/token/token.jd.ts +1 -1
  16. package/dist/common/token/token.ts +1 -1
  17. package/dist/common/wxappApi.jd.ts +1 -0
  18. package/dist/common/wxappApi.ts +1 -1
  19. package/dist/components/ErrorBoundary.tsx +1 -1
  20. package/dist/components/base/CommonFloorHead/index.module.scss +126 -111
  21. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  22. package/dist/components/base/CountDown/index.module.scss +49 -44
  23. package/dist/components/base/CountDown/index.tsx +1 -1
  24. package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
  25. package/dist/components/base/CustomScrollView/index.module.scss +7 -0
  26. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  27. package/dist/components/base/CustomVideo/common.ts +1 -0
  28. package/dist/components/base/CustomVideo/index.tsx +1 -1
  29. package/dist/components/base/Dialog/index.module.scss +16 -0
  30. package/dist/components/base/Dialog/index.tsx +1 -1
  31. package/dist/components/base/Exposure/index.h5.tsx +1 -1
  32. package/dist/components/base/ExposureSmart/const.ts +1 -0
  33. package/dist/components/base/ExposureSmart/index.h5.module.scss +30 -6
  34. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  35. package/dist/components/base/ExposureSmart/index.module.scss +20 -9
  36. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  37. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  38. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  39. package/dist/components/base/InViewRender/index.tsx +1 -1
  40. package/dist/components/base/InViewRender/index.weapp.tsx +1 -1
  41. package/dist/components/base/ItemViewExposureSmart/index.module.scss +8 -0
  42. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -0
  43. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  44. package/dist/components/base/LazyLayoutLoad/index.weapp.tsx +1 -1
  45. package/dist/components/base/LazyLoadImage/const.ts +1 -1
  46. package/dist/components/base/LazyLoadImage/index.h5.module.scss +24 -20
  47. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  48. package/dist/components/base/MobileCommonHeader/index.module.scss +17 -0
  49. package/dist/components/base/MobileCommonHeader/index.tsx +1 -0
  50. package/dist/components/base/NetworkDataError/const.ts +1 -1
  51. package/dist/components/base/NetworkDataError/index.module.scss +125 -69
  52. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  53. package/dist/components/base/Price/Base/index.module.scss +12 -0
  54. package/dist/components/base/Price/Base/index.tsx +1 -1
  55. package/dist/components/base/Price/Double/index.module.scss +32 -0
  56. package/dist/components/base/Price/Double/index.tsx +1 -1
  57. package/dist/components/base/Price/index.tsx +1 -1
  58. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  59. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  60. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  61. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  62. package/dist/components/base/Skeleton/index.tsx +1 -1
  63. package/dist/components/debug/DebugLayout/index.module.scss +67 -0
  64. package/dist/components/debug/DebugLayout/index.tsx +1 -0
  65. package/dist/components/debug/DebugLayout/utils.ts +1 -0
  66. package/dist/components/decorate/DecorateFloorModule/index.module.scss +32 -2
  67. package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
  68. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  69. package/dist/components/decorate/PlaceHolder/index.tsx +1 -1
  70. package/dist/components/floorItem.jd.tsx +1 -1
  71. package/dist/components/floorItem.tsx +1 -1
  72. package/dist/components/floorItem.weapp.tsx +1 -1
  73. package/dist/components/isv/Floor/index.tsx +1 -1
  74. package/dist/components/remoteFloorItem.tsx +1 -0
  75. package/dist/interface/common.ts +1 -1
  76. package/dist/interface/component.ts +1 -1
  77. package/dist/interface/jumpEventReport.ts +1 -1
  78. package/dist/interface/service.ts +1 -1
  79. package/dist/interface/utils.ts +1 -1
  80. package/dist/jumpEventReport/base.ts +1 -1
  81. package/dist/jumpEventReport/const.ts +1 -1
  82. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  83. package/dist/jumpEventReport/index.h5.ts +1 -1
  84. package/dist/jumpEventReport/index.jd.ts +1 -1
  85. package/dist/jumpEventReport/index.ts +1 -1
  86. package/dist/jumpEventReport/index.weapp.ts +1 -1
  87. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  88. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  89. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  90. package/dist/jumpEventReport/web/report.ts +1 -1
  91. package/dist/jumpEventReport/web.base.ts +1 -1
  92. package/dist/jumpEventReport/web.jd.ts +1 -1
  93. package/dist/jumpEventReport/web.jdb.ts +1 -1
  94. package/dist/jumpEventReport/web.jdjch.ts +1 -0
  95. package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
  96. package/dist/jumpEventReport/web.pc.ts +1 -0
  97. package/dist/jumpEventReport/web.tjapp.ts +1 -0
  98. package/dist/jumpEventReport/web.tjm.ts +1 -0
  99. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  100. package/dist/language/en_US.json +231 -0
  101. package/dist/language/zh_CN.json +231 -0
  102. package/dist/language/zh_HK.json +231 -0
  103. package/dist/libs/taroAppReport.js +2 -2
  104. package/dist/modules/ContainerFloorList/index.h5.module.scss +66 -27
  105. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  106. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  107. package/dist/open/api/device.ts +1 -1
  108. package/dist/open/api/environment.ts +1 -1
  109. package/dist/open/api/index.ts +1 -1
  110. package/dist/open/api/jump copy.ts +1 -1
  111. package/dist/open/api/request.ts +1 -1
  112. package/dist/open/api/shopMember.ts +1 -1
  113. package/dist/open/api/track.ts +1 -1
  114. package/dist/open/api/util.ts +1 -1
  115. package/dist/open/components/index.ts +1 -1
  116. package/dist/sass/app.h5.scss +294 -212
  117. package/dist/sass/base.scss +195 -137
  118. package/dist/service/bMallConst.ts +1 -1
  119. package/dist/service/fetchGateway.ts +1 -1
  120. package/dist/service/fetchGateway.weapp.ts +1 -0
  121. package/dist/service/http/colorSign.ts +1 -1
  122. package/dist/service/http/const.ts +1 -1
  123. package/dist/service/http/h5Http.ts +1 -0
  124. package/dist/service/http/index.h5.ts +1 -0
  125. package/dist/service/requestServer.h5.ts +1 -0
  126. package/dist/service/requestServer.ts +1 -1
  127. package/dist/service/requestServer.weapp.ts +1 -0
  128. package/dist/utils/connectNativeJsBridge.ts +1 -1
  129. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  130. package/dist/utils/draExceptionAndProfile.ts +1 -1
  131. package/dist/utils/h5Utils.ts +1 -1
  132. package/dist/utils/index.h5.ts +1 -1
  133. package/dist/utils/index.ts +1 -1
  134. package/dist/utils/index.weapp.ts +1 -1
  135. package/dist/utils/intersectionObserver.ts +1 -1
  136. package/dist/utils/jm-common.js +1 -1
  137. package/dist/utils/jumpExtMapUtil.h5.ts +1 -0
  138. package/dist/utils/jumpExtMapUtil.ts +1 -0
  139. package/dist/utils/sColor.js +1 -0
  140. package/dist/utils/sgmCodeUtils.ts +1 -0
  141. package/dist/utils/taroRenderUtil.ts +1 -0
  142. package/dist/utils/utils.ts +1 -1
  143. package/dist/wxapp/api/helper.js +1 -0
  144. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  145. package/dist/wxapp/common/user_info.js +1 -1
  146. package/dist/wxapp/components/launch-app/index.js +1 -0
  147. package/dist/wxapp/components/launch-app/index.json +5 -0
  148. package/dist/wxapp/components/launch-app/index.wxml +0 -0
  149. package/dist/wxapp/components/launch-app/index.wxss +0 -0
  150. package/dist/wxapp/components/subscribe-guider/helper.js +1 -0
  151. package/dist/wxapp/components/subscribe-guider/index.js +1 -0
  152. package/dist/wxapp/components/subscribe-guider/index.json +5 -0
  153. package/dist/wxapp/components/subscribe-guider/index.wxml +0 -0
  154. package/dist/wxapp/components/subscribe-guider/index.wxss +0 -0
  155. package/package.json +145 -115
  156. package/dist/components/base/Skeleton/old.tsx +0 -1
  157. package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
  158. package/dist/utils/memberFormatUtils.js +0 -1
  159. /package/dist/service/{bMallConst.wxapp.ts → bMallConst.weapp.ts} +0 -0
  160. /package/dist/service/http/{colorSign.wxapp.ts → colorSign.weapp.ts} +0 -0
@@ -1 +1 @@
1
- import React, { Suspense, lazy } from 'react'
2
1
  BUSINESS_TYPE,
3
2
  RemoteLoadFloorList,
4
3
  JD_PLACEHOLDER_IMG,
5
4
  DraJSAgentReportException,
6
5
  DraJSAgentReport,
7
6
  const {
8
7
  floorData,
9
8
  renderSourceType,
10
9
  builtInComponents = {},
11
10
  updateContainerFloorListDataFn,
12
11
  } = props
13
12
  const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE
14
13
  const floorModuleType: any = floorData?.floorExtInfo?.moduleFlag
15
14
  const FloorContentItem =
16
15
  (floorModuleType && builtInComponents[floorModuleType]) || null
17
16
  const dataDefines = getFloorDataToDataDefines(floorData)
18
17
 
19
18
  const renderDecorateDefaultModule = () => {
20
19
  return (
21
20
  <View
22
21
  style={{
23
22
  lineHeight: '120px',
24
23
  textAlign: 'center',
25
24
  }}
26
25
  >
27
26
  当前模块是{floorData.moduleName}
28
27
  </View>
29
28
  )
30
29
  }
31
30
 
32
31
  const getFloorSetHeight = (item) => {
33
32
  const getHeight = item?.floorExtInfo?.floorHeight
34
33
  ? Number(item?.floorExtInfo?.floorHeight)
35
34
  : 200
36
35
  return getHeight > 0 ? getHeight : 200
37
36
  }
38
37
  if (floorModuleType && RemoteLoadFloorList.includes(floorModuleType)) {
39
38
  console.log(
40
39
  '>>>>>>>>>> floorModuleType === FloorModuleType.ISVDESIGNERH5MODULE >>>>>>>>>>',
41
40
  )
42
41
  const renderResult = (() => {
43
42
  try {
44
43
  console.log('>>>>>>>>>> 开始渲染1个isv模块 >>>>>>>>>>')
45
44
  console.log(
46
45
  '==========当前业务类型renderSourceType、楼层floorId: ',
47
46
  renderSourceType,
48
47
  floorData.uid,
49
48
  )
50
49
  const modularPackResult = floorData?.floorExtInfo?.modularPackResult
51
50
  const modularPackResultObj =
52
51
  typeof modularPackResult === 'string'
53
52
  ? JSON.parse(modularPackResult)
54
53
  : modularPackResult
55
54
  if (modularPackResultObj) {
56
55
  const { bundleUrl, bundleFileName } = modularPackResultObj
57
56
  if (bundleUrl && bundleFileName) {
58
57
  let ISVModule =
59
58
  taroJdBaseInfo?.renderedIsvComponents[
60
59
  `${floorData.uid}_${bundleFileName}`
61
60
  ] || null
62
61
  if (!ISVModule) {
63
62
  ISVModule = lazy(
64
63
  () => import(bundleFileName + '@@@@@@' + bundleUrl),
65
64
  )
66
65
  console.log(
67
66
  '1|加载isv模块==========走lazy import生成新的isv模块react组件',
68
67
  bundleFileName,
69
68
  )
70
69
  taroJdBaseInfo.renderedIsvComponents[
71
70
  `${floorData.uid}_${bundleFileName}`
72
71
  ] = ISVModule
73
72
  console.log(
74
73
  '2|渲染isv模块的react组件==========,window.taroJshopH5WebpackJsonp上的组件是否已就绪: ',
75
74
  bundleFileName,
76
75
  window['taroJshopH5WebpackJsonp'].find(
77
76
  (item) => item[0][0] == bundleFileName,
78
77
  ),
79
78
  )
80
79
  } else {
81
80
  console.log(
82
81
  '1|加载isv模块==========不走lazy import生成新的isv模块react组件,从已加载中获取,taroJdBaseInfo: ',
83
82
  taroJdBaseInfo,
84
83
  )
85
84
  console.log(
86
85
  '2|渲染isv模块的react组件==========,taroJdBaseInfo.renderedIsvComponents上的组件是否已就绪: ',
87
86
  taroJdBaseInfo.renderedIsvComponents[
88
87
  `${floorData.uid}_${bundleFileName}`
89
88
  ],
90
89
  )
91
90
  }
92
91
  const _floorHeight = getFloorSetHeight(floorData)
93
92
  return (
94
93
  <ErrorBoundary {...props}>
95
94
  <Suspense
96
95
  fallback={
97
96
  <View
98
97
  style={{
99
98
  position: 'relative',
100
99
  background: `#ffffff url('${JD_PLACEHOLDER_IMG}') center center no-repeat`,
101
100
  height: `${_floorHeight}px`,
102
101
  }}
103
102
  ></View>
104
103
  }
105
104
  >
106
105
  <ISVFloor {...props} dataDefines={dataDefines}>
107
106
  <ISVModule {...props} dataDefines={dataDefines}></ISVModule>
108
107
  </ISVFloor>
109
108
  </Suspense>
110
109
  </ErrorBoundary>
111
110
  )
112
111
  } else {
113
112
  console.log(
114
113
  '3|isv模块渲染异常,modularPackResult中缺少bundleUrl或bundleFileName==========modularPackResult: ',
115
114
  modularPackResultObj,
116
115
  )
117
116
  DraJSAgentReport(
118
117
  `店铺首页isv h5楼层隐藏不显示。原因:modularPackResult数据不完备。页面类型-buildType: ${buildType}。楼层顺序-floorIdx: ${floorData?.floorIdx}`,
119
118
  {
120
119
  buildType,
121
120
  uid: floorData?.uid,
122
121
  floorIdx: floorData?.floorIdx,
123
122
  shopId: floorData?.floorExtInfo?.shopId,
124
123
  moduleId: floorData?.moduleId,
125
124
  moduleName: floorData?.moduleName,
126
125
  middleTemplateId: floorData?.middleTemplateId,
127
126
  modularPackResult: modularPackResult,
128
127
  },
129
128
  )
130
129
  return null
131
130
  }
132
131
  } else {
133
132
  console.log(
134
133
  '3|isv模块渲染异常,缺少modularPackResult==========modularPackResult: ',
135
134
  modularPackResultObj,
136
135
  )
137
136
  DraJSAgentReport(
138
137
  `店铺首页isv h5楼层隐藏不显示。原因:modularPackResult数据不完备。页面类型-buildType: ${buildType}。楼层顺序-floorIdx: ${floorData?.floorIdx}`,
139
138
  {
140
139
  buildType,
141
140
  uid: floorData?.uid,
142
141
  floorIdx: floorData?.floorIdx,
143
142
  shopId: floorData?.floorExtInfo?.shopId,
144
143
  moduleId: floorData?.moduleId,
145
144
  moduleName: floorData?.moduleName,
146
145
  middleTemplateId: floorData?.middleTemplateId,
147
146
  modularPackResult: modularPackResult,
148
147
  },
149
148
  )
150
149
  return null
151
150
  }
152
151
  } catch (err) {
153
152
  console.log('3|isv模块渲染异常,floorItem逻辑错误==========err: ', err)
154
153
  DraJSAgentReportException(err)
155
154
  return null
156
155
  }
157
156
  })()
158
157
  if (renderResult === null) {
159
158
  updateContainerFloorListDataFn &&
160
159
  updateContainerFloorListDataFn({
161
160
  type: 'filter',
162
161
  containerId: floorData?.uid,
163
162
  })
164
163
  console.log('renderResult === null: 命中了!')
165
164
  taroEventSendPageScrollInfo()
166
165
  } else {
167
166
  console.log('renderResult !== null: 没命中', renderResult)
168
167
  }
169
168
  return renderResult
170
169
  } else {
171
170
  return FloorContentItem ? (
172
171
  <ErrorBoundary {...props}>
173
172
  <FloorContentItem {...props} dataDefines={dataDefines} />
174
173
  </ErrorBoundary>
175
174
  ) : isDevMode ? (
176
175
  renderDecorateDefaultModule()
177
176
  ) : null
178
177
  }
179
178
  renderSourceType: BUSINESS_TYPE.ONLINE,
180
179
  switch (moduleId) {
181
180
  case 83158:
182
181
  return 'freeLayout'
183
182
  case 99654:
184
183
  return 'activeText'
185
184
  case 100382:
186
185
  return 'superGoods'
187
186
  }
188
187
  floorList.map((item) => {
189
188
  if (!item.floorExtInfo) {
190
189
  return null
191
190
  }
192
191
  const moduleFlag = item.floorExtInfo.moduleFlag
193
192
  if (!moduleFlag) {
194
193
  const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
195
194
  if (newModuleFlag) {
196
195
  item.floorExtInfo.moduleFlag = newModuleFlag
197
196
  }
198
197
  }
199
198
  })
199
+ import React from 'react';
200
200
  const { floorData, renderSourceType, builtInComponents = {} } = props;
201
201
  const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE;
202
202
  const specificModuleFlag = ['mHeaderVideo'];
203
203
  const frontEndSpecificModuleFlag = ['header_mVideo'];
204
204
  const luxuryContainerPosition = 'luxuryFixed';
205
205
  const floorPosition = floorData?.floorPosition;
206
206
  let floorModuleType: any = floorData?.floorExtInfo?.moduleFlag;
207
207
  specificModuleFlag.includes(floorModuleType) &&
208
208
  floorPosition === luxuryContainerPosition &&
209
209
  (floorModuleType = frontEndSpecificModuleFlag);
210
210
  const FloorContentItem = (floorModuleType && builtInComponents[floorModuleType]) || null;
211
211
  const dataDefines = getFloorDataToDataDefines(floorData);
212
212
  const isOfficlialMemberFloorPreview =
213
213
  getPageType() === PageType.M_PREVIEW && memberDefaultTypeList.includes(floorModuleType);
214
214
 
215
215
  const renderDecorateDefaultModule = () => {
216
216
  return (
217
217
  <View
218
218
  style={{
219
219
  lineHeight: '120px',
220
220
  textAlign: 'center',
221
221
  }}
222
222
  >
223
223
  当前模块是{floorData.moduleName}
224
224
  </View>
225
225
  );
226
226
  };
227
227
 
228
228
  const renderMemberFixedFloor = (floorData) => {
229
229
  return (
230
230
  <View>
231
231
  {floorData?.previewUri ? (
232
232
  <img
233
233
  src={floorData.previewUri}
234
234
  style={{ width: '100%', display: 'block' }}
235
235
  alt="会员楼层占位图"
236
236
  />
237
237
  ) : null}
238
238
  </View>
239
239
  );
240
240
  };
241
241
  if (
242
242
  floorModuleType &&
243
243
  (RemoteLoadFloorList.includes(floorModuleType) || floorData?.floorExtInfo?.floorLoadWay === 2)
244
244
  ) {
245
245
  return <RemoteFloorItem {...props} dataDefines={dataDefines}></RemoteFloorItem>;
246
246
  } else {
247
247
  return isOfficlialMemberFloorPreview ? (
248
248
  renderMemberFixedFloor(floorData)
249
249
  ) : FloorContentItem ? (
250
250
  <ErrorBoundary {...props}>
251
251
  <FloorContentItem {...props} dataDefines={dataDefines} />
252
252
  </ErrorBoundary>
253
253
  ) : isDevMode ? (
254
254
  renderDecorateDefaultModule()
255
255
  ) : null;
256
256
  }
257
257
  renderSourceType: BUSINESS_TYPE.ONLINE,
258
258
  switch (moduleId) {
259
259
  case 83158:
260
260
  return 'freeLayout';
261
261
  case 99654:
262
262
  return 'activeText';
263
263
  case 100382:
264
264
  return 'superGoods';
265
265
  }
266
266
  floorList.map((item) => {
267
267
  if (!item.floorExtInfo) {
268
268
  return null;
269
269
  }
270
270
  const moduleFlag = item.floorExtInfo.moduleFlag;
271
271
  if (!moduleFlag) {
272
272
  const newModuleFlag = moduleId2ModuleFlag(item.moduleId);
273
273
  if (newModuleFlag) {
274
274
  item.floorExtInfo.moduleFlag = newModuleFlag;
275
275
  }
276
276
  }
277
277
  });
@@ -1 +1 @@
1
- import React from 'react'
2
1
  return FloorContentItem ? (
3
2
  <FloorContentItem {...props} dataDefines={dataDefines} />
4
3
  ) : isDevMode ? (
5
4
  renderDecorateDefaultModule()
6
5
  ) : null
6
+ import React from 'react';
7
7
  const { floorData, renderSourceType, builtInComponents = {} } = props;
8
8
  const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE;
9
9
  const floorModuleType = floorData?.floorExtInfo?.moduleFlag;
10
10
  const FloorContentItem = (floorModuleType && builtInComponents[floorModuleType]) || null;
11
11
  const dataDefines = getFloorDataToDataDefines(floorData);
12
12
 
13
13
  const renderDecorateDefaultModule = () => {
14
14
  return (
15
15
  <View
16
16
  style={{
17
17
  lineHeight: '120px',
18
18
  textAlign: 'center',
19
19
  }}
20
20
  >
21
21
  当前模块是{floorData.moduleName}
22
22
  </View>
23
23
  );
24
24
  };
25
25
  return FloorContentItem ? <FloorContentItem {...props} dataDefines={dataDefines} /> : isDevMode ? (
26
26
  renderDecorateDefaultModule()
27
27
  ) : null;
28
28
  renderSourceType: BUSINESS_TYPE.ONLINE,
29
29
  switch (moduleId) {
30
30
  case 83158:
31
31
  return 'freeLayout';
32
32
  case 99654:
33
33
  return 'activeText';
34
34
  case 100382:
35
35
  return 'superGoods';
36
36
  }
37
37
  floorList.map((item) => {
38
38
  if (!item.floorExtInfo) {
39
39
  return null;
40
40
  }
41
41
  const moduleFlag = item.floorExtInfo.moduleFlag;
42
42
  if (!moduleFlag) {
43
43
  const newModuleFlag = moduleId2ModuleFlag(item.moduleId);
44
44
  if (newModuleFlag) {
45
45
  item.floorExtInfo.moduleFlag = newModuleFlag;
46
46
  }
47
47
  }
48
48
  });
@@ -1 +1 @@
1
- import React, { useCallback } from 'react'
2
1
  {floorData?.showCommonFloorHead === false ? null : (
3
2
  <CommonFloorHead dataDefines={dataDefines} floorData={floorData} />
4
3
  )}
4
+ import React, { useCallback } from 'react'
5
5
  const {
6
6
  style,
7
7
  dataDefines,
8
8
  containerBorderRadius,
9
9
  floorData,
10
10
  isRealTimeRender,
11
11
  forceRenderTime,
12
12
  } = props
13
13
  const getRenderRealTimeKeyObj = {
14
14
  key: isRealTimeRender ? Date.now() : forceRenderTime,
15
15
  }
16
16
  console.log('远程加载楼层渲染key信息', getRenderRealTimeKeyObj)
17
17
  return (
18
18
  <View className={floorStyle['wrap']} style={style}>
19
19
  {floorData?.showCommonFloorHead === false ? null : (
20
20
  <CommonFloorHead
21
21
  dataDefines={dataDefines}
22
22
  floorData={floorData}
23
23
  {...getRenderRealTimeKeyObj}
24
24
  />
25
25
  )}
26
26
  <View
27
27
  className={floorStyle['wrap']}
28
28
  style={
29
29
  typeof containerBorderRadius === 'number'
30
30
  ? {
31
31
  borderRadius: containerBorderRadius + 'px',
32
32
  }
33
33
  : containerBorderRadius
34
34
  }
35
35
  >
36
36
  {}
37
37
  {props.children &&
38
38
  React.cloneElement(props.children, {
39
39
  dataDefines: dataDefines,
40
40
  ...getRenderRealTimeKeyObj,
41
41
  })}
42
42
  </View>
43
43
  </View>
44
44
  )
45
45
  isRealTimeRender: false,
46
46
  forceRenderTime: 1,
@@ -0,0 +1 @@
1
+ import Taro from '@tarojs/taro'
2
  getBundleUrl,
1
3
  getBundleFileName,
2
4
  formatPackResult,
3
5
  getTaroVersion
4
6
  const { floorData, renderSourceType, updateContainerFloorListDataFn } = props
5
7
  const dataDefines = getFloorDataToDataDefines(floorData)
6
8
  const [forceRenderTime,setForceRenderTime] = useState(1)
7
9
  useEffect(() => {
8
10
  isJdAndAndroidDevice && Taro.eventCenter.on(TaroEventType.FORCE_UPDATE_PAGE_LAYOUT, (_result) => {
9
11
  setForceRenderTime(Date.now())
10
12
  })
11
13
  return () => {
12
14
  isJdAndAndroidDevice && Taro.eventCenter.off(TaroEventType.FORCE_UPDATE_PAGE_LAYOUT)
13
15
  }
14
16
  },[])
15
17
 
16
18
  const getFloorSetHeight = (item) => {
17
19
  const getHeight = item?.floorExtInfo?.floorHeight
18
20
  ? Number(item?.floorExtInfo?.floorHeight)
19
21
  : 200
20
22
  return getHeight > 0 ? getHeight : 200
21
23
  }
22
24
  console.log(
23
25
  '>>>>>>>>>> floorModuleType === FloorModuleType.ISVDESIGNERH5MODULE >>>>>>>>>>',
24
26
  )
25
27
  const renderResult = (() => {
26
28
  try {
27
29
  console.log('>>>>>>>>>> 开始渲染1个isv模块 >>>>>>>>>>')
28
30
  console.log(
29
31
  '==========当前业务类型renderSourceType、楼层floorId: ',
30
32
  renderSourceType,
31
33
  floorData.uid,
32
34
  )
33
35
  const modularPackResult = floorData?.floorExtInfo?.modularPackResult
34
36
  const modularPackResultObj = formatPackResult(modularPackResult)
35
37
  const bundleUrl = getBundleUrl(modularPackResultObj)
36
38
  const bundleFileName = getBundleFileName(modularPackResultObj)
37
39
  const taroVersion = getTaroVersion(modularPackResultObj)
38
40
  const opt = {
39
41
  msg: `店铺h5楼层隐藏不显示。原因:模块数据不完备,楼层过滤。`,
40
42
  floorIdx: floorData?.floorIdx,
41
43
  uid: floorData?.uid,
42
44
  shopId: floorData?.floorExtInfo?.shopId,
43
45
  moduleId: floorData?.moduleId,
44
46
  moduleDesignerType: floorData?.floorExtInfo?.moduleDesignerType,
45
47
  floorLoadWay: floorData?.floorExtInfo?.floorLoadWay,
46
48
  floorKind: floorData?.floorExtInfo?.floorKind,
47
49
  middleTemplateId: floorData?.middleTemplateId,
48
50
  modularPackResult: {
49
51
  bundleUrl,
50
52
  taroVersion
51
53
  }
52
54
  }
53
55
  if (bundleUrl && bundleFileName) {
54
56
  let ISVModule =
55
57
  taroJdBaseInfo?.renderedIsvComponents[
56
58
  `${floorData.uid}_${bundleFileName}`
57
59
  ] || null
58
60
  if (!ISVModule) {
59
61
  ISVModule = lazy(() => import(bundleFileName + '@@@@@@' + bundleUrl))
60
62
  console.log(
61
63
  '1|加载isv模块==========走lazy import生成新的isv模块react组件',
62
64
  bundleFileName,
63
65
  )
64
66
  taroJdBaseInfo.renderedIsvComponents[
65
67
  `${floorData.uid}_${bundleFileName}`
66
68
  ] = ISVModule
67
69
  console.log(
68
70
  '2|渲染isv模块的react组件==========,window.taroJshopH5WebpackJsonp上的组件是否已就绪: ',
69
71
  bundleFileName,
70
72
  window['taroJshopH5WebpackJsonp'].find(
71
73
  (item) => item[0][0] == bundleFileName,
72
74
  ),
73
75
  )
74
76
  } else {
75
77
  console.log(
76
78
  '1|加载isv模块==========不走lazy import生成新的isv模块react组件,从已加载中获取,taroJdBaseInfo: ',
77
79
  taroJdBaseInfo,
78
80
  )
79
81
  console.log(
80
82
  '2|渲染isv模块的react组件==========,taroJdBaseInfo.renderedIsvComponents上的组件是否已就绪: ',
81
83
  taroJdBaseInfo.renderedIsvComponents[
82
84
  `${floorData.uid}_${bundleFileName}`
83
85
  ],
84
86
  )
85
87
  }
86
88
  const _floorHeight = getFloorSetHeight(floorData)
87
89
  return (
88
90
  <ErrorBoundary {...props}>
89
91
  <Suspense
90
92
  fallback={
91
93
  <View
92
94
  style={{
93
95
  position: 'relative',
94
96
  background: `#ffffff url('${JD_PLACEHOLDER_IMG}') center center no-repeat`,
95
97
  height: `${_floorHeight}px`,
96
98
  }}
97
99
  ></View>
98
100
  }
99
101
  >
100
102
  <ISVFloor {...props} dataDefines={dataDefines} forceRenderTime={forceRenderTime} isRealTimeRender={realTimerRenderTypeList.includes(taroJdBaseInfo.info.pageInfo.dataType)}>
101
103
  <ISVModule {...props} dataDefines={dataDefines}></ISVModule>
102
104
  </ISVFloor>
103
105
  </Suspense>
104
106
  </ErrorBoundary>
105
107
  )
106
108
  } else {
107
109
  console.log(
108
110
  '3|isv模块渲染异常,modularPackResult中缺少bundleUrl或bundleFileName==========modularPackResult: ',
109
111
  modularPackResultObj,
110
112
  )
111
113
  sgmCustomReport({
112
114
  code: getSgmCustomCode(handleSgmCodeTaroVersion(floorData?.floorExtInfo?.floorKind === FLOOR_KIND.PDC_SYSTEM_MODULE ? SgmCustomCode.SYSTEMPDCMODULE_DATA : SgmCustomCode.REMOTEMODULE_DATA)),
113
115
  msg: opt,
114
116
  })
115
117
  return null
116
118
  }
117
119
  } catch (err) {
118
120
  console.log('3|isv模块渲染异常,floorItem逻辑错误==========err: ', err)
119
121
  return null
120
122
  }
121
123
  })()
122
124
  if (renderResult === null) {
123
125
  updateContainerFloorListDataFn &&
124
126
  updateContainerFloorListDataFn({
125
127
  type: 'filter',
126
128
  containerId: floorData?.uid,
127
129
  })
128
130
  console.log('renderResult === null: 命中了!')
129
131
  taroEventSendPageScrollInfo()
130
132
  } else {
131
133
  console.log('renderResult !== null: 没命中', renderResult)
132
134
  }
133
135
  return renderResult
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
1
+ import Taro from '@tarojs/taro';
2
2
  export interface BaseConfigInfo {
3
3
  abTestLabels: {
4
4
  [key: string]: any;
5
5
  };
6
6
  nonSellableSkuids: {
7
7
  [key: string]: number;
8
8
  };
9
9
  loginState: boolean;
10
10
  cookiesStr: string;
11
11
  isImmersive: boolean;
12
12
  isJingGouMiniViewState?: boolean;
13
13
  isJingxiMiniViewState?: boolean;
14
14
  shopInfo: {
15
15
  shopId?: string | number;
16
16
  venderId?: string | number;
17
17
  };
18
18
  pageInfo: {
19
19
  appId?: string;
20
20
  shopId?: string | number;
21
21
  venderId?: string | number;
22
22
  logoSquare?: string;
23
23
  logoUrl?: string;
24
24
  address?: string | null;
25
25
  addressCommaStr?: string | null;
26
26
  un_area?: string | null;
27
27
  userLbsAddress?: string;
28
28
  shopName?: string;
29
29
  jumpTab?: string;
30
30
  sourceType?: string;
31
31
  sourceValue?: string;
32
32
  moduleId?: string;
33
33
  entrance?: string;
34
34
  EA_PTAG?: string;
35
35
  ptag?: string;
36
36
  originReferer?: string;
37
37
  recBroker?: string;
38
38
  rcmdRelateSkuId?: string;
39
39
  tabSpm?: string;
40
40
  skuId?: string;
41
41
  keywords?: string;
42
42
  sceneId?: string;
43
43
  miniScrollInfo?: {
44
44
  scrollLeft: number;
45
45
  scrollTop: number;
46
46
  scrollHeight: number;
47
47
  scrollWidth: number;
48
48
  deltaX: number;
49
49
  deltaY: number;
50
50
  };
51
51
  tabsLoadAllDataInfo: {
52
52
  [key: string]: boolean;
53
53
  };
54
54
  wxBusinessType: string;
55
55
  vapptype: string;
56
56
  pageType: string;
57
57
  dataType: string;
58
58
  floorExposureInfo: object;
59
59
  floorVideInfo: object;
60
60
  isExposureState?: boolean;
61
61
  appLazyContainerList?: string[];
62
62
  appLazyFinishContainerList?: [];
63
63
  shopStickyAndToTopInfo?: {
64
64
  toTop: boolean;
65
65
  sticky: boolean;
66
66
  };
67
67
  isVipShop?: boolean;
68
68
  updateShopInfosState?: boolean;
69
69
  pageScrollTop: number;
70
70
  shopNavBarHeight: number;
71
71
  isFloorInfoDataByPage?: boolean;
72
72
  };
73
73
  lazyContainer?: {
74
74
  wellChosen: {
75
75
  appLazyContainerList?: string[];
76
76
  appLazyFinishContainerList?: string[];
77
77
  };
78
78
  };
79
79
  queryLogInfo?: {
80
80
  sourceType: string;
81
81
  sourceValue: string;
82
82
  moduleId?: string;
83
83
  entrance?: string;
84
84
  };
85
85
  queryInfo: {
86
86
  shopId?: string | number;
87
87
  venderId?: string | number;
88
88
  shopName?: string;
89
89
  [key: string]: any;
90
90
  };
91
91
  originQueryInfo: {
92
92
  shopId?: string | number;
93
93
  venderId?: string | number;
94
94
  shopName?: string;
95
95
  [key: string]: any;
96
96
  };
97
97
  sysInfo: {
98
98
  [key: string]: any;
99
99
  };
100
100
  userInfo: {
101
101
  pin?: string;
102
102
  encodePin?: string;
103
103
  ptkey?: string;
104
104
  wqCookie?: string | null;
105
105
  wxappVersion?: string;
106
106
  wqAuthToken?: string;
107
107
  wqVisitkey?: string;
108
108
  };
109
109
  openAppData?: {
110
110
  [key: string]: any;
111
111
  };
112
112
  }
113
113
 
114
114
  export interface OneKeyJoinMemberParamInfo {
115
115
  title?: string;
116
116
  shopId?: string | number;
117
117
  venderId?: string | number;
118
118
  businessSource?: keyof OneKeyJoinMemberBusinessSource;
119
119
  }
120
120
  export interface OneKeyJoinMemberBusinessSource {
121
121
  isv;
122
122
  lv0;
123
123
  }
124
124
  export type lazyContainer = {
125
125
  [key in 'string']?: {
126
126
  appLazyFinishContainerList: any[];
127
127
  appLazyContainerList: any[];
128
128
  };
129
129
  };
130
130
  export type renderedIsvComponents = {
131
131
  [key in 'string']?: any;
132
132
  };
133
133
  export type MiniApplogUtil = any;
134
134
  export type MiniAppLog = any;
135
135
  export type WxAppLogin = any;
136
136
  export type WxAppUserInfo = any;
137
137
  export type wxAppReportManage = any;
138
138
  export type WxAppReportGDT = any;
139
139
  export type WxAppNavigator = any;
140
140
  export type wxAppParamsSign = any;
141
141
  export type wxAppFingerReportInstance = any;
142
142
  export type wxAppSubsGuider = any;
143
143
  export type wxAppAddressV2api = any;
144
144
  [key: string]: any;