@conecli/cone-render 0.10.1-shop-beta.11 → 0.10.1-shop-beta.13

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 (78) hide show
  1. package/README.md +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/index.dynamic.ts +1 -0
  4. package/dist/common/index.h5.ts +1 -1
  5. package/dist/common/index.jd.ts +1 -1
  6. package/dist/common/index.ts +1 -1
  7. package/dist/common/index.weapp.ts +1 -1
  8. package/dist/common/jssdk.ts +1 -1
  9. package/dist/common/token/index.h5.ts +1 -1
  10. package/dist/common/wxappApi.ts +1 -1
  11. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  12. package/dist/components/base/CountDown/index.tsx +1 -1
  13. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  14. package/dist/components/base/Dialog/index.dynamic.module.scss +126 -0
  15. package/dist/components/base/Dialog/index.dynamic.tsx +1 -0
  16. package/dist/components/base/DynamicTest/index.dynamic.module.scss +15 -0
  17. package/dist/components/base/DynamicTest/index.module.scss +16 -0
  18. package/dist/components/base/DynamicTest/index.tsx +1 -0
  19. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  20. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  21. package/dist/components/base/JdLoading/index.module.scss +2 -0
  22. package/dist/components/base/JdLoading/index.tsx +1 -1
  23. package/dist/components/base/LazyLoadImage/index.tsx +1 -1
  24. package/dist/components/base/NetworkDataError/const.ts +1 -1
  25. package/dist/components/base/NetworkDataError/index.module.scss +116 -70
  26. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  27. package/dist/components/base/Price/Base/index.dynamic.module.scss +63 -0
  28. package/dist/components/base/Price/Base/index.dynamic.tsx +1 -0
  29. package/dist/components/base/Price/Base/index.module.scss +6 -0
  30. package/dist/components/base/Price/Base/index.tsx +1 -1
  31. package/dist/components/base/Price/Double/index.dynamic.module.scss +172 -0
  32. package/dist/components/base/Price/Double/index.dynamic.tsx +1 -0
  33. package/dist/components/base/Price/Double/index.module.scss +6 -0
  34. package/dist/components/base/Price/Double/index.tsx +1 -1
  35. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  36. package/dist/config/env.ts +1 -1
  37. package/dist/interface/common.ts +1 -1
  38. package/dist/interface/component.ts +1 -1
  39. package/dist/interface/jumpEventReport.ts +1 -1
  40. package/dist/jumpEventReport/const.ts +1 -1
  41. package/dist/jumpEventReport/index.dynamic.ts +1 -0
  42. package/dist/jumpEventReport/index.h5.ts +1 -1
  43. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  44. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  45. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  46. package/dist/jumpEventReport/web.base.ts +1 -1
  47. package/dist/jumpEventReport/web.jd.ts +1 -1
  48. package/dist/language/zh_CN.json +162 -0
  49. package/dist/open/api/index.ts +1 -1
  50. package/dist/open/api/shopMember.dynamic.ts +1 -0
  51. package/dist/open/api/shopMember.ts +1 -1
  52. package/dist/open/components/index.dynamic.ts +1 -0
  53. package/dist/open/components/index.ts +1 -1
  54. package/dist/sass/app.dynamic.scss +306 -0
  55. package/dist/service/fetchGateway.h5.ts +1 -0
  56. package/dist/service/fetchGateway.ts +1 -1
  57. package/dist/service/fetchGateway.weapp.ts +1 -1
  58. package/dist/service/fetchJsonp.h5.ts +1 -0
  59. package/dist/service/fetchJsonp.ts +1 -1
  60. package/dist/service/http/colorSign.dynamic.ts +1 -0
  61. package/dist/service/http/http.ts +1 -1
  62. package/dist/service/requestServer.h5.ts +1 -1
  63. package/dist/service/requestServer.ts +1 -1
  64. package/dist/service/requestServer.weapp.ts +1 -1
  65. package/dist/utils/connectNativeJsBridge.dynamic.ts +1 -0
  66. package/dist/utils/connectNativeJsBridge.ts +1 -1
  67. package/dist/utils/h5Utils.ts +1 -1
  68. package/dist/utils/index.h5.ts +1 -1
  69. package/dist/utils/index.ts +1 -1
  70. package/dist/utils/index.weapp.ts +1 -1
  71. package/dist/utils/intersectionObserver.ts +1 -1
  72. package/dist/utils/jumpExtMapUtil.ts +1 -0
  73. package/dist/utils/log.ts +1 -0
  74. package/dist/utils/utils.ts +1 -1
  75. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  76. package/dist/wxapp/common/user_info.js +1 -1
  77. package/package.json +51 -31
  78. /package/dist/utils/{jumpExtMapUtil.js → jumpExtMapUtil.h5.ts} +0 -0
@@ -1 +1 @@
1
- import React, { useCallback, useState } from 'react'
2
1
  const {
3
2
  src = null,
4
3
  lazyLoad = true,
5
4
  imagRenderingSet = true,
6
5
  width = null,
7
6
  height = null,
8
7
  className = null,
9
8
  isSkuImage = false,
10
9
  hideErrorImage = false,
11
10
  style = null,
12
11
  backgroundColor = null,
13
12
  errorSrc = null,
14
13
  onLoad = null,
15
14
  onError = null,
16
15
  ...otherOption
17
16
  } = props
18
17
  getNetWorkType === NetWorkTypeQuality.default &&
19
18
  (getNetWorkType = taroJdBaseInfo.info.sysInfo.netWorkType)
20
19
  const [loadSuccess, setLoadSuccess] = useState(false)
21
20
  const [imgSrc, setImgSrc] = useState(src)
22
21
  const [imageErrState, setImageErrState] = useState(false)
23
22
  const imageError = useCallback(
24
23
  (e) => {
25
24
  console.log('图片加载错误', e)
26
25
  errorSrc && setImgSrc(errorSrc)
27
26
  hideErrorImage && setImageErrState(true)
28
27
  typeof onError === 'function' && onError(e, src, props)
29
28
  },
30
29
  [src],
31
30
  )
32
31
 
33
32
  const imageLoad = useCallback(
34
33
  (event) => {
35
34
  setLoadSuccess(true)
36
35
  typeof onLoad === 'function' && onLoad(event, src, props)
37
36
  },
38
37
  [src],
39
38
  )
40
39
 
41
40
  const changeStyleIncludeWidthAndHeightAndBgColor = () => {
42
41
  const changeStyle = {}
43
42
  width && (changeStyle['width'] = width)
44
43
  height && (changeStyle['height'] = height)
45
44
  backgroundColor && (changeStyle['backgroundColor'] = backgroundColor)
46
45
  return changeStyle
47
46
  }
48
47
  return (
49
48
  <Image
50
49
  style={{
51
50
  ...style,
52
51
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
53
52
  }}
54
53
  className={classNames(
55
54
  imageStyle['d-lazy-image'],
56
55
  {
57
56
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
58
57
  },
59
58
  {
60
59
  [imageStyle['d-hide-image-error']]: imageErrState,
61
60
  },
62
61
  {
63
62
  [imageStyle['d-load-completed']]: loadSuccess,
64
63
  },
65
64
  {
66
65
  'd-imag-rendering-crisp-edges': imagRenderingSet,
67
66
  },
68
67
  className,
69
68
  )}
70
69
  src={getQualityImage(imgSrc, NetWorkTypeQuality[getNetWorkType])}
71
70
  lazyLoad={lazyLoad}
72
71
  onError={imageError}
73
72
  onLoad={imageLoad}
74
73
  {...otherOption}
75
74
  />
76
75
  )
76
+ import React, { useCallback, useState } from 'react'
77
77
  const {
78
78
  src = null,
79
79
  lazyLoad = true,
80
80
  imagRenderingSet = true,
81
81
  width = null,
82
82
  height = null,
83
83
  className = null,
84
84
  isSkuImage = false,
85
85
  hideErrorImage = false,
86
86
  style = null,
87
87
  backgroundColor = null,
88
88
  errorSrc = null,
89
89
  onLoad = null,
90
90
  onError = null,
91
91
  ...otherOption
92
92
  } = props
93
93
  getNetWorkType === NetWorkTypeQuality.default &&
94
94
  (getNetWorkType = taroJdBaseInfo.info.sysInfo.netWorkType)
95
95
  const [loadSuccess, setLoadSuccess] = useState(false)
96
96
  const [imgSrc, setImgSrc] = useState(src)
97
97
  const [imageErrState, setImageErrState] = useState(false)
98
98
  const imageError = useCallback(
99
99
  (e) => {
100
100
  console.log('图片加载错误', e)
101
101
  errorSrc && setImgSrc(errorSrc)
102
102
  hideErrorImage && setImageErrState(true)
103
103
  typeof onError === 'function' && onError(e, src, props)
104
104
  },
105
105
  [src],
106
106
  )
107
107
 
108
108
  const imageLoad = useCallback(
109
109
  (event) => {
110
110
  setLoadSuccess(true)
111
111
  typeof onLoad === 'function' && onLoad(event, src, props)
112
112
  },
113
113
  [src],
114
114
  )
115
115
 
116
116
  const changeStyleIncludeWidthAndHeightAndBgColor = () => {
117
117
  const changeStyle = {}
118
118
  width && (changeStyle['width'] = width)
119
119
  height && (changeStyle['height'] = height)
120
120
  backgroundColor && (changeStyle['backgroundColor'] = backgroundColor)
121
121
  return changeStyle
122
122
  }
123
123
  return (
124
124
  <Image
125
125
  style={{
126
126
  ...style,
127
127
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
128
128
  }}
129
129
  className={classNames(
130
130
  imageStyle['d-lazy-image'],
131
131
  {
132
132
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
133
133
  },
134
134
  {
135
135
  [imageStyle['d-hide-image-error']]: imageErrState,
136
136
  },
137
137
  {
138
138
  [imageStyle['d-load-completed']]: loadSuccess,
139
139
  },
140
140
  {
141
141
  'd-imag-rendering-crisp-edges': imagRenderingSet,
142
142
  },
143
143
  className,
144
144
  )}
145
145
  src={getQualityImage(imgSrc, NetWorkTypeQuality[getNetWorkType])}
146
146
  lazyLoad={lazyLoad}
147
147
  onError={imageError}
148
148
  onLoad={imageLoad}
149
149
  {...otherOption}
150
150
  />
151
151
  )
@@ -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]: '网络连接已断开',
16
16
  [NETWORK_DATA_TYPE.DATA_ERROR]: '数据加载失败',
17
17
  [NETWORK_DATA_TYPE.NO_DATA]: '你访问的内容飞到太空了',
18
18
  [NETWORK_DATA_TYPE.RISK]: '活动太火爆',
19
19
  [NETWORK_DATA_TYPE.NO_NET_WORK]: '请检查您的网络设置',
20
20
  [NETWORK_DATA_TYPE.DATA_ERROR]: '请稍后重试',
21
21
  [NETWORK_DATA_TYPE.NO_DATA]: '',
22
22
  [NETWORK_DATA_TYPE.RISK]: '页面加载失败,请稍后再试',
23
23
  NETWORK_DATA_TYPE.NO_NET_WORK,
24
24
  NETWORK_DATA_TYPE.DATA_ERROR,
25
25
  NETWORK_DATA_TYPE.NO_DATA,
26
26
  NETWORK_DATA_TYPE.RISK,
27
27
  PART: 'part',
28
28
  FULL: 'full',
29
29
  No_Data_Default_Tip: 'no-data-default-tip',
30
30
  No_Data_Tip_1: 'no-data-tip-1',
31
31
  No_Data_Tip_2: 'no-data-tip-2',
32
32
  No_Network_Err_Tip: 'no-network',
33
33
  No_Data_Bmall: 'no-data-bmall',
34
34
  OLD: 'old',
35
35
  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: #8c8c8c;
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://m.360buyimg.com/imagetools/jfs/t1/106708/34/36128/37234/64896f52Fed1530e0/7b403e068aae316c.png');
90
+ }
44
91
  .d-risk {
45
92
  background-image: url('https://m.360buyimg.com/imagetools/jfs/t1/106708/34/36128/37234/64896f52Fed1530e0/7b403e068aae316c.png');
46
93
  }
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
-
94
+ .d-no-data {
95
+ background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/190994/19/325/42717/6088fed0Ec4b502d5/0e8de7593fb0d06c.png');
96
+ }
97
+ .d-no-data-tip-1 {
98
+ background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/152550/40/8432/21643/5fc9cae0E5391a506/523da679188ff687.png');
99
+ }
54
100
  .d-no-data-tip-2 {
55
101
  background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/142705/35/17776/5911/5fd1e62dE4fbc2300/3ee1d4160db1dac6.png');
56
102
  }
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
- }
103
+ .d-no-network-err-tip {
104
+ background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/146556/1/17745/7493/5fd1e62dE86e86669/96f5c91befa8e991.png');
105
+ }
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 = '重新加载',
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 ? subMessage : NetWorkErrorSubTip[netWorkDataType];
134
134
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {};
135
135
  const maxHeight = latestRes.displayHeight || 546;
136
136
  return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
137
137
  <View
138
138
  style={{
139
139
  maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight,
140
140
  }}
141
141
  className={classNames(
142
142
  netWorkErrorStyle['d-shop-network'],
143
143
  {
144
144
  [netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
145
145
  },
146
146
  {
147
147
  [netWorkErrorStyle['d-shop-network-part']]: netWorkShowType === NetWorkShowType.PART,
148
148
  },
149
149
  {
150
150
  [netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
151
151
  },
152
152
  {
153
153
  [netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
154
154
  },
155
155
  'flexible-center-box',
156
156
  className,
157
157
  )}
158
158
  >
159
159
  <View
160
160
  className={classNames(
161
161
  netWorkErrorStyle['d-error-content'],
162
162
  netWorkErrorStyle[`d-${netWorkStyleType}-style-content`],
163
163
  'd-error-content',
164
164
  )}
165
165
  >
166
166
  <View
167
167
  className={classNames(
168
168
  netWorkErrorStyle['d-error-type'],
169
169
  netWorkErrorStyle[`d-${netWorkDataType}`],
170
170
  netWorkErrorStyle[`d-${netWorkImageType}`],
171
171
  'd-error-type',
172
172
  )}
173
173
  />
174
174
  <View
175
175
  className={classNames(
176
176
  netWorkErrorStyle['d-error-tip'],
177
177
  netWorkErrorStyle[`d-${netWorkDataType}-tip`],
178
178
  'd-error-tip',
179
179
  )}
180
180
  >
181
181
  {useErrorTip}
182
182
  </View>
183
183
  {useErrorSubTip ? (
184
184
  <View
185
185
  className={classNames(
186
186
  netWorkErrorStyle['d-error-sub-tip'],
187
187
  netWorkErrorStyle[`d-${netWorkDataType}-sub-tip`],
188
188
  'd-error-sub-tip',
189
189
  )}
190
190
  >
191
191
  {useErrorSubTip}
192
192
  </View>
193
193
  ) : null}
194
194
  <View className={'flexible-horizontal-center-box'}>
195
195
  {refreshCallBackFn && (
196
196
  <Button
197
197
  onClick={refershInitData}
198
198
  className={classNames(
199
199
  netWorkErrorStyle['d-opt-btn'],
200
200
  'd-button-no-border',
201
201
  'd-opt-btn',
202
202
  )}
203
203
  plain
204
204
  size="mini"
205
205
  >
206
206
  {btnLabel}
207
207
  </Button>
208
208
  )}
209
209
  </View>
210
210
  </View>
211
211
  </View>
212
212
  ) : null;
@@ -0,0 +1,63 @@
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
+ }