@conecli/cone-render 0.10.1-shop-beta.22 → 0.10.1-shop-beta.24

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 (121) 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/token.jd.ts +1 -1
  13. package/dist/components/ErrorBoundary.tsx +1 -1
  14. package/dist/components/base/CountDown/index.tsx +1 -1
  15. package/dist/components/base/CustomVideo/index.tsx +1 -1
  16. package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
  17. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  18. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  19. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  20. package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
  21. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  22. package/dist/components/base/JdLoading/index.module.scss +0 -2
  23. package/dist/components/base/JdLoading/index.tsx +1 -1
  24. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  25. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  26. package/dist/components/base/LazyLoadImage/index.tsx +1 -1
  27. package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
  28. package/dist/components/base/NetworkDataError/const.ts +1 -1
  29. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  30. package/dist/components/base/Price/Base/index.tsx +1 -1
  31. package/dist/components/base/Price/Double/index.module.scss +18 -0
  32. package/dist/components/base/Price/Double/index.tsx +1 -1
  33. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  34. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  35. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  36. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  37. package/dist/components/floorItem.tsx +1 -1
  38. package/dist/components/isv/Floor/index.tsx +1 -1
  39. package/dist/components/remoteFloorItem.tsx +1 -1
  40. package/dist/config/env.ts +1 -1
  41. package/dist/interface/common.ts +1 -1
  42. package/dist/interface/component.ts +1 -1
  43. package/dist/interface/jumpEventReport.ts +1 -1
  44. package/dist/interface/service.ts +1 -1
  45. package/dist/jumpEventReport/base.ts +1 -1
  46. package/dist/jumpEventReport/const.ts +1 -1
  47. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  48. package/dist/jumpEventReport/index.ts +1 -1
  49. package/dist/jumpEventReport/index.weapp.ts +1 -1
  50. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  51. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  52. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
  53. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  54. package/dist/jumpEventReport/web/report.ts +1 -1
  55. package/dist/jumpEventReport/web.base.ts +1 -1
  56. package/dist/jumpEventReport/web.jd.ts +1 -1
  57. package/dist/jumpEventReport/web.pc.ts +1 -1
  58. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  59. package/dist/language/en_US.json +179 -83
  60. package/dist/language/zh_CN.json +178 -82
  61. package/dist/language/zh_HK.json +178 -82
  62. package/dist/libs/openShopBridge.js +161 -0
  63. package/dist/libs/openShopBridge.min.js +1 -0
  64. package/dist/libs/taroAppReport.js +2 -2
  65. package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
  66. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  67. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  68. package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
  69. package/dist/open/api/index.ts +1 -1
  70. package/dist/open/api/shopMember.weapp.ts +1 -0
  71. package/dist/open/api/track.ts +1 -1
  72. package/dist/open/api/util.ts +1 -1
  73. package/dist/open/components/index.ts +1 -1
  74. package/dist/open/index.ts +1 -1
  75. package/dist/sass/app.h5.scss +6 -1
  76. package/dist/service/fetchGateway.ts +1 -1
  77. package/dist/service/fetchGateway.weapp.ts +1 -1
  78. package/dist/service/fetchJsonp.ts +1 -1
  79. package/dist/service/fetchJsonp.weapp.ts +1 -0
  80. package/dist/service/http/h5Http.ts +1 -1
  81. package/dist/service/http/http.ts +1 -1
  82. package/dist/service/http/httpInterceptors.weapp.ts +1 -0
  83. package/dist/service/requestServer.h5.ts +1 -1
  84. package/dist/service/requestServer.ts +1 -1
  85. package/dist/service/requestServer.weapp.ts +1 -1
  86. package/dist/utils/connectNativeJsBridge.ts +1 -1
  87. package/dist/utils/h5Utils.ts +1 -1
  88. package/dist/utils/harmonyCallRouter.h5.ts +1 -0
  89. package/dist/utils/harmonyCallRouter.ts +0 -0
  90. package/dist/utils/index.h5.ts +1 -1
  91. package/dist/utils/index.ts +1 -1
  92. package/dist/utils/index.weapp.ts +1 -1
  93. package/dist/utils/intersectionObserver.ts +1 -1
  94. package/dist/utils/sColor.weapp.ts +1 -0
  95. package/dist/utils/utils.ts +1 -1
  96. package/package.json +13 -15
  97. package/dist/common/index.dynamic.ts +0 -1
  98. package/dist/components/base/Dialog/index.dynamic.module.scss +0 -126
  99. package/dist/components/base/Dialog/index.dynamic.tsx +0 -1
  100. package/dist/components/base/DynamicTest/index.dynamic.module.scss +0 -15
  101. package/dist/components/base/DynamicTest/index.module.scss +0 -16
  102. package/dist/components/base/DynamicTest/index.tsx +0 -1
  103. package/dist/components/base/LazyLoadImage/index.dynamic.module.scss +0 -40
  104. package/dist/components/base/LazyLoadImage/index.dynamic.tsx +0 -1
  105. package/dist/components/base/NetworkDataError/index.dynamic.module.scss +0 -95
  106. package/dist/components/base/NetworkDataError/index.dynamic.tsx +0 -1
  107. package/dist/components/base/Price/Base/index.dynamic.module.scss +0 -63
  108. package/dist/components/base/Price/Base/index.dynamic.tsx +0 -1
  109. package/dist/components/base/Price/Double/index.dynamic.module.scss +0 -172
  110. package/dist/components/base/Price/Double/index.dynamic.tsx +0 -1
  111. package/dist/jumpEventReport/index.dynamic.ts +0 -1
  112. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  113. package/dist/open/api/shopMember.dynamic.ts +0 -1
  114. package/dist/open/components/index.dynamic.ts +0 -1
  115. package/dist/sass/app.dynamic.scss +0 -306
  116. package/dist/service/fetchGateway.h5.ts +0 -1
  117. package/dist/service/fetchJsonp.h5.ts +0 -1
  118. package/dist/service/http/colorSign.dynamic.ts +0 -1
  119. package/dist/utils/connectNativeJsBridge.dynamic.ts +0 -1
  120. package/dist/utils/priceUtils.js +0 -1
  121. /package/dist/utils/{sColor.js → sColor.ts} +0 -0
@@ -1 +0,0 @@
1
- import Taro from '@tarojs/taro'
2
  title: '',
3
1
  message: null,
4
2
  className: '',
5
3
  maskCloseable: false,
6
4
  show: true,
7
5
  hasFooter: true,
8
6
  isCustom: false,
9
7
  titleNode: null,
10
8
  bodyNode: null,
11
9
  footerNode: null,
12
10
  closeBtnText: '取消',
13
11
  closeBtnHideState: false,
14
12
  confirmBtnText: '确定',
15
13
  confirmBtnHideState: false,
16
14
  onBeforeConfirm: null,
17
15
  onConfirm: null,
18
16
  onClose: null,
19
17
  onBackground: null,
20
18
  onHide: null,
21
19
  onInit: null,
22
20
  isFormDialog: false,
23
21
  onFormSubmit: null,
24
22
  onFormReset: null,
25
23
  forbiddenBgScrollState: true,
26
24
  const [dialogShowState, setDialogShowState] = useState(false)
27
25
  const [dialogConfig, setDialogConfig] =
28
26
  useState<ComponentInterFace.DialogConfigProps>({
29
27
  type: DialogType.BASE,
30
28
  })
31
29
  const dialogBackFnRef = useRef<ComponentInterFace.DialogConfigBackFn>({})
32
30
  useEffect(() => {
33
31
 
34
32
  Taro.eventCenter.on(TaroEventType.DIALOG, (res) => {
35
33
  res.show ? dialogInit(res) : setDialogShowState(false)
36
34
  })
37
35
  return () => {
38
36
  Taro.eventCenter.off(TaroEventType.DIALOG)
39
37
  }
40
38
  }, [])
41
39
 
42
40
  useEffect(() => {
43
41
  if (dialogConfig.forbiddenBgScrollState && taroJdBaseInfo.rootEleNode) {
44
42
  !dialogShowState ? taroJdBaseInfo.rootEleNode.classList.remove('over-hidden') : taroJdBaseInfo.rootEleNode.classList.add('over-hidden')
45
43
  }
46
44
  }, [dialogConfig, dialogShowState])
47
45
  const dialogInit = useCallback((opts) => {
48
46
  const {
49
47
  onBeforeConfirm,
50
48
  onConfirm,
51
49
  onClose,
52
50
  onBackground,
53
51
  onHide,
54
52
  onInit,
55
53
  onFormSubmit,
56
54
  onFormReset,
57
55
  ...otherOpts
58
56
  } = opts
59
57
  const dialogOpts = Object.assign(
60
58
  {},
61
59
  {
62
60
  ...dialogDefaultConfig,
63
61
  type: DialogType.BASE,
64
62
  },
65
63
  otherOpts,
66
64
  )
67
65
  dialogBackFnRef.current = {
68
66
  onInit,
69
67
  onBeforeConfirm,
70
68
  onConfirm,
71
69
  onClose,
72
70
  onBackground,
73
71
  onHide,
74
72
  onFormSubmit,
75
73
  onFormReset,
76
74
  }
77
75
  setDialogConfig(dialogOpts)
78
76
  setDialogShowState(true)
79
77
  }, [])
80
78
  const hideDialog = useCallback(() => {
81
79
  setDialogShowState(false)
82
80
  }, [])
83
81
  const closeDialog = useCallback(() => {
84
82
  hideDialog()
85
83
  dialogBackFnRef.current.onHide &&
86
84
  typeof dialogBackFnRef.current.onHide === 'function' &&
87
85
  dialogBackFnRef.current.onHide(dialogConfig)
88
86
  }, [dialogConfig])
89
87
 
90
88
  const updateDialogContentFn = (changeDialogConfig) => {
91
89
  setDialogConfig({
92
90
  ...dialogConfig,
93
91
  ...changeDialogConfig
94
92
  })
95
93
  }
96
94
  useEffect(() => {
97
95
  dialogShowState &&
98
96
  dialogBackFnRef.current.onInit &&
99
97
  typeof dialogBackFnRef.current.onInit === 'function' &&
100
98
  dialogBackFnRef.current.onInit(hideDialog, dialogConfig, updateDialogContentFn)
101
99
  }, [dialogShowState])
102
100
 
103
101
  const dialogConfirmFn = useCallback(
104
102
  (e) => {
105
103
  e.stopPropagation()
106
104
  if (
107
105
  dialogBackFnRef.current.onBeforeConfirm &&
108
106
  typeof dialogBackFnRef.current.onBeforeConfirm === 'function'
109
107
  ) {
110
108
  dialogBackFnRef.current.onBeforeConfirm(
111
109
  hideDialog,
112
110
  dialogConfig,
113
111
  )
114
112
  } else {
115
113
  closeDialog()
116
114
  dialogBackFnRef.current.onConfirm &&
117
115
  typeof dialogBackFnRef.current.onConfirm === 'function' &&
118
116
  dialogBackFnRef.current.onConfirm(dialogConfig)
119
117
  }
120
118
  },
121
119
  [dialogConfig],
122
120
  )
123
121
  const dialogCloseFn = useCallback(
124
122
  (e) => {
125
123
  e.stopPropagation()
126
124
  closeDialog()
127
125
  dialogBackFnRef.current.onClose &&
128
126
  typeof dialogBackFnRef.current.onClose === 'function' &&
129
127
  dialogBackFnRef.current.onClose(dialogConfig)
130
128
  },
131
129
  [dialogConfig],
132
130
  )
133
131
  const dialogBackgroundFn = useCallback(() => {
134
132
  if (dialogConfig.maskCloseable) {
135
133
  closeDialog()
136
134
  }
137
135
  if (
138
136
  dialogBackFnRef.current.onBackground &&
139
137
  typeof dialogBackFnRef.current.onBackground === 'function'
140
138
  ) {
141
139
  dialogBackFnRef.current.onBackground()
142
140
  }
143
141
  }, [dialogConfig])
144
142
  const renderCustomViewCompontent = (children) => {
145
143
  return <>{children}</>
146
144
  }
147
145
  return dialogShowState ? renderCustomViewCompontent(
148
146
  <>
149
147
  <View
150
148
  className={classNames(dialogStyle['d-dialog-layout'],"J_customLayout")}
151
149
  onClick={dialogBackgroundFn}
152
150
  >
153
151
  <View
154
152
  className={classNames(
155
153
  dialogStyle['d-dialog-wrap'],
156
154
  dialogStyle[`d-dialog-type-${dialogConfig.type}`],
157
155
  {
158
156
  [dialogStyle['d-dialog-jdapp-wrap']]: isJdApp
159
157
  },
160
158
  'flexible-center-box',
161
159
  dialogConfig.className,
162
160
  )}
163
161
  >
164
162
  {dialogConfig.isCustom ? (
165
163
  dialogConfig.bodyNode ? (
166
164
  dialogConfig.bodyNode
167
165
  ) : null
168
166
  ) : (
169
167
  <View
170
168
  className={classNames(
171
169
  dialogStyle['d-dialog-content'],
172
170
  'd-dialog-content',
173
171
  )}
174
172
  onClick={(e) => e.stopPropagation()}
175
173
  >
176
174
  {dialogConfig.title && dialogConfig.title != '' && (
177
175
  <View
178
176
  className={classNames(
179
177
  dialogStyle['d-dialog-header'],
180
178
  'd-dialog-header',
181
179
  )}
182
180
  >
183
181
  {dialogConfig.title}
184
182
  </View>
185
183
  )}
186
184
  {dialogConfig.message && (
187
185
  <View
188
186
  className={classNames(
189
187
  dialogStyle['d-dialog-body'],
190
188
  'd-dialog-body',
191
189
  )}
192
190
  >{dialogConfig.message}</View>
193
191
  )}
194
192
  {dialogConfig.bodyNode && (
195
193
  <View
196
194
  className={classNames(
197
195
  dialogStyle['d-dialog-body'],
198
196
  'd-dialog-body',
199
197
  )}
200
198
  >
201
199
  {dialogConfig.bodyNode
202
200
  ? dialogConfig.bodyNode
203
201
  : null}
204
202
  </View>
205
203
  )}
206
204
  {dialogConfig.footerNode ? (
207
205
  dialogConfig.footerNode
208
206
  ) : dialogConfig.hasFooter ? (
209
207
  <View
210
208
  className={classNames(
211
209
  dialogStyle['d-dialog-footer'],
212
210
  {
213
211
  [dialogStyle['d-dialog-footer-btn-line']]: !dialogConfig.closeBtnHideState && !dialogConfig.confirmBtnHideState
214
212
  },
215
213
  'd-dialog-footer',
216
214
  'flexible-box',
217
215
  )}
218
216
  >
219
217
  {!dialogConfig.closeBtnHideState && (
220
218
  <Button
221
219
  className={classNames(
222
220
  dialogStyle['d-dialog-btn'],
223
221
  dialogStyle[
224
222
  'd-dialog-cancel-btn'
225
223
  ],
226
224
  'd-dialog-cancel-btn',
227
225
  'adaptive-box-flex',
228
226
  )}
229
227
  form-type={dialogConfig.isFormDialog ? 'reset' : ''}
230
228
  onClick={dialogCloseFn}
231
229
  >
232
230
  {dialogConfig.closeBtnText}
233
231
  </Button>
234
232
  )}
235
233
  {!dialogConfig.confirmBtnHideState && (
236
234
  <Button
237
235
  className={classNames(
238
236
  dialogStyle['d-dialog-btn'],
239
237
  dialogStyle[
240
238
  'd-dialog-ensure-btn'
241
239
  ],
242
240
  'd-dialog-ensure-btn',
243
241
  'adaptive-box-flex',
244
242
  )}
245
243
  onClick={dialogConfirmFn}
246
244
  >
247
245
  {dialogConfig.confirmBtnText}
248
246
  </Button>
249
247
  )}
250
248
  </View>
251
249
  ) : null}
252
250
  </View>
253
251
  )
254
252
  }
255
253
  </View>
256
254
  </View>
257
255
  </>,
258
256
  ) : null
@@ -1,15 +0,0 @@
1
-
2
- .d-sub-dynamic{
3
- padding: 30px;
4
- background-color: #9ebaee;
5
- .d-btn{
6
- font-size: 24px;
7
- color: #49a6e8;
8
- border-radius: 16px;
9
- background-color: #dbdbdb;
10
- }
11
- .d-text{
12
- font-size: 30px;
13
- color: #c183db;
14
- }
15
- }
@@ -1,16 +0,0 @@
1
-
2
-
3
-
4
- .d-sub-dynamic{
5
- padding: 30px;
6
- .d-btn{
7
- font-size: 24px;
8
- color: red;
9
- border-radius: 16px;
10
- background-color: darkgrey;
11
- }
12
- .d-text{
13
- font-size: 30px;
14
- color: #00c853;
15
- }
16
- }
@@ -1 +0,0 @@
1
- import Taro from '@tarojs/taro'
2
  const onClick = () => {
3
1
  Taro.showToast({
4
2
  title: 'cone-render动态化引入测试'
5
3
  })
6
4
  }
7
5
  return <View className={styles['d-sub-dynamic']}>
8
6
  <Button className={styles['d-btn']} onClick={onClick}>动态化楼层按钮测试</Button>
9
7
  <Text className={styles['d-text']}>你好,动态化</Text>
10
8
  </View>;
@@ -1,40 +0,0 @@
1
-
2
- .d-lazy-image {
3
- position: relative;
4
- //background: #F8F8F8 url("../../resoure/jd_logo_bg.png") center center/50% no-repeat;
5
- //background: #fff
6
- //url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAAAeCAMAAABT0xOcAAAAe1BMVEUAAADx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fELy0NOAAAAKHRSTlMApwmfFtYm9rWveHDm70yJHYJaD2k8IeIr6pY2X0HHfsGRZDHdu1XNmO+CqgAAAu9JREFUSMfNlNmymzAQRAchkCUhdrMZbLze/v8vjIRMKN8kRR7ykFNeVIPV9Ewj039P1TR8+eILjL7RdLFFJUO8QMS7ZmyDJvZ0nDYGY+aKKDSJpY3OwWX6uFUEY/peCNEbY4Rp6AABixFYkLQRAK3VOmAjUrawMt1GrfWtXD7rlFF3uiA6HV/p0TF1tBECEVskYe+7qqW08mqT1jruneu21/72JfHoSZ7faj2bJu6mOlgEa3qjEXKeL/ACV1s5YSbqYP6stXUeX2FZnV3wuBSZqnVWqDNCIvaFRzZIiGAIw+CS/1brQCslgOQdUBoW10C2EFJei7AkygOlAnmGeMprJq/NjhZpAIrepOpOte2Oq9EXjupIMVoiXduQ9rTo7KsODhxJYaAGuJPjgRvdkRD1KP9CawRwettyF5SbVLZ49ZbuMJxGW93XisXPKA/oXNMDEReJT6N0OfZ2V4RqX4tFQPbOQbntwrl8oXCOQmu2hVosSr6j5QcW+uvukZJP37CWzL7tQs2lH8B53Nd6eq192N/72mdfa52XhdXPx6zcXKYgikLXbaNP66M27edoAO2X+RkQ9tVRhoWC6IZkCZAbHHa1SgDHNdHDsbrLr0ojKTkfDWp6+WPh1APakMAXbVrb6B/Mn+311zlETJZOCJYChttWxedUIyvyi9bLt+J4IPcLvVYypBNaDG5TguCzmct3rUkAPSdHJRLyDEjXQ6Un3GZQBamxaU09gJg+/r+4gqV0uzixXjBfLnDzixrjhDJGNoDXXqvK76OEJaO3L1bx/FQOCSxqcfJVUWiXCydEPowHeIqaZnf3wmvNRsBiC28ttEnS+1oy+lNtOMVAzayZCwsQ5ESNREgvKKuNjjI/ewNHr9Y4N5Is98llx2U8iOQXcKczhDwAM6ObayaanfWDDwhJcMvpU8ucr6+cPji5a8+UEVMCMNo97tLm0MU2uoMmi850yrc8s8Khyzuj7+Q6U7GPMCt8mOtGljP6l/wAUcBZ6lceL/8AAAAASUVORK5CYII=')
7
- //0 0 / 75px 30px no-repeat;
8
- //&:before{
9
- // content: '';
10
- // position: absolute;
11
- // top: 0;
12
- // left: 0;
13
- // right: 0;
14
- // bottom: 0;
15
- // display: inline-block;
16
- // margin: auto;
17
- // width: 75px;
18
- // height: 30px;
19
- // background: url('https://img10.360buyimg.com/cms/jfs/t1/328840/6/11913/995/68afbf0bF9ec30819/def24889cbb231ec.png')
20
- // 0 0 / 75px 30px no-repeat;
21
- //}
22
- background: url('https://img10.360buyimg.com/cms/jfs/t1/328840/6/11913/995/68afbf0bF9ec30819/def24889cbb231ec.png') center center / 75px 30px no-repeat;
23
- &.d-lazy-sku-image {
24
- background-color: #F6F6F6;
25
- background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/222907/25/7012/5824/61c4797cEbcd17c7f/6c76fc71e4fdb5a5.png');
26
- background-size: 100% 100%;
27
- background-position: 0 0;
28
- }
29
- &.d-load-completed {
30
- background: none;
31
- }
32
- &.d-hide-image-error {
33
- opacity: 0;
34
- }
35
- .d-lazy-image-content{
36
- display: block;
37
- width: 100%;
38
- height: 100%;
39
- }
40
- }
@@ -1 +0,0 @@
1
- import React, { useCallback, useState } from 'react';
2
  const {
3
1
  src = null,
4
2
  lazyLoad = true,
5
3
  imagRenderingSet = true,
6
4
  width = null,
7
5
  height = null,
8
6
  className = null,
9
7
  isSkuImage = false,
10
8
  hideErrorImage = false,
11
9
  style = null,
12
10
  backgroundColor = null,
13
11
  errorSrc = null,
14
12
  onLoad = null,
15
13
  onError = null,
16
14
  ...otherOption
17
15
  } = props;
18
16
  getNetWorkType === NetWorkTypeQuality.default &&
19
17
  (getNetWorkType = taroJdBaseInfo.info.sysInfo.netWorkType);
20
18
  const [loadSuccess, setLoadSuccess] = useState(false);
21
19
  const [imgSrc, setImgSrc] = useState(src);
22
20
  const [imageErrState, setImageErrState] = useState(false);
23
21
  const imageError = useCallback(
24
22
  (e) => {
25
23
  console.log('图片加载错误', e);
26
24
  errorSrc && setImgSrc(errorSrc);
27
25
  hideErrorImage && setImageErrState(true);
28
26
  typeof onError === 'function' && onError(e, src, props);
29
27
  },
30
28
  [src],
31
29
  );
32
30
 
33
31
  const imageLoad = useCallback(
34
32
  (event) => {
35
33
  setLoadSuccess(true);
36
34
  typeof onLoad === 'function' && onLoad(event, src, props);
37
35
  },
38
36
  [src],
39
37
  );
40
38
 
41
39
  const changeStyleIncludeWidthAndHeightAndBgColor = () => {
42
40
  const changeStyle = {};
43
41
  width && (changeStyle['width'] = width);
44
42
  height && (changeStyle['height'] = height);
45
43
  backgroundColor && (changeStyle['backgroundColor'] = backgroundColor);
46
44
  return changeStyle;
47
45
  };
48
46
  const getLastStyle = () => {
49
47
  return {
50
48
  ...style,
51
49
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
52
50
  };
53
51
  };
54
52
  return (
55
53
  <View
56
54
  className={classNames(
57
55
  imageStyle['d-lazy-image'],
58
56
  {
59
57
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
60
58
  },
61
59
  {
62
60
  [imageStyle['d-hide-image-error']]: imageErrState,
63
61
  },
64
62
  {
65
63
  [imageStyle['d-load-completed']]: loadSuccess,
66
64
  },
67
65
  {
68
66
  'd-imag-rendering-crisp-edges': imagRenderingSet,
69
67
  },
70
68
  className,
71
69
  )}
72
70
  style={getLastStyle()}
73
71
  >
74
72
  <Image
75
73
  className={classNames(imageStyle['d-lazy-image-content'])}
76
74
  src={getQualityImage(imgSrc, NetWorkTypeQuality[getNetWorkType])}
77
75
  lazyLoad={lazyLoad}
78
76
  onError={imageError}
79
77
  placeholder={placeholderImg}
80
78
  onLoad={imageLoad}
81
79
  {...otherOption}
82
80
  />
83
81
  </View>
84
82
  );
@@ -1,95 +0,0 @@
1
-
2
- .d-shop-network {
3
- position: fixed;
4
- padding-bottom: 160px;
5
- top: 0;
6
- left: 0;
7
- right: 0;
8
- bottom: 0;
9
- background: #e5e5e5;
10
- box-sizing: border-box;
11
- &.d-shop-network-white {
12
- background-color: #fff;
13
- }
14
- .d-error-content {
15
- text-align: center;
16
- .d-data-error,
17
- .d-no-data{
18
- width: 320px;
19
- height: 320px;
20
- background: url('https://img13.360buyimg.com/img/jfs/t1/338555/32/1332/105413/68abc87dFeaf0b55c/75f29c7a376aab33.png')
21
- 0 0 /320px 320px no-repeat;
22
- }
23
- .d-opt-btn {
24
- display: inline-block;
25
- margin-top: 32px;
26
- padding: 0 24px;
27
- //min-width: 160px;
28
- height: 64px;
29
- line-height: 64px;
30
- font-size: 24px;
31
- color: #1A1A1A;
32
- text-align: center;
33
- border: 1px solid #C2C4CC;
34
- border-radius: 12px;
35
- background-color: #fff;
36
- box-sizing: border-box;
37
- }
38
- }
39
-
40
- .d-error-tip {
41
- line-height: 38px;
42
- font-size: 32px;
43
- font-weight: 600;
44
- color: #1A1A1A;
45
- text-align: center;
46
- }
47
- .d-error-no-sub-tip,
48
- .d-error-sub-tip {
49
- margin-top: 20px;
50
- line-height: 28px;
51
- font-size: 24px;
52
- text-align: center;
53
- color: #505259;
54
- font-weight: normal;
55
- }
56
- .d-error-type {
57
- margin: 0 auto;
58
- width: 320px;
59
- height: 320px;
60
- background-size: contain;
61
- background-repeat: no-repeat;
62
- }
63
-
64
- .d-no-network {
65
- // background-image: url('https://m.360buyimg.com/imagetools/jfs/t1/219405/34/29129/32963/64892a0eF2c068392/86c3fcf9d980ff10.png');
66
- //background-image: url('../../../assets/networkError.png');
67
- background-image: url('https://img20.360buyimg.com/img/jfs/t1/288585/18/14561/112286/68a2be15Fe5ac83cf/4c7a0aab9b5637da.png');
68
- }
69
-
70
- .d-data-error {
71
- background-image: url('https://m.360buyimg.com/imagetools/jfs/t1/106708/34/36128/37234/64896f52Fed1530e0/7b403e068aae316c.png');
72
- }
73
- .d-risk {
74
- background-image: url('https://m.360buyimg.com/imagetools/jfs/t1/106708/34/36128/37234/64896f52Fed1530e0/7b403e068aae316c.png');
75
- }
76
- .d-no-data {
77
- background-image: url('https://img13.360buyimg.com/img/jfs/t1/338555/32/1332/105413/68abc87dFeaf0b55c/75f29c7a376aab33.png');
78
- }
79
- .d-search-empty {
80
- background-image: url('https://img13.360buyimg.com/img/jfs/t1/324272/38/10433/126399/68abc9f3Faeb1be1e/cfe0f3f8af9b4cf1.png');
81
- }
82
- .d-shop-close {
83
- background-image: url('https://img20.360buyimg.com/img/jfs/t1/332566/11/3756/130550/68abca38Feeda2bc3/706b2bbbdfefe19f.png');
84
- }
85
-
86
- }
87
-
88
- .d-shop-network-part {
89
- position: absolute;
90
- min-height: 500px;
91
- background: #f2f2f2;
92
- }
93
- .d-shop-network-no-position {
94
- position: static;
95
- }
@@ -1 +0,0 @@
1
- import { Button, View } from '@tarojs/components';
2
  NetWorkErrorList,
3
1
  NetWorkErrorTip,
4
2
  NetWorkErrorSubTip,
5
3
  NetWorkShowType,
6
4
  NetWorkBusinessType,
7
5
  const {
8
6
  className = '',
9
7
  message = '',
10
8
  subMessage = '',
11
9
  btnLabel = '重新加载',
12
10
  backgroundColorWhite = false,
13
11
  netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
14
12
  netWorkShowType = NetWorkShowType.FULL,
15
13
  netWorkBusinessType = NetWorkBusinessType.noData,
16
14
  refreshCallBackFn = null,
17
15
  viewMaxHeight = '',
18
16
  noPosition = false,
19
17
  } = props;
20
18
  const refershInitData = useCallback(() => {
21
19
  refreshCallBackFn && refreshCallBackFn(true);
22
20
  }, []);
23
21
  const useErrorTip = message && message !== '' ? message : NetWorkErrorTip[netWorkDataType];
24
22
  const useErrorSubTip = subMessage && subMessage !== "" ? subMessage : NetWorkErrorSubTip[netWorkDataType];
25
23
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {};
26
24
  const maxHeight = latestRes?.displayHeight || 0;
27
25
  return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
28
26
  <View
29
27
  style={{
30
28
  maxHeight: viewMaxHeight !== '' ? viewMaxHeight : maxHeight > 0 ? maxHeight : '100vh',
31
29
  }}
32
30
  className={classNames(
33
31
  netWorkErrorStyle['d-shop-network'],
34
32
  {
35
33
  [netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
36
34
  },
37
35
  {
38
36
  [netWorkErrorStyle['d-shop-network-part']]: netWorkShowType === NetWorkShowType.PART,
39
37
  },
40
38
  {
41
39
  [netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
42
40
  },
43
41
  'flexible-center-box',
44
42
  className,
45
43
  )}
46
44
  >
47
45
  <View
48
46
  className={classNames(
49
47
  netWorkErrorStyle['d-error-content'],
50
48
  'd-error-content',
51
49
  )}
52
50
  >
53
51
  <View
54
52
  className={classNames(
55
53
  netWorkErrorStyle['d-error-type'],
56
54
  netWorkErrorStyle[`d-${netWorkDataType}`],
57
55
  netWorkErrorStyle[`d-${netWorkBusinessType}`],
58
56
  'd-error-type',
59
57
  )}
60
58
  />
61
59
  <View
62
60
  className={classNames(
63
61
  netWorkErrorStyle['d-error-tip'],
64
62
  netWorkErrorStyle[`d-${netWorkDataType}-tip`],
65
63
  {
66
64
  [netWorkErrorStyle[`d-error-no-sub-tip`]]: !useErrorSubTip
67
65
  },
68
66
  'd-error-tip',
69
67
  )}
70
68
  >
71
69
  {useErrorTip}
72
70
  </View>
73
71
  {useErrorSubTip ? (
74
72
  <View
75
73
  className={classNames(
76
74
  netWorkErrorStyle['d-error-sub-tip'],
77
75
  netWorkErrorStyle[`d-${netWorkDataType}-sub-tip`],
78
76
  'd-error-sub-tip',
79
77
  )}
80
78
  >
81
79
  {useErrorSubTip}
82
80
  </View>
83
81
  ) : null}
84
82
  <View className={'flexible-horizontal-center-box'}>
85
83
  {refreshCallBackFn && (
86
84
  <Button
87
85
  onClick={refershInitData}
88
86
  className={classNames(
89
87
  netWorkErrorStyle['d-opt-btn'],
90
88
  'd-button-no-border',
91
89
  'd-opt-btn',
92
90
  )}
93
91
  plain
94
92
  size="mini"
95
93
  >
96
94
  {btnLabel}
97
95
  </Button>
98
96
  )}
99
97
  </View>
100
98
  </View>
101
99
  </View>
102
100
  ) : null;
@@ -1,63 +0,0 @@
1
-
2
- :global {
3
- .d-mini-price {
4
- display: flex;
5
- flex-direction: row;
6
- flex-wrap: wrap;
7
- align-items: baseline;
8
- overflow: hidden;
9
- .init-font-color{
10
- color: #f23030;
11
- font-family: 'JDZH-Regular';
12
- align-self: baseline;
13
- &.d-font-v2{
14
- font-family: 'JDZH-Regular';
15
- }
16
- &.d-font-v2-bold{
17
- font-family: 'JDZH-Bold';
18
- }
19
- }
20
- .init-font-android-color{
21
- align-self: flex-end;
22
- }
23
- &-sym {
24
- font-size: 22px;
25
- }
26
-
27
- .int-txt {
28
- font-size: 36px;
29
- }
30
- .off-shelf {
31
- color: rgb(162, 164, 172);
32
- }
33
-
34
- .dec-txt {
35
- font-size: 22px;
36
- }
37
-
38
- .sym-sup {
39
- vertical-align: top;
40
- }
41
-
42
- .dec-sup {
43
- vertical-align: top;
44
- }
45
-
46
- &.del {
47
- .sym-sub,
48
- .int-txt,
49
- .dec-txt {
50
- font-size: 22px;
51
- color: #2e2e2e;
52
- text-decoration: line-through;
53
- }
54
- }
55
- &.d-price-label {
56
- .d-price-label-text {
57
- margin-left: 8px;
58
- font-size: 22px;
59
- font-family: PingFang SC;
60
- }
61
- }
62
- }
63
- }