@conecli/cone-render 0.10.1-shop3.9 → 0.10.1-shop3.91

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/README.md +1 -1
  2. package/dist/api/index.ts +1 -1
  3. package/dist/common/accessibility.h5.ts +1 -0
  4. package/dist/common/accessibility.ts +0 -0
  5. package/dist/common/const.ts +1 -1
  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.weapp.tsx +1 -0
  11. package/dist/common/jssdk.ts +1 -1
  12. package/dist/common/jssdk.weapp.ts +1 -0
  13. package/dist/common/pageType.ts +1 -1
  14. package/dist/common/token/index.h5.ts +1 -1
  15. package/dist/common/token/token.jd.ts +1 -1
  16. package/dist/common/wxappApi.ascf.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.tsx +1 -1
  22. package/dist/components/base/CustomVideo/index.tsx +1 -1
  23. package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
  24. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  25. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  26. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  27. package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
  28. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  29. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  30. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  31. package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
  32. package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
  33. package/dist/components/base/NetworkDataError/const.ts +1 -1
  34. package/dist/components/base/NetworkDataError/index.module.scss +118 -72
  35. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  36. package/dist/components/base/Price/Base/index.module.scss +12 -0
  37. package/dist/components/base/Price/Base/index.tsx +1 -1
  38. package/dist/components/base/Price/Double/index.module.scss +25 -1
  39. package/dist/components/base/Price/Double/index.tsx +1 -1
  40. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  41. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  42. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  43. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  44. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  45. package/dist/components/floorItem.tsx +1 -1
  46. package/dist/components/isv/Floor/index.tsx +1 -1
  47. package/dist/components/remoteFloorItem.tsx +1 -1
  48. package/dist/config/env.ts +1 -1
  49. package/dist/interface/common.ts +1 -1
  50. package/dist/interface/component.ts +1 -1
  51. package/dist/interface/jumpEventReport.ts +1 -1
  52. package/dist/interface/service.ts +1 -1
  53. package/dist/jumpEventReport/base.ts +1 -1
  54. package/dist/jumpEventReport/const.ts +1 -1
  55. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  56. package/dist/jumpEventReport/index.h5.ts +1 -1
  57. package/dist/jumpEventReport/index.jd.ts +1 -1
  58. package/dist/jumpEventReport/index.weapp.ts +1 -1
  59. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  60. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  61. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
  62. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  63. package/dist/jumpEventReport/web/report.ts +1 -1
  64. package/dist/jumpEventReport/web.base.ts +1 -1
  65. package/dist/jumpEventReport/web.jd.ts +1 -1
  66. package/dist/jumpEventReport/web.pc.ts +1 -1
  67. package/dist/jumpEventReport/web.tjm.ts +1 -1
  68. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  69. package/dist/language/en_US.json +309 -0
  70. package/dist/language/zh_CN.json +309 -0
  71. package/dist/language/zh_HK.json +309 -0
  72. package/dist/libs/openShopBridge.js +161 -0
  73. package/dist/libs/openShopBridge.min.js +1 -0
  74. package/dist/libs/taroAppReport.js +2 -2
  75. package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
  76. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  77. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  78. package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
  79. package/dist/open/api/environment.ts +1 -1
  80. package/dist/open/api/shopMember.ts +1 -1
  81. package/dist/open/api/shopMember.weapp.ts +1 -0
  82. package/dist/open/api/track.ts +1 -1
  83. package/dist/open/api/util.ts +1 -1
  84. package/dist/open/components/index.ts +1 -1
  85. package/dist/open/index.ts +1 -1
  86. package/dist/sass/app.h5.scss +27 -1
  87. package/dist/sass/base.scss +8 -4
  88. package/dist/service/fetchGateway.ts +1 -1
  89. package/dist/service/fetchGateway.weapp.ts +1 -1
  90. package/dist/service/fetchJsonp.weapp.ts +1 -0
  91. package/dist/service/http/const.ts +1 -1
  92. package/dist/service/http/h5Http.ts +1 -1
  93. package/dist/service/http/httpInterceptors.weapp.ts +1 -0
  94. package/dist/service/requestServer.h5.ts +1 -1
  95. package/dist/service/requestServer.ts +1 -1
  96. package/dist/service/requestServer.weapp.ts +1 -1
  97. package/dist/utils/connectNativeJsBridge.ts +1 -1
  98. package/dist/utils/h5Utils.ts +1 -1
  99. package/dist/utils/harmonyCallRouter.h5.ts +1 -0
  100. package/dist/utils/harmonyCallRouter.ts +0 -0
  101. package/dist/utils/index.h5.ts +1 -1
  102. package/dist/utils/index.ts +1 -1
  103. package/dist/utils/index.weapp.ts +1 -1
  104. package/dist/utils/jumpExtMapUtil.ts +1 -0
  105. package/dist/utils/log.ts +1 -0
  106. package/dist/utils/{sColor.js → sColor.ts} +1 -1
  107. package/dist/utils/sColor.weapp.ts +1 -0
  108. package/dist/utils/utils.ts +1 -1
  109. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  110. package/dist/wxapp/common/user_info.js +1 -1
  111. package/package.json +162 -141
  112. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  113. package/dist/utils/priceUtils.js +0 -1
  114. /package/dist/utils/{jumpExtMapUtil.js → jumpExtMapUtil.h5.ts} +0 -0
@@ -1 +1 @@
1
- import React, {useEffect, useRef} from 'react'
2
1
  const { title, openAppParams, style, hasCommonHeader = true, hasDownloadTips = true, headerParams } = props
3
2
  const headerRef:any = useRef(null)
4
3
  useEffect(() => {
5
4
  hasCommonHeader && initCommonHeader()
6
5
  hasDownloadTips && initDownloadAppLayerConfigData()
7
6
  }, [])
8
7
  const isScrolledToTop = () => {
9
8
  return window.scrollY !== undefined ? window.scrollY === 0 :
10
9
  document.documentElement.scrollTop === 0 || document.body.scrollTop === 0;
11
10
  }
12
11
  const scrollEventFunc = () => {
13
12
  if(!headerRef.current) return
14
13
  const stickyTop = headerRef.current?.getBoundingClientRect()?.top || 0;
15
14
  if(Math.trunc(stickyTop) <= 0 && !isScrolledToTop()) {
16
15
  console.log('scroll 添加class',Math.trunc(stickyTop), isScrolledToTop())
17
16
  headerRef.current.classList.add('d-mobile-header-sticky');
18
17
  }else {
19
18
  console.log('scroll 移除class',Math.trunc(stickyTop), isScrolledToTop())
20
19
  headerRef.current.classList.remove('d-mobile-header-sticky');
21
20
  }
22
21
  }
23
22
  useEffect(() => {
24
23
  Taro.eventCenter.on(TaroEventType.PAGE_SCROLL,() => {
25
24
  scrollEventFunc()
26
25
  })
27
26
  },[])
28
27
  const initCommonHeader = () => {
29
28
  if (window?.MCommonHeaderBottom) {
30
29
  const mchb = new MCommonHeaderBottom()
31
30
  const headerArg = {
32
31
  moduleName: 'shop',
33
32
  hrederId: 'm_common_header',
34
33
  title,
35
34
  stype: 1,
36
35
  onClickJdkey: function () {
37
36
  console.log('==>m_common_header jdkey click.')
38
37
  },
39
38
  ...headerParams
40
39
  }
41
40
  mchb.header(headerArg)
42
41
  }
43
42
  }
44
43
  const initDownloadAppLayerConfigData = () => {
45
44
  const getEle = document.getElementById('m_common_tip')
46
45
  getEle &&
47
46
  window.$ &&
48
47
  window.$.downloadAppLayerConfigData &&
49
48
  window.$.downloadAppLayerConfigData({
50
49
  tipId: 'm_common_tip',
51
50
  M_sourceFrom: 'jshop',
52
51
  bottom: 74,
53
52
  onClickTipX: () => {
54
53
  Taro.eventCenter.trigger(
55
54
  TaroEventType.DOWN_LOAD_APP_CLOSE_CHANGE,
56
55
  true,
57
56
  )
58
57
  },
59
58
  downloadAppPlugIn: {
60
59
  M_sourceFrom: 'jshop',
61
60
  openAppBtnId: 'download_openapp',
62
61
  downAppURl: '//conecli.com/downloadApp/download.html?channel=jd-m',
63
62
  inteneUrl: 'openapp.jdmobile://virtual?',
64
63
  inteneUrlParams: {
65
64
  category: 'jump',
66
65
  des: 'jshopMain',
67
66
  shopId: `${global.info.queryInfo.shopId || ''}`,
68
67
  venderId: `${global.info.queryInfo.venderId || ''}`,
69
68
  sourceType: global.info.queryInfo?.sourceType || 'M-H5',
70
69
  sourceValue: global.info.queryInfo?.sourceValue || 'Mshop',
71
70
  ...openAppParams,
72
71
  },
73
72
  },
74
73
  })
75
74
  }
76
75
  return !isWxMiniH5View && !isJdApp ? (
77
76
  <View
78
77
  className={mobileCommonHeaderStyle['d-mobile-header-layout']}
79
78
  style={style}
80
79
  ref={headerRef}
81
80
  >
82
81
  <View
83
82
  id="m_common_tip"
84
83
  className={mobileCommonHeaderStyle['d-mobile-common-tip']}
85
84
  />
86
85
  {hasCommonHeader && (
87
86
  <View
88
87
  id="m_common_header"
89
88
  className={mobileCommonHeaderStyle['d-mobile-common-header']}
90
89
  />
91
90
  )}
92
91
  </View>
93
92
  ) : null
94
93
  title: '店铺',
95
94
  openAppParams: {},
95
+ import Taro from '@tarojs/taro'
96
96
  const { title, openAppParams, style, hasCommonHeader = true, hasDownloadTips = true, headerParams } = props
97
97
  const headerRef:any = useRef(null)
98
98
  useEffect(() => {
99
99
  hasCommonHeader && initCommonHeader()
100
100
  !isTjScence && hasDownloadTips && initDownloadAppLayerConfigData()
101
101
  }, [])
102
102
  const isScrolledToTop = () => {
103
103
  return window.scrollY !== undefined ? window.scrollY === 0 :
104
104
  document.documentElement.scrollTop === 0 || document.body.scrollTop === 0;
105
105
  }
106
106
  const scrollEventFunc = () => {
107
107
  if(!headerRef.current) return
108
108
  const stickyTop = headerRef.current?.getBoundingClientRect()?.top || 0;
109
109
  if(Math.trunc(stickyTop) <= 0 && !isScrolledToTop()) {
110
110
  console.log('scroll 添加class',Math.trunc(stickyTop), isScrolledToTop())
111
111
  headerRef.current.classList.add('d-mobile-header-sticky');
112
112
  }else {
113
113
  console.log('scroll 移除class',Math.trunc(stickyTop), isScrolledToTop())
114
114
  headerRef.current.classList.remove('d-mobile-header-sticky');
115
115
  }
116
116
  }
117
117
  useEffect(() => {
118
118
  Taro.eventCenter.on(TaroEventType.PAGE_SCROLL,() => {
119
119
  scrollEventFunc()
120
120
  })
121
121
  },[])
122
122
  const initCommonHeader = () => {
123
123
  if (window?.MCommonHeaderBottom) {
124
124
  const mchb = new MCommonHeaderBottom()
125
125
  const headerArg = {
126
126
  moduleName: 'shop',
127
127
  hrederId: 'm_common_header',
128
128
  title,
129
129
  stype: 1,
130
130
  onClickJdkey: function () {
131
131
  console.log('==>m_common_header jdkey click.')
132
132
  },
133
133
  ...headerParams
134
134
  }
135
135
  mchb.header(headerArg)
136
136
  }
137
137
  }
138
138
  const initDownloadAppLayerConfigData = () => {
139
139
  const getEle = document.getElementById('m_common_tip')
140
140
  getEle &&
141
141
  window.$ &&
142
142
  window.$.downloadAppLayerConfigData &&
143
143
  window.$.downloadAppLayerConfigData({
144
144
  tipId: 'm_common_tip',
145
145
  M_sourceFrom: 'jshop',
146
146
  bottom: 74,
147
147
  onClickTipX: () => {
148
148
  Taro.eventCenter.trigger(
149
149
  TaroEventType.DOWN_LOAD_APP_CLOSE_CHANGE,
150
150
  true,
151
151
  )
152
152
  },
153
153
  downloadAppPlugIn: {
154
154
  M_sourceFrom: 'jshop',
155
155
  openAppBtnId: 'download_openapp',
156
156
  downAppURl: '//conecli.com/downloadApp/download.html?channel=jd-m',
157
157
  inteneUrl: 'openapp.jdmobile://virtual?',
158
158
  inteneUrlParams: {
159
159
  category: 'jump',
160
160
  des: 'jshopMain',
161
161
  shopId: `${global.info.queryInfo.shopId || ''}`,
162
162
  venderId: `${global.info.queryInfo.venderId || ''}`,
163
163
  sourceType: global.info.queryInfo?.sourceType || 'M-H5',
164
164
  sourceValue: global.info.queryInfo?.sourceValue || 'Mshop',
165
165
  ...openAppParams,
166
166
  },
167
167
  },
168
168
  })
169
169
  }
170
170
  return !isWxMiniH5View && !isJdApp ? (
171
171
  <View
172
172
  className={mobileCommonHeaderStyle['d-mobile-header-layout']}
173
173
  style={style}
174
174
  ref={headerRef}
175
175
  >
176
176
  {hasDownloadTips && (
177
177
  <View
178
178
  id="m_common_tip"
179
179
  className={mobileCommonHeaderStyle['d-mobile-common-tip']}
180
180
  />
181
181
  )}
182
182
  {hasCommonHeader && (
183
183
  <View
184
184
  id="m_common_header"
185
185
  className={mobileCommonHeaderStyle['d-mobile-common-header']}
186
186
  />
187
187
  )}
188
188
  </View>
189
189
  ) : null
190
190
  title: '店铺',
191
191
  openAppParams: {},
@@ -0,0 +1 @@
1
+ const MobileCommonHeader = (props) => {
2
  console.log("MobileCommonHeader 京购暂无实现", props);
1
3
  return null
@@ -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]: global?.languageJsonData?.loseNetwork || '网络连接已断开',
16
16
  [NETWORK_DATA_TYPE.DATA_ERROR]:
17
17
  global?.languageJsonData?.highTraffic || '活动太火爆,访问人数较多',
18
18
  [NETWORK_DATA_TYPE.NO_DATA]: global?.languageJsonData?.highTraffic || '活动太火爆,访问人数较多',
19
19
  [NETWORK_DATA_TYPE.RISK]: global?.languageJsonData?.highTraffic || '活动太火爆,访问人数较多',
20
20
  [NETWORK_DATA_TYPE.NOT_LOGIN]: global?.languageJsonData?.notLogin || '登录后,购物更轻松~',
21
21
  [NETWORK_DATA_TYPE.NO_NET_WORK]: global?.languageJsonData?.checkNetwork || '请检查您的网络设置',
22
22
  [NETWORK_DATA_TYPE.DATA_ERROR]:
23
23
  global?.languageJsonData?.pageLoadFailed || '排队进场中,请稍后再试',
24
24
  [NETWORK_DATA_TYPE.NO_DATA]: global?.languageJsonData?.pageLoadFailed || '排队进场中,请稍后再试',
25
25
  [NETWORK_DATA_TYPE.RISK]: `${global?.languageJsonData?.pageLoadFailed || '排队进场中,请稍后再试'
26
26
  }。`,
27
27
  [NETWORK_DATA_TYPE.NOT_LOGIN]: '',
28
28
  NETWORK_DATA_TYPE.NO_NET_WORK,
29
29
  NETWORK_DATA_TYPE.DATA_ERROR,
30
30
  NETWORK_DATA_TYPE.NO_DATA,
31
31
  NETWORK_DATA_TYPE.RISK,
32
32
  NETWORK_DATA_TYPE.NOT_LOGIN,
33
33
  PART: 'part',
34
34
  FULL: 'full',
35
35
  No_Data_Default_Tip: 'no-data-default-tip',
36
36
  No_Data_Tip_1: 'no-data-tip-1',
37
37
  No_Data_Tip_2: 'no-data-tip-2',
38
38
  No_Network_Err_Tip: 'no-network',
39
39
  No_Data_Bmall: 'no-data-bmall',
40
40
  OLD: 'old',
41
41
  NEW: 'new',
@@ -1,94 +1,140 @@
1
1
 
2
2
  .d-shop-network {
3
- position: fixed;
4
- top: 0;
5
- left: 0;
6
- right: 0;
7
- bottom: 0;
8
- background: #e5e5e5;
9
- &.d-shop-network-white {
10
- background-color: #fff;
11
- }
12
- .d-error-content {
13
- text-align: center;
14
- }
3
+ position: fixed;
4
+ top: 0;
5
+ left: 0;
6
+ right: 0;
7
+ bottom: 0;
8
+ background: #e5e5e5;
9
+ &.d-shop-network-white {
10
+ background-color: #fff;
11
+ }
12
+ .d-error-content {
13
+ text-align: center;
14
+ &.d-new-style-content {
15
+ .d-data-error,
16
+ .d-no-data,
17
+ .d-no-data-tip-1,
18
+ .d-no-data-tip-2 {
19
+ width: 240px;
20
+ height: 240px;
21
+ background: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png')
22
+ 0 0 /240px 240px no-repeat;
23
+ }
24
+ .d-data-error-tip {
25
+ padding-bottom: 24px;
26
+ line-height: 38px;
27
+ font-size: 32px;
28
+ font-weight: 600;
29
+ color: #1a1a1a;
30
+ }
31
+ .d-data-error-sub-tip {
32
+ margin: 0;
33
+ font-size: 24px;
34
+ color: #505259;
35
+ }
36
+ .d-no-data-tip {
37
+ line-height: 44px;
38
+ font-size: 24px;
39
+ font-weight: normal;
40
+ color: #505259;
41
+ }
42
+ .d-no-data-sub-tip {
43
+ margin: 0;
44
+ font-weight: normal;
45
+ color: #505259;
46
+ }
47
+ .d-opt-btn {
48
+ width: 160px;
49
+ height: 64px;
50
+ line-height: 64px;
51
+ font-size: 28px;
52
+ color: #1a1a1a;
53
+ border-radius: 12px;
54
+ border: none;
55
+
56
+ &:after{
57
+ border: 1PX solid #C2C4CC;
58
+ }
59
+ }
60
+ }
61
+ }
15
62
 
16
- .d-error-tip {
17
- font-size: 28px;
18
- font-weight: bold;
19
- line-height: 28px;
20
- color: #8C8C8C;
21
- }
22
- .d-error-sub-tip {
23
- margin-top: 16px;
24
- font-size: 24px;
25
- line-height: 24px;
26
- color: #8C8C8C;
27
- }
28
- .d-error-type {
29
- width: 320px;
30
- height: 320px;
31
- background-size: contain;
32
- background-repeat: no-repeat;
63
+ .d-error-tip {
64
+ font-size: 28px;
65
+ font-weight: bold;
66
+ line-height: 28px;
67
+ color: #1a1a1a;
68
+ }
69
+ .d-error-sub-tip {
70
+ margin-top: 16px;
71
+ font-size: 24px;
72
+ line-height: 24px;
73
+ color: #8c8c8c;
74
+ }
75
+ .d-error-type {
76
+ width: 320px;
77
+ height: 320px;
78
+ background-size: contain;
79
+ background-repeat: no-repeat;
33
80
  margin: 0 auto;
34
- }
81
+ }
35
82
 
36
- .d-no-network {
37
- // background-image: url('https://m.360buyimg.com/imagetools/jfs/t1/219405/34/29129/32963/64892a0eF2c068392/86c3fcf9d980ff10.png');
38
- background-image: url('../../../assets/networkError.png');
39
- }
83
+ .d-no-network {
84
+ // background-image: url('https://m.360buyimg.com/imagetools/jfs/t1/219405/34/29129/32963/64892a0eF2c068392/86c3fcf9d980ff10.png');
85
+ background-image: url('../../../assets/networkError.png');
86
+ }
40
87
 
41
- .d-data-error {
42
- background-image: url('https://m.360buyimg.com/imagetools/jfs/t1/106708/34/36128/37234/64896f52Fed1530e0/7b403e068aae316c.png');
43
- }
88
+ .d-data-error {
89
+ background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png');
90
+ }
44
91
  .d-risk {
45
- background-image: url('https://m.360buyimg.com/imagetools/jfs/t1/106708/34/36128/37234/64896f52Fed1530e0/7b403e068aae316c.png');
92
+ background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png');
93
+ }
94
+ .d-no-data, .d-no-login {
95
+ background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png');
96
+ }
97
+ .d-no-data-tip-1 {
98
+ background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png');
46
99
  }
47
- .d-no-data {
48
- background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/190994/19/325/42717/6088fed0Ec4b502d5/0e8de7593fb0d06c.png');
49
- }
50
- .d-no-data-tip-1 {
51
- background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/152550/40/8432/21643/5fc9cae0E5391a506/523da679188ff687.png');
52
- }
53
-
54
100
  .d-no-data-tip-2 {
55
- background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/142705/35/17776/5911/5fd1e62dE4fbc2300/3ee1d4160db1dac6.png');
101
+ background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png');
102
+ }
103
+ .d-no-network-err-tip {
104
+ background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/146556/1/17745/7493/5fd1e62dE86e86669/96f5c91befa8e991.png');
56
105
  }
57
- .d-no-network-err-tip {
58
- background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/146556/1/17745/7493/5fd1e62dE86e86669/96f5c91befa8e991.png');
59
- }
60
106
  .d-no-data-bmall {
61
107
  background-image: url('https://img12.360buyimg.com/imagetools/jfs/t1/217798/34/32933/150484/64ccadf3Fde1a93bf/9b1b8929a9631469.png');
62
108
  }
63
-
64
- .d-opt-btn {
65
- display: flex;
66
- justify-content: center;
67
- align-items: center;
68
- width: 144px;
69
- height: 56px;
70
- margin-top: 32px;
71
- padding: 0;
72
- font-size: 24px;
73
- color: #fa2c19;
74
- border: 1PX solid #fa2c19;
75
- box-sizing: border-box;
76
- border-radius: 48px;
77
- &:active {
78
- opacity: 0.8;
79
- }
80
- }
109
+
110
+ .d-opt-btn {
111
+ display: flex;
112
+ justify-content: center;
113
+ align-items: center;
114
+ width: 144px;
115
+ height: 56px;
116
+ margin-top: 32px;
117
+ padding: 0;
118
+ font-size: 24px;
119
+ color: #fa2c19;
120
+ border: 1px solid #fa2c19;
121
+ box-sizing: border-box;
122
+ border-radius: 48px;
123
+ &:active {
124
+ opacity: 0.8;
125
+ }
126
+ }
81
127
  }
82
128
 
83
129
  .d-network-jd-shop-view {
84
- min-height: 500px;
130
+ min-height: 500px;
85
131
  }
86
132
 
87
133
  .d-shop-network-part {
88
- position: absolute;
89
- min-height: 500px;
90
- background: #f2f2f2;
134
+ position: absolute;
135
+ min-height: 500px;
136
+ background: #f2f2f2;
91
137
  }
92
138
  .d-shop-network-no-position {
93
- position: static;
139
+ position: static;
94
140
  }
@@ -1 +1 @@
1
- import { Button, View } from '@tarojs/components'
2
1
  NetWorkErrorList,
3
2
  NetWorkErrorTip,
4
3
  NetWorkErrorSubTip,
5
4
  NetWorkShowType,
6
5
  NetWork_Image_Type,
7
6
  const {
8
7
  className = '',
9
8
  message = '',
10
9
  subMessage = '',
11
10
  btnLabel = '重新加载',
12
11
  backgroundColorWhite = false,
13
12
  netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
14
13
  netWorkImageType = NetWork_Image_Type.No_Data_Default_Tip,
15
14
  netWorkShowType = NetWorkShowType.FULL,
16
15
  refreshCallBackFn = null,
17
16
  viewMaxHeight = '',
18
17
  noPosition = false,
19
18
  } = props
20
19
  const refershInitData = useCallback(() => {
21
20
  refreshCallBackFn && refreshCallBackFn(true)
22
21
  }, [])
23
22
  const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType]
24
23
  const useErrorSubTip = subMessage
25
24
  ? subMessage
26
25
  : NetWorkErrorSubTip[netWorkDataType]
27
26
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
28
27
  const maxHeight = latestRes.displayHeight || 546
29
28
  return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
30
29
  <View
31
30
  style={{
32
31
  maxHeight:
33
32
  viewMaxHeight !== ''
34
33
  ? viewMaxHeight
35
34
  : isMemberPage || isAppStowShop
36
35
  ? '100vh'
37
36
  : maxHeight,
38
37
  }}
39
38
  className={classNames(
40
39
  netWorkErrorStyle['d-shop-network'],
41
40
  {
42
41
  [netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
43
42
  },
44
43
  {
45
44
  [netWorkErrorStyle['d-shop-network-part']]:
46
45
  netWorkShowType === NetWorkShowType.PART,
47
46
  },
48
47
  {
49
48
  [netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
50
49
  },
51
50
  {
52
51
  [netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
53
52
  },
54
53
  'flexible-center-box',
55
54
  className,
56
55
  )}
57
56
  >
58
57
  <View
59
58
  className={classNames(
60
59
  netWorkErrorStyle['d-error-content'],
61
60
  'd-error-content',
62
61
  )}
63
62
  >
64
63
  <View
65
64
  className={classNames(
66
65
  netWorkErrorStyle['d-error-type'],
67
66
  netWorkErrorStyle[`d-${netWorkDataType}`],
68
67
  netWorkErrorStyle[`d-${netWorkImageType}`],
69
68
  'd-error-type',
70
69
  )}
71
70
  />
72
71
  <View
73
72
  className={classNames(
74
73
  netWorkErrorStyle['d-error-tip'],
75
74
  'd-error-tip',
76
75
  )}
77
76
  >
78
77
  {useErrorTip}
79
78
  </View>
80
79
  {useErrorSubTip ? (
81
80
  <View
82
81
  className={classNames(
83
82
  netWorkErrorStyle['d-error-sub-tip'],
84
83
  'd-error-sub-tip',
85
84
  )}
86
85
  >
87
86
  {useErrorSubTip}
88
87
  </View>
89
88
  ) : null}
90
89
  <View className={'flexible-horizontal-center-box'}>
91
90
  {refreshCallBackFn && (
92
91
  <Button
93
92
  onClick={refershInitData}
94
93
  className={classNames(
95
94
  netWorkErrorStyle['d-opt-btn'],
96
95
  'd-button-no-border',
97
96
  'd-opt-btn',
98
97
  )}
99
98
  plain
100
99
  size="mini"
101
100
  >
102
101
  {btnLabel}
103
102
  </Button>
104
103
  )}
105
104
  </View>
106
105
  </View>
107
106
  </View>
108
107
  ) : null
108
+ import { Button, View } from '@tarojs/components';
109
109
  NetWorkErrorList,
110
110
  NetWorkErrorTip,
111
111
  NetWorkErrorSubTip,
112
112
  NetWorkShowType,
113
113
  NetWork_Image_Type,
114
114
  NetWorkStyleType,
115
115
  const {
116
116
  className = '',
117
117
  message = '',
118
118
  subMessage = '',
119
119
  btnLabel = global?.languageJsonData?.reload || '重新加载',
120
120
  backgroundColorWhite = false,
121
121
  netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
122
122
  netWorkShowType = NetWorkShowType.FULL,
123
123
  netWorkImageType = NetWork_Image_Type.No_Data_Default_Tip,
124
124
  netWorkStyleType = NetWorkStyleType.OLD,
125
125
  refreshCallBackFn = null,
126
126
  viewMaxHeight = '',
127
127
  noPosition = false,
128
128
  } = props;
129
129
  const refershInitData = useCallback(() => {
130
130
  refreshCallBackFn && refreshCallBackFn(true);
131
131
  }, []);
132
132
  const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType];
133
133
  const useErrorSubTip = subMessage
134
134
  ? subMessage
135
135
  : message != ''
136
136
  ? ''
137
137
  : NetWorkErrorSubTip[netWorkDataType];
138
138
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {};
139
139
  const onePlusOneBottomPlaceHeight = global.info?.sysInfo?.onePlusOneBottomPlaceHeight
140
140
  ? global.info?.sysInfo?.onePlusOneBottomPlaceHeight + 20
141
141
  : 0;
142
142
  const maxHeight = latestRes.displayHeight || onePlusOneBottomPlaceHeight + 546;
143
143
  return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
144
144
  <View
145
145
  style={{
146
146
  maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight,
147
147
  }}
148
148
  className={classNames(
149
149
  netWorkErrorStyle['d-shop-network'],
150
150
  {
151
151
  [netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
152
152
  },
153
153
  {
154
154
  [netWorkErrorStyle['d-shop-network-part']]: netWorkShowType === NetWorkShowType.PART,
155
155
  },
156
156
  {
157
157
  [netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
158
158
  },
159
159
  {
160
160
  [netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
161
161
  },
162
162
  'flexible-center-box',
163
163
  className,
164
164
  )}
165
165
  >
166
166
  <View
167
167
  className={classNames(
168
168
  netWorkErrorStyle['d-error-content'],
169
169
  netWorkErrorStyle[`d-${netWorkStyleType}-style-content`],
170
170
  'd-error-content',
171
171
  )}
172
172
  >
173
173
  <View
174
174
  className={classNames(
175
175
  netWorkErrorStyle['d-error-type'],
176
176
  netWorkErrorStyle[`d-${netWorkDataType}`],
177
177
  netWorkErrorStyle[`d-${netWorkImageType}`],
178
178
  `d-${netWorkDataType}`,
179
179
  `d-${netWorkImageType}`,
180
180
  'd-error-type',
181
181
  )}
182
182
  />
183
183
  <View
184
184
  className={classNames(
185
185
  netWorkErrorStyle['d-error-tip'],
186
186
  netWorkErrorStyle[`d-${netWorkDataType}-tip`],
187
187
  `d-${netWorkDataType}-tip`,
188
188
  'd-error-tip',
189
189
  )}
190
190
  >
191
191
  {useErrorTip}
192
192
  </View>
193
193
  {useErrorSubTip ? (
194
194
  <View
195
195
  className={classNames(
196
196
  netWorkErrorStyle['d-error-sub-tip'],
197
197
  netWorkErrorStyle[`d-${netWorkDataType}-sub-tip`],
198
198
  `d-${netWorkDataType}-sub-tip`,
199
199
  'd-error-sub-tip',
200
200
  )}
201
201
  >
202
202
  {useErrorSubTip}
203
203
  </View>
204
204
  ) : null}
205
205
  <View className={'flexible-horizontal-center-box'}>
206
206
  {refreshCallBackFn && (
207
207
  <Button
208
208
  onClick={refershInitData}
209
209
  className={classNames(
210
210
  netWorkErrorStyle['d-opt-btn'],
211
211
  'd-button-no-border',
212
212
  'd-opt-btn',
213
213
  )}
214
214
  plain
215
215
  size="mini"
216
216
  >
217
217
  {btnLabel}
218
218
  </Button>
219
219
  )}
220
220
  </View>
221
221
  </View>
222
222
  </View>
223
223
  ) : null;