|
@@ -37,6 +37,7 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
|
|
|
function confirm() {
|
|
function confirm() {
|
|
|
var fast: any = {}
|
|
var fast: any = {}
|
|
|
var sleep: any = {}
|
|
var sleep: any = {}
|
|
|
|
|
+ debugger
|
|
|
switch (props.event) {
|
|
switch (props.event) {
|
|
|
case 'start_sleep':
|
|
case 'start_sleep':
|
|
|
if (!fastStart) {
|
|
if (!fastStart) {
|
|
@@ -98,7 +99,7 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- if (!sleepStart) {
|
|
|
|
|
|
|
+ if (!sleepStart && props.scenario == 'FAST_SLEEP') {
|
|
|
Taro.showToast({
|
|
Taro.showToast({
|
|
|
icon: 'none',
|
|
icon: 'none',
|
|
|
title: '请选择开始睡眠时间'
|
|
title: '请选择开始睡眠时间'
|
|
@@ -106,10 +107,13 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
fast.real_start_time = fastStart.time
|
|
fast.real_start_time = fastStart.time
|
|
|
- fast.real_start_date = fastStart.date
|
|
|
|
|
|
|
+ fast.real_start_date = fastStart.date
|
|
|
|
|
+
|
|
|
|
|
+ if (props.scenario == 'FAST_SLEEP') {
|
|
|
|
|
+ sleep.real_start_time = sleepStart.time
|
|
|
|
|
+ sleep.real_start_date = sleepStart.date
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- sleep.real_start_time = sleepStart.time
|
|
|
|
|
- sleep.real_start_date = sleepStart.date
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
else if (props.status == 'ONGOING1') {
|
|
else if (props.status == 'ONGOING1') {
|
|
@@ -143,10 +147,20 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
|
|
|
fast.real_end_date = fastEnd.date
|
|
fast.real_end_date = fastEnd.date
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- batchClocks({
|
|
|
|
|
- fast,
|
|
|
|
|
- sleep
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
|
+ var params: any = {
|
|
|
|
|
+ }
|
|
|
|
|
+ if (props.scenario == 'FAST_SLEEP') {
|
|
|
|
|
+ params = {
|
|
|
|
|
+ fast,
|
|
|
|
|
+ sleep
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ params = {
|
|
|
|
|
+ fast
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ batchClocks(params).then(res => {
|
|
|
getLocalPush()
|
|
getLocalPush()
|
|
|
global.indexPageRefresh()
|
|
global.indexPageRefresh()
|
|
|
global.scrollToLatest()
|
|
global.scrollToLatest()
|
|
@@ -159,7 +173,7 @@ export default function IndexConsoleMuti(props: { status: string, event: string,
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
function tapItem(index: number) {
|
|
function tapItem(index: number) {
|
|
|
setShowPicker(true);
|
|
setShowPicker(true);
|
|
|
switch (index) {
|
|
switch (index) {
|