@conecli/cone-render 0.8.38 → 0.8.40

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 (117) hide show
  1. package/README.md +7 -1
  2. package/dist/api/index.ts +1 -1
  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/common/wxappApi.ts +1 -1
  18. package/dist/components/ErrorBoundary.tsx +1 -1
  19. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  20. package/dist/components/base/CountDown/index.tsx +1 -1
  21. package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
  22. package/dist/components/base/CustomScrollView/index.module.scss +7 -0
  23. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  24. package/dist/components/base/CustomVideo/index.tsx +1 -1
  25. package/dist/components/base/Dialog/index.module.scss +5 -0
  26. package/dist/components/base/Dialog/index.tsx +1 -1
  27. package/dist/components/base/Exposure/index.h5.tsx +1 -1
  28. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  29. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  30. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  31. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  32. package/dist/components/base/InViewRender/index.tsx +1 -1
  33. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  34. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  35. package/dist/components/base/LazyLayoutLoad/index.weapp.tsx +1 -1
  36. package/dist/components/base/LazyLoadImage/const.ts +1 -1
  37. package/dist/components/base/LazyLoadImage/index.h5.module.scss +20 -20
  38. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  39. package/dist/components/base/MobileCommonHeader/index.module.scss +9 -0
  40. package/dist/components/base/MobileCommonHeader/index.tsx +1 -0
  41. package/dist/components/base/NetworkDataError/const.ts +1 -1
  42. package/dist/components/base/NetworkDataError/index.module.scss +4 -0
  43. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  44. package/dist/components/base/Price/Double/index.tsx +1 -1
  45. package/dist/components/base/Price/index.tsx +1 -1
  46. package/dist/components/base/Skeleton/index.tsx +1 -1
  47. package/dist/components/decorate/DecorateFloorModule/index.module.scss +21 -2
  48. package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
  49. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  50. package/dist/components/floorItem.jd.tsx +1 -1
  51. package/dist/components/floorItem.tsx +1 -1
  52. package/dist/components/floorItem.weapp.tsx +1 -1
  53. package/dist/components/isv/Floor/index.tsx +1 -1
  54. package/dist/components/remoteFloorItem.tsx +1 -1
  55. package/dist/interface/common.ts +1 -1
  56. package/dist/interface/component.ts +1 -1
  57. package/dist/interface/jumpEventReport.ts +1 -1
  58. package/dist/interface/service.ts +1 -1
  59. package/dist/interface/utils.ts +1 -1
  60. package/dist/jumpEventReport/base.ts +1 -1
  61. package/dist/jumpEventReport/const.ts +1 -1
  62. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  63. package/dist/jumpEventReport/index.h5.ts +1 -1
  64. package/dist/jumpEventReport/index.jd.ts +1 -1
  65. package/dist/jumpEventReport/index.weapp.ts +1 -1
  66. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  67. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  68. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  69. package/dist/jumpEventReport/web/report.ts +1 -1
  70. package/dist/jumpEventReport/web.base.ts +1 -1
  71. package/dist/jumpEventReport/web.jd.ts +1 -1
  72. package/dist/jumpEventReport/web.jdb.ts +1 -1
  73. package/dist/jumpEventReport/web.jdjch.ts +1 -1
  74. package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
  75. package/dist/jumpEventReport/web.pc.ts +1 -0
  76. package/dist/jumpEventReport/web.tjapp.ts +1 -0
  77. package/dist/jumpEventReport/web.tjm.ts +1 -0
  78. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  79. package/dist/modules/ContainerFloorList/index.h5.module.scss +17 -1
  80. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  81. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  82. package/dist/open/api/environment.ts +1 -1
  83. package/dist/open/api/index.ts +1 -1
  84. package/dist/open/api/jump copy.ts +1 -1
  85. package/dist/open/api/shopMember.ts +1 -1
  86. package/dist/open/api/track.ts +1 -1
  87. package/dist/open/api/util.ts +1 -1
  88. package/dist/open/components/index.ts +1 -1
  89. package/dist/sass/app.h5.scss +39 -3
  90. package/dist/sass/base.scss +12 -0
  91. package/dist/service/fetchGateway.ts +1 -1
  92. package/dist/service/http/const.ts +1 -1
  93. package/dist/service/requestServer.ts +1 -1
  94. package/dist/utils/connectNativeJsBridge.ts +1 -1
  95. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  96. package/dist/utils/draExceptionAndProfile.ts +1 -1
  97. package/dist/utils/h5Utils.ts +1 -1
  98. package/dist/utils/index.h5.ts +1 -1
  99. package/dist/utils/index.ts +1 -1
  100. package/dist/utils/index.weapp.ts +1 -1
  101. package/dist/utils/jm-common.js +1 -1
  102. package/dist/utils/sgmCodeUtils.ts +1 -0
  103. package/dist/utils/taroRenderUtil.ts +1 -0
  104. package/dist/utils/utils.ts +1 -1
  105. package/dist/wxapp/api/helper.js +1 -0
  106. package/dist/wxapp/components/launch-app/index.js +1 -0
  107. package/dist/wxapp/components/launch-app/index.json +5 -0
  108. package/dist/wxapp/components/launch-app/index.wxml +0 -0
  109. package/dist/wxapp/components/launch-app/index.wxss +0 -0
  110. package/dist/wxapp/components/subscribe-guider/helper.js +1 -0
  111. package/dist/wxapp/components/subscribe-guider/index.js +1 -0
  112. package/dist/wxapp/components/subscribe-guider/index.json +5 -0
  113. package/dist/wxapp/components/subscribe-guider/index.wxml +0 -0
  114. package/dist/wxapp/components/subscribe-guider/index.wxss +0 -0
  115. package/package.json +2 -1
  116. package/dist/components/base/Skeleton/old.tsx +0 -1
  117. package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
@@ -1 +1 @@
1
- import React, { useCallback, useEffect, useRef, useState } from 'react'
2
1
  const [componentShowState, setComponentShowState] = useState(false)
3
2
  const componentLazyRef = useRef<HTMLElement | null>(null)
4
3
  const componentShowStateRef = useRef(false)
5
4
  const needShowHighVersion = isH5AndJdShopViewH5Scroll && !(global.info.queryInfo?.downgraded && global.info.queryInfo.downgraded === "true")
6
5
  useEffect(() => {
7
6
  if(needShowHighVersion) return
8
7
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
9
8
  !componentShowStateRef.current && dealPageScrollInfo(latestRes)
10
9
  Taro.eventCenter.on(TaroEventType.PAGE_SCROLL, (res) => {
11
10
  !componentShowStateRef.current && dealPageScrollInfo(res)
12
11
  })
13
12
 
14
13
  if (typeof displayHeight === 'undefined' || typeof offSetY === 'undefined') return
15
14
  <View
16
15
  ref={ componentLazyRef }
17
16
  className={classNames(
18
17
  imageStyle['d-app-lazy-image'],
19
18
  {
20
19
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
21
20
  },
22
21
  {
23
22
  [imageStyle['d-hide-image-error']]: imageErrState,
24
23
  },
25
24
  {
26
25
  [imageStyle['d-load-completed']]: loadSuccess,
27
26
  },
28
27
  {
29
28
  'd-imag-rendering-crisp-edges':
30
29
  !taroJdBaseInfo.info.pageInfo.isVipShop &&
31
30
  imagRenderingSet,
32
31
  },
33
32
  'J_html5ImageBg',
34
33
  className,
35
34
  )}
36
35
  style={{
37
36
  ...style,
38
37
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
39
38
  >
40
39
  {(componentShowState || lazyLoad === false) && <img
41
40
  src={getQualityImage(
42
41
  imgSrc,
43
42
  taroJdBaseInfo.info.pageInfo.isVipShop
44
43
  ? NetWorkTypeQuality['perfect']
45
44
  : NetWorkTypeQuality[getNetWorkType],
46
45
  )}
47
46
  onLoad={imageLoad.bind(this, imgSrc)}
48
47
  onError={imageError}
49
48
  />}
50
49
  </View>
51
50
  ) : (
52
51
  <Image
53
52
  style={{
54
53
  ...style,
55
54
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
56
55
  }}
57
56
  className={classNames(
58
57
  imageStyle['d-lazy-image'],
59
58
  {
60
59
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
61
60
  },
62
61
  {
63
62
  [imageStyle['d-hide-image-error']]: imageErrState,
64
63
  },
65
64
  {
66
65
  [imageStyle['d-load-completed']]: loadSuccess,
67
66
  },
68
67
  {
69
68
  'd-imag-rendering-crisp-edges': imagRenderingSet,
70
69
  },
71
70
  className,
72
71
  )}
73
72
  src={getQualityImage(
74
73
  imgSrc,
75
74
  NetWorkTypeQuality[getNetWorkType],
76
75
  )}
77
76
  lazyLoad={isChartH5 ? false : lazyLoad}
78
77
  onError={imageError}
79
78
  onLoad={imageLoad.bind(this, imgSrc)}
80
79
  {...otherOption}
81
80
  />
82
81
  )
82
+ import React, { useCallback, useEffect, useRef, useState } from 'react'
83
83
  TaroEventType,
84
84
  const {
85
85
  src,
86
86
  lazyLoad,
87
87
  imagRenderingSet,
88
88
  width,
89
89
  height,
90
90
  className,
91
91
  isSkuImage,
92
92
  hideErrorImage,
93
93
  style,
94
94
  backgroundColor,
95
95
  errorSrc,
96
96
  onLoad,
97
97
  onError,
98
98
  ...otherOption
99
99
  } = props
100
100
  getNetWorkType === NetWorkTypeQuality.default &&
101
101
  (getNetWorkType = taroJdBaseInfo.info.sysInfo.netWorkType)
102
102
  const [loadSuccess, setLoadSuccess] = useState(false)
103
103
  const [imageErrState, setImageErrState] = useState(false)
104
104
  const [componentShowState, setComponentShowState] = useState(false)
105
105
  const [imgSrc, setImgSrc] = useState(src)
106
106
  const componentLazyRef = useRef<HTMLElement | null>(null)
107
107
  const componentShowStateRef = useRef(false)
108
108
  const needShowHighVersion = isH5AndJdShopViewH5Scroll && !(global.info.queryInfo?.downgraded && global.info.queryInfo.downgraded === "true")
109
109
  const imageError = useCallback(
110
110
  (e) => {
111
111
  console.log('图片加载错误', e)
112
112
  errorSrc && setImgSrc(errorSrc)
113
113
  hideErrorImage && setImageErrState(true)
114
114
  typeof onError === 'function' && onError(e, src, props)
115
115
  },
116
116
  [src],
117
117
  )
118
118
 
119
119
  const imageLoad = useCallback(
120
120
  (_src, event) => {
121
121
  setLoadSuccess(true)
122
122
  typeof onLoad === 'function' && onLoad(event, src, props)
123
123
  },
124
124
  [src],
125
125
  )
126
126
 
127
127
  const changeStyleIncludeWidthAndHeightAndBgColor = () => {
128
128
  const changeStyle = {}
129
129
  width && (changeStyle['width'] = width)
130
130
  height && (changeStyle['height'] = height)
131
131
  backgroundColor && (changeStyle['backgroundColor'] = backgroundColor)
132
132
  return changeStyle
133
133
  }
134
134
  useEffect(() => {
135
135
  if(needShowHighVersion) return
136
136
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
137
137
  !componentShowStateRef.current && dealPageScrollInfo(latestRes)
138
138
  Taro.eventCenter.on(TaroEventType.PAGE_SCROLL, (res) => {
139
139
  !componentShowStateRef.current && dealPageScrollInfo(res)
140
140
  })
141
141
  }, [])
142
142
 
143
143
  const dealPageScrollInfo = (res) => {
144
144
  const { displayHeight, offSetY } = getNativePageScrollRes(res) || {}
145
145
  if (typeof displayHeight === 'undefined' || typeof offSetY === 'undefined') return
146
146
  if (componentLazyRef.current) {
147
147
  const eleClientRect =
148
148
  componentLazyRef.current.getBoundingClientRect()
149
149
  const getContainerHeightOffSetY =
150
150
  displayHeight * 1.5 + offSetY
151
151
  const eleOffsetTop = Math.ceil(eleClientRect.top)
152
152
  const eleOffsetHeight = Math.ceil(eleClientRect.height)
153
153
  if (!componentShowStateRef.current) {
154
154
  if (getContainerHeightOffSetY > eleOffsetTop) {
155
155
  componentShowStateRef.current = true
156
156
  setComponentShowState(true)
157
157
  }
158
158
  }
159
159
  }
160
160
  }
161
161
  return (
162
162
  (isH5AndJdShopView && global?.config?.needImageLazy !== false && !needShowHighVersion && !isAppStowShop) ? (
163
163
  <View
164
164
  ref={ componentLazyRef }
165
165
  className={classNames(
166
166
  imageStyle['d-app-lazy-image'],
167
167
  {
168
168
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
169
169
  },
170
170
  {
171
171
  [imageStyle['d-hide-image-error']]: imageErrState,
172
172
  },
173
173
  {
174
174
  [imageStyle['d-load-completed']]: loadSuccess,
175
175
  },
176
176
  {
177
177
  'd-imag-rendering-crisp-edges':
178
178
  !taroJdBaseInfo.info.pageInfo.isVipShop &&
179
179
  imagRenderingSet,
180
180
  },
181
181
  'J_html5ImageBg',
182
182
  className,
183
183
  )}
184
184
  style={{
185
185
  ...style,
186
186
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
187
187
  }}
188
188
  {...otherOption}
189
189
  >
190
190
  {(componentShowState || lazyLoad === false) && <img
191
191
  src={getQualityImage(
192
192
  imgSrc,
193
193
  taroJdBaseInfo.info.pageInfo.isVipShop
194
194
  ? NetWorkTypeQuality['perfect']
195
195
  : NetWorkTypeQuality[getNetWorkType],
196
196
  )}
197
197
  onLoad={imageLoad.bind(this, imgSrc)}
198
198
  onError={imageError}
199
199
  />}
200
200
  </View>
201
201
  ) : (
202
202
  <Image
203
203
  style={{
204
204
  ...style,
205
205
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
206
206
  }}
207
207
  className={classNames(
208
208
  imageStyle['d-lazy-image'],
209
209
  {
210
210
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
211
211
  },
212
212
  {
213
213
  [imageStyle['d-hide-image-error']]: imageErrState,
214
214
  },
215
215
  {
216
216
  [imageStyle['d-load-completed']]: loadSuccess,
217
217
  },
218
218
  {
219
219
  'd-imag-rendering-crisp-edges': imagRenderingSet,
220
220
  },
221
221
  className,
222
222
  )}
223
223
  src={getQualityImage(
224
224
  imgSrc,
225
225
  NetWorkTypeQuality[getNetWorkType],
226
226
  )}
227
227
  lazyLoad={isChartH5 ? false : lazyLoad}
228
228
  onError={imageError}
229
229
  onLoad={imageLoad.bind(this, imgSrc)}
230
230
  {...otherOption}
231
231
  />
232
232
  )
233
233
  )
234
234
  lazyLoad: true,
235
235
  isSkuImage: false,
236
236
  hideErrorImage: false,
237
237
  imagRenderingSet: true,
238
238
  src: null,
239
239
  style: null,
240
240
  width: null,
241
241
  height: null,
242
242
  backgroundColor: null,
243
243
  className: null,
244
244
  errorSrc: null,
245
245
  onLoad: null,
246
246
  onError: null,
@@ -0,0 +1,9 @@
1
+
2
+ .d-mobile-header-layout {
3
+ position: relative;
4
+ z-index: 12;
5
+ .d-mobile-common-tip,
6
+ .d-mobile-common-header {
7
+ position: relative;
8
+ }
9
+ }
@@ -0,0 +1 @@
1
+ import React, { useEffect, useContext, useState } from 'react'
2
  const { title, openAppParams, style, hasCommonHeader = true, hasDownloadTips = true, headerParams } = props
1
3
  useEffect(() => {
2
4
  hasCommonHeader && initCommonHeader()
3
5
  hasDownloadTips && initDownloadAppLayerConfigData()
4
6
  }, [])
5
7
  const initCommonHeader = () => {
6
8
  if (window?.MCommonHeaderBottom) {
7
9
  const mchb = new MCommonHeaderBottom()
8
10
  const headerArg = {
9
11
  moduleName: 'shop',
10
12
  hrederId: 'm_common_header',
11
13
  title,
12
14
  stype: 1,
13
15
  onClickJdkey: function () {
14
16
  console.log('==>m_common_header jdkey click.')
15
17
  },
16
18
  ...headerParams
17
19
  }
18
20
  mchb.header(headerArg)
19
21
  }
20
22
  }
21
23
  const initDownloadAppLayerConfigData = () => {
22
24
  const getEle = document.getElementById('m_common_tip')
23
25
  getEle &&
24
26
  window.$ &&
25
27
  window.$.downloadAppLayerConfigData &&
26
28
  window.$.downloadAppLayerConfigData({
27
29
  tipId: 'm_common_tip',
28
30
  M_sourceFrom: 'jshop',
29
31
  bottom: 74,
30
32
  onClickTipX: () => {
31
33
  Taro.eventCenter.trigger(
32
34
  TaroEventType.DOWN_LOAD_APP_CLOSE_CHANGE,
33
35
  true,
34
36
  )
35
37
  },
36
38
  downloadAppPlugIn: {
37
39
  M_sourceFrom: 'jshop',
38
40
  openAppBtnId: 'download_openapp',
39
41
  downAppURl: '//conecli.com/downloadApp/download.html?channel=jd-m',
40
42
  inteneUrl: 'openapp.jdmobile://virtual?',
41
43
  inteneUrlParams: {
42
44
  category: 'jump',
43
45
  des: 'jshopMain',
44
46
  shopId: `${global.info.queryInfo.shopId || ''}`,
45
47
  venderId: `${global.info.queryInfo.venderId || ''}`,
46
48
  sourceType: global.info.queryInfo?.sourceType || 'M-H5',
47
49
  sourceValue: global.info.queryInfo?.sourceValue || 'Mshop',
48
50
  ...openAppParams,
49
51
  },
50
52
  },
51
53
  })
52
54
  }
53
55
  return !isWxMiniH5View && !isJdApp ? (
54
56
  <View
55
57
  className={mobileCommonHeaderStyle['d-mobile-header-layout']}
56
58
  style={style}
57
59
  >
58
60
  <View
59
61
  id="m_common_tip"
60
62
  className={mobileCommonHeaderStyle['d-mobile-common-tip']}
61
63
  />
62
64
  {hasCommonHeader && (
63
65
  <View
64
66
  id="m_common_header"
65
67
  className={mobileCommonHeaderStyle['d-mobile-common-header']}
66
68
  />
67
69
  )}
68
70
  </View>
69
71
  ) : null
70
72
  title: '店铺',
71
73
  openAppParams: {},
@@ -1 +1 @@
1
- import { NETWORK_DATA_TYPE } from '../../../common/const'
2
1
  [NETWORK_DATA_TYPE.NO_NET_WORK]: '网络连接已断开',
3
2
  [NETWORK_DATA_TYPE.DATA_ERROR]: '数据加载失败',
4
3
  [NETWORK_DATA_TYPE.NO_DATA]: '你访问的内容飞到太空了',
5
4
  [NETWORK_DATA_TYPE.RISK]: '活动太火爆',
6
5
  [NETWORK_DATA_TYPE.NO_NET_WORK]: '请检查您的网络设置',
7
6
  [NETWORK_DATA_TYPE.DATA_ERROR]: '请稍后重试',
8
7
  [NETWORK_DATA_TYPE.NO_DATA]: '',
9
8
  [NETWORK_DATA_TYPE.RISK]: '页面加载失败,请稍后再试',
10
9
  NETWORK_DATA_TYPE.NO_NET_WORK,
11
10
  NETWORK_DATA_TYPE.DATA_ERROR,
12
11
  NETWORK_DATA_TYPE.NO_DATA,
13
12
  NETWORK_DATA_TYPE.RISK,
14
13
  No_Data_Bmall:'no-data-bmall',
14
+ import { NETWORK_DATA_TYPE } from '../../../common/const'
15
15
  [NETWORK_DATA_TYPE.NO_NET_WORK]: '网络连接已断开',
16
16
  [NETWORK_DATA_TYPE.DATA_ERROR]: '数据加载失败',
17
17
  [NETWORK_DATA_TYPE.NO_DATA]: '你访问的内容飞到太空了',
18
18
  [NETWORK_DATA_TYPE.RISK]: '活动太火爆',
19
19
  [NETWORK_DATA_TYPE.NO_NET_WORK]: '请检查您的网络设置',
20
20
  [NETWORK_DATA_TYPE.DATA_ERROR]: '请稍后重试',
21
21
  [NETWORK_DATA_TYPE.NO_DATA]: '',
22
22
  [NETWORK_DATA_TYPE.RISK]: '页面加载失败,请稍后再试',
23
23
  NETWORK_DATA_TYPE.NO_NET_WORK,
24
24
  NETWORK_DATA_TYPE.DATA_ERROR,
25
25
  NETWORK_DATA_TYPE.NO_DATA,
26
26
  NETWORK_DATA_TYPE.RISK,
27
27
  No_Data_Bmall:'no-data-bmall',
@@ -50,6 +50,10 @@
50
50
  .d-no-data-tip-1 {
51
51
  background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/152550/40/8432/21643/5fc9cae0E5391a506/523da679188ff687.png');
52
52
  }
53
+
54
+ .d-no-data-tip-2 {
55
+ background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/142705/35/17776/5911/5fd1e62dE4fbc2300/3ee1d4160db1dac6.png');
56
+ }
53
57
  .d-no-network-err-tip {
54
58
  background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/146556/1/17745/7493/5fd1e62dE86e86669/96f5c91befa8e991.png');
55
59
  }
@@ -1 +1 @@
1
- import { Button, View } from '@tarojs/components'
2
1
  NetWorkErrorSubTip,
3
2
  subMessage,
4
3
  backgroundColorWhite,
5
4
  const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType]
6
5
  const useErrorSubTip = subMessage? subMessage: NetWorkErrorSubTip[netWorkDataType]
7
6
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
8
7
  const maxHeight = latestRes.displayHeight || 546
9
8
  style={{maxHeight: isMemberPage ? '100vh' : maxHeight}}
10
9
  {useErrorSubTip? <View className={netWorkErrorStyle['d-error-sub-tip']}>{useErrorSubTip}</View>: null}
11
10
  <Button
12
11
  onClick={refershInitData}
13
12
  className={classNames(
14
13
  netWorkErrorStyle['d-opt-btn'],
15
14
  'd-button-no-border',
16
15
  )}
17
16
  plain
18
17
  size="mini"
19
18
  >
20
19
  重新加载
21
20
  </Button>
22
21
  )}
23
22
  subMessage: '',
23
+ import { Button, View } from '@tarojs/components'
24
24
  NetWorkErrorList,
25
25
  NetWorkErrorTip,
26
26
  NetWorkErrorSubTip,
27
27
  NetWorkShowType,
28
28
  NetWork_Image_Type,
29
29
  const {
30
30
  className,
31
31
  message,
32
32
  subMessage,
33
33
  btnLabel,
34
34
  backgroundColorWhite,
35
35
  netWorkDataType,
36
36
  netWorkShowType,
37
37
  netWorkImageType,
38
38
  refreshCallBackFn,
39
39
  viewMaxHeight
40
40
  } = props
41
41
  const refershInitData = useCallback(() => {
42
42
  refreshCallBackFn && refreshCallBackFn(true)
43
43
  }, [])
44
44
  const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType]
45
45
  const useErrorSubTip = subMessage
46
46
  ? subMessage
47
47
  : NetWorkErrorSubTip[netWorkDataType]
48
48
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
49
49
  const maxHeight = latestRes.displayHeight || 546
50
50
  return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
51
51
  <View
52
52
  style={{ maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight }}
53
53
  className={classNames(
54
54
  netWorkErrorStyle['d-shop-network'],
55
55
  {
56
56
  [netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
57
57
  },
58
58
  {
59
59
  [netWorkErrorStyle['d-shop-network-part']]:
60
60
  netWorkShowType === NetWorkShowType.PART,
61
61
  },
62
62
  {
63
63
  [netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
64
64
  },
65
65
  'flexible-center-box',
66
66
  className,
67
67
  )}
68
68
  >
69
69
  <View className={classNames(netWorkErrorStyle['d-error-content'],'d-error-content')}>
70
70
  <View
71
71
  className={classNames(
72
72
  netWorkErrorStyle['d-error-type'],
73
73
  netWorkErrorStyle[`d-${netWorkDataType}`],
74
74
  netWorkErrorStyle[`d-${netWorkImageType}`],
75
75
  'd-error-type'
76
76
  )}
77
77
  />
78
78
  <View className={classNames(netWorkErrorStyle['d-error-tip'],'d-error-tip')}>
79
79
  {useErrorTip}
80
80
  </View>
81
81
  {useErrorSubTip ? <View className={classNames(netWorkErrorStyle['d-error-sub-tip'],'d-error-sub-tip')}>{useErrorSubTip}</View> : null}
82
82
  <View className={'flexible-horizontal-center-box'}>
83
83
  {refreshCallBackFn && (
84
84
  <Button
85
85
  onClick={refershInitData}
86
86
  className={classNames(
87
87
  netWorkErrorStyle['d-opt-btn'],
88
88
  'd-button-no-border',
89
89
  'd-opt-btn'
90
90
  )}
91
91
  plain
92
92
  size="mini"
93
93
  >
94
94
  {btnLabel}
95
95
  </Button>
96
96
  )}
97
97
  </View>
98
98
  </View>
99
99
  </View>
100
100
  ) : null
101
101
  className: '',
102
102
  message: '',
103
103
  subMessage: '',
104
104
  btnLabel: '重新加载',
105
105
  backgroundColorWhite: false,
106
106
  netWorkDataType: NETWORK_DATA_TYPE.NORMAL,
107
107
  netWorkImageType: NetWork_Image_Type.No_Data_Default_Tip,
108
108
  netWorkShowType: NetWorkShowType.FULL,
109
109
  refreshCallBackFn: null,
110
110
  viewMaxHeight: ''