@conecli/cone-render 0.9.1-shop2.4 → 0.9.1-shop2.40

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 (117) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/assets/icon_blue_info.svg +1 -0
  3. package/dist/common/const.ts +1 -1
  4. package/dist/common/environmentType.ts +1 -0
  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.ts +1 -0
  10. package/dist/common/pageType.ts +1 -1
  11. package/dist/common/sgmCustomCode.ts +1 -0
  12. package/dist/common/token/token.jd.ts +1 -1
  13. package/dist/common/token/token.ts +1 -1
  14. package/dist/common/wxappApi.jd.ts +1 -0
  15. package/dist/components/ErrorBoundary.tsx +1 -1
  16. package/dist/components/base/CommonFloorHead/index.module.scss +126 -111
  17. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  18. package/dist/components/base/CountDown/index.module.scss +49 -44
  19. package/dist/components/base/CountDown/index.tsx +1 -1
  20. package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
  21. package/dist/components/base/CustomScrollView/index.module.scss +7 -0
  22. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  23. package/dist/components/base/CustomVideo/common.ts +1 -0
  24. package/dist/components/base/CustomVideo/index.tsx +1 -1
  25. package/dist/components/base/Dialog/index.module.scss +16 -0
  26. package/dist/components/base/Dialog/index.tsx +1 -1
  27. package/dist/components/base/ExposureSmart/index.h5.module.scss +12 -2
  28. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  29. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  30. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  31. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  32. package/dist/components/base/InViewRender/index.tsx +1 -1
  33. package/dist/components/base/ItemViewExposureSmart/index.module.scss +2 -2
  34. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  35. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  36. package/dist/components/base/LazyLoadImage/index.h5.module.scss +23 -20
  37. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  38. package/dist/components/base/MobileCommonHeader/index.module.scss +8 -0
  39. package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
  40. package/dist/components/base/NetworkDataError/index.module.scss +3 -0
  41. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  42. package/dist/components/base/Price/Base/index.tsx +1 -1
  43. package/dist/components/base/Price/Double/index.module.scss +8 -0
  44. package/dist/components/base/Price/Double/index.tsx +1 -1
  45. package/dist/components/debug/DebugLayout/index.module.scss +67 -0
  46. package/dist/components/debug/DebugLayout/index.tsx +1 -0
  47. package/dist/components/debug/DebugLayout/utils.ts +1 -0
  48. package/dist/components/decorate/DecorateFloorModule/index.module.scss +11 -0
  49. package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
  50. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  51. package/dist/components/decorate/PlaceHolder/index.tsx +1 -1
  52. package/dist/components/floorItem.jd.tsx +1 -1
  53. package/dist/components/floorItem.tsx +1 -1
  54. package/dist/components/floorItem.weapp.tsx +1 -1
  55. package/dist/components/isv/Floor/index.tsx +1 -1
  56. package/dist/components/remoteFloorItem.tsx +1 -1
  57. package/dist/interface/common.ts +1 -1
  58. package/dist/interface/component.ts +1 -1
  59. package/dist/interface/jumpEventReport.ts +1 -1
  60. package/dist/interface/service.ts +1 -1
  61. package/dist/interface/utils.ts +1 -1
  62. package/dist/jumpEventReport/base.ts +1 -1
  63. package/dist/jumpEventReport/const.ts +1 -1
  64. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  65. package/dist/jumpEventReport/index.h5.ts +1 -1
  66. package/dist/jumpEventReport/index.jd.ts +1 -1
  67. package/dist/jumpEventReport/index.weapp.ts +1 -1
  68. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  69. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  70. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  71. package/dist/jumpEventReport/web/report.ts +1 -1
  72. package/dist/jumpEventReport/web.base.ts +1 -1
  73. package/dist/jumpEventReport/web.jd.ts +1 -1
  74. package/dist/jumpEventReport/web.jdb.ts +1 -1
  75. package/dist/jumpEventReport/web.jdjch.ts +1 -1
  76. package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
  77. package/dist/jumpEventReport/web.pc.ts +1 -1
  78. package/dist/jumpEventReport/web.tjapp.ts +1 -0
  79. package/dist/jumpEventReport/web.tjm.ts +1 -0
  80. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  81. package/dist/modules/ContainerFloorList/index.h5.module.scss +30 -1
  82. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  83. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  84. package/dist/open/api/device.ts +1 -1
  85. package/dist/open/api/environment.ts +1 -1
  86. package/dist/open/api/index.ts +1 -1
  87. package/dist/open/api/jump copy.ts +1 -1
  88. package/dist/open/api/request.ts +1 -1
  89. package/dist/open/api/shopMember.ts +1 -1
  90. package/dist/open/api/track.ts +1 -1
  91. package/dist/open/api/util.ts +1 -1
  92. package/dist/open/components/index.ts +1 -1
  93. package/dist/sass/app.h5.scss +274 -212
  94. package/dist/sass/base.scss +195 -137
  95. package/dist/service/fetchGateway.ts +1 -1
  96. package/dist/service/http/colorSign.ts +1 -1
  97. package/dist/service/http/const.ts +1 -1
  98. package/dist/service/http/h5Http.ts +1 -0
  99. package/dist/service/http/index.h5.ts +1 -0
  100. package/dist/service/requestServer.h5.ts +1 -0
  101. package/dist/service/requestServer.ts +1 -1
  102. package/dist/utils/connectNativeJsBridge.ts +1 -1
  103. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  104. package/dist/utils/draExceptionAndProfile.ts +1 -1
  105. package/dist/utils/h5Utils.ts +1 -1
  106. package/dist/utils/index.h5.ts +1 -1
  107. package/dist/utils/index.ts +1 -1
  108. package/dist/utils/index.weapp.ts +1 -1
  109. package/dist/utils/jm-common.js +1 -1
  110. package/dist/utils/jumpExtMapUtil.js +1 -0
  111. package/dist/utils/sColor.js +1 -0
  112. package/dist/utils/sgmCodeUtils.ts +1 -0
  113. package/dist/utils/taroRenderUtil.ts +1 -1
  114. package/dist/utils/utils.ts +1 -1
  115. package/package.json +26 -3
  116. package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
  117. package/dist/utils/memberFormatUtils.js +0 -1
@@ -1 +1 @@
1
- import React, { useMemo } from 'react'
2
1
  key: 1,
2
+ import React, { useMemo } from 'react';
3
3
  'https://m.360buyimg.com/imagetools/jfs/t1/170321/15/27425/230/61c1839aE0514462b/0b4d278fe18d91bb.png';
4
4
  'https://m.360buyimg.com/imagetools/jfs/t1/94671/2/26921/257/623d630aE681512e3/ded2e640c4a0a7ea.png';
5
5
  const getLogInfo = ReportContainerData.getReportClickFloorInfo(
6
6
  floorData,
7
7
  dataDefines,
8
8
  {
9
9
  clickArea: `title`,
10
10
  skuid: ``,
11
11
  tagList: [],
12
12
  labelList: [],
13
13
  pos: ``,
14
14
  },
15
15
  {
16
16
  la_p: ``,
17
17
  },
18
18
  );
19
19
  if (config) {
20
20
  JumpEventReport.jdJumpConfigUrl(config, {
21
21
  eventId: `TerminatorNew_${floorData.floorExtInfo?.moduleFlag}_Click`,
22
22
  jsonParam: getLogInfo,
23
23
  });
24
24
  }
25
25
  dataDefines,
26
26
  floorData,
27
27
  oldModuleFloorTitle,
28
28
  titleText,
29
29
  titleMoreClick,
30
30
  additionalRenderContent,
31
31
  customClassName,
32
32
  const floorTitleDataDefine = dataDefines
33
33
  ? dataDefines.filter((item) => {
34
34
  return item.type === 'floorTitle';
35
35
  })
36
36
  : [];
37
37
  const floorTitle = oldModuleFloorTitle
38
38
  ? oldModuleFloorTitle
39
39
  : (floorTitleDataDefine[0]?.nodeText?.data ?? {});
40
40
  const { detail, imageUrl, text, textBackground, type: floorTitleType = 1, subText } = floorTitle;
41
41
  if (floorTitleType === 1) {
42
42
  return null;
43
43
  }
44
44
  const bgMap = {
45
45
  '1': null,
46
46
  '2': textBackground || '',
47
47
  '3': imageUrl || '',
48
48
  };
49
49
  const useFloorTitleBgImg = bgMap[floorTitleType];
50
50
  return (
51
51
  <View
52
52
  className={classNames(styles['d-root'], customClassName)}
53
53
  onClick={floorTitleType === 3 ? gotoMPage.bind(this, dataDefines, floorData, detail) : {}}
54
54
  >
55
55
  <View
56
56
  className={classNames(styles['d-img'], {
57
57
  [styles['d-img-bg']]: useFloorTitleBgImg,
58
58
  })}
59
59
  style={useFloorTitleBgImg ? { backgroundImage: `url(${useFloorTitleBgImg})` } : {}}
60
60
  />
61
61
  <View
62
62
  className={classNames(
63
63
  styles['d-content-wrap'],
64
64
  floorTitleType === 2 && textBackground ? styles['d-has-title-bg'] : null,
65
65
  floorTitleType === 3 ? styles['d-type-is-img'] : null,
66
66
  useFloorTitleBgImg ? styles['d-content-wrap-for-img'] : null,
67
67
  )}
68
68
  >
69
69
  <View className={classNames(styles['d-content'], 'd-content')}>
70
70
  <View className={styles['d-content-left']}>
71
71
  {floorTitleType === 2 && text ? (
72
72
  <Text className={classNames(styles['d-text'], 'text-ellipsis')}>
73
73
  {titleText ? titleText : text}
74
74
  </Text>
75
75
  ) : null}
76
76
  {floorTitleType === 2 && subText
77
77
  ? [
78
78
  textBackground ? <View key={1} className={styles['d-vertical-line']} /> : null,
79
79
  <Text key={2} className={styles['d-sub-text']}>
80
80
  {subText}
81
81
  </Text>,
82
82
  ]
83
83
  : null}
84
84
  {additionalRenderContent ? additionalRenderContent(textBackground) : null}
85
85
  </View>
86
86
  <View className={styles['d-content-right']}>
87
87
  {titleMoreClick ? (
88
88
  <View
89
89
  className={styles['d-title-more']}
90
90
  onClick={(e) => {
91
91
  typeof titleMoreClick === 'function' && titleMoreClick(e);
92
92
  e.stopPropagation();
93
93
  }}
94
94
  >
95
95
  <Text
96
96
  className={classNames(
97
97
  styles['d-title-more-text'],
98
98
  textBackground || floorTitleType === 3
99
99
  ? styles['d-title-more-text-white']
100
100
  : null,
101
101
  )}
102
102
  >
103
103
  更多
104
104
  </Text>
105
105
  <Image
106
106
  className={styles['d-title-more-arrow']}
107
107
  src={textBackground || floorTitleType === 3 ? ICON_ARROW_WHITE : ICON_ARROW_GRAY}
108
108
  mode="widthFix"
109
109
  />
110
110
  </View>
111
111
  ) : null}
112
112
  </View>
113
113
  </View>
114
114
  </View>
115
115
  </View>
116
116
  );
117
117
  return useMemo(() => {
118
118
  return <CommonFloorHeader {...props} />;
119
119
  }, [props.key]);
120
120
  titleText: null,
121
121
  titleMoreClick: null,
122
122
  additionalRenderContent: null,
123
123
  customClassName: null,
124
124
  key: 1,
@@ -1,47 +1,52 @@
1
1
 
2
2
  .d-count-down {
3
- position: relative;
4
- z-index: 2;
5
- padding-top: 1px;
6
- line-height: 28px;
7
- font-size: 24px;
8
- font-weight: bolder;
9
- color: #fff;
10
- text-align: center;
11
- &.d-ios-10-count-down {
12
- padding-top: 9px;
13
- }
14
- :global {
15
- .d-count-down-title {
16
- // position: relative;
17
- // top: -2px;
18
- display: inline-block;
19
- padding-right: 5px;
20
- height: 24px;
21
- line-height: 24px;
22
- font-size: 20px;
23
- }
24
- .d-count-down-time {
25
- display: inline-block;
26
- //margin: 0 2px;
27
- min-width: 24px;
28
- line-height: 28px;
29
- font-size: 20px;
30
- text-align: center;
31
- }
32
- .d-time-space-text {
33
- display: inline-block;
34
- //margin: 0 2px;
35
- font-size: 20px;
36
- }
37
- // .d-count-from-end {
38
- // margin-right: 4px;
39
- // font-size: 9px;
40
- // }
41
- }
42
- :global(.d-count-down-time) {
43
- &:global(.d-day-time) {
44
- min-width: 12px;
45
- }
46
- }
3
+ position: relative;
4
+ z-index: 2;
5
+ padding-top: 1px;
6
+ line-height: 28px;
7
+ font-size: 24px;
8
+ font-weight: bolder;
9
+ color: #fff;
10
+ text-align: center;
11
+ &.d-ios-10-count-down {
12
+ padding-top: 9px;
13
+ }
14
+ :global {
15
+ .d-count-down-title {
16
+ // position: relative;
17
+ // top: -2px;
18
+ display: inline-block;
19
+ padding-right: 5px;
20
+ height: 24px;
21
+ line-height: 24px;
22
+ font-size: 20px;
23
+ }
24
+ .d-count-down-time {
25
+ display: inline-block;
26
+ //margin: 0 2px;
27
+ min-width: 24px;
28
+ line-height: 28px;
29
+ font-size: 20px;
30
+ text-align: center;
31
+ }
32
+ .d-time-space-text {
33
+ display: inline-block;
34
+ //margin: 0 2px;
35
+ font-size: 20px;
36
+ }
37
+ .d-day-time {
38
+ min-width: 12px;
39
+ }
40
+ // .d-count-from-end {
41
+ // margin-right: 4px;
42
+ // font-size: 9px;
43
+ // }
44
+ }
45
+ &.d-en-count-down {
46
+ :global {
47
+ .d-day-space-text {
48
+ padding-right: 4px;
49
+ }
50
+ }
51
+ }
47
52
  }
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
1
+ import Taro from '@tarojs/taro';
2
2
  const {
3
3
  residueTime,
4
4
  serverTime,
5
5
  startTime,
6
6
  endTime,
7
7
  className,
8
8
  info,
9
9
  endTimeEndCallBack,
10
10
  startTimeEndCallBack,
11
11
  startTitleText,
12
12
  endTitleText,
13
13
  timeNumSpaceTextState,
14
14
  showDaytimeNumSpaceTextState,
15
15
  getDaysToHours,
16
16
  onlyShowDayState,
17
17
  showDayState,
18
18
  showHourState,
19
19
  showMinuteState,
20
20
  showSecondState,
21
21
  showDayToSecondState,
22
22
  fromStartText,
23
23
  fromEndText,
24
24
  numTextColor,
25
25
  textColor,
26
26
  numTextBgColor,
27
27
  } = props;
28
28
  const [endTimeFormat, setEndTimeFormat] = useState<{
29
29
  day: string | number;
30
30
  hour: string | number;
31
31
  minute: string | number;
32
32
  second: string | number;
33
33
  }>({
34
34
  day: 0,
35
35
  hour: 0,
36
36
  minute: 0,
37
37
  second: 0,
38
38
  });
39
39
  const countDownTimer = useRef<NodeJS.Timer | null>();
40
40
  const countDownTypeText = useRef<ComponentInterFace.CountDownTimerRef>({
41
41
  type: 'end',
42
42
  text: endTitleText,
43
43
  time: null,
44
44
  });
45
45
 
46
46
  const diffTimerRef = useRef({
47
47
  stopDocumentTime: 0,
48
48
  recoverDocumentTime: 0,
49
49
  diffTime: 0,
50
50
  });
51
51
 
52
52
  useEffect(() => {
53
53
  Taro.eventCenter.on(TaroEventType.PAGE_DOCUMENT_VISIBILITY_CHANGE, (state) => {
54
54
  if (state) {
55
55
  if (diffTimerRef.current.stopDocumentTime && diffTimerRef.current.stopDocumentTime > 0) {
56
56
  diffTimerRef.current.recoverDocumentTime = Date.now();
57
57
  diffTimerRef.current.diffTime =
58
58
  diffTimerRef.current.recoverDocumentTime - diffTimerRef.current.stopDocumentTime;
59
59
  changeTimerSetInterval(true);
60
60
  }
61
61
  } else {
62
62
  diffTimerRef.current.stopDocumentTime = Date.now();
63
63
  if (countDownTimer.current) {
64
64
  clearInterval(countDownTimer.current);
65
65
  countDownTimer.current = null;
66
66
  }
67
67
  }
68
68
  });
69
69
  }, []);
70
70
  useEffect(() => {
71
71
  if (serverTime > 0 || residueTime > 0) {
72
72
  let getNowEndTime = residueTime > 0 ? residueTime : endTime - serverTime;
73
73
  if (startTime && endTime) {
74
74
  if (serverTime <= startTime) {
75
75
  getNowEndTime = startTime - serverTime;
76
76
  countDownTypeText.current = {
77
77
  type: 'start',
78
78
  text: startTitleText,
79
79
  time: null,
80
80
  };
81
81
  } else {
82
82
  getNowEndTime = endTime - serverTime;
83
83
  countDownTypeText.current = {
84
84
  type: 'end',
85
85
  text: endTitleText,
86
86
  time: null,
87
87
  };
88
88
  }
89
89
  } else {
90
90
  countDownTypeText.current = {
91
91
  type: 'end',
92
92
  text: endTitleText,
93
93
  time: null,
94
94
  };
95
95
  }
96
96
  if (getNowEndTime > 0) {
97
97
  countDownTimeFormat(getNowEndTime);
98
98
  countDownTypeText.current.time = getNowEndTime;
99
99
  countDownTypeText.current.type === 'start' &&
100
100
  (countDownTypeText.current.endTime = endTime - serverTime);
101
101
  changeTimerSetInterval();
102
102
  } else {
103
103
  countDownTypeText.current = {
104
104
  type: 'end',
105
105
  text: endTitleText,
106
106
  time: 0,
107
107
  };
108
108
  }
109
109
  }
110
110
  return () => {
111
111
  countDownTimer.current && clearInterval(countDownTimer.current);
112
112
  };
113
113
  }, [serverTime]);
114
114
 
115
115
  const changeTimerSetInterval = (recoverState = false) => {
116
116
  countDownTimer.current && clearInterval(countDownTimer.current);
117
117
  recoverState && changeTimerFunc();
118
118
  countDownTimer.current = setInterval(changeTimerFunc, 1000);
119
119
  };
120
120
  const changeTimerFunc = () => {
121
121
  if (countDownTypeText.current.time && diffTimerRef.current.diffTime > 0) {
122
122
  countDownTypeText.current.time -= diffTimerRef.current.diffTime;
123
123
  countDownTypeText.current.type === 'start' &&
124
124
  countDownTypeText.current.endTime &&
125
125
  (countDownTypeText.current.endTime -= diffTimerRef.current.diffTime);
126
126
  console.log(
127
127
  '当前id倒计时获取倒计时息屏时间计算差值',
128
128
  countDownTimer.current,
129
129
  diffTimerRef.current,
130
130
  countDownTypeText.current,
131
131
  );
132
132
  diffTimerRef.current.stopDocumentTime = 0;
133
133
  diffTimerRef.current.recoverDocumentTime = 0;
134
134
  diffTimerRef.current.diffTime = 0;
135
135
  }
136
136
  if (countDownTypeText.current.time && countDownTypeText.current.time > 1000) {
137
137
  countDownTypeText.current.time -= 1000;
138
138
  countDownTypeText.current.type === 'start' &&
139
139
  countDownTypeText.current.endTime &&
140
140
  (countDownTypeText.current.endTime -= 1000);
141
141
  countDownTimeFormat(countDownTypeText.current.time);
142
142
  } else {
143
143
  countDownTypeText.current.time = 0;
144
144
  countDownTimeFormat(countDownTypeText.current.time);
145
145
  countDownTimer.current && clearInterval(countDownTimer.current);
146
146
  if (countDownTypeText.current.type === 'start') {
147
147
  let triggerStartTimeEndCallBackState = true;
148
148
  countDownTypeText.current = Object.assign({}, countDownTypeText.current, {
149
149
  type: 'end',
150
150
  text: endTitleText,
151
151
  });
152
152
  countDownTypeText.current.time = countDownTypeText.current.endTime;
153
153
  countDownTypeText.current.time && (countDownTypeText.current.time -= 1000);
154
154
  if (countDownTypeText.current.time && countDownTypeText.current.time > 0) {
155
155
  countDownTimer.current = setInterval(() => {
156
156
  if (countDownTypeText.current.time && diffTimerRef.current.diffTime > 0) {
157
157
  countDownTypeText.current.time -= diffTimerRef.current.diffTime;
158
158
  diffTimerRef.current.stopDocumentTime = 0;
159
159
  diffTimerRef.current.recoverDocumentTime = 0;
160
160
  diffTimerRef.current.diffTime = 0;
161
161
  }
162
162
  if (triggerStartTimeEndCallBackState && startTimeEndCallBack) {
163
163
  startTimeEndCallBack({
164
164
  type: 'start',
165
165
  endState: true,
166
166
  ...info,
167
167
  });
168
168
  triggerStartTimeEndCallBackState = false;
169
169
  }
170
170
  if (countDownTypeText.current.time && countDownTypeText.current.time > 1000) {
171
171
  countDownTypeText.current.time -= 1000;
172
172
  countDownTimeFormat(countDownTypeText.current.time);
173
173
  } else {
174
174
  endTimeEndCallBack &&
175
175
  endTimeEndCallBack({
176
176
  type: 'end',
177
177
  endState: true,
178
178
  ...info,
179
179
  });
180
180
  }
181
181
  }, 1000);
182
182
  }
183
183
  } else {
184
184
  endTimeEndCallBack &&
185
185
  endTimeEndCallBack({
186
186
  type: 'end',
187
187
  endState: true,
188
188
  ...info,
189
189
  });
190
190
  }
191
191
  }
192
192
  };
193
193
  const countDownTimeFormat = (nowEndTime) => {
194
194
  let day = Math.floor(nowEndTime / 1000 / 86400);
195
195
  let hour = Math.floor((nowEndTime / 1000 / 3600) % 24);
196
196
  const minute = Math.floor((nowEndTime / 1000 / 60) % 60);
197
197
  const second = Math.floor((nowEndTime / 1000) % 60);
198
198
  if (getDaysToHours && day > 0) {
199
199
  hour = hour + day * 24;
200
200
  day = 0;
201
201
  }
202
202
  setEndTimeFormat({
203
203
  day,
204
204
  hour: `${hour}`.padStart(2, '0'),
205
205
  minute: `${minute}`.padStart(2, '0'),
206
206
  second: `${second}`.padStart(2, '0'),
207
207
  });
208
208
  };
209
209
  const numCustomStyle = numTextColor
210
210
  ? useRef({ color: numTextColor, backgroundColor: numTextBgColor })
211
211
  : useRef({});
212
212
  const textCustomStyle = textColor ? useRef({ color: textColor }) : useRef({});
213
213
  return (
214
214
  <View
215
215
  className={classNames(
216
216
  countDownStyle['d-count-down'],
217
217
  {
218
218
  [countDownStyle['d-ios-10-count-down']]: ios10State && !devToolPlatformState,
219
219
  },
220
220
  {
221
221
  [countDownStyle['d-en-count-down']]: isLanguageForEn,
222
222
  },
223
223
  className,
224
224
  )}
225
225
  >
226
226
  {countDownTypeText.current && countDownTypeText.current.text && (
227
227
  <Text className={classNames('d-count-down-title', 'font-jdzht')}>
228
228
  {countDownTypeText.current.text}
229
229
  </Text>
230
230
  )}
231
231
  <View className="display-inline-block">
232
232
  {fromStartText && <Text className="d-count-from-start">{fromStartText}</Text>}
233
233
  {onlyShowDayState && endTimeFormat.day > 0 ? (
234
234
  <>
235
235
  <Text
236
236
  className={classNames('d-count-down-time', 'd-day-time', 'font-jdzht')}
237
237
  style={numCustomStyle.current}
238
238
  >
239
239
  {endTimeFormat.day}
240
240
  </Text>
241
241
  <Text className="d-time-space-text d-day-space-text" style={textCustomStyle.current}>
242
242
  {showDaytimeNumSpaceTextState ? countDownTimeDay : ':'}
243
243
  </Text>
244
244
  </>
245
245
  ) : (
246
246
  <>
247
247
  {(showDayState || showDayToSecondState) && endTimeFormat.day > 0 && (
248
248
  <>
249
249
  <Text
250
250
  className={classNames('d-count-down-time', 'd-day-time', 'font-jdzht')}
251
251
  style={numCustomStyle.current}
252
252
  >
253
253
  {endTimeFormat.day}
254
254
  </Text>
255
255
  <Text
256
256
  className="d-time-space-text d-day-space-text"
257
257
  style={textCustomStyle.current}
258
258
  >
259
259
  {showDaytimeNumSpaceTextState ? countDownTimeDay : ':'}
260
260
  </Text>
261
261
  </>
262
262
  )}
263
263
  {showHourState && (
264
264
  <>
265
265
  <Text
266
266
  className={classNames('d-count-down-time', 'd-hour-time', 'font-jdzht')}
267
267
  style={numCustomStyle.current}
268
268
  >
269
269
  {endTimeFormat.hour}
270
270
  </Text>
271
271
  <Text className="d-time-space-text" style={textCustomStyle.current}>
272
272
  {(endTimeFormat.day > 0 && showDaytimeNumSpaceTextState) || timeNumSpaceTextState
273
273
  ? countDownTimeHour
274
274
  : ':'}
275
275
  </Text>
276
276
  </>
277
277
  )}
278
278
  {showMinuteState && (
279
279
  <>
280
280
  <Text
281
281
  className={classNames('d-count-down-time', 'd-minute-time', 'font-jdzht')}
282
282
  style={numCustomStyle.current}
283
283
  >
284
284
  {endTimeFormat.minute}
285
285
  </Text>
286
286
  <Text className="d-time-space-text" style={textCustomStyle.current}>
287
287
  {(endTimeFormat.day > 0 && showDaytimeNumSpaceTextState) || timeNumSpaceTextState
288
288
  ? countDownTimeMin
289
289
  : endTimeFormat.day > 0
290
290
  ? ''
291
291
  : ':'}
292
292
  </Text>
293
293
  </>
294
294
  )}
295
295
  {showSecondState && (endTimeFormat.day <= 0 || showDayToSecondState) && (
296
296
  <>
297
297
  <Text
298
298
  className={classNames('d-count-down-time', 'd-second-time', 'font-jdzht')}
299
299
  style={numCustomStyle.current}
300
300
  >
301
301
  {endTimeFormat.second}
302
302
  </Text>
303
303
  {(timeNumSpaceTextState ||
304
304
  (showDayToSecondState && showDaytimeNumSpaceTextState)) && (
305
305
  <Text className="d-time-space-text" style={textCustomStyle.current}>
306
306
 
307
307
  </Text>
308
308
  )}
309
309
  </>
310
310
  )}
311
311
  </>
312
312
  )}
313
313
  {fromEndText && <Text className="d-count-from-end">{fromEndText}</Text>}
314
314
  </View>
315
315
  </View>
316
316
  );
317
317
  return useMemo(() => {
318
318
  return <CountDownTimer {...props} />;
319
319
  }, []);
320
320
  residueTime: -1,
321
321
  serverTime: null,
322
322
  className: null,
323
323
  startTime: null,
324
324
  endTime: null,
325
325
  info: null,
326
326
  startTitleText: '距活动开始',
327
327
  endTitleText: '距活动结束',
328
328
  fromEndText: null,
329
329
  startTimeEndCallBack: null,
330
330
  endTimeEndCallBack: null,
331
331
  timeNumSpaceTextState: false,
332
332
  showDaytimeNumSpaceTextState: true,
333
333
  onlyShowDayState: false,
334
334
  showDayState: false,
335
335
  showDayToSecondState: false,
336
336
  getDaysToHours: false,
337
337
  showHourState: true,
338
338
  showMinuteState: true,
339
339
  showSecondState: true,
340
340
  numTextColor: null,
341
341
  textColor: null,
342
342
  numTextBgColor: null,
@@ -0,0 +1 @@
1
+ import React from 'react'
2
  return (
1
3
  <ScrollView
2
4
  scrollX
3
5
  enhanced
4
6
  showScrollbar={false}
5
7
  {...otherProps}
6
8
  className={classNames(
7
9
  className,
8
10
  {
9
11
  [customScrollViewStyle[
10
12
  'd-custom-ios-mini-extend-border-radius'
11
13
  ]]:
12
14
  isIosDevice &&
13
15
  isJdMin &&
14
16
  scrollX &&
15
17
  style['borderRadius'],
16
18
  },
17
19
  {
18
20
  [customScrollViewStyle[
19
21
  'd-custom-ios-h5-extend-border-radius'
20
22
  ]]: isIosDevice,
21
23
  },
22
24
  {
23
25
  [customScrollViewStyle['d-custom-mini-hide-scroll']]:
24
26
  isJdMin,
25
27
  },
26
28
  )}
27
29
  style={style}
28
30
  >
29
31
  {children}
30
32
  </ScrollView>
31
33
  )
@@ -16,3 +16,10 @@
16
16
  width: 0;
17
17
  }
18
18
  }
19
+
20
+ .d-custom-mini-hide-scroll {
21
+ &::-webkit-scrollbar {
22
+ display: none;
23
+ width: 0;
24
+ }
25
+ }