@conecli/cone-render 0.10.1-shop3.98 → 0.10.1-shop3.99

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