Leon 1 jaar geleden
bovenliggende
commit
e4e330ba5a
1 gewijzigde bestanden met toevoegingen van 7 en 3 verwijderingen
  1. 7 3
      src/features/trackTimeDuration/components/IndexConsoleMuti.tsx

+ 7 - 3
src/features/trackTimeDuration/components/IndexConsoleMuti.tsx

@@ -99,6 +99,7 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
                         })
                         return
                     }
+                    debugger
                     if (!sleepStart && props.scenario == 'FAST_SLEEP') {
                         Taro.showToast({
                             icon: 'none',
@@ -127,7 +128,7 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
                     sleep.real_start_time = sleepStart.time
                     sleep.real_start_date = sleepStart.date
                 }
-                if (!sleepEnd) {
+                if (!sleepEnd && props.scenario == 'FAST_SLEEP') {
                     Taro.showToast({
                         icon: 'none',
                         title: '请选择结束睡眠时间'
@@ -141,8 +142,11 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
                     })
                     return
                 }
-                sleep.real_end_time = sleepEnd.time
-                sleep.real_end_date = sleepEnd.date
+
+                if (props.scenario == 'FAST_SLEEP') {
+                    sleep.real_end_time = sleepEnd.time
+                    sleep.real_end_date = sleepEnd.date
+                }
                 fast.real_end_time = fastEnd.time
                 fast.real_end_date = fastEnd.date
                 break;