@conecli/cone-render 0.10.1-shop-beta.23 → 0.10.1-shop-beta.26

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 (128) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/accessibility.h5.ts +1 -0
  3. package/dist/common/accessibility.ts +0 -0
  4. package/dist/common/const.ts +1 -1
  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.weapp.tsx +1 -0
  10. package/dist/common/jssdk.weapp.ts +1 -0
  11. package/dist/common/pageType.ts +1 -1
  12. package/dist/common/token/index.h5.ts +1 -1
  13. package/dist/common/token/token.jd.ts +1 -1
  14. package/dist/common/wxappApi.ascf.ts +1 -0
  15. package/dist/components/ErrorBoundary.tsx +1 -1
  16. package/dist/components/base/CountDown/index.tsx +1 -1
  17. package/dist/components/base/CustomVideo/index.tsx +1 -1
  18. package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
  19. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  20. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  21. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  22. package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
  23. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  24. package/dist/components/base/JdLoading/index.module.scss +0 -2
  25. package/dist/components/base/JdLoading/index.tsx +1 -1
  26. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  27. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  28. package/dist/components/base/LazyLoadImage/index.tsx +1 -1
  29. package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
  30. package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
  31. package/dist/components/base/NetworkDataError/const.ts +1 -1
  32. package/dist/components/base/NetworkDataError/index.module.scss +1 -1
  33. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  34. package/dist/components/base/Price/Base/index.tsx +1 -1
  35. package/dist/components/base/Price/Double/index.module.scss +1 -1
  36. package/dist/components/base/Price/Double/index.tsx +1 -1
  37. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  38. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  39. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  40. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  41. package/dist/components/floorItem.tsx +1 -1
  42. package/dist/components/isv/Floor/index.tsx +1 -1
  43. package/dist/components/remoteFloorItem.tsx +1 -1
  44. package/dist/config/env.ts +1 -1
  45. package/dist/interface/common.ts +1 -1
  46. package/dist/interface/component.ts +1 -1
  47. package/dist/interface/jumpEventReport.ts +1 -1
  48. package/dist/interface/service.ts +1 -1
  49. package/dist/jumpEventReport/base.ts +1 -1
  50. package/dist/jumpEventReport/const.ts +1 -1
  51. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  52. package/dist/jumpEventReport/index.h5.ts +1 -1
  53. package/dist/jumpEventReport/index.ts +1 -1
  54. package/dist/jumpEventReport/index.weapp.ts +1 -1
  55. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  56. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  57. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
  58. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  59. package/dist/jumpEventReport/web/report.ts +1 -1
  60. package/dist/jumpEventReport/web.base.ts +1 -1
  61. package/dist/jumpEventReport/web.jd.ts +1 -1
  62. package/dist/jumpEventReport/web.pc.ts +1 -1
  63. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  64. package/dist/language/en_US.json +233 -83
  65. package/dist/language/zh_CN.json +232 -82
  66. package/dist/language/zh_HK.json +232 -82
  67. package/dist/libs/openShopBridge.js +161 -0
  68. package/dist/libs/openShopBridge.min.js +1 -0
  69. package/dist/libs/taroAppReport.js +2 -2
  70. package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
  71. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  72. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  73. package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
  74. package/dist/open/api/index.ts +1 -1
  75. package/dist/open/api/shopMember.ts +1 -1
  76. package/dist/open/api/shopMember.weapp.ts +1 -0
  77. package/dist/open/api/track.ts +1 -1
  78. package/dist/open/api/util.ts +1 -1
  79. package/dist/open/components/index.ts +1 -1
  80. package/dist/open/index.ts +1 -1
  81. package/dist/sass/app.h5.scss +6 -1
  82. package/dist/sass/base.scss +8 -4
  83. package/dist/service/fetchGateway.ts +1 -1
  84. package/dist/service/fetchGateway.weapp.ts +1 -1
  85. package/dist/service/fetchJsonp.ts +1 -1
  86. package/dist/service/fetchJsonp.weapp.ts +1 -0
  87. package/dist/service/http/h5Http.ts +1 -1
  88. package/dist/service/http/http.ts +1 -1
  89. package/dist/service/http/httpInterceptors.weapp.ts +1 -0
  90. package/dist/service/requestServer.h5.ts +1 -1
  91. package/dist/service/requestServer.ts +1 -1
  92. package/dist/service/requestServer.weapp.ts +1 -1
  93. package/dist/utils/connectNativeJsBridge.ts +1 -1
  94. package/dist/utils/h5Utils.ts +1 -1
  95. package/dist/utils/harmonyCallRouter.h5.ts +1 -0
  96. package/dist/utils/harmonyCallRouter.ts +0 -0
  97. package/dist/utils/index.h5.ts +1 -1
  98. package/dist/utils/index.ts +1 -1
  99. package/dist/utils/index.weapp.ts +1 -1
  100. package/dist/utils/intersectionObserver.ts +1 -1
  101. package/dist/utils/sColor.weapp.ts +1 -0
  102. package/dist/utils/utils.ts +1 -1
  103. package/package.json +36 -38
  104. package/dist/common/index.dynamic.ts +0 -1
  105. package/dist/components/base/Dialog/index.dynamic.module.scss +0 -126
  106. package/dist/components/base/Dialog/index.dynamic.tsx +0 -1
  107. package/dist/components/base/DynamicTest/index.dynamic.module.scss +0 -15
  108. package/dist/components/base/DynamicTest/index.module.scss +0 -16
  109. package/dist/components/base/DynamicTest/index.tsx +0 -1
  110. package/dist/components/base/LazyLoadImage/index.dynamic.module.scss +0 -40
  111. package/dist/components/base/LazyLoadImage/index.dynamic.tsx +0 -1
  112. package/dist/components/base/NetworkDataError/index.dynamic.module.scss +0 -95
  113. package/dist/components/base/NetworkDataError/index.dynamic.tsx +0 -1
  114. package/dist/components/base/Price/Base/index.dynamic.module.scss +0 -63
  115. package/dist/components/base/Price/Base/index.dynamic.tsx +0 -1
  116. package/dist/components/base/Price/Double/index.dynamic.module.scss +0 -172
  117. package/dist/components/base/Price/Double/index.dynamic.tsx +0 -1
  118. package/dist/jumpEventReport/index.dynamic.ts +0 -1
  119. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  120. package/dist/open/api/shopMember.dynamic.ts +0 -1
  121. package/dist/open/components/index.dynamic.ts +0 -1
  122. package/dist/sass/app.dynamic.scss +0 -306
  123. package/dist/service/fetchGateway.h5.ts +0 -1
  124. package/dist/service/fetchJsonp.h5.ts +0 -1
  125. package/dist/service/http/colorSign.dynamic.ts +0 -1
  126. package/dist/utils/connectNativeJsBridge.dynamic.ts +0 -1
  127. package/dist/utils/priceUtils.js +0 -1
  128. /package/dist/utils/{sColor.js → sColor.ts} +0 -0
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro';
2
1
  clientVersion: '11.0.0',
3
2
  client: 'wh5',
4
3
  screen: `${Math.ceil(
5
4
  getSystemInfo?.screenWidth * devicePixelRatio,
6
5
  )}*${Math.ceil(getSystemInfo?.screenHeight * devicePixelRatio)}`,
7
6
  area: '1_72_2799_0',
8
7
  uuid: "-1",
9
8
  const { area, realTimeArea } = areaInfo || {};
10
9
  area && area !== '' && (clientParams.area = area);
11
10
  realTimeArea && realTimeArea !== '' && (clientParams['realTimeArea'] = realTimeArea);
12
11
  console.warn(
13
12
  'cone-render中对外暴露fetchGateway收到原生端获取传来的四级地址信息',
14
13
  areaInfo,
15
14
  '更新后的接口底层信息',
16
15
  clientParams,
17
16
  );
18
17
  functionId: string,
19
18
  body = {},
20
19
  options = {},
21
20
  requestOptions = {},
22
21
  const useBodyParams = { ...body };
23
22
  const params = Object.assign(
24
23
  {},
25
24
  {
26
25
  t: Date.now(),
27
26
  functionId,
28
27
  appid: 'shop_m_jd_com',
29
28
  body: JSON.stringify(useBodyParams),
30
29
  },
31
30
  clientParams,
32
31
  options,
33
32
  {
34
33
  area: clientParams.area,
35
34
  client: !isJdApp && options?.client ? options?.client : clientParams.client,
36
35
  clientVersion:
37
36
  !isJdApp && options?.clientVersion ? options?.clientVersion : clientParams.clientVersion,
38
37
  },
39
38
  );
40
39
  console.warn(
41
40
  'fetchGateway url:' + api.apiFunc + ',functionId:' + params.functionId,
42
41
  '底层默认的clientParams',
43
42
  clientParams,
44
43
  '下发的options',
45
44
  options,
46
45
  '最后params',
47
46
  params,
48
47
  );
49
48
  return http.post(api.apiFunc, params, requestOptions);
49
+ import Taro from '@tarojs/taro';
50
50
  UUID,
51
51
  isJdApp,
52
52
  jdAppVersionStr,
53
53
  isIosDevice,
54
54
  isPc,
55
55
  isJdAndIosDevice,
56
56
  isJdAndAndroidDevice,
57
57
  isJdAndHarmonyDevice,
58
58
  isNewHarmonyShop,
59
59
  passSmartCouponInfoFunctionIdList,
60
60
  needFixClientValueToHarmonyFunctionIdList,
61
61
  clientVersion: isJdApp && jdAppVersionStr !== '' ? jdAppVersionStr : '11.0.0',
62
62
  client: isJdApp ? (isIosDevice ? 'apple' : 'android') : isPc ? 'pc' : 'wh5',
63
63
  screen: `${Math.ceil(window.screen?.width * devicePixelRatio)}*${Math.ceil(
64
64
  window.screen?.height * devicePixelRatio,
65
65
  )}`,
66
66
  area: '1_72_2799_0',
67
67
  uuid: UUID,
68
68
  const { area, realTimeArea } = areaInfo || {};
69
69
  area && area !== '' && (clientParams.area = area);
70
70
  realTimeArea && realTimeArea !== '' && (clientParams['realTimeArea'] = realTimeArea);
71
71
  console.warn(
72
72
  'cone-render中对外暴露fetchGateway收到原生端获取传来的四级地址信息',
73
73
  areaInfo,
74
74
  '更新后的接口底层信息',
75
75
  clientParams,
76
76
  );
77
77
  if (isH5 && (isJdAndIosDevice || isJdAndAndroidDevice)) {
78
78
  const smartCouponInfo = await getSmartCouponInfo();
79
79
  if (smartCouponInfo) {
80
80
  requestParams.smartCouponInfo = smartCouponInfo;
81
81
  }
82
82
  } else {
83
83
  console.warn('🚗 ~~ handleSmartCouponInfo ~~ 不支持的环境!');
84
84
  }
85
85
  functionId: string,
86
86
  body = {},
87
87
  options = {},
88
88
  requestOptions = {},
89
89
  const useBodyParams = { ...body };
90
90
  if (passSmartCouponInfoFunctionIdList.includes(functionId)) {
91
91
  await handleSmartCouponInfo(useBodyParams);
92
92
  }
93
93
  const params = Object.assign(
94
94
  {},
95
95
  {
96
96
  t: Date.now(),
97
97
  functionId,
98
98
  appid: 'shop_m_jd_com',
99
99
  body: JSON.stringify(useBodyParams),
100
100
  },
101
101
  clientParams,
102
102
  options,
103
103
  {
104
104
  area: clientParams.area,
105
105
  client: !isJdApp && options?.client ? options?.client : clientParams.client,
106
106
  clientVersion:
107
107
  !isJdApp && options?.clientVersion ? options?.clientVersion : clientParams.clientVersion,
108
108
  },
109
109
  );
110
110
  if (
111
111
  isJdAndHarmonyDevice &&
112
112
  (needFixClientValueToHarmonyFunctionIdList.includes(functionId) || isNewHarmonyShop)
113
113
  ) {
114
114
  params.client = 'harmony';
115
115
  } else {
116
116
  }
117
117
  console.warn(
118
118
  'fetchGateway url:' + api.apiFunc + ',functionId:' + params.functionId,
119
119
  '底层默认的clientParams',
120
120
  clientParams,
121
121
  '下发的options',
122
122
  options,
123
123
  '最后params',
124
124
  params,
125
125
  );
126
126
  return http.post(api.apiFunc, params, requestOptions);
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro';
2
1
  clientVersion: '11.0.0',
3
2
  client: 'wh5',
4
3
  screen: `${Math.ceil(getSystemInfo?.screenWidth * devicePixelRatio)}*${Math.ceil(
5
4
  getSystemInfo?.screenHeight * devicePixelRatio,
6
5
  )}`,
7
6
  area: '1_72_2799_0',
8
7
  uuid: UUID,
9
8
  const { area, realTimeArea } = areaInfo || {};
10
9
  area && area !== '' && (clientParams.area = area);
11
10
  realTimeArea && realTimeArea !== '' && (clientParams['realTimeArea'] = realTimeArea);
12
11
  console.warn(
13
12
  'cone-render中对外暴露fetchGateway收到原生端获取传来的四级地址信息',
14
13
  areaInfo,
15
14
  '更新后的接口底层信息',
16
15
  clientParams,
17
16
  );
18
17
  functionId: string,
19
18
  body = {},
20
19
  options = {},
21
20
  requestOptions = {},
22
21
  const params = Object.assign(
23
22
  {},
24
23
  {
25
24
  t: Date.now(),
26
25
  functionId,
27
26
  appid: 'shop_m_jd_com',
28
27
  body: JSON.stringify(body),
29
28
  },
30
29
  clientParams,
31
30
  options,
32
31
  {
33
32
  area: clientParams.area,
34
33
  client: options?.client || clientParams.client,
35
34
  clientVersion: options?.clientVersion || clientParams.clientVersion,
36
35
  },
37
36
  );
38
37
  console.warn(
39
38
  'fetchGateway url:' + api.apiFunc + ',functionId:' + params.functionId,
40
39
  '底层默认的clientParams',
41
40
  clientParams,
42
41
  '下发的options',
43
42
  options,
44
43
  '最后params',
45
44
  params,
46
45
  );
47
46
  return http.post(api.apiFunc, params, requestOptions);
47
+ import Taro from '@tarojs/taro';
48
48
  appid: 'wx_mini_app',
49
49
  clientVersion: '11.0.0',
50
50
  client: 'wh5',
51
51
  area: '1_72_2799_0',
52
52
  screen: `${Math.ceil(getSystemInfo?.screenWidth * devicePixelRatio)}*${Math.ceil(
53
53
  getSystemInfo?.screenHeight * devicePixelRatio,
54
54
  )}`,
55
55
  uuid: '-1',
56
56
  loginType: '11',
57
57
  const { area, realTimeArea } = areaInfo || {};
58
58
  area && area !== '' && (clientParams.area = area);
59
59
  realTimeArea && realTimeArea !== '' && (clientParams['realTimeArea'] = realTimeArea);
60
60
  console.warn(
61
61
  'cone-render中对外暴露fetchGateway收到原生端获取传来的四级地址信息',
62
62
  areaInfo,
63
63
  '更新后的接口底层信息',
64
64
  clientParams,
65
65
  );
66
66
  functionId: string,
67
67
  body = {},
68
68
  options = {},
69
69
  requestOptions = {},
70
70
  const params = Object.assign(
71
71
  {},
72
72
  {
73
73
  t: Date.now(),
74
74
  functionId,
75
75
  appid: 'shop_m_jd_com',
76
76
  body: JSON.stringify(body),
77
77
  },
78
78
  clientParams,
79
79
  options,
80
80
  {
81
81
  area: clientParams.area,
82
82
  client: options?.client || clientParams.client,
83
83
  clientVersion: options?.clientVersion || clientParams.clientVersion,
84
84
  },
85
85
  );
86
86
  console.warn(
87
87
  'fetchGateway url:' + api.apiFunc + ',functionId:' + params.functionId,
88
88
  '底层默认的clientParams',
89
89
  clientParams,
90
90
  '下发的options',
91
91
  options,
92
92
  '最后params',
93
93
  params,
94
94
  );
95
95
  return http.post(api.apiFunc, params, requestOptions);
@@ -1 +1 @@
1
- const fetchJsonp = function (url: string | string[], options = {}) {
2
1
  return Promise.reject(() => {
3
2
  console.log("暂未实现jsonp的请求方式",url)
4
3
  })
4
+ const defaultOptions = {
5
5
  timeout: 5000,
6
6
  jsonpCallback: 'callback',
7
7
  return `jsonp_${Date.now()}_${Math.ceil(Math.random() * 100000)}`
8
8
  try {
9
9
  delete window[functionName]
10
10
  } catch (e) {
11
11
  window[functionName] = undefined
12
12
  }
13
13
  const script = document.getElementById(scriptId)
14
14
  document.getElementsByTagName('head')[0].removeChild(script)
15
15
  const timeout =
16
16
 
17
17
  options.timeout != null ? options.timeout : defaultOptions.timeout
18
18
  const jsonpCallback =
19
19
 
20
20
  options.jsonpCallback != null
21
21
  ? options.jsonpCallback
22
22
  : defaultOptions.jsonpCallback
23
23
  let timeoutId: string | number | NodeJS.Timeout | undefined
24
24
  return new Promise((resolve, reject) => {
25
25
  const callbackFunction = generateCallbackFunction()
26
26
  window[callbackFunction] = function (response: any) {
27
27
  resolve({
28
28
  ok: true,
29
29
  json: function () {
30
30
  return Promise.resolve(response)
31
31
  },
32
32
  })
33
33
  if (timeoutId) clearTimeout(timeoutId)
34
34
  removeScript(jsonpCallback + '_' + callbackFunction)
35
35
  clearFunction(callbackFunction)
36
36
  }
37
37
  url += url.indexOf('?') === -1 ? '?' : '&'
38
38
  const jsonpScript = document.createElement('script')
39
39
  jsonpScript.setAttribute(
40
40
  'src',
41
41
  url + jsonpCallback + '=' + callbackFunction,
42
42
  )
43
43
  jsonpScript.id = jsonpCallback + '_' + callbackFunction
44
44
  document.getElementsByTagName('head')[0].appendChild(jsonpScript)
45
45
  timeoutId = setTimeout(() => {
46
46
  reject(new Error(`JSONP request to ${url} timed out`))
47
47
  clearFunction(callbackFunction)
48
48
  removeScript(jsonpCallback + '_' + callbackFunction)
49
49
  }, timeout)
50
50
  })
@@ -0,0 +1 @@
1
+ const fetchJsonp = function () {
2
  return Promise.reject(false)