@conecli/cone-render 0.10.1-shop3.136 → 0.10.1-shop3.138

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.
@@ -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
  NetWorkStyleType,
8
7
  netWorkDataDraType,
9
8
  const {
10
9
  className = '',
11
10
  message = '',
12
11
  subMessage = '',
13
12
  btnLabel = global?.languageJsonData?.reload || '重新加载',
14
13
  backgroundColorWhite = false,
15
14
  netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
16
15
  netWorkShowType = NetWorkShowType.FULL,
17
16
  netWorkImageType = NetWork_Image_Type.No_Data_Default_Tip,
18
17
  netWorkStyleType = NetWorkStyleType.OLD,
19
18
  refreshCallBackFn = null,
20
19
  viewMaxHeight = '',
21
20
  noPosition = false,
22
21
  } = props;
23
22
  const refershInitData = useCallback(() => {
24
23
  refreshCallBackFn && refreshCallBackFn(true);
25
24
  }, []);
26
25
  const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType];
27
26
  const useErrorSubTip = subMessage
28
27
  ? subMessage
29
28
  : message != ''
30
29
  ? ''
31
30
  : NetWorkErrorSubTip[netWorkDataType];
32
31
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {};
33
32
  const onePlusOneBottomPlaceHeight = global.info?.sysInfo?.onePlusOneBottomPlaceHeight
34
33
  ? global.info?.sysInfo?.onePlusOneBottomPlaceHeight + 20
35
34
  : 0;
36
35
  const maxHeight = latestRes.displayHeight || onePlusOneBottomPlaceHeight + 546;
37
36
  useEffect(() => {
38
37
  if (netWorkDataType && netWorkDataDraType[netWorkDataType]) {
39
38
  draBusinessCustomReport({
40
39
  eventName: 'business',
41
40
  errorName: netWorkDataDraType[netWorkDataType],
42
41
  errorMessage: '业务由于各类数据或者网络异常等走到兜底netWorkDataError组件,具体请看详细数据',
43
42
  extraData: JSON.stringify({
44
43
  message: useErrorTip,
45
44
  subMessage: useErrorSubTip,
46
45
  netWorkDataType,
47
46
  netWorkImageType,
48
47
  btnLabel,
49
48
  }),
50
49
  });
51
50
  }
52
51
  }, [netWorkDataType])
53
52
  return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
54
53
  <View
55
54
  style={{
56
55
  maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight,
57
56
  }}
58
57
  className={classNames(
59
58
  netWorkErrorStyle['d-shop-network'],
60
59
  {
61
60
  [netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
62
61
  },
63
62
  {
64
63
  [netWorkErrorStyle['d-shop-network-part']]: netWorkShowType === NetWorkShowType.PART,
65
64
  },
66
65
  {
67
66
  [netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
68
67
  },
69
68
  {
70
69
  [netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
71
70
  },
72
71
  'flexible-center-box',
73
72
  'J_shopNetwork',
74
73
  className,
75
74
  )}
76
75
  >
77
76
  <View
78
77
  className={classNames(
79
78
  netWorkErrorStyle['d-error-content'],
80
79
  netWorkErrorStyle[`d-${netWorkStyleType}-style-content`],
81
80
  'd-error-content',
82
81
  )}
83
82
  >
84
83
  <View
85
84
  className={classNames(
86
85
  netWorkErrorStyle['d-error-type'],
87
86
  netWorkErrorStyle[`d-${netWorkDataType}`],
88
87
  netWorkErrorStyle[`d-${netWorkImageType}`],
89
88
  `d-${netWorkDataType}`,
90
89
  `d-${netWorkImageType}`,
91
90
  'd-error-type',
92
91
  )}
93
92
  />
94
93
  <View
95
94
  className={classNames(
96
95
  netWorkErrorStyle['d-error-tip'],
97
96
  netWorkErrorStyle[`d-${netWorkDataType}-tip`],
98
97
  `d-${netWorkDataType}-tip`,
99
98
  'd-error-tip',
100
99
  )}
101
100
  >
102
101
  {useErrorTip}
103
102
  </View>
104
103
  {useErrorSubTip ? (
105
104
  <View
106
105
  className={classNames(
107
106
  netWorkErrorStyle['d-error-sub-tip'],
108
107
  netWorkErrorStyle[`d-${netWorkDataType}-sub-tip`],
109
108
  `d-${netWorkDataType}-sub-tip`,
110
109
  'd-error-sub-tip',
111
110
  )}
112
111
  >
113
112
  {useErrorSubTip}
114
113
  </View>
115
114
  ) : null}
116
115
  <View className={'flexible-horizontal-center-box'}>
117
116
  {refreshCallBackFn && (
118
117
  <Button
119
118
  onClick={refershInitData}
120
119
  className={classNames(
121
120
  netWorkErrorStyle['d-opt-btn'],
122
121
  'd-button-no-border',
123
122
  'd-opt-btn',
124
123
  )}
125
124
  plain
126
125
  size="mini"
127
126
  >
128
127
  {btnLabel}
129
128
  </Button>
130
129
  )}
131
130
  </View>
132
131
  </View>
133
132
  </View>
134
133
  ) : null;
134
+ import { Button, View } from '@tarojs/components';
135
135
  NetWorkErrorList,
136
136
  NetWorkErrorTip,
137
137
  NetWorkErrorSubTip,
138
138
  NetWorkShowType,
139
139
  NetWork_Image_Type,
140
140
  NetWorkStyleType,
141
141
  netWorkDataDraType,
142
142
  const {
143
143
  className = '',
144
144
  message = '',
145
145
  subMessage = '',
146
146
  btnLabel = global?.languageJsonData?.reload || '重新加载',
147
147
  backgroundColorWhite = false,
148
148
  netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
149
149
  netWorkShowType = NetWorkShowType.FULL,
150
150
  netWorkImageType = NetWork_Image_Type.No_Data_Default_Tip,
151
151
  netWorkStyleType = NetWorkStyleType.OLD,
152
152
  refreshCallBackFn = null,
153
153
  viewMaxHeight = '',
154
154
  noPosition = false,
155
155
  } = props;
156
156
  const refershInitData = useCallback(() => {
157
157
  refreshCallBackFn && refreshCallBackFn(true);
158
158
  }, []);
159
159
  const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType];
160
160
  const useErrorSubTip = subMessage
161
161
  ? subMessage
162
162
  : message != ''
163
163
  ? ''
164
164
  : NetWorkErrorSubTip[netWorkDataType];
165
165
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {};
166
166
  const onePlusOneBottomPlaceHeight = global.info?.sysInfo?.onePlusOneBottomPlaceHeight
167
167
  ? global.info?.sysInfo?.onePlusOneBottomPlaceHeight + 20
168
168
  : 0;
169
169
  const maxHeight = latestRes.displayHeight || onePlusOneBottomPlaceHeight + 546;
170
170
  useEffect(() => {
171
171
  if (netWorkDataType && netWorkDataDraType[netWorkDataType]) {
172
172
  draBusinessCustomReport({
173
173
  eventName: 'business',
174
174
  errorName: netWorkDataDraType[netWorkDataType],
175
175
  errorMessage: '业务由于各类数据或者网络异常等走到兜底netWorkDataError组件,具体请看详细数据',
176
176
  extraData: JSON.stringify({
177
177
  message: useErrorTip,
178
178
  subMessage: useErrorSubTip,
179
179
  netWorkDataType,
180
180
  netWorkShowType,
181
181
  netWorkImageType,
182
182
  btnLabel,
183
183
  }),
184
184
  });
185
185
  }
186
186
  }, [netWorkDataType])
187
187
  return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
188
188
  <View
189
189
  style={{
190
190
  maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight,
191
191
  }}
192
192
  className={classNames(
193
193
  netWorkErrorStyle['d-shop-network'],
194
194
  {
195
195
  [netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
196
196
  },
197
197
  {
198
198
  [netWorkErrorStyle['d-shop-network-part']]: netWorkShowType === NetWorkShowType.PART,
199
199
  },
200
200
  {
201
201
  [netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
202
202
  },
203
203
  {
204
204
  [netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
205
205
  },
206
206
  'flexible-center-box',
207
207
  'J_shopNetwork',
208
208
  className,
209
209
  )}
210
210
  >
211
211
  <View
212
212
  className={classNames(
213
213
  netWorkErrorStyle['d-error-content'],
214
214
  netWorkErrorStyle[`d-${netWorkStyleType}-style-content`],
215
215
  'd-error-content',
216
216
  )}
217
217
  >
218
218
  <View
219
219
  className={classNames(
220
220
  netWorkErrorStyle['d-error-type'],
221
221
  netWorkErrorStyle[`d-${netWorkDataType}`],
222
222
  netWorkErrorStyle[`d-${netWorkImageType}`],
223
223
  `d-${netWorkDataType}`,
224
224
  `d-${netWorkImageType}`,
225
225
  'd-error-type',
226
226
  )}
227
227
  />
228
228
  <View
229
229
  className={classNames(
230
230
  netWorkErrorStyle['d-error-tip'],
231
231
  netWorkErrorStyle[`d-${netWorkDataType}-tip`],
232
232
  `d-${netWorkDataType}-tip`,
233
233
  'd-error-tip',
234
234
  )}
235
235
  >
236
236
  {useErrorTip}
237
237
  </View>
238
238
  {useErrorSubTip ? (
239
239
  <View
240
240
  className={classNames(
241
241
  netWorkErrorStyle['d-error-sub-tip'],
242
242
  netWorkErrorStyle[`d-${netWorkDataType}-sub-tip`],
243
243
  `d-${netWorkDataType}-sub-tip`,
244
244
  'd-error-sub-tip',
245
245
  )}
246
246
  >
247
247
  {useErrorSubTip}
248
248
  </View>
249
249
  ) : null}
250
250
  <View className={'flexible-horizontal-center-box'}>
251
251
  {refreshCallBackFn && (
252
252
  <Button
253
253
  onClick={refershInitData}
254
254
  className={classNames(
255
255
  netWorkErrorStyle['d-opt-btn'],
256
256
  'd-button-no-border',
257
257
  'd-opt-btn',
258
258
  )}
259
259
  plain
260
260
  size="mini"
261
261
  >
262
262
  {btnLabel}
263
263
  </Button>
264
264
  )}
265
265
  </View>
266
266
  </View>
267
267
  </View>
268
268
  ) : null;
@@ -188,3 +188,7 @@
188
188
  .fontV2Bold {
189
189
  font-family: 'JDZhengHeiV2-Bold';
190
190
  }
191
+
192
+ .none {
193
+ display: none;
194
+ }