@conecli/cone-render 0.10.1-shop3.43 → 0.10.1-shop3.45

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
- export const getPageType = () => {
2
1
  return process.env.BUILD_TYPE || ''
3
2
 
4
3
  M_DECORATE = 'm-decorate',
5
4
  M_RENDER_MODULE = 'm-render-module',
6
5
  M_PREVIEW = 'm-preview',
7
6
  M_ISV_PREVIEW = 'm-isv-preview',
8
7
  MARKETING_PREVIEW = 'marketing-preview',
9
8
 
10
9
  APP_VIEW = 'app-view',
11
10
  APP_MEMBER = 'app-member',
12
11
  APP_INTRODUCE = 'app-introduce',
13
12
  APP_PROMOTION = 'app-promotion',
14
13
  APP_CLASSIFY = 'app-classify',
15
14
  APP_PRODUCT = 'app-product',
16
15
  MEMBER_HOME = 'member-home',
17
16
 
18
17
 
19
18
  PC_VIEW = 'pc-view',
20
19
  PC_VIEW1 = 'pc-view1',
21
20
  PC_VIEW2 = 'pc-view2',
22
21
  M_VIEW = 'm-view',
23
22
  M_BSC_VIEW = 'm-bsc-view',
24
23
  SALE_VIEW = 'sale-view',
25
24
  VIP_VIEW = 'vip-view',
26
25
  M_SEARCH = 'm-search',
27
26
  M_INTRODUCE = 'm-introduce',
28
27
 
29
28
  MEMBER_SHOPCARD = 'member-shopcard',
30
29
  M_MEMBER = 'm-member',
31
30
  M_MEMBER_SAM_BIND_CARD = 'm-member-sam-bind-card',
32
31
  M_MEMBER_WATSONS_BIND_CARD = 'm-member-watsons-bind-card',
33
32
  M_SAM_CARD = 'm-sam-card',
34
33
  M_SAM_CENTER = 'm-sam-center',
35
34
  M_WATSONS_CARD = 'm-watsons-card',
36
35
 
37
36
  M_LOTTERY = 'm-lottery',
38
37
  M_COUPON = 'm-coupon',
39
38
  M_WARES = 'm-wares',
40
39
  M_FAST_SHOPPING = 'm-fast-shopping',
41
40
  M_SPECIAL_SECKILL = 'm-special-seckill',
42
41
  WEAPP_SHOP = 'weapp-shop',
43
42
  WEAPP_PROMOTION = 'weapp-promotion',
44
43
  M_VIDEOS = 'm-videos',
44
+ export const getPageType = () => {
45
45
  return process.env.BUILD_TYPE || '';
46
46
 
47
47
  M_DECORATE = 'm-decorate',
48
48
  M_RENDER_MODULE = 'm-render-module',
49
49
  M_PREVIEW = 'm-preview',
50
50
  M_ISV_PREVIEW = 'm-isv-preview',
51
51
  MARKETING_PREVIEW = 'marketing-preview',
52
52
 
53
53
  APP_VIEW = 'app-view',
54
54
  APP_MEMBER = 'app-member',
55
55
  APP_INTRODUCE = 'app-introduce',
56
56
  APP_PROMOTION = 'app-promotion',
57
57
  APP_CLASSIFY = 'app-classify',
58
58
  APP_PRODUCT = 'app-product',
59
59
  MEMBER_HOME = 'member-home',
60
60
 
61
61
 
62
62
  PC_VIEW = 'pc-view',
63
63
  PC_VIEW1 = 'pc-view1',
64
64
  PC_VIEW2 = 'pc-view2',
65
65
  M_VIEW = 'm-view',
66
66
  M_BSC_VIEW = 'm-bsc-view',
67
67
  SALE_VIEW = 'sale-view',
68
68
  VIP_VIEW = 'vip-view',
69
69
  M_SEARCH = 'm-search',
70
70
  M_INTRODUCE = 'm-introduce',
71
71
 
72
72
  MEMBER_SHOPCARD = 'member-shopcard',
73
73
  M_MEMBER = 'm-member',
74
74
  M_MEMBER_SAM_BIND_CARD = 'm-member-sam-bind-card',
75
75
  M_MEMBER_WATSONS_BIND_CARD = 'm-member-watsons-bind-card',
76
76
  M_SAM_CARD = 'm-sam-card',
77
77
  M_SAM_CENTER = 'm-sam-center',
78
78
  M_WATSONS_CARD = 'm-watsons-card',
79
79
 
80
80
  M_LOTTERY = 'm-lottery',
81
81
  M_COUPON = 'm-coupon',
82
82
  M_WARES = 'm-wares',
83
83
  M_FAST_SHOPPING = 'm-fast-shopping',
84
84
  M_SPECIAL_SECKILL = 'm-special-seckill',
85
85
  WEAPP_SHOP = 'weapp-shop',
86
86
  WEAPP_PROMOTION = 'weapp-promotion',
87
87
  M_VIDEOS = 'm-videos',
@@ -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 maxHeight = latestRes.displayHeight || 546;
33
32
  return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
34
33
  <View
35
34
  style={{
36
35
  maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight,
37
36
  }}
38
37
  className={classNames(
39
38
  netWorkErrorStyle['d-shop-network'],
40
39
  {
41
40
  [netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
42
41
  },
43
42
  {
44
43
  [netWorkErrorStyle['d-shop-network-part']]: netWorkShowType === NetWorkShowType.PART,
45
44
  },
46
45
  {
47
46
  [netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
48
47
  },
49
48
  {
50
49
  [netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
51
50
  },
52
51
  'flexible-center-box',
53
52
  className,
54
53
  )}
55
54
  >
56
55
  <View
57
56
  className={classNames(
58
57
  netWorkErrorStyle['d-error-content'],
59
58
  netWorkErrorStyle[`d-${netWorkStyleType}-style-content`],
60
59
  'd-error-content',
61
60
  )}
62
61
  >
63
62
  <View
64
63
  className={classNames(
65
64
  netWorkErrorStyle['d-error-type'],
66
65
  netWorkErrorStyle[`d-${netWorkDataType}`],
67
66
  netWorkErrorStyle[`d-${netWorkImageType}`],
68
67
  'd-error-type',
69
68
  )}
70
69
  />
71
70
  <View
72
71
  className={classNames(
73
72
  netWorkErrorStyle['d-error-tip'],
74
73
  netWorkErrorStyle[`d-${netWorkDataType}-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
  netWorkErrorStyle[`d-${netWorkDataType}-sub-tip`],
85
84
  'd-error-sub-tip',
86
85
  )}
87
86
  >
88
87
  {useErrorSubTip}
89
88
  </View>
90
89
  ) : null}
91
90
  <View className={'flexible-horizontal-center-box'}>
92
91
  {refreshCallBackFn && (
93
92
  <Button
94
93
  onClick={refershInitData}
95
94
  className={classNames(
96
95
  netWorkErrorStyle['d-opt-btn'],
97
96
  'd-button-no-border',
98
97
  'd-opt-btn',
99
98
  )}
100
99
  plain
101
100
  size="mini"
102
101
  >
103
102
  {btnLabel}
104
103
  </Button>
105
104
  )}
106
105
  </View>
107
106
  </View>
108
107
  </View>
109
108
  ) : null;
109
+ import { Button, View } from '@tarojs/components';
110
110
  NetWorkErrorList,
111
111
  NetWorkErrorTip,
112
112
  NetWorkErrorSubTip,
113
113
  NetWorkShowType,
114
114
  NetWork_Image_Type,
115
115
  NetWorkStyleType,
116
116
  const {
117
117
  className = '',
118
118
  message = '',
119
119
  subMessage = '',
120
120
  btnLabel = global?.languageJsonData?.reload || '重新加载',
121
121
  backgroundColorWhite = false,
122
122
  netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
123
123
  netWorkShowType = NetWorkShowType.FULL,
124
124
  netWorkImageType = NetWork_Image_Type.No_Data_Default_Tip,
125
125
  netWorkStyleType = NetWorkStyleType.OLD,
126
126
  refreshCallBackFn = null,
127
127
  viewMaxHeight = '',
128
128
  noPosition = false,
129
129
  } = props;
130
130
  const refershInitData = useCallback(() => {
131
131
  refreshCallBackFn && refreshCallBackFn(true);
132
132
  }, []);
133
133
  const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType];
134
134
  const useErrorSubTip = subMessage
135
135
  ? subMessage
136
136
  : message != ''
137
137
  ? ''
138
138
  : NetWorkErrorSubTip[netWorkDataType];
139
139
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {};
140
140
  const onePlusOneBottomPlaceHeight = global.info?.sysInfo?.onePlusOneBottomPlaceHeight
141
141
  ? global.info?.sysInfo?.onePlusOneBottomPlaceHeight + 20
142
142
  : 0;
143
143
  const maxHeight = latestRes.displayHeight || onePlusOneBottomPlaceHeight + 546;
144
144
  return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
145
145
  <View
146
146
  style={{
147
147
  maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight,
148
148
  }}
149
149
  className={classNames(
150
150
  netWorkErrorStyle['d-shop-network'],
151
151
  {
152
152
  [netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
153
153
  },
154
154
  {
155
155
  [netWorkErrorStyle['d-shop-network-part']]: netWorkShowType === NetWorkShowType.PART,
156
156
  },
157
157
  {
158
158
  [netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
159
159
  },
160
160
  {
161
161
  [netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
162
162
  },
163
163
  'flexible-center-box',
164
164
  className,
165
165
  )}
166
166
  >
167
167
  <View
168
168
  className={classNames(
169
169
  netWorkErrorStyle['d-error-content'],
170
170
  netWorkErrorStyle[`d-${netWorkStyleType}-style-content`],
171
171
  'd-error-content',
172
172
  )}
173
173
  >
174
174
  <View
175
175
  className={classNames(
176
176
  netWorkErrorStyle['d-error-type'],
177
177
  netWorkErrorStyle[`d-${netWorkDataType}`],
178
178
  netWorkErrorStyle[`d-${netWorkImageType}`],
179
179
  'd-error-type',
180
180
  )}
181
181
  />
182
182
  <View
183
183
  className={classNames(
184
184
  netWorkErrorStyle['d-error-tip'],
185
185
  netWorkErrorStyle[`d-${netWorkDataType}-tip`],
186
186
  'd-error-tip',
187
187
  )}
188
188
  >
189
189
  {useErrorTip}
190
190
  </View>
191
191
  {useErrorSubTip ? (
192
192
  <View
193
193
  className={classNames(
194
194
  netWorkErrorStyle['d-error-sub-tip'],
195
195
  netWorkErrorStyle[`d-${netWorkDataType}-sub-tip`],
196
196
  'd-error-sub-tip',
197
197
  )}
198
198
  >
199
199
  {useErrorSubTip}
200
200
  </View>
201
201
  ) : null}
202
202
  <View className={'flexible-horizontal-center-box'}>
203
203
  {refreshCallBackFn && (
204
204
  <Button
205
205
  onClick={refershInitData}
206
206
  className={classNames(
207
207
  netWorkErrorStyle['d-opt-btn'],
208
208
  'd-button-no-border',
209
209
  'd-opt-btn',
210
210
  )}
211
211
  plain
212
212
  size="mini"
213
213
  >
214
214
  {btnLabel}
215
215
  </Button>
216
216
  )}
217
217
  </View>
218
218
  </View>
219
219
  </View>
220
220
  ) : null;