@conecli/cone-render 0.9.1-shop2.3 → 0.9.1-shop2.31

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 (114) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/assets/icon_blue_info.svg +1 -0
  3. package/dist/common/const.ts +1 -1
  4. package/dist/common/environmentType.ts +1 -0
  5. package/dist/common/index.h5.ts +1 -1
  6. package/dist/common/index.jd.ts +1 -1
  7. package/dist/common/index.ts +1 -1
  8. package/dist/common/index.weapp.ts +1 -1
  9. package/dist/common/jdplayerSdk.ts +1 -0
  10. package/dist/common/jssdk.ts +1 -0
  11. package/dist/common/pageType.ts +1 -0
  12. package/dist/common/sgmCustomCode.ts +1 -0
  13. package/dist/common/token/index.h5.ts +1 -1
  14. package/dist/common/token/token.jd.ts +1 -1
  15. package/dist/common/token/token.ts +1 -1
  16. package/dist/common/wxappApi.jd.ts +1 -0
  17. package/dist/components/ErrorBoundary.tsx +1 -1
  18. package/dist/components/base/CountDown/index.tsx +1 -1
  19. package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
  20. package/dist/components/base/CustomScrollView/index.module.scss +7 -0
  21. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  22. package/dist/components/base/CustomVideo/common.ts +1 -0
  23. package/dist/components/base/CustomVideo/index.tsx +1 -1
  24. package/dist/components/base/Dialog/index.module.scss +5 -0
  25. package/dist/components/base/Dialog/index.tsx +1 -1
  26. package/dist/components/base/Exposure/index.h5.tsx +1 -1
  27. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  28. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  29. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  30. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  31. package/dist/components/base/InViewRender/index.tsx +1 -1
  32. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  33. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  34. package/dist/components/base/LazyLoadImage/const.ts +1 -1
  35. package/dist/components/base/LazyLoadImage/index.h5.module.scss +23 -20
  36. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  37. package/dist/components/base/MobileCommonHeader/index.module.scss +17 -0
  38. package/dist/components/base/MobileCommonHeader/index.tsx +1 -0
  39. package/dist/components/base/NetworkDataError/const.ts +1 -1
  40. package/dist/components/base/NetworkDataError/index.module.scss +7 -0
  41. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  42. package/dist/components/base/Price/Base/index.tsx +1 -1
  43. package/dist/components/base/Price/Double/index.tsx +1 -1
  44. package/dist/components/base/Price/index.tsx +1 -1
  45. package/dist/components/debug/DebugLayout/index.module.scss +67 -0
  46. package/dist/components/debug/DebugLayout/index.tsx +1 -0
  47. package/dist/components/debug/DebugLayout/utils.ts +1 -0
  48. package/dist/components/decorate/DecorateFloorModule/index.module.scss +32 -2
  49. package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
  50. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  51. package/dist/components/decorate/PlaceHolder/index.tsx +1 -1
  52. package/dist/components/floorItem.jd.tsx +1 -1
  53. package/dist/components/floorItem.tsx +1 -1
  54. package/dist/components/floorItem.weapp.tsx +1 -1
  55. package/dist/components/isv/Floor/index.tsx +1 -1
  56. package/dist/components/remoteFloorItem.tsx +1 -1
  57. package/dist/interface/common.ts +1 -1
  58. package/dist/interface/component.ts +1 -1
  59. package/dist/interface/jumpEventReport.ts +1 -1
  60. package/dist/interface/service.ts +1 -1
  61. package/dist/interface/utils.ts +1 -1
  62. package/dist/jumpEventReport/base.ts +1 -1
  63. package/dist/jumpEventReport/const.ts +1 -1
  64. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  65. package/dist/jumpEventReport/index.h5.ts +1 -1
  66. package/dist/jumpEventReport/index.jd.ts +1 -1
  67. package/dist/jumpEventReport/index.weapp.ts +1 -1
  68. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  69. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  70. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  71. package/dist/jumpEventReport/web/report.ts +1 -1
  72. package/dist/jumpEventReport/web.base.ts +1 -1
  73. package/dist/jumpEventReport/web.jd.ts +1 -1
  74. package/dist/jumpEventReport/web.jdb.ts +1 -1
  75. package/dist/jumpEventReport/web.jdjch.ts +1 -1
  76. package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
  77. package/dist/jumpEventReport/web.tjapp.ts +1 -0
  78. package/dist/jumpEventReport/web.tjm.ts +1 -0
  79. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  80. package/dist/modules/ContainerFloorList/index.h5.module.scss +18 -1
  81. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  82. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  83. package/dist/open/api/device.ts +1 -1
  84. package/dist/open/api/environment.ts +1 -1
  85. package/dist/open/api/index.ts +1 -1
  86. package/dist/open/api/jump copy.ts +1 -1
  87. package/dist/open/api/request.ts +1 -1
  88. package/dist/open/api/shopMember.ts +1 -1
  89. package/dist/open/api/track.ts +1 -1
  90. package/dist/open/api/util.ts +1 -1
  91. package/dist/open/components/index.ts +1 -1
  92. package/dist/sass/app.h5.scss +49 -3
  93. package/dist/sass/base.scss +57 -0
  94. package/dist/service/fetchGateway.ts +1 -1
  95. package/dist/service/http/colorSign.ts +1 -1
  96. package/dist/service/http/const.ts +1 -1
  97. package/dist/service/http/h5Http.ts +1 -0
  98. package/dist/service/http/index.h5.ts +1 -0
  99. package/dist/service/requestServer.h5.ts +1 -0
  100. package/dist/service/requestServer.ts +1 -1
  101. package/dist/utils/connectNativeJsBridge.ts +1 -1
  102. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  103. package/dist/utils/draExceptionAndProfile.ts +1 -1
  104. package/dist/utils/h5Utils.ts +1 -1
  105. package/dist/utils/index.h5.ts +1 -1
  106. package/dist/utils/index.ts +1 -1
  107. package/dist/utils/index.weapp.ts +1 -1
  108. package/dist/utils/jm-common.js +1 -1
  109. package/dist/utils/sgmCodeUtils.ts +1 -0
  110. package/dist/utils/taroRenderUtil.ts +1 -1
  111. package/dist/utils/utils.ts +1 -1
  112. package/package.json +26 -3
  113. package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
  114. package/dist/utils/memberFormatUtils.js +0 -1
@@ -1 +1 @@
1
- import {
2
1
  isChartH5,
3
2
  isH5AndJdShopViewH5Scroll,
4
3
  isMemberPage,
5
4
  isPc,
6
5
  ipLoc_djd,
7
6
  isJdAndHarmonyDevice,
8
7
  isChartH5,
9
8
  isH5AndJdShopViewH5Scroll,
10
9
  isH5AndJingGouMini,
11
10
  urlCookie,
12
11
  isMemberPage,
13
12
  isPc,
14
13
  ipLoc_djd,
14
+ import {
15
15
  isMin,
16
16
  isJdMinAndHarmony,
17
17
  isChartH5,
18
18
  isH5AndJdShopViewH5Scroll,
19
19
  isH5AndJdShopH5CustomScrollView,
20
20
  getAvifSupport,
21
21
  getWebpSupport,
22
22
  isMemberPage,
23
23
  sgmCustomReport,
24
24
  draCustomReport,
25
25
  remoteCustomReport,
26
26
  draInterfaceCustomReport,
27
27
  draBusinessCustomReport,
28
28
  isOpenJdAppUrl,
29
29
  jdOpenAppParams,
30
30
  createJdOpenAppUrl,
31
31
  isEmpty,
32
32
  getJdAppReportPageSource,
33
33
  isPc,
34
34
  ipLoc_djd,
35
35
  dealJdOpenAppData,
36
36
  jdAppVersionCompare,
37
37
  dealNativePixelToCssPixel,
38
38
  isAppStowShop,
39
39
  isImageOptimizeEnable,
40
40
  isIpadDevice,
41
41
  getBorderStyle,
42
42
  console.warn("🚗 ~~ file: index.ts:93 ~~ 通用的isInGrayscale还没有实现,不应该被调用!")
43
43
  return false
44
44
  isJdAndHarmonyDevice,
45
45
  isJdAndroidX5Core,
46
46
  isMin,
47
47
  isJdMinAndHarmony,
48
48
  isChartH5,
49
49
  isH5AndJdShopViewH5Scroll,
50
50
  isH5AndJdShopH5CustomScrollView,
51
51
  isH5AndJingGouMini,
52
52
  urlCookie,
53
53
  stopNativeScrollEvent,
54
54
  getAvifSupport,
55
55
  getWebpSupport,
56
56
  isMemberPage,
57
57
  sgmCustomReport,
58
58
  draCustomReport,
59
59
  remoteCustomReport,
60
60
  draInterfaceCustomReport,
61
61
  draBusinessCustomReport,
62
62
  isOpenJdAppUrl,
63
63
  jdOpenAppParams,
64
64
  createJdOpenAppUrl,
65
65
  isEmpty,
66
66
  isAppHomeForMarketPage,
67
67
  getJdAppReportPageSource,
68
68
  isImageOptimizeEnable,
69
69
  isPc,
70
70
  ipLoc_djd,
71
71
  isTjM,
72
72
  isTjJxM,
73
73
  isTjScence,
74
74
  isH5AdnJxMini,
75
75
  isTJApp,
76
76
  isH5AdnHaoWuJie,
77
77
  tjChannel,
78
78
  dealJdOpenAppData,
79
79
  jdAppVersionCompare,
80
80
  dealNativePixelToCssPixel,
81
81
  isAppStowShop,
82
82
  getSgmCustomCode,
83
83
  handleSgmCodeTaroVersion,
84
84
  isInGrayscale,
85
85
  isIpadDevice,
86
86
  getBorderStyle,
@@ -1 +1 @@
1
- import {
2
1
  isChartH5,
3
2
  isH5AndJdShopViewH5Scroll,
4
3
  sgmCustomReport,
5
4
  isMemberPage,
6
5
  isAppClassifyPage
7
6
  isJdAndHarmonyDevice,
8
7
  isH5AndJdShopViewH5Scroll,
9
8
  isH5AndJingGouMini,
10
9
  urlCookie,
11
10
  isMemberPage,
12
11
  isAppClassifyPage
12
+ import {
13
13
  isJdMinAndHarmony,
14
14
  isChartH5,
15
15
  isH5AndJdShopViewH5Scroll,
16
16
  isH5AndJdShopH5CustomScrollView,
17
17
  getAvifSupport,
18
18
  getWebpSupport,
19
19
  sgmCustomReport,
20
20
  draCustomReport,
21
21
  remoteCustomReport,
22
22
  draInterfaceCustomReport,
23
23
  draBusinessCustomReport,
24
24
  isOpenJdAppUrl,
25
25
  jdOpenAppParams,
26
26
  createJdOpenAppUrl,
27
27
  isEmpty,
28
28
  getJdAppReportPageSource,
29
29
  isMemberPage,
30
30
  isAppClassifyPage,
31
31
  dealJdOpenAppData,
32
32
  jdAppVersionCompare,
33
33
  dealNativePixelToCssPixel,
34
34
  isImageOptimizeEnable,
35
35
  isIpadDevice,
36
36
  getBorderStyle,
37
37
  console.warn("🚗 ~~ file: index.ts:93 ~~ wxapp的isInGrayscale还没有实现,不应该被调用!")
38
38
  return false
39
39
  isJdAndHarmonyDevice,
40
40
  isJdAndroidX5Core,
41
41
  isMin,
42
42
  isJdMinAndHarmony,
43
43
  isH5AndJdShopViewH5Scroll,
44
44
  isH5AndJdShopH5CustomScrollView,
45
45
  isH5AndJingGouMini,
46
46
  urlCookie,
47
47
  stopNativeScrollEvent,
48
48
  getAvifSupport,
49
49
  getWebpSupport,
50
50
  sgmCustomReport,
51
51
  draCustomReport,
52
52
  remoteCustomReport,
53
53
  draInterfaceCustomReport,
54
54
  draBusinessCustomReport,
55
55
  isOpenJdAppUrl,
56
56
  jdOpenAppParams,
57
57
  createJdOpenAppUrl,
58
58
  isEmpty,
59
59
  getJdAppReportPageSource,
60
60
  isMemberPage,
61
61
  isAppClassifyPage,
62
62
  isAppHomeForMarketPage,
63
63
  isImageOptimizeEnable,
64
64
  isPc,
65
65
  isTjM,
66
66
  isTjJxM,
67
67
  isTjScence,
68
68
  isH5AdnJxMini,
69
69
  isTJApp,
70
70
  isH5AdnHaoWuJie,
71
71
  tjChannel,
72
72
  dealJdOpenAppData,
73
73
  jdAppVersionCompare,
74
74
  dealNativePixelToCssPixel,
75
75
  getSgmCustomCode,
76
76
  handleSgmCodeTaroVersion,
77
77
  isInGrayscale,
78
78
  isIpadDevice,
79
79
  getBorderStyle,
@@ -1 +1 @@
1
- var splitOnFirst = function splitOnFirst(string, separator) {
2
1
  return Object.prototype.toString.call(obj);
3
2
  return typeof obj === 'function';
4
3
  return '[object Object]' === getType(obj);
5
4
  return '[object Array]' == getType(obj);
6
5
  return '[object Undefined]' === getType(obj);
7
6
  return '[object Null]' == getType(obj);
8
7
  return typeof obj === 'string';
9
8
  return typeof obj === 'boolean';
10
9
  return '[object Number]' === getType(num);
11
10
  ua = ua || navigator.userAgent;
12
11
  if (name === 'wx') return (/micromessenger/i.test(ua)
13
12
  );
14
13
  if (name === 'qq') return (/qq\//i.test(ua)
15
14
  );
16
15
  if (name === 'weibo') return (/weibo/i.test(ua)
17
16
  );
18
17
  if (name === 'jd') return (/^jdapp/i.test(ua)
19
18
  );
20
19
  if (name === 'jdharmony') return (/^jdapp;harmony/i.test(ua)
21
20
  );
22
21
  if (name === 'jdlittle') return (/^jdltapp/i.test(ua)
23
22
  );
24
23
  if (name === 'mp') return navigator.userAgent.match(/micromessenger/i) && navigator.userAgent.match(/miniprogram/i) || window.__wxjs_environment === 'miniprogram';
25
24
  if (name === 'jdb') return (/JDBmall/i.test(ua) && /shop\.m\.jd\.com\/shop\/bhome/i.test(window.location.href));
26
25
  if(name === 'jdjch') return (/jdjchshopapp/i.test(ua) || (/shop\.m\.jd\.com\/shop\/bhome/i.test(window.location.href)) && window.location.href.includes('channel')) ;
27
26
  return false;
28
27
  ua = ua || navigator.userAgent;
29
28
  return (/android/i.test(ua) && !isIOS()
30
29
  );
31
30
  ua = ua || navigator.userAgent;
32
31
  return (/ip(hone|od)|ipad/i.test(ua)
33
32
  );
34
33
  ua = ua || navigator.userAgent;
35
34
  return (/ipad/i.test(ua) || /android/i.test(ua) && !/mobi|mini|fennec/i.test(ua)
36
35
  );
37
36
  ua = ua || navigator.userAgent;
38
37
  return !!ua.match(/ip(hone|od)|android.+mobile|windows (ce|phone)|blackberry|bb10|symbian|webos|firefox.+fennec|opera m(ob|in)i|polaris|iemobile|lgtelecom|nokia|sonyericsson|dolfin|uzard|natebrowser|ktf;|skt;/i);
39
38
  ua = ua || navigator.userAgent;
40
39
  return !!ua.match(/iphone/i);
41
40
  ua = ua || navigator.userAgent;
42
41
  return !!ua.match(/ipad/i);
43
42
  ua = ua || navigator.userAgent;
44
43
  if (name === 'xview') return typeof window.XView !== 'undefined';
45
44
  if (name === 'wk') return !!ua.match(/supportjdshwk/i) || window._is_jdsh_wkwebview == 1;
46
45
  return false;
47
46
  ua = ua || navigator.userAgent;
48
47
  var re = /nettype\/([\S]*)/i;
49
48
  if (isApp('jd', ua)) re = /network\/([^;]*)/i;
50
49
  return re.test(ua) ? RegExp.$1.toLowerCase() : 'unknown';
51
50
  ua = ua || navigator.userAgent;
52
51
  if (!isApp('jd', ua)) return null;
53
52
  return ua.split(';')[4];
54
53
  ua = ua || navigator.userAgent;
55
54
  if (appName === 'jd') return ua.split(';')[2] || null;
56
55
  if (appName === 'wx') return (/micromessenger\/([\S]*)/i.test(ua) ? RegExp.$1 : null
57
56
  );
58
57
  if (appName === 'qq') return (/qq\/([\S]*)/i.test(ua) ? RegExp.$1 : null
59
58
  );
60
59
  return null;
61
60
  ua = ua || navigator.userAgent;
62
61
  var match = ua.match(/android\s([0-9\.]*)/i);
63
62
  return match ? match[1] : 'unknown';
64
63
  ua = ua || navigator.userAgent;
65
64
  var match = ua.match(/OS ((\d+_?){2,3})\s/i);
66
65
  return match ? match[1].replace(/_/g, '.') : 'unknown';
66
+ var splitOnFirst = function splitOnFirst(string, separator) {
67
67
  return Object.prototype.toString.call(obj);
68
68
  return typeof obj === 'function';
69
69
  return '[object Object]' === getType(obj);
70
70
  return '[object Array]' == getType(obj);
71
71
  return '[object Undefined]' === getType(obj);
72
72
  return '[object Null]' == getType(obj);
73
73
  return typeof obj === 'string';
74
74
  return typeof obj === 'boolean';
75
75
  return '[object Number]' === getType(num);
76
76
  ua = ua || navigator.userAgent;
77
77
  if (name === 'wx') return (/micromessenger/i.test(ua)
78
78
  );
79
79
  if (name === 'qq') return (/qq\//i.test(ua)
80
80
  );
81
81
  if (name === 'weibo') return (/weibo/i.test(ua)
82
82
  );
83
83
  if (name === 'jd') return (/^jdapp/i.test(ua)
84
84
  );
85
85
  if (name === 'jdharmony') return (/^jdapp;harmony/i.test(ua)
86
86
  );
87
87
  if (name === 'jdlittle') return (/^jdltapp/i.test(ua)
88
88
  );
89
89
  if (name === 'mp') return navigator.userAgent.match(/micromessenger/i) && navigator.userAgent.match(/miniprogram/i) || window.__wxjs_environment === 'miniprogram';
90
90
  if (name === 'jdb') return (/JDBmall/i.test(ua) && /shop\.m\.jd\.com\/shop\/bhome/i.test(window.location.href));
91
91
  if(name === 'jdjch') return (/jdjchshopapp/i.test(ua) || (/shop\.m\.jd\.com\/shop\/bhome/i.test(window.location.href)) && window.location.href.includes('channel')) ;
92
92
  if(name == 'tjapp') return /jdltapp;/.test(ua);
93
93
  return false;
94
94
  ua = ua || navigator.userAgent;
95
95
  return (/android/i.test(ua) && !isIOS()
96
96
  );
97
97
  ua = ua || navigator.userAgent;
98
98
  return (/ip(hone|od)|ipad/i.test(ua)
99
99
  );
100
100
  ua = ua || navigator.userAgent;
101
101
  return (/ipad/i.test(ua) || /android/i.test(ua) && !/mobi|mini|fennec/i.test(ua)
102
102
  );
103
103
  ua = ua || navigator.userAgent;
104
104
  return !!ua.match(/ip(hone|od)|android.+mobile|windows (ce|phone)|blackberry|bb10|symbian|webos|firefox.+fennec|opera m(ob|in)i|polaris|iemobile|lgtelecom|nokia|sonyericsson|dolfin|uzard|natebrowser|ktf;|skt;/i);
105
105
  ua = ua || navigator.userAgent;
106
106
  return !!ua.match(/iphone/i);
107
107
  ua = ua || navigator.userAgent;
108
108
  return !!ua.match(/ipad/i);
109
109
  ua = ua || navigator.userAgent;
110
110
  if (name === 'xview') return typeof window.XView !== 'undefined';
111
111
  if (name === 'wk') return !!ua.match(/supportjdshwk/i) || window._is_jdsh_wkwebview == 1;
112
112
  return false;
113
113
  ua = ua || navigator.userAgent;
114
114
  var re = /nettype\/([\S]*)/i;
115
115
  if (isApp('jd', ua)) re = /network\/([^;]*)/i;
116
116
  return re.test(ua) ? RegExp.$1.toLowerCase() : 'unknown';
117
117
  ua = ua || navigator.userAgent;
118
118
  if (!isApp('jd', ua)) return null;
119
119
  return ua.split(';')[4];
120
120
  ua = ua || navigator.userAgent;
121
121
  if (appName === 'jd') return ua.split(';')[2] || null;
122
122
  if (appName === 'wx') return (/micromessenger\/([\S]*)/i.test(ua) ? RegExp.$1 : null
123
123
  );
124
124
  if (appName === 'qq') return (/qq\/([\S]*)/i.test(ua) ? RegExp.$1 : null
125
125
  );
126
126
  return null;
127
127
  ua = ua || navigator.userAgent;
128
128
  var match = ua.match(/android\s([0-9\.]*)/i);
129
129
  return match ? match[1] : 'unknown';
130
130
  ua = ua || navigator.userAgent;
131
131
  var match = ua.match(/OS ((\d+_?){2,3})\s/i);
132
132
  return match ? match[1].replace(/_/g, '.') : 'unknown';
@@ -0,0 +1 @@
1
+ import { getPageType } from "../common/pageType"
2
  return str.replace(/-([a-z])/g, (match) => {
1
3
  return match[1].toUpperCase();
2
4
  });
3
5
  const taroVersion =
4
6
  window?.taroRenderVersion === TaroRenderVersion.VERSION_NEW ? 'newTaro' : 'oldTaro'
5
7
  console.log('handleSgmCodeTaroVersion', handleSgmCodeTaroVersion)
6
8
  return `${taroVersion}_${sgmCustomCode}`
7
9
  let finalSgmCustomCode = sgmCustomCode
8
10
  const pageType = getPageType()
9
11
  if (pageType !== '') {
10
12
  const sgmPageType = underlineToCamelCase(pageType)
11
13
  finalSgmCustomCode = `${sgmPageType}_${finalSgmCustomCode}`
12
14
  }
13
15
  const environmentType = getEnvironmentType()
14
16
  finalSgmCustomCode = `${environmentType}_${finalSgmCustomCode}`
15
17
  console.log('sgm上报自定义编码', finalSgmCustomCode)
16
18
  return finalSgmCustomCode
@@ -1 +1 @@
1
- export enum TaroRenderVersion {
2
1
  VERSION_OLD = 0,
3
2
  VERSION_NEW = 1,
4
3
  let result = modularPackResult?.bundleUrl || ''
5
4
  if (window?.taroRenderVersion === TaroRenderVersion.VERSION_NEW) {
6
5
  result = modularPackResult?.bundleUrlV2 || ''
7
6
  }
8
7
  console.log(
9
8
  'getBundleUrl taroRenderVersion:' +
10
9
  window?.taroRenderVersion +
11
10
  ',bundleUrl:' +
12
11
  result,
13
12
  )
14
13
  return result
15
14
  let result = modularPackResult?.bundleFileName || ''
16
15
  if (window?.taroRenderVersion === TaroRenderVersion.VERSION_NEW) {
17
16
  result = modularPackResult?.bundleFileNameV2 || ''
18
17
  }
19
18
  console.log(
20
19
  'getBundleUrl taroRenderVersion:' +
21
20
  window?.taroRenderVersion +
22
21
  ',bundleFileName:' +
23
22
  result,
24
23
  )
25
24
  return result
26
25
  if (typeof modularPackResult === 'string') {
27
26
  try {
28
27
  return JSON.parse(modularPackResult)
29
28
  } catch (e) {
30
29
  console.error('JSON解析失败', e)
31
30
  return {}
32
31
  }
33
32
  }
34
33
  return modularPackResult || {}
34
+ export enum TaroRenderVersion {
35
35
  VERSION_OLD = 0,
36
36
  VERSION_NEW = 1,
37
37
  let result = modularPackResult?.bundleUrl || ''
38
38
  if (window?.taroRenderVersion === TaroRenderVersion.VERSION_NEW) {
39
39
  result = modularPackResult?.bundleUrlV2 || ''
40
40
  }
41
41
  console.log(
42
42
  'getBundleUrl taroRenderVersion:' +
43
43
  window?.taroRenderVersion +
44
44
  ',bundleUrl:' +
45
45
  result,
46
46
  )
47
47
  return result
48
48
  let result = modularPackResult?.bundleFileName || ''
49
49
  if (window?.taroRenderVersion === TaroRenderVersion.VERSION_NEW) {
50
50
  result = modularPackResult?.bundleFileNameV2 || ''
51
51
  }
52
52
  console.log(
53
53
  'getBundleUrl taroRenderVersion:' +
54
54
  window?.taroRenderVersion +
55
55
  ',bundleFileName:' +
56
56
  result,
57
57
  )
58
58
  return result
59
59
  let result = modularPackResult?.taroVersion || ''
60
60
  if (window?.taroRenderVersion === TaroRenderVersion.VERSION_NEW) {
61
61
  result = modularPackResult?.taroVersionV2 || ''
62
62
  }
63
63
  console.log(
64
64
  'getTaroVersion taroRenderVersion:' +
65
65
  window?.taroRenderVersion +
66
66
  ',taroVersion:' +
67
67
  result,
68
68
  )
69
69
  return result
70
70
  if (typeof modularPackResult === 'string') {
71
71
  try {
72
72
  return JSON.parse(modularPackResult)
73
73
  } catch (e) {
74
74
  console.error('JSON解析失败', e)
75
75
  return {}
76
76
  }
77
77
  }
78
78
  return modularPackResult || {}