leon 1 年間 前
コミット
0504af2cce
32 ファイル変更584 行追加362 行削除
  1. 3 2
      src/_health/components/add_label.scss
  2. 70 2
      src/_health/components/add_label.tsx
  3. 102 33
      src/_health/components/fast_sleep_card.tsx
  4. 6 1
      src/_health/components/fast_sleep_console.tsx
  5. 26 74
      src/_health/components/fast_sleep_popup.tsx
  6. 31 16
      src/_health/components/fast_sleep_popup_content.tsx
  7. 4 8
      src/_health/components/schedule_item.tsx
  8. 1 4
      src/_health/pages/add_moment.scss
  9. 18 15
      src/_health/pages/add_moment.tsx
  10. 8 6
      src/_health/pages/fast_sleep.tsx
  11. 7 5
      src/_health/pages/guide_active.tsx
  12. 6 4
      src/_health/pages/guide_eat.tsx
  13. 21 6
      src/_health/pages/schedules.tsx
  14. 1 1
      src/_health/pages/schedules_edit.config.ts
  15. 138 111
      src/_health/pages/schedules_edit.tsx
  16. 30 1
      src/_health/pages/schedules_order.tsx
  17. 1 0
      src/app.config.ts
  18. 19 0
      src/app.scss
  19. BIN
      src/assets/_health/setting_album.png
  20. BIN
      src/assets/_health/setting_body.png
  21. BIN
      src/assets/_health/setting_calendar.png
  22. BIN
      src/assets/_health/setting_chart.png
  23. BIN
      src/assets/_health/setting_journal.png
  24. BIN
      src/assets/_health/setting_more.png
  25. BIN
      src/assets/_health/setting_streak.png
  26. 11 0
      src/context/locales/en.js
  27. 46 34
      src/context/locales/zh.js
  28. 27 24
      src/features/health/HeaderCircadian.tsx
  29. 2 10
      src/features/health/MainConsole.tsx
  30. 0 1
      src/features/trackSomething/components/MetricModalOrder.tsx
  31. 3 2
      src/features/trackSomething/components/MoveOrderList.weapp.tsx
  32. 3 2
      src/features/trackTimeDuration/components/Rings.weapp.tsx

+ 3 - 2
src/_health/components/add_label.scss

@@ -39,8 +39,9 @@
     border-radius: 32px;
     padding-left: 30px;
     padding-right: 30px;
-    color: #B2B2B2;
-    background-color: #b2b2b225;
+    font-size: 28px;
+    color: #000;
+    background-color: #fff;
     display: flex;
     align-items: center;
     justify-content: center;

+ 70 - 2
src/_health/components/add_label.tsx

@@ -137,7 +137,7 @@ export default function AddLabel(props: {
         }
     }
 
-    function timeContent() {
+    function timeContent2() {
         return <Card>
             {
                 isEat() ? <View style={{
@@ -182,7 +182,7 @@ export default function AddLabel(props: {
                     <View className="label_bg">
                         {
                             timeLabels.map((item, index) => {
-                                return <View className="label" key={index} onClick={() => setStrTime(item.title)}>{item.title}</View>
+                                return <View className="label" key={index} onClick={() => setStrLabel(item.title)}>{item.title}</View>
                             })
                         }
                     </View>
@@ -199,6 +199,74 @@ export default function AddLabel(props: {
         </Card>
     }
 
+    function timeContent() {
+        return <View>
+            <Card>
+                {
+                    isEat() ? <View style={{
+                        position: 'relative',
+                        display: 'flex', flexDirection: 'row',
+                        height: rpxToPx(128),
+                        alignItems: 'center',
+                        boxSizing: 'border-box',
+                        paddingLeft: rpxToPx(54),
+                        paddingRight: rpxToPx(54),
+                        justifyContent: 'center'
+                    }}>
+                        <Text className="h34" style={{ color: MainColorType.eat }}>{strTime}</Text>
+                    </View> :
+                        <View style={{
+                            position: 'relative',
+                            display: 'flex', flexDirection: 'row',
+                            height: rpxToPx(128),
+                            alignItems: 'center',
+                            boxSizing: 'border-box',
+                            paddingLeft: rpxToPx(54),
+                            paddingRight: rpxToPx(54),
+                            justifyContent: 'space-between'
+                        }}>
+                            <Text className="h34">具体时间</Text>
+                            <Switch
+                                color={props.color ? props.color : getThemeColor(health.mode)}
+                                checked={!isFullday}
+                                onChange={(e) => {
+                                    setIsFullday(!e.detail.value)
+                                }} />
+                        </View>
+                }
+            </Card>
+            <View style={{height:rpxToPx(36)}}/>
+
+            {
+                isFullday ? <View>
+                    <Card>
+                        <Input className="input_lb" placeholder="选择或输入时间标签" value={strLabel} onInput={(e: any) => {
+                            setStrLabel(e.target.value)
+                        }} />
+                    </Card>
+                    <View className="label_bg">
+                        {
+                            timeLabels.map((item, index) => {
+                                return <View className="label" key={index} onClick={() => setStrLabel(item.title)}>{item.title}</View>
+                            })
+                        }
+                    </View>
+                </View> :
+                    <Card>
+                        <View style={{ flexDirection: 'column', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
+                            <NewTimePicker
+                                color={props.color ? props.color : getThemeColor(health.mode)}
+                                onChange={e => {
+                                    console.log(e)
+                                    setStrTime(e)
+                                }} />
+                        </View>
+                    </Card>
+            }
+        </View>
+    }
+
+
     return <NewModal title="标签" dismiss={props.disMiss}
         themeColor={props.color ? props.color : getThemeColor(health.mode)}
         btnTitle={props.justLabel ? '完成' : '下一步'}

+ 102 - 33
src/_health/components/fast_sleep_card.tsx

@@ -114,7 +114,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
 
     function target3BigRing() {
         const { fast, sleep, status } = props.data
-        if (status == 'OG2_NO1') {
+        if (status == 'OG2_NO1'||sleep.status == 'WFS') {
             var time1 = fast.period.end_time
             var time2 = sleep.period.end_time
             var duration = 0
@@ -180,7 +180,18 @@ export default function FastSleepCard(props: { step: number, data: any }) {
 
     function real1BigRing() {
         const { fast, sleep, status } = props.data
+        if (status == 'WFS') {
+            if (fast.target.start_timestamp <= new Date().getTime() && new Date().getTime() < sleep.target.start_timestamp) {
+                return {
+                    color: MainColorType.fast,
+                    startArc: getStartArc(fast.target.start_timestamp),
+                    durationArc: getDurationArc(fast.target.start_timestamp, new Date().getTime())
+                }
+            }
+            return null
+        }
         if (fast.real) {
+
             if (status == 'OG1') {
                 return {
                     color: MainColorType.fast,
@@ -199,6 +210,13 @@ export default function FastSleepCard(props: { step: number, data: any }) {
     function real2BigRing() {
         const { sleep } = props.data
         if (!sleep.real) {
+            if (sleep.target.start_timestamp <= new Date().getTime() && new Date().getTime() < sleep.target.end_timestamp) {
+                return {
+                    color: MainColorType.sleep,
+                    startArc: getStartArc(sleep.target.start_timestamp),
+                    durationArc: getDurationArc(sleep.target.start_timestamp, new Date().getTime())
+                }
+            }
             return null;
         }
         return {
@@ -208,7 +226,18 @@ export default function FastSleepCard(props: { step: number, data: any }) {
         }
     }
     function real3BigRing() {
-        const { fast, sleep } = props.data
+        const { fast, sleep,status } = props.data
+        if (status == 'WFS') {
+            if (sleep.target.end_timestamp <= new Date().getTime() && new Date().getTime() < fast.target.end_timestamp) {
+                return {
+                    color: MainColorType.fast,
+                    startArc: getStartArc(sleep.target.end_timestamp),
+                    durationArc: getDurationArc(sleep.target.end_timestamp, new Date().getTime())
+                }
+            }
+            return null
+        }
+
         if (!sleep.real || !sleep.real.end_timestamp) {
             return null;
         }
@@ -222,6 +251,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
     function currentDot(mode, outRange?: boolean) {
         return {
             color: outRange ? '#B2B2B2' : getThemeColor(mode),
+            fillColor:outRange ?MainColorType.g03:'#ffffff00',
             lineWidth: 4,
             borderColor: '#ffffff',
             offset: 0
@@ -278,7 +308,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
                     targetRing={target0SmallRing()}
                     realRing={real0SmallRing()}
                     canvasId={'circle0_small'}
-                    currentDot={sleep.status=='DONE'?null:currentDot('SLEEP', outRange2)}
+                    currentDot={sleep.status == 'DONE' ? null : currentDot('SLEEP', outRange2)}
                 />
             </View>
         </View>
@@ -299,7 +329,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
             targetRing={target1BigRing()}
             realRing={real1BigRing()}
             canvasId={'circle1_big'}
-            currentDot={status=='OG2'||status=='OG3'?null:currentDot('FAST', outRange)}
+            currentDot={status == 'OG2' || status == 'OG3' ? null : currentDot('FAST', outRange)}
         /></View>
     }
 
@@ -317,7 +347,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
             targetRing={target2BigRing()}
             realRing={real2BigRing()}
             canvasId={'circle2_big'}
-            currentDot={sleep.status=='DONE'?null:currentDot('SLEEP', outRange)}
+            currentDot={sleep.status == 'DONE' ? null : currentDot('SLEEP', outRange)}
 
         /></View>
     }
@@ -337,7 +367,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
             targetRing={target3BigRing()}
             realRing={real3BigRing()}
             canvasId={'circle3_big'}
-            currentDot={currentDot('FAST',outRange)}
+            currentDot={currentDot('FAST', outRange)}
 
         /></View>
     }
@@ -356,18 +386,18 @@ export default function FastSleepCard(props: { step: number, data: any }) {
     }
 
     function statusBar() {
-        var title = ''
+        var title = t('health.overview')
         var hide = false;
         const { status } = props.data
         switch (props.step) {
             case 0:
                 {
-                    if (status == 'WFS') {
-                        title = t('health.ready_for_logging')
-                    }
-                    else {
-                        title = t('health.logging_progress')
-                    }
+                    // if (status == 'WFS') {
+                    //     title = t('health.ready_for_logging')
+                    // }
+                    // else {
+                    //     title = t('health.logging_progress')
+                    // }
 
                     return <View style={{
                         position: 'absolute',
@@ -378,7 +408,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
                         top: rpxToPx(20),
                         opacity: hide ? 0 : 1
                     }}>
-                        <StatusIndicator type={status == 'WFS' ? StatusType.normal : StatusType.ing}
+                        <StatusIndicator type={StatusType.normal}//type={status == 'WFS' ? StatusType.normal : StatusType.ing}
                             color={status == 'OG2_NO1' || status == 'OG2' ? MainColorType.sleep : MainColorType.fast}
                             text={title}
                             fontColor={MainColorType.g01}
@@ -403,12 +433,12 @@ export default function FastSleepCard(props: { step: number, data: any }) {
                     var color: any = MainColorType.fast
                     var img: any = null
                     if (status == 'WFS') {
-                        type = StatusType.img
+                        type = StatusType.normal
                         color = 'transparent'
                         img = <IconCircle width={rpxToPx(26)} color={MainColorType.fast} />
                     }
                     else if (status == 'OG1') {
-                        type = StatusType.ing
+                        type = StatusType.normal
                     }
                     else if (status == 'OG2_NO1') {
                         type = StatusType.img
@@ -459,22 +489,24 @@ export default function FastSleepCard(props: { step: number, data: any }) {
                     var img: any = null
                     var color: any = MainColorType.sleep
                     if (status == 'WFS' || status == 'OG1') {
-                        type = StatusType.img
-                        img = <IconCircle width={rpxToPx(26)} color={MainColorType.sleep} />
-                        color = 'transparent'
+                        type = StatusType.normal
+                        // img = <IconCircle width={rpxToPx(26)} color={MainColorType.sleep} />
+                        // color = 'transparent'
                     }
                     else if (status == 'OG2') {
-                        type = StatusType.ing
+                        type = StatusType.normal
                     }
                     else if (status == 'OG2_NO1') {
-                        type = StatusType.ing
-                        img = <IconMiss width={rpxToPx(26)} color='#fff' />
+                        type = StatusType.normal
+                        // img = <IconMiss width={rpxToPx(26)} color='#fff' />
                     }
                     else {
                         type = StatusType.img
                         img = <IconCheck width={rpxToPx(26)} height={rpxToPx(26)} color='#fff' />
                     }
 
+                    // debugger
+
                     return <View style={{
                         position: 'absolute',
                         display: 'flex',
@@ -502,15 +534,15 @@ export default function FastSleepCard(props: { step: number, data: any }) {
                     var type = StatusType.normal
                     var img: any = null
                     if (status == 'OG3') {
-                        type = StatusType.ing
+                        type = StatusType.normal
                     }
                     else if (status == 'OG2_NO1') {
-                        type = StatusType.img
-                        img = <IconCircle width={rpxToPx(26)} color={MainColorType.fast} />
+                        type = StatusType.normal
+                        // img = <IconCircle width={rpxToPx(26)} color={MainColorType.fast} />
                     }
                     else {
-                        type = StatusType.img
-                        img = <IconCircle width={rpxToPx(26)} color={MainColorType.fast} />
+                        type = StatusType.normal
+                        // img = <IconCircle width={rpxToPx(26)} color={MainColorType.fast} />
                     }
 
                     return <View style={{
@@ -523,7 +555,8 @@ export default function FastSleepCard(props: { step: number, data: any }) {
                         opacity: hide ? 0 : 1
                     }}>
                         <StatusIndicator type={type}
-                            color={status == 'OG3' ? MainColorType.fast : 'transparent'}
+                            // color={status == 'OG3' ? MainColorType.fast : 'transparent'}
+                            color={MainColorType.fast}
                             text={title}
                             fontColor={MainColorType.g01}
                             fontSize={rpxToPx(20)}
@@ -651,32 +684,68 @@ export default function FastSleepCard(props: { step: number, data: any }) {
 
 
     function statusDetail() {
+        const { fast, sleep, status } = props.data
         switch (props.step) {
             case 0:
                 return <View className='right_content'>
                     <View className='h34 ' style={{ lineHeight: rpxToPx(42) + 'px' }}>{t('health.fasting')}</View>
-                    <View className='h36 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{fastTime()}</View>
+                    <View style={{ display: 'flex', flexDirection: 'row' }}>
+                        {
+                            status == 'WFS' ? <View className='h36 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{fastTime()}</View> :
+                                status == 'OG2_NO1' ? <View className='time_count h30 bold' style={{ backgroundColor: MainColorType.error }}>00:00:00</View> :
+                                    <View className='time_count h30 bold' style={{ backgroundColor: MainColorType.fast }}>{fastTime()}</View>
+                        }
+                    </View>
+
+
                     <View style={{ height: rpxToPx(24) }} />
                     <View className='h34 ' style={{ lineHeight: rpxToPx(42) + 'px' }}>{t('health.sleep')}</View>
-                    <View className='h36 bold' style={{ color: MainColorType.sleep, lineHeight: rpxToPx(52) + 'px' }}>{sleepTime()}</View>
+                    <View style={{ display: 'flex', flexDirection: 'row' }}>
+                        {
+                            status == 'WFS' || sleep.status == 'DONE' ? <View className='h36 bold' style={{ color: MainColorType.sleep, lineHeight: rpxToPx(52) + 'px' }}>{sleepTime()}</View> :
+                                sleep.status == 'OG' ? <View className='time_count h30 bold' style={{ backgroundColor: MainColorType.sleep }}>{sleepTime()}</View> :
+                                    <View className='time_count h30 bold' style={{ backgroundColor: MainColorType.g03 }}>00:00:00</View>
+                        }
+                    </View>
+
                 </View>
             case 1:
                 return <View className='right_content'>
                     <View className='h34 ' style={{ lineHeight: rpxToPx(42) + 'px' }}>{t('health.fast_before_bed')}</View>
                     <View style={{ height: rpxToPx(12) }} />
-                    <View className='h36 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{step1()}</View>
+                    <View style={{ display: 'flex', flexDirection: 'row' }}>
+                        {
+                            status == 'OG1' ? <View className='time_count h30 bold' style={{ backgroundColor: MainColorType.fast }}>{step1()}</View> :
+                                status == 'OG2_NO1' ? <View className='time_count h30 bold' style={{ backgroundColor: MainColorType.error }}>00:00:00</View> :
+                                    <View className='h36 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{step1()}</View>
+                        }
+                    </View>
+
                 </View>
             case 2:
                 return <View className='right_content'>
                     <View className='h34 ' style={{ lineHeight: rpxToPx(42) + 'px' }}>{t('health.fast_while_sleep')}</View>
                     <View style={{ height: rpxToPx(12) }} />
-                    <View className='h36 bold' style={{ color: MainColorType.sleep, lineHeight: rpxToPx(52) + 'px' }}>{step2()}</View>
+                    <View style={{ display: 'flex', flexDirection: 'row' }}>
+                        {
+                            status == 'OG2' || status == 'OG2_NO1' ? <View className='time_count h30 bold' style={{ backgroundColor: MainColorType.sleep }}>{step2()}</View> :
+                                status == 'OG3' || status == 'WFS' ? <View className='h36 bold' style={{ color: MainColorType.sleep, lineHeight: rpxToPx(52) + 'px' }}>{step2()}</View> :
+                                    <View className='time_count h30 bold' style={{ backgroundColor: MainColorType.g03 }}>00:00:00</View>
+                        }
+                    </View>
                 </View>
             case 3:
                 return <View className='right_content'>
                     <View className='h34 ' style={{ lineHeight: rpxToPx(42) + 'px' }}>{t('health.fast_after_sleep')}</View>
                     <View style={{ height: rpxToPx(12) }} />
-                    <View className='h36 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{step3()}</View>
+                    <View style={{ display: 'flex', flexDirection: 'row' }}>
+                        {
+                            status == 'WFS' ? <View className='h36 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{step3()}</View> :
+                                status == 'OG3' ? <View className='time_count h30 bold' style={{ backgroundColor: MainColorType.fast }}>{step3()}</View> :
+                                    <View className='time_count h30 bold' style={{ backgroundColor: MainColorType.g03 }}>00:00:00</View>
+                        }
+                    </View>
+
                 </View>
         }
         return <View className='right_content'></View>

+ 6 - 1
src/_health/components/fast_sleep_console.tsx

@@ -16,7 +16,7 @@ import { useTranslation } from "react-i18next";
 import ConsoleCell from "./console_cell";
 import StatusIndicator, { StatusType } from "../base/status_indicator";
 
-export default function FastSleepConsole(props: { step: number, data: any, del: any }) {
+export default function FastSleepConsole(props: { step: number, data: any, del: any,showDetail:any }) {
     const health = useSelector((state: any) => state.health);
     let navigation, showActionSheetWithOptions;
     const { t } = useTranslation()
@@ -436,6 +436,11 @@ export default function FastSleepConsole(props: { step: number, data: any, del:
         }
         {
             <View className="main_console_footer">
+                <NewButton 
+                    type={NewButtonType.link}
+                    title={props.data.status=='WFS'?t('health.three_stages'):t('health.current_progress')}
+                    onClick={props.showDetail}
+                />
                 <NewButton
                     btnStyle={{
                         position: 'absolute',

+ 26 - 74
src/_health/components/fast_sleep_popup.tsx

@@ -36,30 +36,34 @@ export default function FastSleepPopup(props: { close: any, data: any }) {
     }
 
     function step1() {
-        if (health.fast_with_sleep.status == 'OG2_MISALIGNED') {
-            return '-'
-        }
+        
         const { fast, sleep, status } = props.data
+        if (status == 'OG2_NO1') {
+            return <View className="time_count h30 bold" style={{ backgroundColor: MainColorType.error }}>00:00:00</View>
+        }
         if (status == 'WFS') {
-            return ('-')
+            return ('')
         }
         else if (status == 'OG1') {
-            return TimeFormatter.countdown(fast.real.start_timestamp)
+            return <View className="time_count h30 bold" style={{ backgroundColor: MainColorType.fast }}>{TimeFormatter.countdown(fast.real.start_timestamp)}</View>
         }
         else if (status == 'OG2_NO1') {
-            return ('-')
+            return ('')
         }
         return TimeFormatter.calculateTimeDifference(fast.real.start_timestamp, sleep.real.start_timestamp)
     }
 
     function step2() {
         const { fast, sleep, status } = props.data
-        if (status == 'WFS' || status == 'OG1') {
-            return '-'
+        if (status == 'WFS') {
+            return ''
+        }
+        if (status == 'OG1') {
+            return <View className="time_count h30 bold" style={{ backgroundColor: MainColorType.g03 }}>00:00:00</View>
         }
 
         if (status == 'OG2_NO1' || status == 'OG2') {
-            return TimeFormatter.countdown(sleep.real.start_timestamp)
+            return <View className="time_count h30 bold" style={{ backgroundColor: MainColorType.sleep }}>{TimeFormatter.countdown(sleep.real.start_timestamp)}</View>
         }
         else if (status == 'OG3') {
             return TimeFormatter.calculateTimeDifference(sleep.real.start_timestamp, sleep.real.end_timestamp)
@@ -69,11 +73,14 @@ export default function FastSleepPopup(props: { close: any, data: any }) {
 
     function step3() {
         const { fast, sleep, status } = props.data
-        if (status == 'WFS' || status == 'OG1' || status == 'OG2_NO1' || status == 'OG2') {
-            return '-'
+        if (status == 'WFS') {
+            return ''
+        }
+        if (status == 'OG1' || status == 'OG2_NO1' || status == 'OG2'){
+            return <View className="time_count h30 bold" style={{ backgroundColor: MainColorType.g03 }}>00:00:00</View>
         }
         if (status == 'OG3') {
-            return TimeFormatter.countdown(sleep.real.end_timestamp)
+            return <View className="time_count h30 bold" style={{ backgroundColor: MainColorType.fast }}>{TimeFormatter.countdown(sleep.real.end_timestamp)}</View>
         }
         return TimeFormatter.calculateTimeDifference(sleep.target.end_timestamp, fast.target.end_timestamp)
     }
@@ -96,7 +103,7 @@ export default function FastSleepPopup(props: { close: any, data: any }) {
             type = StatusType.normal
         }
         else if (status == 'OG1') {
-            type = StatusType.ing
+            type = StatusType.normal
         }
         else {
             type = StatusType.img
@@ -125,7 +132,7 @@ export default function FastSleepPopup(props: { close: any, data: any }) {
             type = StatusType.normal
         }
         else if (status == 'OG2') {
-            type = StatusType.ing
+            type = StatusType.normal
         }
         else {
             type = StatusType.img
@@ -149,11 +156,11 @@ export default function FastSleepPopup(props: { close: any, data: any }) {
     function afterStatus() {
         const { status } = props.data
         var type = StatusType.normal
-        if (status == 'WFS' || status == 'OG1' || status == 'OG2') {
+        if (status == 'WFS' || status == 'OG1' || status == 'OG2' || status == 'OG2_NO1') {
             type = StatusType.normal
         }
         else if (status == 'OG3') {
-            type = StatusType.ing
+            type = StatusType.normal
         }
         else {
             type = StatusType.img
@@ -176,10 +183,11 @@ export default function FastSleepPopup(props: { close: any, data: any }) {
 
     return <FastSleepPopupContent
         close={props.close}
+        status={props.data.status}
         beforeStatus={beforeStatus()}
         sleepStatus={ingStatus()}
         afterStatus={afterStatus()}
-        showStep={true}
+        showStep={props.data.status == 'WFS' ? false : true}
         total={total()}
         total1={total1()}
         total2={total2()}
@@ -187,62 +195,6 @@ export default function FastSleepPopup(props: { close: any, data: any }) {
         step1={step1()}
         step2={step2()}
         step3={step3()}
+        title={props.data.status == 'WFS' ? t('health.three_stages') : t('health.current_progress')}
     />
-
-    return <View className="popup_container1">
-        <View className="fast_sleep_content">
-            <View className="h34 bold">{t('health.my_fast_journal')}</View>
-            <View className="h24 bold g01" style={{ marginTop: rpxToPx(8) }}>{t('health.my_fast_duration', { time: total() })}</View>
-            <View className="pop_line1" />
-            <View className="pop_steps">
-                {
-                    beforeSleep()
-                }
-                <View style={{ display: 'flex', flexDirection: 'row' }}>
-                    <View style={{
-                        marginLeft: rpxToPx(12.5),
-                        marginRight: rpxToPx(24),
-                        width: 1, height: rpxToPx(103),
-                        backgroundColor: (ingStatus() == StatusType.ing || afterStatus() == StatusType.ing) ? MainColorType.g01 : MainColorType.g03
-                    }} />
-                    <Text className="bold h24"
-                        style={{ marginTop: rpxToPx(12), color: beforeStatus() == StatusType.ing ? MainColorType.fast : '#000' }}><Text className="h34">{step1()}</Text> / {total1()}</Text>
-                </View>
-                {
-                    sleeping()
-                }
-                <View style={{ display: 'flex', flexDirection: 'row' }}>
-                    <View style={{
-                        marginLeft: rpxToPx(12.5),
-                        marginRight: rpxToPx(24),
-                        width: 1, height: rpxToPx(103),
-                        backgroundColor: afterStatus() == StatusType.ing ? MainColorType.g01 : MainColorType.g03
-                    }} />
-                    <Text className="bold h24"
-                        style={{ marginTop: rpxToPx(12), color: ingStatus() == StatusType.ing ? MainColorType.sleep : '#000' }}><Text className="h34">{step2()}</Text> / {total2()}</Text>
-                </View>
-                {
-                    afterSleep()
-                }
-                <View style={{ display: 'flex', flexDirection: 'row' }}>
-                    <View style={{
-                        marginLeft: rpxToPx(12.5),
-                        marginRight: rpxToPx(24.5),
-                        width: 1, height: rpxToPx(103),
-                        backgroundColor: 'transparent'
-                    }} />
-                    <Text className="bold h24"
-                        style={{ marginTop: rpxToPx(12), color: afterStatus() == StatusType.ing ? MainColorType.fast : '#000' }}><Text className="h34">{step3()}</Text> / {total3()}</Text>
-                </View>
-            </View>
-            <NewButton
-                type={NewButtonType.fill}
-                color={MainColorType.fast}
-                width={rpxToPx(440)}
-                height={rpxToPx(96)}
-                title={t('health.ok')}
-                onClick={props.close}
-            />
-        </View>
-    </View>
 }

+ 31 - 16
src/_health/components/fast_sleep_popup_content.tsx

@@ -5,6 +5,7 @@ import NewButton, { NewButtonType } from "../base/new_button";
 import { MainColorType } from "@/context/themes/color";
 import StatusIndicator, { StatusType } from "../base/status_indicator";
 import './fast_sleep_popup.scss'
+import { IconError, IconMiss } from "@/components/basic/Icons";
 
 export default function FastSleepPopupContent(props: {
     close: any,
@@ -16,31 +17,44 @@ export default function FastSleepPopupContent(props: {
     total1: string,
     total2: string,
     total3: string,
-    step1?: string,
-    step2?: string,
-    step3?: string
+    step1?: any,
+    step2?: any,
+    step3?: any,
+    title?: string,
+    status?: any
 }) {
     const { t } = useTranslation()
 
     function beforeSleep() {
         const type = props.beforeStatus
         return <StatusIndicator type={type}
-            color={MainColorType.fast}
-            fontColor={MainColorType.g01}
+            color={props.status && props.status == 'OG2_NO1' ? MainColorType.error : MainColorType.fast}
+            fontColor={MainColorType.black}
+            fontSize={rpxToPx(24)}
             text={t('health.fast_before_bed')}
         >
             {
-                type == StatusType.img && <Image style={{ width: rpxToPx(20), height: rpxToPx(20) }} src={require('@assets/_health/checked.png')} />
+                beforeIcon(type)
             }
         </StatusIndicator>
 
     }
 
+    function beforeIcon(type) {
+        if (type != StatusType.img) return null;
+        if (props.status && props.status == 'OG2_NO1') {
+            return <IconMiss width={rpxToPx(26)} color='#fff' />
+        }
+
+        return <Image style={{ width: rpxToPx(20), height: rpxToPx(20) }} src={require('@assets/_health/checked.png')} />
+    }
+
     function sleeping() {
         const type = props.sleepStatus
         return <StatusIndicator type={type}
             color={MainColorType.sleep}
-            fontColor={MainColorType.g01}
+            fontColor={MainColorType.black}
+            fontSize={rpxToPx(24)}
             text={t('health.fast_while_sleep')}
         >
             {
@@ -53,7 +67,8 @@ export default function FastSleepPopupContent(props: {
         const type = props.afterStatus
         return <StatusIndicator type={type}
             color={MainColorType.fast}
-            fontColor={MainColorType.g01}
+            fontColor={MainColorType.black}
+            fontSize={rpxToPx(24)}
             text={t('health.fast_after_sleep')}
         >
             {
@@ -65,8 +80,8 @@ export default function FastSleepPopupContent(props: {
 
     return <View className="popup_container1">
         <View className="fast_sleep_content">
-            <View className="h34 bold">{t('health.my_fast_journal')}</View>
-            <View className="h24 bold g01" style={{ marginTop: rpxToPx(8) }}>{t('health.my_fast_duration', { time: props.total })}</View>
+            <View className="h34 bold">{props.title ?? t('health.three_stages')}</View>
+            {/* <View className="h24 bold g01" style={{ marginTop: rpxToPx(8) }}>{t('health.my_fast_duration', { time: props.total })}</View> */}
             <View className="pop_line1" />
             <View className="pop_steps">
                 {
@@ -79,8 +94,8 @@ export default function FastSleepPopupContent(props: {
                         width: 1, height: rpxToPx(103),
                         backgroundColor: (props.sleepStatus == StatusType.ing || props.afterStatus == StatusType.ing) ? MainColorType.g01 : MainColorType.g03
                     }} />
-                    <Text className="bold h24"
-                        style={{ marginTop: rpxToPx(12), color: props.beforeStatus == StatusType.ing ? MainColorType.fast : '#000' }}><Text className="h34">{props.step1 ?? ''}</Text>{props.showStep && ' / '}{props.total1}</Text>
+                    <View className="bold h24"
+                        style={{ marginTop: rpxToPx(12), color: props.beforeStatus == StatusType.ing ? MainColorType.fast : '#000', display: 'flex', flexDirection: 'row', alignItems: 'center' }}><View className="h34">{props.step1 ?? ''}</View>{props.showStep && ' / '}{props.total1}</View>
                 </View>
                 {
                     sleeping()
@@ -92,8 +107,8 @@ export default function FastSleepPopupContent(props: {
                         width: 1, height: rpxToPx(103),
                         backgroundColor: props.afterStatus == StatusType.ing ? MainColorType.g01 : MainColorType.g03
                     }} />
-                    <Text className="bold h24"
-                        style={{ marginTop: rpxToPx(12), color: props.sleepStatus == StatusType.ing ? MainColorType.sleep : '#000' }}><Text className="h34">{props.step2 ?? ''}</Text>{props.showStep && ' / '}{props.total2}</Text>
+                    <View className="bold h24"
+                        style={{ marginTop: rpxToPx(12), color: props.sleepStatus == StatusType.ing ? MainColorType.sleep : '#000', display: 'flex', flexDirection: 'row', alignItems: 'center' }}><View className="h34">{props.step2 ?? ''}</View>{props.showStep && ' / '}{props.total2}</View>
                 </View>
                 {
                     afterSleep()
@@ -105,8 +120,8 @@ export default function FastSleepPopupContent(props: {
                         width: 1, height: rpxToPx(103),
                         backgroundColor: 'transparent'
                     }} />
-                    <Text className="bold h24"
-                        style={{ marginTop: rpxToPx(12), color: props.afterStatus == StatusType.ing ? MainColorType.fast : '#000' }}><Text className="h34">{props.step3 ?? ''}</Text>{props.showStep && ' / '}{props.total3}</Text>
+                    <View className="bold h24"
+                        style={{ marginTop: rpxToPx(12), color: props.afterStatus == StatusType.ing ? MainColorType.fast : '#000', display: 'flex', flexDirection: 'row', alignItems: 'center' }}><View className="h34">{props.step3 ?? ''}</View>{props.showStep && ' / '}{props.total3}</View>
                 </View>
             </View>
             <NewButton

+ 4 - 8
src/_health/components/schedule_item.tsx

@@ -32,30 +32,26 @@ export default function ScheduleItem(props: {
     const [time, setTime] = useState(props.obj.time)
 
     function itemStyle(obj) {
-        const borderWidth = 1
         if (obj.is_conflict) {
             return {
                 // backgroundColor: '#FF00001A',
                 // color: '#FF0000'
                 backgroundColor: '#B2B2B21A',
                 color: '#000',
-                borderWidth: borderWidth,
                 borderColor: '#FF0000',
-                borderStyle: 'solid'
             }
         }
         if (props.errors.length > 0) {
             return {
                 backgroundColor: '#B2B2B21A',
-                color: '#000'
+                color: '#000',
+                borderColor:'transparent'
             }
         }
         return {
             backgroundColor: '#B2B2B21A',
             color: '#000',
-            borderWidth: borderWidth,
             borderColor: obj.window == props.selMode ? getThemeColor(props.selMode) : 'transparent',
-            borderStyle: 'solid'
         }
         // return {
         //     backgroundColor: obj.window == props.selMode ? getThemeColor(props.selMode) + '1A' : '#B2B2B21A',
@@ -131,7 +127,7 @@ export default function ScheduleItem(props: {
                         }
                         <View style={{ width: rpxToPx(12) }} />
                         {
-                            !props.disable && props.obj.specific_time && <View className='edit_item_time' onClick={() => {
+                            !props.disable && props.obj.specific_time && <View className='edit_item_time schedule_border' onClick={() => {
                                 // setSelIndex(i)
                                 // setSelItem(obj)
                                 setTime(props.obj.time)
@@ -141,7 +137,7 @@ export default function ScheduleItem(props: {
                             }} style={itemStyle(props.obj)}>{props.obj.time}</View>
                         }
                         {
-                            props.disable && <View style={{borderWidth:1,borderColor:'transparent',borderStyle: 'solid'}}>
+                            props.disable && <View className="schedule_border" style={{borderColor:'transparent'}}>
                                 <View className="edit_item_time" style={{ backgroundColor: 'transparent', color: props.gray ? MainColorType.g02 : '#000' }}>{props.obj.time}</View>
                             </View>
                         }

+ 1 - 4
src/_health/pages/add_moment.scss

@@ -29,6 +29,7 @@
     width: 750px;
     flex-shrink: 0;
     font-size: 36px;
+    position: relative;
 }
 
 .form{
@@ -82,12 +83,8 @@
 
 .tag_list{
     display: flex;
-    position: fixed;
-    left: 0;
-    right: 0;
     background-color: #fff;
     height: 108px;
-    z-index: 100000;
 
 }
 

+ 18 - 15
src/_health/pages/add_moment.tsx

@@ -495,6 +495,24 @@ export default function AddMoment() {
 
             />
 
+            <View style={{position:'relative'}}>
+            <View className="border_footer_line" style={{left:rpxToPx(96)}}/>
+            </View>
+
+            <View className="tag_list">
+                <ScrollView style={{ width: rpxToPx(750), flexDirection: 'row', display: 'flex', height: rpxToPx(108) }} scrollX enableFlex showScrollbar={false}>
+                    <View style={{ width: rpxToPx(96), flexShrink: 0 }} />
+                    {
+                        labels.map((item, index) => {
+                            return <View className="add_page_tag_btn" key={index} onClick={() => {
+                                setTitle(item.title)
+                            }}>{item.title}</View>
+                        })
+                    }
+                    <View style={{ width: rpxToPx(40), flexShrink: 0 }} />
+                </ScrollView>
+            </View>
+
             <Textarea placeholder="简单描述(选填)" className="textarea g01"
                 placeholder-style="color:#B2B2B2"
                 value={desc}
@@ -554,21 +572,6 @@ export default function AddMoment() {
                     setShowTimePicker(false)
                 }} />
         }
-        {
-            <View className="tag_list" style={{ bottom: bottom }}>
-                <ScrollView style={{ width: rpxToPx(750), flexDirection: 'row', display: 'flex', height: rpxToPx(108) }} scrollX enableFlex showScrollbar={false}>
-                    <View style={{ width: rpxToPx(40), flexShrink: 0 }} />
-                    {
-                        labels.map((item, index) => {
-                            return <View className="add_page_tag_btn" key={index} onClick={() => {
-                                setTitle(item.title)
-                            }}>{item.title}</View>
-                        })
-                    }
-                    <View style={{ width: rpxToPx(40), flexShrink: 0 }} />
-                </ScrollView>
-            </View>
-        }
 
     </View>
 }

+ 8 - 6
src/_health/pages/fast_sleep.tsx

@@ -32,7 +32,7 @@ export default function FastSleep() {
     const [showDate, setShowDate] = useState(false)
     const [date, setDate] = useState('')
     const historyRef = useRef()
-    const {t} = useTranslation()
+    const { t } = useTranslation()
 
     useEffect(() => {
 
@@ -78,7 +78,7 @@ export default function FastSleep() {
 
     if (!loaded) return <View />
 
-    return <StickyDateList
+    return <View><StickyDateList
         isPulling={isPulling}
         showDate={showDate}
         date={date}
@@ -140,16 +140,18 @@ export default function FastSleep() {
 
             <FastSleepConsole step={current} data={data} del={() => {
                 getDatas()
-            }} />
+            }} showDetail={()=>setShowPopCard(true)}/>
             <MainHistory type='FAST,SLEEP' ref={historyRef} updateDate={(e) => {
                 setShowDate(e.show)
                 setDate(e.date)
             }} refreshSuccess={() => {
                 setIsPulling(false)
             }} />
-            {
-                showPopCard && <FastSleepPopup close={() => { setShowPopCard(false) }} data={data} />
-            }
+
         </View>
     </StickyDateList>
+        {
+            showPopCard && <FastSleepPopup close={() => { setShowPopCard(false) }} data={data} />
+        }
+    </View>
 }

+ 7 - 5
src/_health/pages/guide_active.tsx

@@ -151,7 +151,7 @@ export default function GuideActive() {
                 items.map((obj, i) => {
                     return <ScheduleItem
                         index={i}
-                        count={items.length}
+                        count={items.length + 1}
                         key={i * 100}
                         obj={obj}
                         highlight={highlight ? obj.window == 'ACTIVE' : false}
@@ -203,8 +203,10 @@ export default function GuideActive() {
             }
             <View className='item_add'
                 onClick={() => add()}>
-                <StatusIndicator type={StatusType.normal} text={t('health.add_active')}
-                    color={MainColorType.active} fontColor={MainColorType.active} fontSize={rpxToPx(34)} />
+                <StatusIndicator type={StatusType.img} text={t('health.add_active')}
+                    color={MainColorType.active} fontColor={MainColorType.active} fontSize={rpxToPx(34)} >
+                    <IconAdd color="#fff" width={rpxToPx(20)} />
+                </StatusIndicator>
                 <View style={{ flex: 1 }} />
             </View>
         </Card>
@@ -217,7 +219,7 @@ export default function GuideActive() {
                 items.map((obj, i) => {
                     return <ScheduleItem
                         index={i}
-                        count={items.length}
+                        count={items.length + 1}
                         key={i * 100}
                         obj={obj}
                         highlight={false}
@@ -268,7 +270,7 @@ export default function GuideActive() {
         </Card>
     }
     return <View style={{ flex: 1, display: 'flex', flexDirection: 'column', height: '100vh' }}>
-        <View style={{ height: navigationBarHeight, backgroundColor: MainColorType.g05,flexShrink:0 }} />
+        <View style={{ height: navigationBarHeight, backgroundColor: MainColorType.g05, flexShrink: 0 }} />
         <View className="navi-bar" style={{ height: navigationBarHeight, zIndex: 1000, backgroundColor: MainColorType.g05 }}>
 
             <View style={{

+ 6 - 4
src/_health/pages/guide_eat.tsx

@@ -142,7 +142,7 @@ export default function GuideEat() {
                 items.map((obj, i) => {
                     return <ScheduleItem
                         index={i}
-                        count={items.length}
+                        count={items.length+1}
                         key={i * 100}
                         obj={obj}
                         highlight={highlight ? obj.window == 'EAT' : false}
@@ -194,8 +194,10 @@ export default function GuideEat() {
             }
             <View className='item_add'
                 onClick={() => add()}>
-                <StatusIndicator type={StatusType.normal} text={t('health.add_meal')}
-                    color={MainColorType.eat} fontColor={MainColorType.eat} fontSize={rpxToPx(34)} />
+                <StatusIndicator type={StatusType.img} text={t('health.add_meal')}
+                    color={MainColorType.eat} fontColor={MainColorType.eat} fontSize={rpxToPx(34)} >
+                        <IconAdd color="#fff" width={rpxToPx(20)} />
+                    </StatusIndicator>
                 <View style={{ flex: 1 }} />
             </View>
         </Card>
@@ -208,7 +210,7 @@ export default function GuideEat() {
                 items.map((obj, i) => {
                     return <ScheduleItem
                         index={i}
-                        count={items.length}
+                        count={items.length+1}
                         key={i * 100}
                         obj={obj}
                         highlight={false}

+ 21 - 6
src/_health/pages/schedules.tsx

@@ -338,12 +338,20 @@ export default function Schedules() {
 
     function more() {
         var items: any = ['设置提醒', '个性化名称'];
+        var temps = list.filter(item => {
+            return !item.specific_time
+        })
+        var needOrder =false
+        if (temps.length > 1) {
+            needOrder = true
+            items.push('排序')
+        }
         if (errors.length == 0) {
             items.push(t('health.reset_schedule'))
         }
         showActionSheet({
             showActionSheetWithOptions: showActionSheetWithOptions,
-            title: 'Oprate Title',
+            title: 'Operate Title',
             itemList: items,
             success: (res) => {
                 if (res == 0 || res == 1) {
@@ -352,6 +360,13 @@ export default function Schedules() {
                     jumpPage(url)
                 }
                 else if (res == 2) {
+                    if (needOrder){
+                        jumpPage('./schedules_order?list='+JSON.stringify(temps))
+                        return
+                    }
+                    jumpPage('/_health/pages/guide_begin')
+                }
+                else if (res == 3) {
                     jumpPage('/_health/pages/guide_begin')
                 }
 
@@ -417,7 +432,7 @@ export default function Schedules() {
                                     count={list.length}
                                     key={i * 100}
                                     obj={obj}
-                                    highlight={false}
+                                    highlight={highlight && selMode == obj.window}
                                     showLine={i < list.length - 1}
                                     errors={errors}
                                     selMode={selMode}
@@ -574,10 +589,10 @@ export default function Schedules() {
         <Layout title={getTitle()}
             titleShowStyle={NaviBarTitleShowType.scrollToShow}
             type={TemplateType.customHeader}
-            // header={headerView()}
-            // triggered={triggered}
-            // refresh={refresh}
-            // showPullToRefresh={true}
+        // header={headerView()}
+        // triggered={triggered}
+        // refresh={refresh}
+        // showPullToRefresh={true}
         >
             {
                 detail()

+ 1 - 1
src/_health/pages/schedules_edit.config.ts

@@ -3,6 +3,6 @@ export default definePageConfig({
       // 'ec-canvas': '../../lib/ec-canvas/ec-canvas',
       // 'demo':'../../components/demo'
     },
-    "navigationBarTitleText":"批量编辑",
+    "navigationBarTitleText":"",
     "navigationBarBackgroundColor":"#f5f5f5"
   })

+ 138 - 111
src/_health/pages/schedules_edit.tsx

@@ -16,6 +16,9 @@ import NewButton, { NewButtonType } from "../base/new_button";
 import { MainColorType } from "@/context/themes/color";
 import { IconNotification, IconNotificationOff } from "@/components/basic/Icons";
 import NewHeader, { NewHeaderType } from "../components/new_header";
+import Card from "../components/card";
+import Layout from "@/components/layout/layout";
+import { NaviBarTitleShowType, TemplateType } from "@/utils/types";
 
 let useRoute;
 let useNavigation;
@@ -251,77 +254,81 @@ export default function SchedulesEdit() {
         }
         return <View />
     }
-    return <View className='schedule_list_bg'>
-        <ScrollView enableFlex style={{ height: Taro.getWindowInfo().screenHeight - 220 }} scrollY>
-            <NewHeader title="日程设置" type={NewHeaderType.left} />
-            <View style={{ display: 'flex', flexDirection: 'column' }}>
-                {
-                    list.map((item, index) => {
-                        return <View key={index} style={{ display: 'flex', flexDirection: 'column', marginBottom: rpxToPx(36) }}>
-                            {
-                                item.list.map((obj, i) => {
-                                    return <AtSwipeAction key={i * 100}
-                                        isOpened={false}
-                                        autoClose
-                                        disabled={item.window != 'EAT' && item.window != 'ACTIVE'}
-                                        options={[
-                                            {
-                                                text: '删除',
-                                                style: {
-                                                    backgroundColor: '#FF4949'
-                                                }
-                                            }
-                                        ]}
-                                        onClick={() => {
-                                            if (item.window == 'ACTIVE' || item.window == 'EAT') {
-                                                if (item.list.length == 1) {
-                                                    Taro.showToast({
-                                                        title: '至少保留一项',
-                                                        icon: 'none'
-                                                    })
-                                                    return;
-                                                }
-                                            }
-                                            showAlert({
-                                                title: '删除',
-                                                content: '确认删除此计划',
-                                                showCancel: true,
-                                                cancel: () => {
-                                                    console.log('cancel')
-                                                },
-                                                confirm: () => {
-                                                    delItem(index, i)
-                                                }
-                                            })
-                                        }}
-                                    >
-
-                                        <View className='schedule_item' style={{ width: rpxToPx(750), boxSizing: 'border-box' }}>
-                                            <View style={{ display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', flex: 1 }}>
-                                                <View className='item_left2'>
-                                                    <StatusIndicator type={StatusType.normal} color={getThemeColor(obj.window)} />
 
+    function detail() {
+        return <View className='schedule_list_bg'>
+            <ScrollView enableFlex style={{ height: Taro.getWindowInfo().screenHeight - 220 }} scrollY>
+                <NewHeader title="日程设置" type={NewHeaderType.left} />
+                <Card>
+                    <View style={{ display: 'flex', flexDirection: 'column' }}>
+                        {
+                            list.map((item, index) => {
+                                return <View key={index} style={{ display: 'flex', flexDirection: 'column' }}>
+                                    {
+                                        item.list.map((obj, i) => {
+                                            if (!obj.specific_time && router.params.type == 'reminder') return <View key={i * 100} />
+                                            return <AtSwipeAction key={i * 100}
+                                                isOpened={false}
+                                                autoClose
+                                                disabled={true}
+                                                options={[
                                                     {
-                                                        editIndex.row == index && editIndex.index == i ?
-                                                            <Input className='item_name' style={{ flex: 1 }}
-                                                                value={selItem.title}
-                                                                autoFocus={true}
-                                                                focus={true}
-                                                                onBlur={() => {
-                                                                    setEditIndex({
-                                                                        row: -1,
-                                                                        index: -1
-                                                                    })
-                                                                }}
-                                                                onInput={(e) => {
-                                                                    var temp = JSON.parse(JSON.stringify(selItem))
-                                                                    temp.title = e.detail.value
-                                                                    obj.title = e.detail.value
-                                                                    setSelItem(temp)
-                                                                }} /> : <Text className='item_name'>{obj.title}</Text>
+                                                        text: '删除',
+                                                        style: {
+                                                            backgroundColor: '#FF4949'
+                                                        }
                                                     }
-
-                                                    {/* {
+                                                ]}
+                                                onClick={() => {
+                                                    if (item.window == 'ACTIVE' || item.window == 'EAT') {
+                                                        if (item.list.length == 1) {
+                                                            Taro.showToast({
+                                                                title: '至少保留一项',
+                                                                icon: 'none'
+                                                            })
+                                                            return;
+                                                        }
+                                                    }
+                                                    showAlert({
+                                                        title: '删除',
+                                                        content: '确认删除此计划',
+                                                        showCancel: true,
+                                                        cancel: () => {
+                                                            console.log('cancel')
+                                                        },
+                                                        confirm: () => {
+                                                            delItem(index, i)
+                                                        }
+                                                    })
+                                                }}
+                                            >
+
+                                                <View className='schedule_item' style={{ width: rpxToPx(700), boxSizing: 'border-box' }}>
+                                                    <View style={{ display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', flex: 1 }}>
+                                                        <View className='item_left2'>
+                                                            <StatusIndicator type={StatusType.normal} color={getThemeColor(obj.window)} />
+
+                                                            {
+                                                                editIndex.row == index && editIndex.index == i ?
+                                                                    <Input className='item_name' style={{ flex: 1 }}
+                                                                        value={selItem.title}
+                                                                        autoFocus={true}
+                                                                        focus={true}
+                                                                        onBlur={() => {
+                                                                            setEditIndex({
+                                                                                row: -1,
+                                                                                index: -1
+                                                                            })
+                                                                        }}
+                                                                        onInput={(e) => {
+                                                                            var temp = JSON.parse(JSON.stringify(selItem))
+                                                                            temp.title = e.detail.value
+                                                                            obj.title = e.detail.value
+                                                                            setSelItem(temp)
+                                                                        }} /> : <Text className='item_name'>{obj.title}</Text>
+                                                            }
+
+                                                            {/* {
                                                         (item.window == 'EAT' || item.window == 'ACTIVE') &&
                                                         !(editIndex.row == index && editIndex.index == i) &&
                                                         <Image src={require('@assets/_health/edit.png')}
@@ -338,16 +345,19 @@ export default function SchedulesEdit() {
                                                             }}
                                                         />
                                                     } */}
-                                                </View>
-                                                {
-                                                    obj.specific_time && <View className="h22" style={{ color: MainColorType.g02 }}>{obj.time}</View>
-                                                }
-                                            </View>
-                                            {
-                                                router.params.type == 'reminder' ? reminder(obj) : editName(item, obj, index, i)
-                                            }
-
-                                            {/* {router.params.type == 'reminder' && (obj.specific_time || health.mode == 'DAY' || health.mode == 'NIGHT') && <Switch checked={obj.reminder}
+                                                        </View>
+                                                        {
+                                                            obj.specific_time && <View className="h22" style={{ color: MainColorType.g02, marginLeft: rpxToPx(26) }}>{obj.time}</View>
+                                                        }
+                                                        {
+                                                            !obj.specific_time && <View className="h22" style={{ color: MainColorType.g02, marginLeft: rpxToPx(26) }}>{obj.time_label}</View>
+                                                        }
+                                                    </View>
+                                                    {
+                                                        router.params.type == 'reminder' ? reminder(obj) : editName(item, obj, index, i)
+                                                    }
+
+                                                    {/* {router.params.type == 'reminder' && (obj.specific_time || health.mode == 'DAY' || health.mode == 'NIGHT') && <Switch checked={obj.reminder}
                                                 color={getThemeColor(obj.window)}
                                                 onChange={e => {
                                                     if (process.env.TARO_ENV == 'weapp') {
@@ -357,43 +367,60 @@ export default function SchedulesEdit() {
                                                     obj.reminder = e.detail.value;
                                                     setList([...list])
                                                 }} />} */}
-                                            {
-                                                i < item.list.length - 1 && <View className='border_footer_line' />
-                                            }
+                                                    {
+                                                        (index < list.length - 1 || i < item.list.length - 1) && <View className='border_footer_line' style={{ left: rpxToPx(66), flexShrink: 0 }} />
+                                                    }
 
-                                        </View>
-                                    </AtSwipeAction>
-                                })
-                            }
-                        </View>
+                                                </View>
+                                            </AtSwipeAction>
+                                        })
+                                    }
+                                </View>
 
-                    })
-                }
+                            })
+                        }
+                    </View>
+                </Card>
+            </ScrollView>
+            <View className="main_footer">
+                <NewButton
+                    type={NewButtonType.fill}
+                    title="完成"
+                    color={getThemeColor(health.mode)}
+                    width={rpxToPx(670)}
+                    height={rpxToPx(96)}
+                    onClick={tapDone}
+                />
             </View>
-        </ScrollView>
-        <View className="main_footer">
-            <NewButton
-                type={NewButtonType.fill}
-                title="完成"
-                color={getThemeColor(health.mode)}
-                width={rpxToPx(670)}
-                height={rpxToPx(96)}
-                onClick={tapDone}
-            />
+
+            {/* <View className="edit_footer_btn" style={{ color: getThemeColor(health.mode), backgroundColor: getThemeColor(health.mode) + '33' }} onClick={tapDone}>完成</View> */}
+            {
+                showTimePicker && <Modal
+                    testInfo={null}
+                    dismiss={() => {
+                        setShowTimePicker(false)
+                    }}
+                    confirm={() => { }}>
+                    {
+                        modalContent()
+                    }
+                </Modal>
+            }
         </View>
+    }
 
-        {/* <View className="edit_footer_btn" style={{ color: getThemeColor(health.mode), backgroundColor: getThemeColor(health.mode) + '33' }} onClick={tapDone}>完成</View> */}
-        {
-            showTimePicker && <Modal
-                testInfo={null}
-                dismiss={() => {
-                    setShowTimePicker(false)
-                }}
-                confirm={() => { }}>
-                {
-                    modalContent()
-                }
-            </Modal>
-        }
+    return <View>
+        <Layout title='批量编辑'
+            titleShowStyle={NaviBarTitleShowType.scrollToShow}
+            type={TemplateType.customHeader}
+        // header={headerView()}
+        // triggered={triggered}
+        // refresh={refresh}
+        // showPullToRefresh={true}
+        >
+            {
+                detail()
+            }
+        </Layout>
     </View>
 }

+ 30 - 1
src/_health/pages/schedules_order.tsx

@@ -1,8 +1,37 @@
 import { View } from "@tarojs/components";
 import { useSelector } from "react-redux";
 import './edit.scss'
+import { useState } from "react";
+import { useRouter } from "@tarojs/taro";
+import MoveOrderList from '@/features/trackSomething/components/MoveOrderList'
+import { MainColorType } from "@/context/themes/color";
 
+let useRoute;
+let useNavigation;
+let scenario = '';
+if (process.env.TARO_ENV == 'rn') {
+    useRoute = require("@react-navigation/native").useRoute
+    useNavigation = require("@react-navigation/native").useNavigation
+}
 export default function SchedulesOrder() {
+    let navigation, showActionSheetWithOptions;
+
+    let router
+    if (useNavigation) {
+        navigation = useNavigation()
+    }
+
+    if (process.env.TARO_ENV == 'rn') {
+        router = useRoute()
+    }
+    else {
+        router = useRouter()
+    }
+    
     const health = useSelector((state: any) => state.health);
-    return <View className="edit_footer_btn"></View>
+    const [list, setList] = useState(JSON.parse(router.params.list))
+    return <View >
+        {/* <View>hell owl</View> */}
+        <MoveOrderList itemHeight={40} array={list} color={MainColorType.active} update={(temps: any)=>{setList(temps)}}/>
+    </View>
 }

+ 1 - 0
src/app.config.ts

@@ -52,6 +52,7 @@ const appConfig = defineAppConfig({
         'pages/schedules',
         'pages/add_moment',
         'pages/schedules_edit',
+        'pages/schedules_order',
         'pages/moment_detail',
         'pages/timeline_detail',
         'pages/archive',

+ 19 - 0
src/app.scss

@@ -643,4 +643,23 @@ page {
     flex-direction: row;
     align-items: flex-end;
     background-color: #fff;
+}
+
+.schedule_border{
+    border-width: 3px;
+    border-style: solid;
+}
+
+.time_count{
+    display: flex;
+    color: #fff;
+    border-radius: 10px;
+    min-width: 137px;
+    padding-left: 9px;
+    padding-right: 9px;
+    box-sizing: border-box;
+    height: 48px;
+    flex-direction: row;
+    align-items: center;
+    justify-content: center;
 }

BIN
src/assets/_health/setting_album.png


BIN
src/assets/_health/setting_body.png


BIN
src/assets/_health/setting_calendar.png


BIN
src/assets/_health/setting_chart.png


BIN
src/assets/_health/setting_journal.png


BIN
src/assets/_health/setting_more.png


BIN
src/assets/_health/setting_streak.png


+ 11 - 0
src/context/locales/en.js

@@ -879,14 +879,21 @@ export default {
         i_know: 'Got it',
 
         fasting:'Fasting',
+        eating:'Eating',
         fast: 'Fast',
         eat: 'Eat',
         sleep: 'Sleep',
         active: 'Active',
         window_day: 'Day',
         night: 'Night',
+        daytime:'Daytime',
+        nighttime:'Nighttime',
         switch_to:'Switch to {{scenario}}',
 
+        live_now:'LIVE NOW',
+        next_up:'NEXT UP',
+        in_progress:'IN PROGRESS',
+
         faststreak: 'Faststreak',
         eatstreak: 'Eatstreak',
         sleepstreak: 'Sleepstreak',
@@ -939,9 +946,13 @@ export default {
         fast_after_sleep:'Fasting after Waking Up',
         my_fast_journal:'My Fasting Journey',
         my_fast_duration:'Total {{time}}',
+        three_stages:'The Three Stages of Fasting',
+        current_progress:'Current Progress',
+        stage_detail:'Stage Details',
 
         ready_for_logging:'Ready for Logging',
         logging_progress:'Logging in Progress',
+        overview:'Overview',
         stage1:'Stage 1',
         stage2:'Stage 2',
         stage3:'Stage 3',

+ 46 - 34
src/context/locales/zh.js

@@ -869,23 +869,30 @@ export default {
         guide_done_desc: '你的日程已启动',
         guide_current_scenario: '当前正处于{{scenario}}日程内',
 
-        console_guide_tip:'完成我的日程设置,开启规律的健康生活 👆',
-        add_mini_guide_tip:'添加到我的小程序,下次使用更方便 👆',
+        console_guide_tip: '完成我的日程设置,开启规律的健康生活 👆',
+        add_mini_guide_tip: '添加到我的小程序,下次使用更方便 👆',
 
         add_meal: '添加餐次',
         add_active: '添加活动',
         mark_done: '标记完成',
         i_know: '我知道了',
 
-        fasting:'断食',
+        fasting: '断食',
         fast: '断食',
         eat: '进食',
+        eating:'进食',
         sleep: '睡眠',
         active: '活跃',
         window_day: '白天',
         night: '夜晚',
+        daytime:'白天',
+        nighttime:'夜晚',
         switch_to: '切换到{{scenario}}',
 
+        live_now:'当前',
+        next_up:'接下来',
+        in_progress:'计时中',
+
         faststreak: '连续断食记录',
         eatstreak: '连续进食记录',
         sleepstreak: '连续睡眠记录',
@@ -899,7 +906,7 @@ export default {
         since_date: '{{date}}起生效',
         until_date_time: '明天 {{date}} {{time}} 失效',
         expire_date_time: '今天 {{date}} {{time}} 失效',
-        last_expire_date_time:'上次连续记录 {{date}} {{time}} 失效',
+        last_expire_date_time: '上次连续记录 {{date}} {{time}} 失效',
 
 
         day: '天',
@@ -919,8 +926,8 @@ export default {
         change_location: '更改位置',
         clear_location: '清除位置',
         delete_current_record: '删除当前记录',
-        edit_fast_goal:'编辑断食目标',
-        change_step_goal:'更改步数目标',
+        edit_fast_goal: '编辑断食目标',
+        change_step_goal: '更改步数目标',
 
         create_my_active: '创建我的活动',
 
@@ -932,33 +939,38 @@ export default {
 
         more_actions: '更多操作',
 
-        misaligned:'错位',
-        fast_missing:'断食待补记',
-        fast_before_bed:'睡前断食',
-        fast_while_sleep:'睡眠期间断食',
-        fast_after_sleep:'起床后断食',
-        my_fast_journal:'我的断食旅程',
-        my_fast_duration:'全长 {{time}}',
-
-        ready_for_logging:'待记录',
-        logging_progress:'记录中',
-        stage1:'阶段一',
-        stage2:'阶段二',
-        stage3:'阶段三',
-
-        ok:'我知道了',
-
-        logging:'记录中',
-        log:'记录',
-        recents:'最近记录',
-        language:'语言',
-
-        fast_with_sleep:'断食与睡眠',
-        long_fast:'长断食',
-        move_more:'走一走',
-        move_every_hour:'每小时走一走',
-
-        log_extra_meal:'记录额外一餐',
-        log_extra_activity:'记录额外活动',
+        misaligned: '错位',
+        fast_missing: '断食待补记',
+        fast_before_bed: '睡前断食',
+        fast_while_sleep: '睡眠期间断食',
+        fast_after_sleep: '起床后断食',
+        my_fast_journal: '我的断食旅程',
+        my_fast_duration: '全长 {{time}}',
+        three_stages: '断食三阶段',
+        current_progress: '当前进度',
+        stage_detail: '阶段详情',
+
+
+        ready_for_logging: '待记录',
+        logging_progress: '记录中',
+        overview: '总览',
+        stage1: '阶段一',
+        stage2: '阶段二',
+        stage3: '阶段三',
+
+        ok: '我知道了',
+
+        logging: '记录中',
+        log: '记录',
+        recents: '最近记录',
+        language: '语言',
+
+        fast_with_sleep: '断食与睡眠',
+        long_fast: '长断食',
+        move_more: '走一走',
+        move_every_hour: '每小时走一走',
+
+        log_extra_meal: '记录额外一餐',
+        log_extra_activity: '记录额外活动',
     }
 }

+ 27 - 24
src/features/health/HeaderCircadian.tsx

@@ -5,6 +5,7 @@ import { useEffect, useState } from 'react';
 import { setShowActionTip } from '@/store/health';
 import { getScenario } from './hooks/health_hooks';
 import dayjs from 'dayjs';
+import { useTranslation } from 'react-i18next';
 
 let lauchShow = false
 let timer;
@@ -17,6 +18,7 @@ export default function HeaderCircadian() {
     const [title, setTitle] = useState('')
     const [desc, setDesc] = useState('')
     const [lowLight, setLowLight] = useState(false)
+    const {t} = useTranslation()
 
     useEffect(() => {
         if (health && health.windows && !lauchShow) {
@@ -65,12 +67,14 @@ export default function HeaderCircadian() {
                 return
             }
             else {
+
                 if (new Date().getTime() >= scenario.target.start_timestamp && new Date().getTime() < scenario.target.end_timestamp) {
-                    setDesc('ON')
+                    const scenario = getScenario(health.windows, health.mode)
+                    setDesc(scenario.status=='OG'?t('health.in_progress'):t('health.live_now'))
                     setLowLight(false)
                 }
                 else {
-                    setDesc('UPCOMING')
+                    setDesc(t('health.next_up'))
                     setLowLight(true)
                 }
             }
@@ -78,42 +82,42 @@ export default function HeaderCircadian() {
                 case 'FAST':
                     {
                         setIcon(require('@assets/_health/fast.png'))
-                        setTitle('Fast time')
+                        setTitle(t('health.fasting'))
                         // setDesc(health.isCompleted ? 'COMPLETED' : 'IN PROGRESS')
                     }
                     break;
                 case 'EAT':
                     {
                         setIcon(require('@assets/_health/eat.png'))
-                        setTitle('Eat time')
+                        setTitle(t('health.eating'))
                         // setDesc(health.isCompleted ? 'COMPLETED' : 'IN PROGRESS')
                     }
                     break;
                 case 'SLEEP':
                     {
                         setIcon(require('@assets/_health/sleep.png'))
-                        setTitle('Sleep time')
+                        setTitle(t('health.sleep'))
                         // setDesc(health.isCompleted ? 'COMPLETED' : 'IN PROGRESS')
                     }
                     break;
                 case 'ACTIVE':
                     {
                         setIcon(require('@assets/_health/active.png'))
-                        setTitle('Active time')
+                        setTitle(t('health.active'))
                         // setDesc(health.isCompleted ? 'COMPLETED' : 'IN PROGRESS')
                     }
                     break;
                 case 'DAY':
                     {
                         setIcon(require('@assets/_health/sun.png'))
-                        setTitle('Daytime')
+                        setTitle(t('health.daytime'))
                         // setDesc(health.isCompleted ? 'COMPLETED' : 'IN PROGRESS')
                     }
                     break;
                 case 'NIGHT':
                     {
                         setIcon(require('@assets/_health/moon.png'))
-                        setTitle('Nighttime')
+                        setTitle(t('health.nighttime'))
                         // setDesc(health.isCompleted ? 'COMPLETED' : 'IN PROGRESS')
                     }
                     break;
@@ -137,29 +141,29 @@ export default function HeaderCircadian() {
                 case 'FAST':
                     {
                         setIcon(require('@assets/_health/fast.png'))
-                        setTitle('Fast logging')
-                        setDesc(health.isCompleted ? 'COMPLETED' : 'IN PROGRESS')
+                        setTitle(t('health.fasting'))
+                        setDesc(health.isCompleted ? 'COMPLETED' : t('health.in_progress'))
                     }
                     break;
                 case 'EAT':
                     {
                         setIcon(require('@assets/_health/eat.png'))
-                        setTitle('Meal logging')
-                        setDesc(health.isCompleted ? 'COMPLETED' : 'IN PROGRESS')
+                        setTitle(t('health.eating'))
+                        setDesc(health.isCompleted ? 'COMPLETED' : t('health.in_progress'))
                     }
                     break;
                 case 'SLEEP':
                     {
                         setIcon(require('@assets/_health/sleep.png'))
-                        setTitle('Sleep logging')
-                        setDesc(health.isCompleted ? 'COMPLETED' : 'IN PROGRESS')
+                        setTitle(t('health.sleep'))
+                        setDesc(health.isCompleted ? 'COMPLETED' : t('health.in_progress'))
                     }
                     break;
                 case 'ACTIVE':
                     {
                         setIcon(require('@assets/_health/active.png'))
-                        setTitle('Activity logging')
-                        setDesc(health.isCompleted ? 'COMPLETED' : 'IN PROGRESS')
+                        setTitle(t('health.active'))
+                        setDesc(health.isCompleted ? 'COMPLETED' : t('health.in_progress'))
                     }
                     break;
             }
@@ -177,7 +181,6 @@ export default function HeaderCircadian() {
                 }))
             }, 3000)
         }
-
     }, [health.showActionCircadian])
 
     useEffect(() => {
@@ -194,35 +197,35 @@ export default function HeaderCircadian() {
                 if (dayjs(day.target.start_timestamp).format('YYYY-MM-DD HH:mm:ss') == now) {
                     isShow = true;
                     setIcon(require('@assets/_health/sun.png'))
-                    setTitle('Daytime')
+                    setTitle(t('health.daytime'))
                 }
                 else if (dayjs(night.target.start_timestamp).format('YYYY-MM-DD HH:mm:ss') == now) {
                     isShow = true;
                     setIcon(require('@assets/_health/moon.png'))
-                    setTitle('Nighttime')
+                    setTitle(t('health.nighttime'))
                 }
                 else if (dayjs(fast.target.start_timestamp).format('YYYY-MM-DD HH:mm:ss') == now) {
                     isShow = true;
                     setIcon(require('@assets/_health/fast.png'))
-                    setTitle('Fast time')
+                    setTitle(t('health.fasting'))
                 }
                 else if (dayjs(eat.target.start_timestamp).format('YYYY-MM-DD HH:mm:ss') == now) {
                     isShow = true;
                     setIcon(require('@assets/_health/eat.png'))
-                    setTitle('Eat time')
+                    setTitle(t('health.eating'))
                 }
                 else if (dayjs(sleep.target.start_timestamp).format('YYYY-MM-DD HH:mm:ss') == now) {
                     isShow = true;
                     setIcon(require('@assets/_health/sleep.png'))
-                    setTitle('Sleep time')
+                    setTitle(t('health.sleep'))
                 }
                 else if (dayjs(active.target.start_timestamp).format('YYYY-MM-DD HH:mm:ss') == now) {
                     isShow = true;
                     setIcon(require('@assets/_health/active.png'))
-                    setTitle('Active time')
+                    setTitle(t('health.active'))
                 }
                 if (isShow) {
-                    setDesc('ON')
+                    setDesc(t('health.live_now'))
                     setLowLight(false)
                     setShowTip(true)
                     if (timer) {

+ 2 - 10
src/features/health/MainConsole.tsx

@@ -794,16 +794,8 @@ export default function MainConsole(props: { type: WindowType }) {
     }
 
     function ogTime() {
-        return <View className="h30 bold" style={{
-            display: 'flex',
-            color: '#fff',
-            borderRadius:rpxToPx(10),
-            minWidth:rpxToPx(137),
-            paddingLeft:rpxToPx(9),
-            paddingRight:rpxToPx(9),
-            boxSizing:'border-box',
-            height:rpxToPx(48),
-            flexDirection: 'row', alignItems: 'center', justifyContent: 'center', backgroundColor: getThemeColor(health.mode)
+        return <View className="time_count h30 bold" style={{
+            backgroundColor: getThemeColor(health.mode)
         }}>
             {/* <View className="console_tag_bg" style={{backgroundColor:getThemeColor(health.mode)}}>
                 <Image src={global.language=='en'?require('@assets/_health/tag_log.png'):require('@assets/_health/tag_record.png')} className="console_tag_img"/>

+ 0 - 1
src/features/trackSomething/components/MetricModalOrder.tsx

@@ -23,7 +23,6 @@ export default function Component(props: { themeColor: string, cancel: Function,
     function confirm() {
         props.confirm(list)
     }
-
     // function items() {
     //     var array:any = []
     //     for (var i = 0; i < list.length; i++) {

+ 3 - 2
src/features/trackSomething/components/MoveOrderList.weapp.tsx

@@ -186,6 +186,7 @@ export default function Component(props: { array: any, itemHeight: number, color
             <View>
                 {
                     list.map((item, index) => {
+                        debugger
                         return <View key={index} style={{ opacity: changedIndex == index && hiddenContent ? 0 : 1, height: props.itemHeight, width: rpxToPx(750) }}
                             onLongPress={(e) => longPress(e, index)}
                             onTouchMove={(e) => touchMove(e)}
@@ -198,7 +199,7 @@ export default function Component(props: { array: any, itemHeight: number, color
                                     width: '100%',
                                     alignItems: 'center', justifyContent: 'space-between'
                                 }}>
-                                    <Text style={{ color: props.color,fontSize:rpxToPx(32) }}>{item.name}</Text>
+                                    <Text style={{ color: props.color,fontSize:rpxToPx(32) }}>{item.name??item.title}</Text>
                                     <IconDrag width={17} height={12} />
 
                                 </View>
@@ -217,7 +218,7 @@ export default function Component(props: { array: any, itemHeight: number, color
                     <View className='drag_item' style={{ backgroundColor: props.color }}>
                         {
                             dragIndex >= 0 && <View className='modal_sel_item' style={{ height: 40, border: 'none' }}>
-                                <Text style={{ color: 'black', fontWeight: 'bold' }}>{list[changedIndex].name}</Text>
+                                <Text style={{ color: 'black', fontWeight: 'bold' }}>{list[changedIndex].name??list[changedIndex].title}</Text>
                                 <IconDrag width={17} height={12} />
                             </View>
                         }

+ 3 - 2
src/features/trackTimeDuration/components/Rings.weapp.tsx

@@ -21,6 +21,7 @@ export type CurrentDot = {
     timestamp?: number;
     offset?: number;
     whiteIcon?: boolean;
+    fillColor?:string;
 }
 
 export type RealRing = {
@@ -323,8 +324,8 @@ export default function Rings(props: {
             // }
             ctx.arc(xPrime, yPrime, lineWidth / 2.0 + dotLineWidth / 2-0.75, 0, 2 * Math.PI);
             ctx.lineWidth = dotLineWidth;
-            // ctx.fillStyle = props.currentDot.borderColor
-            // ctx.fill()
+            ctx.fillStyle = props.currentDot.fillColor?props.currentDot.fillColor:'transparent'
+            ctx.fill()
             ctx.strokeStyle = props.currentDot.borderColor//'#1C1C1C';
             ctx.lineCap = 'round'; // 设置为圆角
             ctx.stroke();