@conecli/cone-render 0.9.1-shop2.30 → 0.9.1-shop2.32

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 from 'react'
2
1
  return FloorContentItem ? (
3
2
  <ErrorBoundary {...props}>
4
3
  <FloorContentItem {...props} dataDefines={dataDefines} />
5
4
  </ErrorBoundary>
6
5
  ) : isDevMode ? (
7
6
  renderDecorateDefaultModule()
8
7
  ) : null
8
+ import { View } from '@tarojs/components';
9
9
  const { floorData, renderSourceType, builtInComponents = {} } = props;
10
10
  const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE;
11
11
  const floorModuleType = floorData?.floorExtInfo?.moduleFlag;
12
12
  const FloorContentItem = (floorModuleType && builtInComponents[floorModuleType]) || null;
13
13
  const dataDefines = getFloorDataToDataDefines(floorData);
14
14
 
15
15
  const renderDecorateDefaultModule = () => {
16
16
  return (
17
17
  <View
18
18
  style={{
19
19
  lineHeight: '120px',
20
20
  textAlign: 'center',
21
21
  }}
22
22
  >
23
23
  当前模块是{floorData.moduleName}
24
24
  </View>
25
25
  );
26
26
  };
27
27
  return FloorContentItem ? (
28
28
  <ErrorBoundary {...props}>
29
29
  <FloorContentItem {...props} dataDefines={dataDefines} />
30
30
  </ErrorBoundary>
31
31
  ) : isDevMode ? (
32
32
  renderDecorateDefaultModule()
33
33
  ) : null;
34
34
  renderSourceType: BUSINESS_TYPE.ONLINE,
35
35
  switch (moduleId) {
36
36
  case 83158:
37
37
  return 'freeLayout';
38
38
  case 99654:
39
39
  return 'activeText';
40
40
  case 100382:
41
41
  return 'superGoods';
42
42
  }
43
43
  floorList.map((item) => {
44
44
  if (!item.floorExtInfo) {
45
45
  return null;
46
46
  }
47
47
  const moduleFlag = item.floorExtInfo.moduleFlag;
48
48
  if (!moduleFlag) {
49
49
  const newModuleFlag = moduleId2ModuleFlag(item.moduleId);
50
50
  if (newModuleFlag) {
51
51
  item.floorExtInfo.moduleFlag = newModuleFlag;
52
52
  }
53
53
  }
54
54
  });