import { View, Image } from "@tarojs/components"; import './time_record.scss' import Taro from "@tarojs/taro"; import { rpxToPx } from "@/utils/tools"; import { MainColorType } from "@/context/themes/color"; import NewButton, { NewButtonType } from "@/_health/base/new_button"; import { useEffect, useState } from "react"; import NewDateTimePicker from "@/_health/base/new_date_time_picker"; import dayjs from "dayjs"; import RingProgress from "../components/ring_progress"; import NewDurationPicker, { DurationPickerType } from "@/_health/base/new_durationpicker"; import { IconArrow } from "@/components/basic/Icons"; let timer export default function TimeRecord() { const systemInfo: any = Taro.getWindowInfo ? Taro.getWindowInfo() : Taro.getSystemInfoSync(); const navigationBarHeight = systemInfo.statusBarHeight + 44; const [enterTime] = useState(new Date().getTime()) const [showDatePicker, setShowDatePicker] = useState(false) const [showDurationPicker, setShowDurationPicker] = useState(false) const [count, setCount] = useState(0) useEffect(() => { timer = setInterval(() => { setCount(count => count + 1) }, 1000) return () => { clearInterval(timer) } }, []) function tapStart() { setShowDatePicker(true) } function tapGoal() { setShowDurationPicker(true) } return { Taro.navigateBack() }} /> upcoming fast { setShowDurationPicker(true) }}> STARTED 今天 13:54 Edit Start STARTED 今天 13:54 Edit Start { Taro.redirectTo({ url: './log_record' }) }}> Or share your meals if you haven't started fasting yet { Taro.redirectTo({ url: './log_record' }) }}> How are you feeling? Start 10:00 Goal 10:00 { }} type={NewButtonType.fill} color={MainColorType.orange} width={rpxToPx(669)} height={rpxToPx(96)} title="开始断食" /> { showDatePicker && { // if (props.dateChange) // props.dateChange(e[0]) // if (props.timeChange) // props.timeChange(e[1]) // props.change(e) }} color={MainColorType.orange} /> } { showDurationPicker && } }