leon 1 year ago
parent
commit
d495b27e34
40 changed files with 562 additions and 300 deletions
  1. 34 3
      src/_health/base/new_button.tsx
  2. 1 1
      src/_health/base/new_modal.scss
  3. 1 1
      src/_health/base/new_timepicker.tsx
  4. 3 2
      src/_health/components/card.scss
  5. 0 2
      src/_health/components/fast_sleep_card.scss
  6. 59 36
      src/_health/components/fast_sleep_card.tsx
  7. 10 0
      src/_health/components/fast_sleep_console.scss
  8. 15 3
      src/_health/components/fast_sleep_console.tsx
  9. 5 4
      src/_health/pages/add_moment.tsx
  10. 1 1
      src/_health/pages/fast_sleep.scss
  11. 1 1
      src/_health/pages/fast_sleep.tsx
  12. 37 15
      src/_health/pages/log_time.tsx
  13. 2 3
      src/_health/pages/long_fast.scss
  14. 44 14
      src/_health/pages/long_fast.tsx
  15. 8 0
      src/_health/pages/move.config.ts
  16. 25 16
      src/_health/pages/move.scss
  17. 93 42
      src/_health/pages/move.tsx
  18. 8 0
      src/_health/pages/move_detail.config.ts
  19. 21 22
      src/_health/pages/move_detail.tsx
  20. 1 0
      src/_health/pages/move_schedule.scss
  21. 3 2
      src/_health/pages/post_result.scss
  22. 3 2
      src/_health/pages/post_result.tsx
  23. 7 0
      src/_health/pages/timeline_detail.config.ts
  24. 12 6
      src/_health/pages/timeline_detail.scss
  25. 0 0
      src/_health/pages/timeline_detail.ts.config
  26. 65 23
      src/_health/pages/timeline_detail.tsx
  27. 9 4
      src/app.scss
  28. 0 1
      src/components/basic/Icons.tsx
  29. 4 4
      src/features/health/History.scss
  30. 8 6
      src/features/health/HistoryItem.tsx
  31. 4 9
      src/features/health/MainConsole.scss
  32. 11 7
      src/features/health/MainConsole.tsx
  33. 3 3
      src/features/health/MainDayNightCard.tsx
  34. 5 15
      src/features/health/MainFastEatCard.tsx
  35. 8 1
      src/features/health/MainHistory.tsx
  36. 3 3
      src/features/health/MainSleepActiveCard.tsx
  37. 30 29
      src/features/health/MainSwiper.tsx
  38. 5 5
      src/features/trackTimeDuration/components/Rings.weapp.tsx
  39. 1 1
      src/pages/clock/Clock.tsx
  40. 12 13
      src/pages/clock/ClockNew.tsx

+ 34 - 3
src/_health/base/new_button.tsx

@@ -13,7 +13,8 @@ export enum NewButtonType {
     text = 'text', //纯文本
     link = 'link',  //超链接(有可能带icon)
     label = 'label',
-    more = 'more'
+    more = 'more',
+    img = 'image'
 }
 
 function hexToHSL(hex) {
@@ -87,6 +88,7 @@ export default function NewButton(props: {
                 backgroundColor: isTouched ? hexToHSL(props.color) : props.disable ? '#B2B2B2' : props.color,
                 color: '#fff',
                 fontSize: props.fontSize ?? rpxToPx(30),
+                fontWeight: props.bold ? 'bold' : 'normal',
                 display: 'flex',
                 alignItems: 'center',
                 justifyContent: 'center',
@@ -102,6 +104,7 @@ export default function NewButton(props: {
                 backgroundColor: isTouched ? props.color + '40' : props.disable ? '#B2B2B240' : props.color + '1A',
                 color: props.disable ? '#b2b2b2' : props.color,
                 fontSize: props.fontSize ?? rpxToPx(30),
+                fontWeight: props.bold ? 'bold' : 'normal',
                 display: 'flex',
                 alignItems: 'center',
                 justifyContent: 'center',
@@ -119,6 +122,7 @@ export default function NewButton(props: {
                 backgroundColor: isTouched ? props.color + '26' : 'transparent',
                 color: props.disable ? '#b2b2b2' : props.color,
                 fontSize: props.fontSize ?? rpxToPx(30),
+                fontWeight: props.bold ? 'bold' : 'normal',
                 display: 'flex',
                 alignItems: 'center',
                 justifyContent: 'center',
@@ -136,6 +140,7 @@ export default function NewButton(props: {
                 backgroundColor: isTouched ? '#b2b2b240' : '#b2b2b210',
                 color: props.disable ? '#b2b2b2' : '#000000',
                 fontSize: props.fontSize ?? rpxToPx(30),
+                fontWeight: props.bold ? 'bold' : 'normal',
                 display: 'flex',
                 alignItems: 'center',
                 justifyContent: 'center',
@@ -163,6 +168,7 @@ export default function NewButton(props: {
                 backgroundColor: props.disable ? '#B2B2B240' : isTouched ? '#B2B2B240' : '#B2B2B21A',
                 color: props.disable ? '#b2b2b2' : '#000',
                 fontSize: props.fontSize ?? rpxToPx(30),
+                fontWeight: props.bold ? 'bold' : 'normal',
                 display: 'flex',
                 alignItems: 'center',
                 justifyContent: 'center',
@@ -176,12 +182,13 @@ export default function NewButton(props: {
                 flexDirection: 'row',
                 flex: 1,
                 color: '#5C7099',
-                fontSize: rpxToPx(26),
+                fontSize: props.fontSize ? props.fontSize : rpxToPx(26),
                 opacity: isTouched ? 0.4 : 1,
             }
             break
         case NewButtonType.label:
             style = {
+                ...props.btnStyle,
                 height: rpxToPx(64),
                 borderRadius: rpxToPx(32),
                 display: 'flex',
@@ -189,6 +196,7 @@ export default function NewButton(props: {
                 alignItems: 'center',
                 justifyContent: 'center',
                 fontSize: rpxToPx(28),
+                fontWeight: props.bold ? 'bold' : 'normal',
                 paddingLeft: rpxToPx(24),
                 paddingRight: rpxToPx(24),
                 boxSizing: 'border-box',
@@ -234,10 +242,33 @@ export default function NewButton(props: {
             >
                 <IconMore color={MainColorType.link} width={rpxToPx(34)} />
             </View>
+        case NewButtonType.img:
+            return <View style={{ opacity: isTouched ? 0.6 : 1, ...props.btnStyle }} onClick={(e) => {
+                if (process.env.TARO_ENV == 'weapp') {
+                    e.stopPropagation()
+                }
+                if (props.disable) return
+                props.onClick()
+            }}
+                onTouchStart={(e) => {
+                    if (process.env.TARO_ENV == 'weapp') {
+                        e.stopPropagation()
+                    }
+                    if (props.disable) return
+                    setIsTouched(true)
+                }}
+                onTouchEnd={(e) => {
+                    if (process.env.TARO_ENV == 'weapp') {
+                        e.stopPropagation()
+                    }
+                    setIsTouched(false)
+                }}>
+                {props.children}
+            </View>
     }
 
     return <View
-        style={{ ...style, fontWeight: props.bold ? 'bold' : 'normal' }}
+        style={{ ...style, fontWeight: props.bold ? 'bold' : 'normal',display:'flex',flexDirection:'row',alignItems:'center' }}
         catchMove
         onClick={(e) => {
             if (process.env.TARO_ENV == 'weapp') {

+ 1 - 1
src/_health/base/new_modal.scss

@@ -153,7 +153,7 @@
 }
 
 .modal_footer {
-    padding-bottom: 50px;
+    padding-bottom: 128px;
     display: flex;
     flex-direction: column;
     align-items: center;

+ 1 - 1
src/_health/base/new_timepicker.tsx

@@ -82,7 +82,7 @@ export default function NewTimePicker(props: { time?: string, onChange?: any, co
     return <PickerView
         value={values}
         // itemStyle={{ color: '#000' }}
-        style={{ color: '#000', height: rpxToPx(340), width: rpxToPx(670) }}
+        style={{ color: '#000', height: rpxToPx(340), width: rpxToPx(618) }}
         onChange={onPickerChange}
         indicatorClass="pick_sel_item"
         indicatorStyle={bgStyle}//""

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

@@ -2,8 +2,9 @@
     background-color: #fff;
     display: flex;
     border-radius: 36px;
-    margin-left: 40px;
-    width: 670px;
+    margin-left: 26px;
+    width: 698px;
     flex-direction: column;
     overflow: hidden;
+    flex-shrink: 0;
 }

+ 0 - 2
src/_health/components/fast_sleep_card.scss

@@ -1,7 +1,5 @@
 .circle_content{
     margin-left: 66px;
-    width: 224px;
-    height: 224px;
     margin-right: 38px;
     flex-shrink: 0;
     display: flex;

+ 59 - 36
src/_health/components/fast_sleep_card.tsx

@@ -9,10 +9,10 @@ import { useSelector } from 'react-redux';
 
 export default function FastSleepCard(props: { step: number, data: any }) {
     const health = useSelector((state: any) => state.health);
-    
+
     const common: RingCommon = {
         useCase: 'ChooseScenario',
-        radius: 37,
+        radius: 50,
         lineWidth: 14,
         isFast: true,
         status: 'WAIT_FOR_START'
@@ -20,7 +20,15 @@ export default function FastSleepCard(props: { step: number, data: any }) {
 
     const common2: RingCommon = {
         useCase: 'ChooseScenario',
-        radius: 20,
+        radius: 31,
+        lineWidth: 14,
+        isFast: true,
+        status: 'WAIT_FOR_START'
+    }
+
+    const common3: RingCommon = {
+        useCase: 'ChooseScenario',
+        radius: 40,
         lineWidth: 14,
         isFast: true,
         status: 'WAIT_FOR_START'
@@ -41,7 +49,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
 
     function target0SmallRing() {
         const { sleep } = props.data
-        if (sleep.real && sleep.real.end_timestamp){
+        if (sleep.real && sleep.real.end_timestamp) {
             return {
                 color: MainColorType.sleepLight,
                 startArc: getStartArc(sleep.real.start_timestamp),
@@ -69,7 +77,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
 
     function target2BigRing() {
         const { sleep } = props.data
-        if (sleep.real && sleep.real.end_timestamp){
+        if (sleep.real && sleep.real.end_timestamp) {
             return {
                 color: MainColorType.sleepLight,
                 startArc: getStartArc(sleep.real.start_timestamp),
@@ -84,11 +92,11 @@ export default function FastSleepCard(props: { step: number, data: any }) {
     }
 
     function target3BigRing() {
-        const { fast, sleep,status } = props.data
+        const { fast, sleep, status } = props.data
         return {
             color: MainColorType.fastLight,
-            startArc: getStartArc(status=='OG3'?sleep.real.end_timestamp:sleep.target.end_timestamp),
-            durationArc: getDurationArc(status=='OG3'?sleep.real.end_timestamp:sleep.target.end_timestamp, fast.target.end_timestamp)
+            startArc: getStartArc(status == 'OG3' ? sleep.real.end_timestamp : sleep.target.end_timestamp),
+            durationArc: getDurationArc(status == 'OG3' ? sleep.real.end_timestamp : sleep.target.end_timestamp, fast.target.end_timestamp)
         }
     }
 
@@ -109,7 +117,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
         if (!sleep.real) {
             return null;
         }
-        if (sleep.real.end_timestamp){
+        if (sleep.real.end_timestamp) {
             return {
                 color: MainColorType.sleep,
                 startArc: getStartArc(sleep.real.start_timestamp),
@@ -178,7 +186,12 @@ export default function FastSleepCard(props: { step: number, data: any }) {
 
 
     function circle0() {
-        return <View style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', width: '100%', height: '100%', position: 'relative' }}>
+        return <View style={{
+            display: 'flex', alignItems: 'center', justifyContent: 'center', width: 114, height: 114,
+            marginLeft: rpxToPx(50),
+            marginTop: rpxToPx(86),
+            position: 'relative',
+        }}>
             <Rings common={common}
                 bgRing={bgRing}
                 targetRing={target0BigRing()}
@@ -210,35 +223,35 @@ export default function FastSleepCard(props: { step: number, data: any }) {
     }
 
     function circle1() {
-        return <Rings common={common}
+        return <View style={{ display: 'flex', marginTop: rpxToPx(107), marginLeft: rpxToPx(70), alignItems: 'center', justifyContent: 'center', width: 114, height: 114, position: 'relative' }}> <Rings common={common3}
             bgRing={bgRing}
             targetRing={target1BigRing()}
             realRing={real1BigRing()}
             canvasId={'circle1_big'}
             currentDot={currentDot('FAST')}
-        />
+        /></View>
     }
 
     function circle2() {
-        return <Rings common={common}
+        return <View style={{ display: 'flex', marginTop: rpxToPx(107), marginLeft: rpxToPx(70), alignItems: 'center', justifyContent: 'center', width: 114, height: 114, position: 'relative' }}> <Rings common={common3}
             bgRing={bgRing}
             targetRing={target2BigRing()}
             realRing={real2BigRing()}
             canvasId={'circle2_big'}
             currentDot={currentDot('SLEEP')}
 
-        />
+        /></View>
     }
 
     function circle3() {
-        return <Rings common={common}
+        return <View style={{ display: 'flex', marginTop: rpxToPx(107), marginLeft: rpxToPx(70), alignItems: 'center', justifyContent: 'center', width: 114, height: 114, position: 'relative' }}> <Rings common={common3}
             bgRing={bgRing}
             targetRing={target3BigRing()}
             realRing={real3BigRing()}
             canvasId={'circle3_big'}
             currentDot={currentDot('FAST')}
 
-        />
+        /></View>
     }
 
     function circleContent() {
@@ -287,7 +300,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
                     else {
                         title = 'Stage 1 completed'
                     }
-                    
+
                 }
                 break;
             case 2:
@@ -361,7 +374,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
     }
 
     function step1() {
-        if (health.fast_with_sleep.status == 'OG2_MISALIGNED'){
+        if (health.fast_with_sleep.status == 'OG2_MISALIGNED') {
             return 'Not Available'
         }
         const { fast, sleep, status } = props.data
@@ -388,7 +401,7 @@ export default function FastSleepCard(props: { step: number, data: any }) {
     }
 
     function step2() {
-        if (health.fast_with_sleep.status == 'OG2_MISALIGNED'){
+        if (health.fast_with_sleep.status == 'OG2_MISALIGNED') {
             return 'Not Meaningful'
         }
         const { fast, sleep, status } = props.data
@@ -426,25 +439,29 @@ export default function FastSleepCard(props: { step: number, data: any }) {
         switch (props.step) {
             case 0:
                 return <View className='right_content'>
-                    <View className='h34' style={{ color: MainColorType.g01 }}>Fast</View>
-                    <View className='h50 bold' style={{ color: MainColorType.fast }}>{fastTime()}</View>
-                    <View className='h34' style={{ color: MainColorType.g01 }}>Sleep</View>
-                    <View className='h50 bold' style={{ color: MainColorType.sleep }}>{sleepTime()}</View>
+                    <View className='h34' style={{ color: MainColorType.g01, lineHeight: rpxToPx(42) + 'px' }}>Fast</View>
+                    <View className='h44 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{fastTime()}</View>
+                    <View style={{ height: rpxToPx(24) }} />
+                    <View className='h34' style={{ color: MainColorType.g01, lineHeight: rpxToPx(42) + 'px' }}>Sleep</View>
+                    <View className='h44 bold' style={{ color: MainColorType.sleep, lineHeight: rpxToPx(52) + 'px' }}>{sleepTime()}</View>
                 </View>
             case 1:
                 return <View className='right_content'>
-                    <View className='h34' style={{ color: MainColorType.g01 }}>Fast before Bedtime</View>
-                    <View className='h50 bold' style={{ color: MainColorType.fast }}>{step1()}</View>
+                    <View className='h34' style={{ color: MainColorType.g01, lineHeight: rpxToPx(42) + 'px' }}>Fast before Bedtime</View>
+                    <View style={{ height: rpxToPx(12) }} />
+                    <View className='h44 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{step1()}</View>
                 </View>
             case 2:
                 return <View className='right_content'>
-                    <View className='h34' style={{ color: MainColorType.g01 }}>Fast while Sleeping</View>
-                    <View className='h50 bold' style={{ color: MainColorType.sleep }}>{step2()}</View>
+                    <View className='h34' style={{ color: MainColorType.g01, lineHeight: rpxToPx(42) + 'px' }}>Fast while Sleeping</View>
+                    <View style={{ height: rpxToPx(12) }} />
+                    <View className='h44 bold' style={{ color: MainColorType.sleep, lineHeight: rpxToPx(52) + 'px' }}>{step2()}</View>
                 </View>
             case 3:
                 return <View className='right_content'>
-                    <View className='h34' style={{ color: MainColorType.g01 }}>Fast after Wake Up</View>
-                    <View className='h50 bold' style={{ color: MainColorType.fast }}>{step3()}</View>
+                    <View className='h34' style={{ color: MainColorType.g01, lineHeight: rpxToPx(42) + 'px' }}>Fast after Wake Up</View>
+                    <View style={{ height: rpxToPx(12) }} />
+                    <View className='h44 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{step3()}</View>
                 </View>
         }
         return <View className='right_content'></View>
@@ -452,20 +469,26 @@ export default function FastSleepCard(props: { step: number, data: any }) {
 
     return <View style={{
         position: 'relative', display: 'flex', flexDirection: 'row',
-        height: rpxToPx(366),
-        paddingTop: rpxToPx(66),
+        height: rpxToPx(384),
         boxSizing: 'border-box'
     }}>
         {
             statusBar()
         }
-        <View className='circle_content'>
+
+        {
+            circleContent()
+        }
+        <View style={{
+            marginLeft: rpxToPx(36), height: 114, marginTop: props.step == 0 ? rpxToPx(86) : rpxToPx(107),
+            display: 'flex',
+            flexDirection: 'row',
+            alignItems: 'center'
+
+        }}>
             {
-                circleContent()
+                statusDetail()
             }
         </View>
-        {
-            statusDetail()
-        }
     </View>
 }

+ 10 - 0
src/_health/components/fast_sleep_console.scss

@@ -61,4 +61,14 @@
     width: 76px;
     height: 76px;
     border-radius: 12px;
+}
+
+.main_footer {
+    height: 128px;
+    width: 750px;
+    background-color: #fff;
+    align-items: center;
+    justify-content: center;
+    display: flex;
+    position: relative;
 }

+ 15 - 3
src/_health/components/fast_sleep_console.tsx

@@ -11,7 +11,7 @@ import { IconCellArrow, IconNotification, IconNotificationOff } from "@/componen
 import { useSelector } from "react-redux";
 import { delRecord } from "@/services/health";
 
-export default function FastSleepConsole(props: { step: number, data: any,del:any }) {
+export default function FastSleepConsole(props: { step: number, data: any, del: any }) {
     const health = useSelector((state: any) => state.health);
 
     function tapLogBtn(index: number) {
@@ -65,7 +65,7 @@ export default function FastSleepConsole(props: { step: number, data: any,del:an
                 break;
         }
 
-        jumpPage(`/_health/pages/log_time?is_fast_with_sleep=1&index=${index}&single=${index == 0 ? 1 : 0}&is_start=${is_start}&window=${window}&data=${JSON.stringify(props.data)}`)
+        jumpPage(`/_health/pages/log_time?is_fast_with_sleep=1&index=${index}&initCheck=${health.fast_with_sleep.status == 'OG2_MISALIGNED' ? 1 : 0}&single=${index == 0 ? 1 : 0}&is_start=${is_start}&window=${window}&data=${JSON.stringify(props.data)}`)
         /*
             const isSingle = router.params.single == '1'
     const isFast = router.params.window == 'FAST'
@@ -338,8 +338,20 @@ export default function FastSleepConsole(props: { step: number, data: any,del:an
             }, 3, 4)
         }
         {
-            props.data.status != 'WFS' && <Text onClick={delConfirm}>删除</Text>
+            props.data.status != 'WFS' && <View className="main_footer">
+                <NewButton
+                    btnStyle={{
+                        position: 'absolute',
+                        top: rpxToPx(42),
+                        right: rpxToPx(40)
+                    }}
+                    type={NewButtonType.more}
+                    onClick={delConfirm}
+                />
+
+            </View>
         }
 
+
     </View>
 }

+ 5 - 4
src/_health/pages/add_moment.tsx

@@ -134,18 +134,19 @@ export default function AddMoment() {
         var minute = parseInt(time.split(':')[1] + '')
         date.setHours(hour)
         date.setMinutes(minute)
-        var timestamp = date.getTime()
+        var timestamp1 = date.getTime()
         if (isYesterday){
-            timestamp -=24*3600*1000
+            timestamp1 -=24*3600*1000
         }
+        debugger
 
         var params: any = {
             schedule_id: schedule_id,
             title: title,
             description: desc,
             start: {
-                date: dayjs(timestamp).format('YYYYMMDD'),
-                timestamp: timestamp
+                date: dayjs(timestamp1).format('YYYYMMDD'),
+                timestamp: timestamp1
             }
         }
 

+ 1 - 1
src/_health/pages/fast_sleep.scss

@@ -5,7 +5,7 @@
     min-height: 72px;
     padding-top: 18px;
     padding-bottom: 18px;
-    padding-left: 48px;
+    padding-left: 28px;
     padding-right: 40px;
     box-sizing: border-box;
 }

+ 1 - 1
src/_health/pages/fast_sleep.tsx

@@ -78,7 +78,7 @@ export default function FastSleep() {
         {
             health.fast_with_sleep.status != 'OG2_MISALIGNED' && <Swiper indicatorColor='#999'
                 indicatorActiveColor='#333'
-                style={{ height: rpxToPx(344), marginBottom: 20, flexShrink: 0 }}
+                style={{ height: rpxToPx(444), marginBottom: rpxToPx(24), flexShrink: 0 }}
                 onChange={e => setCurrent(e.detail.current)}
                 current={current}
                 indicatorDots>

+ 37 - 15
src/_health/pages/log_time.tsx

@@ -58,6 +58,7 @@ export default function LogTime() {
     const [autoCheck, setAutoCheck] = useState(false)
     const [initCheck, setInitCheck] = useState(router.params.initCheck == '1')
 
+
     useEffect(() => {
         if (isSingle) {
             if (isFast) {
@@ -91,8 +92,8 @@ export default function LogTime() {
             //     item.today = false
             // })
             // setArray(list)
-            setArray(array=>{
-                array.map((item)=>{
+            setArray(array => {
+                array.map((item) => {
                     item.today = false
                 })
                 return array;
@@ -260,6 +261,7 @@ export default function LogTime() {
             var timestamp = getTimestamp(obj)
             var params: any = {
                 schedule_id: obj.schedule_id,
+                event_id: obj.event_id ? obj.event_id : null,
                 extra: obj.extra,
                 date: dayjs(timestamp).format('YYYYMMDD'),
                 timestamp: timestamp,
@@ -276,6 +278,7 @@ export default function LogTime() {
                     var timestamp = getTimestamp(obj)
                     list.push({
                         schedule_id: obj.schedule_id,
+                        event_id: obj.event_id ? obj.event_id : null,
                         extra: obj.extra,
                         date: dayjs(timestamp).format('YYYYMMDD'),
                         timestamp: timestamp,
@@ -285,6 +288,7 @@ export default function LogTime() {
                     var timestamp2 = getTimestamp(obj2)
                     list.push({
                         schedule_id: obj2.schedule_id,
+                        event_id: obj.event_id ? obj.event_id : null,
                         extra: obj2.extra,
                         date: dayjs(timestamp2).format('YYYYMMDD'),
                         timestamp: timestamp2,
@@ -295,6 +299,7 @@ export default function LogTime() {
                     var timestamp = getTimestamp(obj)
                     list.push({
                         schedule_id: obj.schedule_id,
+                        event_id: obj.event_id ? obj.event_id : null,
                         extra: obj.extra,
                         date: dayjs(timestamp).format('YYYYMMDD'),
                         timestamp: timestamp,
@@ -304,6 +309,7 @@ export default function LogTime() {
                     var timestamp2 = getTimestamp(obj2)
                     list.push({
                         schedule_id: obj2.schedule_id,
+                        event_id: obj.event_id ? obj.event_id : null,
                         extra: obj2.extra,
                         date: dayjs(timestamp2).format('YYYYMMDD'),
                         timestamp: timestamp2,
@@ -326,6 +332,7 @@ export default function LogTime() {
                         var timestamp = getTimestamp(obj)
                         list.push({
                             schedule_id: obj.schedule_id,
+                            event_id: obj.event_id ? obj.event_id : null,
                             extra: obj.extra,
                             date: dayjs(timestamp).format('YYYYMMDD'),
                             timestamp: timestamp,
@@ -365,9 +372,9 @@ export default function LogTime() {
             check_items: list,
             op_page: isFastWithSleep ? 'FAST_WITH_SLEEP' : null,
             only_check: onlyCheck,
-            extra:{
-                set_time:enterTime,
-                confirm_time:new Date().getTime()
+            extra: {
+                set_time: enterTime,
+                confirm_time: new Date().getTime()
             }
         }).then(res => {
             if ((res as any).result) {
@@ -562,24 +569,38 @@ export default function LogTime() {
                 {
                     isSingle && <View style={{ flex: 1 }} />
                 }
-                <View className='border_footer_line' />
+                <View className='border_footer_line' style={{left:rpxToPx(66)}}/>
             </View>
             {
-                expandIndex == index && <NewTimePicker time={array[index].time} onChange={(e) => {
-                    var list = JSON.parse(JSON.stringify(array))
-                    list[index].time = e
-                    setArray(list)
-                }} color={iFast ? MainColorType.fast : MainColorType.sleep} />
+                expandIndex == index && <View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', width: rpxToPx(698) }}>
+                    <NewTimePicker time={array[index].time} onChange={(e) => {
+                        var list = JSON.parse(JSON.stringify(array))
+                        list[index].time = e
+                        setArray(list)
+                    }} color={iFast ? MainColorType.fast : MainColorType.sleep} />
+                </View>
             }
 
-            {
+            {/* {
                 expandIndex == index && <View className='card_footer' onClick={() => tapChangeTime(schedule_time, time, index)}>
-                    <IconCalendar width={rpxToPx(24)} color='#5C7099' />
+                    
                     <Text style={{ color: '#5C7099', marginLeft: rpxToPx(12), fontSize: rpxToPx(26) }}>{changeTimeText(schedule_time, time)}</Text>
                 </View>
+            } */}
+            {
+                expandIndex == index && <View className='card_footer'>
+                    <NewButton type={NewButtonType.link}
+                        title={changeTimeText(schedule_time, time)}
+                        onClick={() => tapChangeTime(schedule_time, time, index)}
+                    >
+                        <View style={{ marginRight: rpxToPx(12), display: 'flex' }}>
+                            <IconCalendar width={rpxToPx(24)} color='#5C7099' />
+                        </View>
+                    </NewButton>
+                </View>
             }
             {
-                showLine && <View className="border_footer_line" />
+                showLine && <View className="border_footer_line" style={{left:rpxToPx(66)}}/>
             }
 
         </View>
@@ -654,6 +675,7 @@ export default function LogTime() {
     if (!loaded) return <View />
 
     return <View className="page_container">
+        <View style={{ height: rpxToPx(36) }} />
         <Card>
             <View style={{ display: 'flex', flexDirection: 'column' }}>
                 {
@@ -734,7 +756,7 @@ export default function LogTime() {
                 color={footerBtnColor()}
                 type={NewButtonType.fill}
                 title={'Log'}
-                width={rpxToPx(670)}
+                width={rpxToPx(646)}
                 height={rpxToPx(96)}
                 bold={true}
                 onClick={() => tapCommit(false)} />

+ 2 - 3
src/_health/pages/long_fast.scss

@@ -1,9 +1,8 @@
 .long_fast_card{
+    height: 432px;
     position: relative;
-    padding-bottom: 103px;
-    padding-top: 104px;
     display: flex;
     flex-direction: column;
     align-items: center;
-    flex: 1;
+    flex-shrink: 0;
 }

+ 44 - 14
src/_health/pages/long_fast.tsx

@@ -2,6 +2,7 @@ import { View, Text, Image } from "@tarojs/components";
 import NewHeader, { NewHeaderType } from "../components/new_header";
 import Card from "../components/card";
 import './long_fast.scss'
+import '@features/health/MainConsole.scss'
 import { MainColorType } from "@/context/themes/color";
 import { rpxToPx } from "@/utils/tools";
 import NewButton, { NewButtonType } from "../base/new_button";
@@ -107,10 +108,14 @@ export default function LongFast() {
     }
 
     function tapMore() {
+        var listItems = ['编辑目标', '删除记录']
+        if (long_fast.status == 'OG') {
+            listItems.push('结束断食')
+        }
         showActionSheet({
             title: '选择操作',
             showActionSheetWithOptions: showActionSheetWithOptions,
-            itemList: ['编辑目标', '删除记录'],
+            itemList: listItems,
             success: (res) => {
                 switch (res) {
                     case 0:
@@ -128,6 +133,9 @@ export default function LongFast() {
                             }
                         })
                         break;
+                    case 2:
+                        tapEnd()
+                        break;
                 }
             }
         })
@@ -168,7 +176,7 @@ export default function LongFast() {
 
     function goal() {
         var hours = long_fast.extra.long_fast_goal / 60
-        return hours +'小时'
+        return hours + '小时'
         // var days = Math.floor(hours / 24)
         // var left = hours % 24
         // var str = ''
@@ -184,15 +192,15 @@ export default function LongFast() {
     function moment() {
         if (long_fast.timeline[0].moment) {
             const moment = long_fast.timeline[0].moment
-            return <View style={{ marginTop: 20, display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
+            return <View style={{ marginTop: rpxToPx(22), display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
                 {
                     moment.media && moment.media.length > 0 && <Image
-                    src={moment.media[0].url}
-                    mode="aspectFill"
-                    style={{width:rpxToPx(28),height:rpxToPx(28),borderRadius:rpxToPx(4)}} />
+                        src={moment.media[0].url}
+                        mode="aspectFill"
+                        style={{ width: rpxToPx(28), height: rpxToPx(28), borderRadius: rpxToPx(4) }} />
                 }
-                <Text style={{marginLeft:10,marginRight:10}}>{moment.description}</Text>
-                <Text>{TimeFormatter.dateDescription(moment.time.timestamp)}</Text>
+                <Text className="h20" style={{ marginLeft: rpxToPx(12), marginRight: 10, color: MainColorType.g02 }}>{moment.description} · {TimeFormatter.dateDescription(moment.time.timestamp, true)}</Text>
+                <Text className="h20" style={{ marginLeft: rpxToPx(12), color: MainColorType.g02 }}></Text>
             </View>
         }
         return <View />
@@ -204,10 +212,11 @@ export default function LongFast() {
             subtitle="Prolonged Fasting beyond 24 hours"
         />
         <Card>
-            <View className="long_fast_card">
-                <View className="h50 bold">{timeText()}</View>
-                <View className="h24" style={{ color: MainColorType.g02 }}>Goal {goal()}</View>
-                <View style={{ height: rpxToPx(33) }} />
+            <View className="long_fast_card" >
+                <View style={{ height: rpxToPx(96) }} />
+                <View className="h50 bold" style={{ color: MainColorType.fast }}>{timeText()}</View>
+                <View className="h24" style={{ color: MainColorType.g02, marginTop: rpxToPx(12) }}>Goal {goal()}</View>
+                <View style={{ height: rpxToPx(44) }} />
                 {
                     long_fast.status == 'WFS' ? <NewButton
                         type={NewButtonType.fill}
@@ -237,7 +246,7 @@ export default function LongFast() {
 
             </View>
         </Card>
-        {
+        {/* {
             long_fast.status == 'OG' && <View style={{ position: 'relative', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                 <NewButton
                     type={NewButtonType.link}
@@ -251,7 +260,28 @@ export default function LongFast() {
         }
         {
             long_fast.status == 'OG' && <Text onClick={tapMore}>More</Text>
-        }
+        } */}
+
+        <View className="main_footer" style={{backgroundColor:'transparent',marginBottom:-rpxToPx(35)}}>
+            <View style={{ width: rpxToPx(316), height: rpxToPx(128), display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
+                <NewButton
+                    type={NewButtonType.link}
+                    title={'See Guidelines'}
+                    onClick={() => { }}
+                >
+                </NewButton>
+            </View>
+            <NewButton
+                btnStyle={{
+                    position: 'absolute',
+                    top: rpxToPx(42),
+                    right: rpxToPx(26)
+                }}
+                type={NewButtonType.more}
+                onClick={tapMore}
+            />
+
+        </View>
 
 
 

+ 8 - 0
src/_health/pages/move.config.ts

@@ -0,0 +1,8 @@
+export default definePageConfig({
+    usingComponents: {
+        // 'ec-canvas': '../../lib/ec-canvas/ec-canvas',
+        // 'demo':'../../components/demo'
+    },
+    "navigationBarTitleText": "",
+    "navigationBarBackgroundColor": "#f5f5f5"
+})

+ 25 - 16
src/_health/pages/move.scss

@@ -18,16 +18,19 @@
 }
 
 .move_console {
-    width: 670px;
+    width: 698px;
     background-color: #fff;
-    margin-left: 40px;
+    margin-left: 26px;
     border-radius: 24px;
     display: flex;
     flex-direction: column;
     align-items: center;
     position: relative;
-    padding-top: 70px;
-    padding-bottom: 40px;
+    height: 432px;
+}
+
+.move_console_auth{
+    justify-content: center;
 }
 
 .console_duration {
@@ -90,9 +93,9 @@
 }
 
 .console_footer{
-    font-size: 18px;
-    line-height: 28px;
-    margin-top: 16px;
+    font-size: 20px;
+    line-height: 24px;
+    margin-top: 24px;
     color: #B2B2B2;
 }
 
@@ -169,8 +172,10 @@
 }
 
 .summary_content {
-    padding: 50px;
-
+    padding-top: 50px;
+    padding-left: 40px;
+    padding-right: 40px;
+    padding-bottom: 80px;
 }
 
 .summary_content2{
@@ -180,7 +185,7 @@
 .light_desc {
     font-size: 24px;
     color: #B2B2B2;
-    margin-bottom: 16px;
+    margin-bottom: 10px;
 }
 
 .history {
@@ -237,9 +242,9 @@
 }
 
 .history_item_detail_icon {
-    height: 32px;
-    width: 32px;
-    margin-right: 16px;
+    height: 44px;
+    width: 44px;
+    margin: 20px;
 }
 
 .no_more {
@@ -250,10 +255,11 @@
     display: flex;
     align-items: center;
     justify-content: center;
+    font-size: 26px;
 }
 
 .current_history_item {
-    height: 140px;
+    height: 172px;
     display: flex;
     flex-direction: row;
     justify-content: space-between;
@@ -279,8 +285,8 @@
     display: flex;
     align-items: center;
     justify-content: center;
-    margin-top: 24px;
-    padding-bottom: 28px;
+    margin-top: 36px;
+    padding-bottom: 36px;
     position: relative;
 }
 
@@ -321,6 +327,9 @@
     color: #5C7099;
     font-size: 26px;
     margin-top: 10px;
+    padding-left: 26px;
+    padding-right: 26px;
+    box-sizing: border-box;
 }
 
 .upcoming{

+ 93 - 42
src/_health/pages/move.tsx

@@ -14,6 +14,9 @@ import { TimeFormatter } from "@/utils/time_format";
 import { jumpPage } from "@/features/trackTimeDuration/hooks/Common";
 import { rpxToPx } from "@/utils/tools";
 import { IconMore } from "@/components/basic/Icons";
+import NewHeader, { NewHeaderType } from "../components/new_header";
+import NewButton, { NewButtonType } from "../base/new_button";
+import { MainColorType } from "@/context/themes/color";
 
 let timer
 export default function Move() {
@@ -178,7 +181,7 @@ export default function Move() {
                 // })
                 // console.log(res)
                 // console.log('move result')
-                jumpPage('./post_result?data='+JSON.stringify((res as any).post_result))
+                jumpPage('./post_result?data=' + JSON.stringify((res as any).post_result))
                 getMovesCurrent()
                 getMovesHistory()
             })
@@ -291,11 +294,15 @@ export default function Move() {
         end = (end + '').padStart(2, '0')
         return <View className="current_history_item">
             <View style={{ display: 'flex', flexDirection: 'column' }}>
-                <Text className="current_item_period">{start}:00-{end}:00</Text>
+                <Text className="h24" style={{ color: MainColorType.g02, lineHeight: rpxToPx(36) + 'px' }}>{start}:00-{end}:00</Text>
                 {
                     item.is_extra && <Text style={{ color: getThemeColor('SLEEP') }}>is Extra</Text>
                 }
-                <Text>{item.real_steps}/{item.target_steps}</Text>
+                <Text className="h24 bold"><Text className="h34 bold">{item.real_steps}</Text> / {item.target_steps} steps</Text>
+                <View style={{
+                    height: rpxToPx(18), flexShrink: 0,
+
+                }} />
             </View>
 
             {
@@ -317,7 +324,7 @@ export default function Move() {
 
         return <View className="summary">
             <View className="summary_header">
-                <Text>Last {hours.length} Hour{hours.length == 1 ? '' : 's'}</Text>
+                <Text className="h34 bold">Last {hours.length} Hour{hours.length == 1 ? '' : 's'}</Text>
                 {/* <Image className="arrow_hide"
                     onClick={() => {
                         setHideCurrentRecent(!hideCurrentRecent)
@@ -341,9 +348,20 @@ export default function Move() {
                     }
                     {
                         hours.length > 3 && <View className="recent_btn_bg">
-                            {
+                            {/* {
                                 moreActive ? <View className="recent_btn" onClick={() => setMoreActive(false)}>收起</View> : <View className="recent_btn" onClick={() => setMoreActive(true)}>展开剩余{hours.length - 3}条</View>
-                            }
+                            } */}
+                            <View style={{ height: rpxToPx(68), minWidth: rpxToPx(200), display: 'flex' }}>
+                                <NewButton
+                                    onClick={() => {
+                                        setMoreActive(!moreActive)
+                                    }}
+                                    type={NewButtonType.link}
+                                    fontSize={rpxToPx(24)}
+                                    title={moreActive ? '收起' : `展开剩余${hours.length - 3}条`}
+                                    btnStyle={{ minWidth: rpxToPx(170) }}
+                                />
+                            </View>
                             <View className="border_footer_line" />
                         </View>
                     }
@@ -394,10 +412,10 @@ export default function Move() {
             target.setSeconds(0)
             target.setMilliseconds(0)
             var timestamp = target.getTime()
-            if (now.getTime()>timestamp){
-                timestamp += 24*3600*1000
+            if (now.getTime() > timestamp) {
+                timestamp += 24 * 3600 * 1000
             }
-            return <Text className="console_footer">{formatTimeInterval(new Date().getTime(),timestamp)}</Text>
+            return <Text className="console_footer">{formatTimeInterval(new Date().getTime(), timestamp)}</Text>
         }
         if (getStatus() == 'open') {
             if (new Date().getMinutes() < 10) {
@@ -481,7 +499,7 @@ export default function Move() {
     function becomeTime() {
         var hour = new Date().getHours()
         var tHour = parseInt(getDuration().substring(0, 2))
-        if (isExtra()){
+        if (isExtra()) {
             tHour = data.hours[0].hour
         }
         if (hour > tHour) {
@@ -493,7 +511,7 @@ export default function Move() {
     function consolePanel() {
 
         if (!allowRun) {
-            return <View className="move_console">
+            return <View className="move_console move_console_auth">
                 <Text className="console_duration" style={{ color: '#000', fontSize: rpxToPx(34) }}>你还没有开启步数授权</Text>
                 <Text className="console_open_tip">体验Move More需要您开启微信运动授权,点击下方按钮进行授权</Text>
                 <View className="console_checkbtn"
@@ -503,45 +521,78 @@ export default function Move() {
         }
 
         return <View className="move_console">
-            {/* <View className="summary_status_bg">
-                <View className="summary_status_point" style={{ backgroundColor: isExtra() ? getThemeColor('SLEEP') : getThemeColor('ACTIVE') }} />
-                <Text className="summary_status_text">{isExtra() ? 'SLEEP HOUR ' : 'WAKING HOUR '}{hourIndex()}</Text>
-            </View> */}
+            <View style={{ flex: 1 }} />
             {hourIndex()}
-            <Text className="console_duration">{getDuration()}</Text>
-            <Text className="console_desc" style={{
+            <Text className={isExtra() ? 'h24' : '34'} style={{
+                color: MainColorType.g01,
+                lineHeight: isExtra() ? rpxToPx(28) + 'px' : rpxToPx(42) + 'px'
+            }}>{getDuration()}</Text>
+            <View style={{ height: rpxToPx(12) }} />
+            <Text className={isExtra() ? 'bold h50' : 'bold h34'} style={{
                 color: isExtra() ? getThemeColor('SLEEP') : getThemeColor('ACTIVE'),
-                fontSize: isExtra() ? rpxToPx(48) : rpxToPx(34)
+                lineHeight: isExtra() ? rpxToPx(60) + 'px' : rpxToPx(42) + 'px'
             }}>{
                     isExtra() ? 'Sleep well.' : getStatus() == 'open' ? `Think you've hit ${getCurrentTarget()} steps this hour?` : `Hit ${getCurrentTarget()} steps within the hour`
                 }</Text>
+            <View style={{ height: rpxToPx(48), }} />
+
             {
-                isExtra() ?<View className="console_checkbtn">{becomeTime()}</View>:getStatus() == 'open' ? <View className="console_checkbtn"
-                    onClick={tapLog}
-                    style={{ color: '#fff', backgroundColor: getThemeColor('ACTIVE') }}>I Think So!</View> :
-                    <View className="console_checkbtn" onClick={tapLog}>{becomeTime()}</View>
+                isExtra() ? <NewButton type={NewButtonType.gray}
+                    width={rpxToPx(502)}
+                    height={rpxToPx(96)}
+                    fontSize={rpxToPx(26)}
+                    bold
+                    // disable
+                    title={becomeTime()}
+                /> : getStatus() == 'open' ?
+                    <NewButton type={NewButtonType.fill}
+                        onClick={tapLog}
+                        width={rpxToPx(502)}
+                        height={rpxToPx(96)}
+                        fontSize={rpxToPx(26)}
+                        title="I Think So!"
+                        bold
+                        color={getThemeColor('ACTIVE')}
+                    />
+                    :
+                    <NewButton type={NewButtonType.gray}
+                        onClick={tapLog}
+                        width={rpxToPx(502)}
+                        height={rpxToPx(96)}
+                        fontSize={rpxToPx(26)}
+                        bold
+                        // disable
+                        title={becomeTime()}
+                    />
+                // <View className="console_checkbtn" onClick={tapLog}>{becomeTime()}</View>
             }
             {
                 consoleFooter()
             }
+            <View style={{ height: rpxToPx(48) }} />
 
 
         </View>
     }
 
+    function toolBtnText() {
+        return `Upcoming (${data.hours.length - hours.length > 0 ? data.hours.length - hours.length : ''})`
+    }
+
     function tools() {
         return <View className="tools">
-            <View className="upcoming" onClick={() => {
-                jumpPage(`/_health/pages/move_schedule?hours=${JSON.stringify(data.hours)}`)
-            }}>
+            <View style={{ width: rpxToPx(74) }} />
+            <NewButton type={NewButtonType.link}
+                title={toolBtnText()}
+                onClick={() => {
+                    jumpPage(`/_health/pages/move_schedule?hours=${JSON.stringify(data.hours)}`)
+                }}
+            >
                 <Image className="calendar" src={require('@assets/_health/calendar.png')} />
-                <Text>Upcoming{data.hours.length - hours.length > 0 ? `(${data.hours.length - hours.length})` : ''}</Text>
-            </View>
-            <View className="more" onClick={() => {
+            </NewButton>
+            <NewButton type={NewButtonType.more} onClick={() => {
                 jumpPage('./move_setting_time')
-            }}>
-                <IconMore width={17} color="#b2b2b2" />
-            </View>
+            }} />
         </View>
     }
 
@@ -549,7 +600,7 @@ export default function Move() {
         return <View className="move_summary">
 
             <View className="summary_header">
-                <Text>Summary</Text>
+                <Text className="h34 bold">Summary</Text>
                 <View style={{ flex: 1 }} />
                 {
                     data.last_updated && <Text style={{ color: '#b2b2b2', fontSize: 10, fontWeight: 'normal' }}>最近更新于 {dayjs(data.last_updated).format('HH:mm')}</Text>
@@ -561,29 +612,29 @@ export default function Move() {
                 <View className="summary_footer">
                     <View className="summary_footer_item">
                         <Text className="light_desc">Hours Sedentary</Text>
-                        <Text>{data.stat.sedentary_hours}/{data.stat.waking_hours}</Text>
+                        <Text style={{ fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.sedentary_hours}</Text> / {data.stat.waking_hours}</Text>
                     </View>
                     <View className="summary_footer_item">
                         <Text className="light_desc">Hours Active</Text>
-                        <Text style={{ color: getThemeColor('ACTIVE') }}>{data.stat.active_hours}/{data.stat.waking_hours}</Text>
+                        <Text style={{ color: getThemeColor('ACTIVE'), fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.active_hours}</Text> / {data.stat.waking_hours}</Text>
                     </View>
                     <View className="summary_footer_item">
                         <Text className="light_desc">Hours Missed</Text>
-                        <Text>{data.stat.missed_hours}/{data.stat.waking_hours}</Text>
+                        <Text style={{ fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.missed_hours}</Text> / {data.stat.waking_hours}</Text>
                     </View>
                 </View>
                 <View className="summary_footer" style={{ marginTop: rpxToPx(48) }}>
                     <View className="summary_footer_item">
                         <Text className="light_desc">Total Steps</Text>
-                        <Text>{data.stat.real_steps}/{data.stat.target_steps}</Text>
+                        <Text style={{ fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.real_steps}</Text> / {data.stat.target_steps}</Text>
                     </View>
                     <View className="summary_footer_item">
                         <Text className="light_desc">Total Calories</Text>
-                        <Text>{data.stat.real_calories}/{data.stat.target_calories}</Text>
+                        <Text style={{ fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.real_calories}</Text> / {data.stat.target_calories}</Text>
                     </View>
                     <View className="summary_footer_item">
                         <Text className="light_desc">Total Distance</Text>
-                        <Text>{data.stat.real_distance}/{data.stat.target_distance}</Text>
+                        <Text style={{ fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.real_distance}</Text> / {data.stat.target_distance}</Text>
                     </View>
                 </View>
             </View>
@@ -592,13 +643,13 @@ export default function Move() {
     }
 
     function goDetail(item) {
-        jumpPage('./move_detail?id='+item.id)
+        jumpPage('./move_detail?id=' + item.id)
     }
 
     if (!loaded || !loadAuth) return <View />
 
     return <View style={{ display: 'flex', flexDirection: 'column' }}>
-        <Text className="move-title">Move Every Hour</Text>
+        <NewHeader type={NewHeaderType.left} title="Move Every Hour" />
         {
             consolePanel()
         }
@@ -615,7 +666,7 @@ export default function Move() {
         {
             list.length > 0 && <View className="history">
                 <View className="history_header">
-                    <Text className="history_header_title">Recent</Text>
+                    <Text className="h34 bold">Recent</Text>
                     <View className="border_footer_line" />
                 </View>
                 {
@@ -624,7 +675,7 @@ export default function Move() {
                             <Text className="history_item_date">{(item.date + '').substring(6, 8)}</Text>
                             <View className="history_item_detail_bg">
                                 <Image className="history_item_detail_icon" src={require('@assets/_health/walk.png')} />
-                                <Text style={{fontSize:rpxToPx(26)}}> Hours Active {item.active_hours} · Total Steps {item.stat.real_steps}</Text>
+                                <Text style={{ fontSize: rpxToPx(26) }}> Hours Active {item.active_hours} · Total Steps {item.stat.real_steps}</Text>
                             </View>
                             <View className="border_footer_line" />
                         </View>

+ 8 - 0
src/_health/pages/move_detail.config.ts

@@ -0,0 +1,8 @@
+export default definePageConfig({
+    usingComponents: {
+        // 'ec-canvas': '../../lib/ec-canvas/ec-canvas',
+        // 'demo':'../../components/demo'
+    },
+    "navigationBarTitleText": "",
+    "navigationBarBackgroundColor": "#f5f5f5"
+})

+ 21 - 22
src/_health/pages/move_detail.tsx

@@ -6,6 +6,9 @@ import './move.scss'
 import { getThemeColor } from "@/features/health/hooks/health_hooks";
 import { rpxToPx } from "@/utils/tools";
 import dayjs from "dayjs";
+import NewHeader, { NewHeaderType } from "../components/new_header";
+import NewButton, { NewButtonType } from "../base/new_button";
+import { MainColorType } from "@/context/themes/color";
 
 let useRoute;
 let useNavigation;
@@ -43,10 +46,10 @@ export default function MoveDetail() {
         return <View className="move_summary">
 
             <View className="summary_header">
-                <Text>Summary</Text>
+                <Text className="h34 bold">Summary</Text>
                 <View style={{ flex: 1 }} />
                 {
-                    data.last_updated && <Text style={{ color: '#b2b2b2', fontSize: 10, fontWeight: 'normal' }}></Text>
+                    data.last_updated && <Text style={{ color: '#b2b2b2', fontSize: 10, fontWeight: 'normal' }}>最近更新于 {dayjs(data.last_updated).format('HH:mm')}</Text>
                 }
 
                 <View className="border_footer_line" />
@@ -55,29 +58,29 @@ export default function MoveDetail() {
                 <View className="summary_footer">
                     <View className="summary_footer_item">
                         <Text className="light_desc">Hours Sedentary</Text>
-                        <Text>{data.stat.sedentary_hours}/{data.stat.waking_hours}</Text>
+                        <Text style={{ fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.sedentary_hours}</Text> / {data.stat.waking_hours}</Text>
                     </View>
                     <View className="summary_footer_item">
                         <Text className="light_desc">Hours Active</Text>
-                        <Text style={{ color: getThemeColor('ACTIVE') }}>{data.stat.active_hours}/{data.stat.waking_hours}</Text>
+                        <Text style={{ color: getThemeColor('ACTIVE'), fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.active_hours}</Text> / {data.stat.waking_hours}</Text>
                     </View>
                     <View className="summary_footer_item">
                         <Text className="light_desc">Hours Missed</Text>
-                        <Text>{data.stat.missed_hours}/{data.stat.waking_hours}</Text>
+                        <Text style={{ fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.missed_hours}</Text> / {data.stat.waking_hours}</Text>
                     </View>
                 </View>
                 <View className="summary_footer" style={{ marginTop: rpxToPx(48) }}>
                     <View className="summary_footer_item">
                         <Text className="light_desc">Total Steps</Text>
-                        <Text>{data.stat.real_steps}/{data.stat.target_steps}</Text>
+                        <Text style={{ fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.real_steps}</Text> / {data.stat.target_steps}</Text>
                     </View>
                     <View className="summary_footer_item">
                         <Text className="light_desc">Total Calories</Text>
-                        <Text>{data.stat.real_calories}/{data.stat.target_calories}</Text>
+                        <Text style={{ fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.real_calories}</Text> / {data.stat.target_calories}</Text>
                     </View>
                     <View className="summary_footer_item">
                         <Text className="light_desc">Total Distance</Text>
-                        <Text>{data.stat.real_distance}/{data.stat.target_distance}</Text>
+                        <Text style={{ fontWeight: 'bold', fontSize: rpxToPx(24) }}><Text style={{ fontSize: rpxToPx(34) }}>{data.stat.real_distance}</Text> / {data.stat.target_distance}</Text>
                     </View>
                 </View>
             </View>
@@ -90,13 +93,12 @@ export default function MoveDetail() {
         const hours = data.hours
         return <View className="summary">
             <View className="summary_header">
-                <Text>Hourly</Text>
+                <Text className="h34 bold">Hourly</Text>
                 <View className="border_footer_line" />
             </View>
             <View className="summary_content2">
                 {
                     hours.map((item, index) => {
-                        if (index >= 3 && !moreActive) return <View key={index} />
                         return <View key={index}>
                             {
                                 currentHistory(item)
@@ -104,14 +106,6 @@ export default function MoveDetail() {
                         </View>
                     })
                 }
-                {
-                    hours.length > 3 && <View className="recent_btn_bg">
-                        {
-                            moreActive ? <View className="recent_btn" onClick={() => setMoreActive(false)}>收起</View> : <View className="recent_btn" onClick={() => setMoreActive(true)}>展开剩余{hours.length - 3}条</View>
-                        }
-                        <View className="border_footer_line" />
-                    </View>
-                }
             </View>
 
 
@@ -127,11 +121,15 @@ export default function MoveDetail() {
         end = (end + '').padStart(2, '0')
         return <View className="current_history_item">
             <View style={{ display: 'flex', flexDirection: 'column' }}>
-                <Text className="current_item_period">{start}:00-{end}:00</Text>
+                <Text className="h24" style={{ color: MainColorType.g02, lineHeight: rpxToPx(36) + 'px' }}>{start}:00-{end}:00</Text>
                 {
                     item.is_extra && <Text style={{ color: getThemeColor('SLEEP') }}>is Extra</Text>
                 }
-                <Text>{item.real_steps}/{item.target_steps}</Text>
+                <Text className="h24 bold"><Text className="h34 bold">{item.real_steps}</Text> / {item.target_steps} steps</Text>
+                <View style={{
+                    height: rpxToPx(18), flexShrink: 0,
+
+                }} />
             </View>
 
             {
@@ -149,14 +147,15 @@ export default function MoveDetail() {
 
     if (!loaded) return <View />
 
-    const date = data.start_date+''
+    const date = data.start_date + ''
     return <View>
-        <View className="detail_date">{date.substring(0,4)}年{date.substring(4,6)}月{date.substring(6,8)}日</View>
+        <NewHeader type={NewHeaderType.left} title={date.substring(0, 4) + '年' + date.substring(4, 6) + '月' + date.substring(6, 8) + '日'} />
         {
             summary()
         }
         {
             activeHour()
         }
+        <Text className="no_more">没有更多了</Text>
     </View>
 }

+ 1 - 0
src/_health/pages/move_schedule.scss

@@ -51,6 +51,7 @@
     display: flex;
     align-items: center;
     justify-content: center;
+    font-size: 26px;
 }
 
 .history_item_detail_icon{

+ 3 - 2
src/_health/pages/post_result.scss

@@ -2,7 +2,7 @@
     display: flex;
     flex-direction: column;
     align-items: center;
-    padding-top: 246px;
+    padding-top: 304px;
     height: 100vh;
     box-sizing: border-box;
 }
@@ -43,11 +43,12 @@
 }
 
 .result_top_line{
-    background-color: #9E9E9E;
+    background-color: #b2b2b2;
     height: 2px;
     transform: scaleY(0.5);
     width: 400px;
     margin-bottom: 48px;
+    opacity: 0.4;
 }
 
 .next_target{

+ 3 - 2
src/_health/pages/post_result.tsx

@@ -118,7 +118,7 @@ export default function PostResult() {
             return <View className="result_icon_bg">
                 <Image className="result_icon_bg" mode="aspectFill" src={data.images[0]} />
                 <View className="result_icon_small" style={{ backgroundColor: getMainColor() }}>
-                    <IconCheck color="#fff" width={rpxToPx(18)} height={rpxToPx(18)} />
+                    <IconCheck color="#fff" width={rpxToPx(32)} height={rpxToPx(32)} />
                 </View>
             </View>
         }
@@ -127,7 +127,7 @@ export default function PostResult() {
             return <Image className="result_icon_bg" mode="aspectFill" src={data.extra.move_status == 'ACTIVE' ? require('@assets/_health/walk2.png') : require('@assets/_health/sit.png')} />
         }
         return <View className="result_icon_bg" style={{ backgroundColor: getMainColor() }}>
-            <IconCheck color="#fff" width={rpxToPx(40)} height={rpxToPx(40)} />
+            <IconCheck color="#fff" width={rpxToPx(88)} height={rpxToPx(88)} />
         </View>
     }
 
@@ -178,6 +178,7 @@ export default function PostResult() {
                 width={rpxToPx(400)}
                 height={rpxToPx(96)}
                 title="Done"
+                bold
                 onClick={() => {
                     Taro.navigateBack()
                 }}

+ 7 - 0
src/_health/pages/timeline_detail.config.ts

@@ -0,0 +1,7 @@
+export default definePageConfig({
+    usingComponents: {
+        // 'ec-canvas': '../../lib/ec-canvas/ec-canvas',
+        // 'demo':'../../components/demo'
+    },
+    "navigationBarTitleText": "详情",
+})

+ 12 - 6
src/_health/pages/timeline_detail.scss

@@ -26,6 +26,7 @@
     font-weight: bold;
     font-size: 34px;
     line-height: 42px;
+    margin-bottom: 12px;
 }
 
 .add_note{
@@ -52,7 +53,6 @@
     bottom:0;
     background-color: rgba(0,0,0,0.9);
     box-sizing: border-box;
-    padding-top:100px;
     padding-left:72px;
     padding-right:72px;
     display: flex;
@@ -64,23 +64,22 @@
     margin-bottom: 30px;
 }
 
-.toolbar{
-    height: 108px;
+.toolbar2{
+    height: 172px;
     display: flex;
     flex-direction: row;
     align-items: center;
     padding-left:72px;
-    padding-right:40px;
+    padding-right:72px;
     margin-left:-72px;
     margin-right:-72px;
     box-sizing: border-box;
-    background-color: #fff;
 }
 
 .album{
     width: 72px;
     height: 72px;
-    margin-right: 32px;
+    margin-right: 48px;
 
 }
 
@@ -103,4 +102,11 @@
     margin-top: 122px;
     color: #B2B2B2;
     font-size: 24px;
+}
+
+.myTextarea{
+    line-height: 72px;
+    font-size: 48px;
+    width: 606px;
+    color: #fff;
 }

+ 0 - 0
src/_health/pages/timeline_detail.ts.config


+ 65 - 23
src/_health/pages/timeline_detail.tsx

@@ -1,6 +1,7 @@
 import { View, Image, Text, Input, Textarea } from "@tarojs/components";
 import { useSelector } from "react-redux";
 import './timeline_detail.scss'
+import '@features/health/History.scss'
 import { useEffect, useState } from "react";
 import Taro, { useRouter } from "@tarojs/taro";
 import dayjs from "dayjs";
@@ -8,6 +9,10 @@ import { getThemeColor } from "@/features/health/hooks/health_hooks";
 import { baseUrl } from "@/services/http/api";
 import { checkAuthorized } from "@/utils/check_authorized";
 import { createMoment, getEvents } from "@/services/health";
+import NewButton, { NewButtonType } from "../base/new_button";
+import { IconClose } from "@/components/basic/Icons";
+import { rpxToPx } from "@/utils/tools";
+import { MainColorType } from "@/context/themes/color";
 
 let timestamp = 0;
 let useRoute;
@@ -44,6 +49,13 @@ export default function TimelineDetail() {
 
     const { schedule_id, event_id } = router.params
 
+    useEffect(() => {
+        Taro.setNavigationBarColor({
+            backgroundColor: showPop ? '#191919' : '#ffffff',
+            frontColor: '#000000'
+        })
+    }, [showPop])
+
     useEffect(() => {
         Taro.onKeyboardHeightChange(res => {
             setBottom(res.height)
@@ -191,6 +203,16 @@ export default function TimelineDetail() {
 
     }
 
+    function mediaCount() {
+        let count = 0;
+        list.map(moment => {
+            moment.media.map((obj) => {
+                count++
+            })
+        })
+        return count;
+    }
+
     if (!loaded) return <View />
 
     return <View style={{ display: 'flex', flex: 1 }}>
@@ -208,14 +230,8 @@ export default function TimelineDetail() {
                             {
                                 detail.title && <Text> {detail.title}</Text>
                             }
-                            {/* {
-                                item.description && <Text style={{ color: '#000' }}> {item.description}</Text>
-                            } */}
                         </Text>
 
-                        {/* {
-                            item.media && item.media.length > 0 && <Image mode="aspectFill" src={item.media[0].url} style={{ width: 60, height: 60, marginTop: 5 }} />
-                        } */}
                     </View>
                 }
                 {
@@ -244,45 +260,71 @@ export default function TimelineDetail() {
                                     item.description && <Text style={{ color: '#000' }}> {item.description}</Text>
                                 }
                             </Text>
-
-                            {
-                                item.media && item.media.length > 0 && <Image mode="aspectFill" src={item.media[0].url} style={{ width: 60, height: 60, marginTop: 5 }} />
-                            }
                         </View>
                     })
                 }
+                {
+                    <View className="media" style={{ marginRight: mediaCount() == 4 ? 80 : 0 }}>
+                        {
+                            list.map(moment => {
+                                return moment.media.map((obj, j) => {
+                                    return <Image className="media_item" mode="aspectFill" onClick={() => { }} src={obj.url} key={j * 10} />
+                                })
+                            })
+
+                        }
+                    </View>
+                }
                 {
                     publish && <Text className="publish_time">发布于{dayjs(publish.timestamp).format('MM-DD HH:mm')}</Text>
                 }
             </View>
         </View>
         {
-            health.mode != 'ACTIVE' && health.mode != 'EAT' && <View className="add_note" onClick={() => {
+            health.mode != 'ACTIVE' && health.mode != 'EAT' && <View className="add_note"><NewButton type={NewButtonType.link} title="写个笔记" onClick={() => {
                 timestamp = new Date().getTime()
                 setShowPop(true)
-            }}>写个笔记</View>
+
+            }} /></View>
         }
 
+
         {
             showPop && <View className="publish_bg">
-                <View style={{
-                    position: 'absolute', left: 50,
-                    top: 30,
-                    color: '#fff'
-                }} onClick={() => setShowPop(false)}>关闭</View>
-                <Text className="time">{dayjs(timestamp).format('HH:mm')}</Text>
-                <Textarea placeholder="What's on your mind?" style={{ flex: 1, color: '#fff', caretColor: getThemeColor(health.mode) }} focus value={desc} onInput={(e) => {
+                <NewButton type={NewButtonType.img}
+                    btnStyle={{
+                        position: 'absolute', left: rpxToPx(52),
+                        top: 0,
+                        color: '#fff',
+                        width: 32,
+                        height: 32
+                    }}
+                    onClick={() => {
+                        setShowPop(false)
+                    }}>
+                    <IconClose color="#fff" width={20} height={20} />
+                </NewButton>
+                <View style={{ height: rpxToPx(88), marginTop: rpxToPx(120), width: rpxToPx(80), color: MainColorType.link }}>{dayjs(timestamp).format('HH:mm')}
+                </View>
+                <Textarea className="myTextarea" placeholder="What's on your mind?" style={{ flex: 1, color: '#fff', caretColor: getThemeColor(health.mode) }} focus value={desc} onInput={(e) => {
                     setDesc(e.detail.value)
                 }} />
-                <View className="toolbar">
+                <View className="toolbar2">
                     {
-                        imgUrl.length > 0 && <Image src={imgUrl} mode="aspectFill" className="album" onClick={() => addImage(false)} />
+                        imgUrl.length > 0 && <NewButton type={NewButtonType.img} onClick={() => addImage(false)}>
+                            <Image src={imgUrl} mode="aspectFill" className="album" />
+                        </NewButton>
                     }
                     {
-                        imgUrl.length == 0 && <Image src={require('@assets/_health/album.png')} className="album" onClick={() => addImage(false)} />
+                        imgUrl.length == 0 && <NewButton type={NewButtonType.img} onClick={() => addImage(false)}>
+                            <Image src={require('@assets/_health/album.png')} className="album"
+                            />
+                        </NewButton>
                     }
                     {
-                        imgUrl.length == 0 && <Image src={require('@assets/_health/camera.png')} className="album" onClick={() => addImage(true)} />
+                        imgUrl.length == 0 && <NewButton type={NewButtonType.img} onClick={() => addImage(false)}>
+                            <Image src={require('@assets/_health/camera.png')} className="album"
+                            /></NewButton>
                     }
 
 

+ 9 - 4
src/app.scss

@@ -430,18 +430,18 @@ page {
 .card_header {
     display: flex;
     flex-direction: row;
-    padding-left: 52px;
-    padding-right: 40px;
+    padding-left: 28px;
+    padding-right: 28px;
     box-sizing: border-box;
     align-items: center;
     height: 128px;
-    width: 670px;
+    width: 698px;
     flex-shrink: 0;
     flex: 1;
 }
 
 .card_footer {
-    height: 128px;
+    height: 108px;
     display: flex;
     flex-direction: row;
     align-items: center;
@@ -453,6 +453,11 @@ page {
     line-height: 60px;
 }
 
+.h44 {
+    font-size: 44px;
+    line-height: 52px;
+}
+
 .h34 {
     font-size: 34px;
     line-height: 42px;

File diff suppressed because it is too large
+ 0 - 1
src/components/basic/Icons.tsx


+ 4 - 4
src/features/health/History.scss

@@ -3,6 +3,7 @@
     flex-direction: row;
     width: 750px;
     padding: 40px;
+    padding-bottom: 20px;
     box-sizing: border-box;
     position: relative;
     background-color: #fff;
@@ -46,8 +47,6 @@
     font-size: 32px;
     line-height: 48px;
     color: #5C7099;
-    vertical-align: top;
-    vertical-align: text-top;
 }
 
 .history_item_desc {
@@ -62,7 +61,8 @@
     justify-content: center;
     width: 750px;
     text-align: center;
-    margin-top: 20px;
+    height: 128px;
+    font-size: 26px;
     color: #B2B2B2;
 }
 
@@ -100,7 +100,7 @@
     margin-top: 20px;
     background-color: #F5F5F5;
     height: 68px;
-    padding-left: 26px;
+    padding-left: 20px;
     width: 572px;
 }
 

+ 8 - 6
src/features/health/HistoryItem.tsx

@@ -60,7 +60,7 @@ export default function HistoryItem(props: {
     function ring() {
         const common: RingCommon = {
             useCase: 'ChooseScenario',
-            radius: 10,
+            radius: 7,
             lineWidth: 3,
             isFast: true,
             status: 'WAIT_FOR_START'
@@ -83,7 +83,7 @@ export default function HistoryItem(props: {
     function ring2() {
         const common: RingCommon = {
             useCase: 'ChooseScenario',
-            radius: 10,
+            radius: 7,
             lineWidth: 3,
             isFast: true,
             status: 'WAIT_FOR_START'
@@ -178,11 +178,13 @@ export default function HistoryItem(props: {
         <View className="history_date">{historyDate()}</View>
         <View className="history_content">
 
-            <View style={{ display: 'flex', flexDirection: 'column', marginBottom: rpxToPx(12) }}>
+            <View style={{ display: 'flex', flexDirection: 'column', marginBottom: rpxToPx(12), width: rpxToPx(600) }}>
                 {
                     props.data.events.map((item, index) => {
                         return <Text key={index}>
-                            <Text className="history_item_title">{item.time && dayjs(item.time.timestamp).format('HH:mm')}<Text style={{ fontSize: 9, lineHeight: '20px', fontWeight: 'bold', verticalAlign: 'text-top' }}>{dayTag(index)}</Text> {getTitle(item)} </Text>
+                            <Text className="history_item_title">{item.time && dayjs(item.time.timestamp).format('HH:mm')}
+                                <Text style={{ fontSize: 9, lineHeight: '20px', fontWeight: 'bold', verticalAlign: 'text-top' }}>{dayTag(index)}</Text>
+                                {getTitle(item)} </Text>
                             {
                                 item.moments && item.moments.map((moment, i) => {
                                     return <Text className="history_item_desc" key={i * 1000}>{moment.description}</Text>
@@ -209,7 +211,7 @@ export default function HistoryItem(props: {
                 </View>
             }
 
-            <View className="history_duration_bg">
+            <View className="history_duration_bg" style={{ marginTop: 0 }}>
                 {
                     props.fast_type != 'LF' && ring()
                 }
@@ -258,7 +260,7 @@ export default function HistoryItem(props: {
                     </View>
                 </View>
             }
-            <View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', height: rpxToPx(60) }}>
+            <View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', height: rpxToPx(60), marginTop: rpxToPx(20) }}>
                 <View style={{ flex: 1 }} />
                 <NewButton type={NewButtonType.more}
                     onClick={tapDel}

+ 4 - 9
src/features/health/MainConsole.scss

@@ -86,7 +86,6 @@
     display: flex;
     width: 750px;
     background-color: #fff;
-    height: 134px;
     position: relative;
     flex-direction: column;
     align-items: center;
@@ -96,7 +95,8 @@
 .main_summary_time {
     font-size: 36px;
     color: #000;
-    height: 44px;
+    height: 48px;
+    line-height: 48px;
     min-width: 150px;
     align-items: center;
     justify-content: center;
@@ -137,10 +137,10 @@
 }
 
 .main_summary_duration {
-    margin-top: 6px;
     color: #B2B2B2;
     font-size: 24px;
-    line-height: 28px;
+    line-height: 36px;
+    height: 36px;
 }
 
 .main_summary_status {
@@ -217,11 +217,6 @@
     flex: 1;
 }
 
-.cell_arrow {
-    width: 34px;
-    height: 34px;
-}
-
 /*
 rn呼吸灯效果
 import React, { useEffect, useRef } from 'react';

+ 11 - 7
src/features/health/MainConsole.tsx

@@ -14,7 +14,7 @@ import showActionSheet from "@/components/basic/ActionSheet";
 import { rpxToPx } from "@/utils/tools";
 import { setMode, setShowActionTip } from "@/store/health";
 import { getCountownTime, getDuration, getScenario, getThemeColor, getWindowStatus } from "./hooks/health_hooks";
-import { IconCellArrow, IconMore, IconNotification, IconNotificationOff, IconSwitch } from "@/components/basic/Icons";
+import { IconArrow, IconMore, IconNotification, IconNotificationOff, IconSwitch } from "@/components/basic/Icons";
 import DurationPicker from "@/_health/components/duration_picker";
 import Taro from "@tarojs/taro";
 import { systemLocation } from "@/services/common";
@@ -192,7 +192,7 @@ export default function MainConsole(props: { type: WindowType }) {
         if (item.action && item.action != 'NA') {
             if (health.mode == 'FAST' || health.mode == 'SLEEP') {
                 if (item.action == 'POST_MOMENT') {
-                    return <IconCellArrow color='#B2B2B2' width={rpxToPx(34)} />
+                    return <IconArrow width={rpxToPx(34)} color={MainColorType.g03}/>
                 }
 
             }
@@ -945,11 +945,13 @@ export default function MainConsole(props: { type: WindowType }) {
         <Image className="main_arrow" src={require('@assets/images/center_arrow.png')} />
         <View className="main_summary">
             {/* <View className="main_summary_status" style={{ color: getThemeColor(health.mode) }}>{windowStatus()}</View> */}
-            <View className="main_summary_time" style={{ color: getWindowStatus(health.windows, health.mode) == WindowStatusType.upcoming ? '#B2B2B2' : '#000' }}>{getCountownTime(health.windows, health.mode)}
+            <View className="main_summary_time bold" style={{ 
+                marginTop:rpxToPx(14),
+                color: getWindowStatus(health.windows, health.mode) == WindowStatusType.upcoming ? '#B2B2B2' : '#000' }} >{getCountownTime(health.windows, health.mode)}
                 <View className={timePointClass()}
                     style={{ backgroundColor: getWindowStatus(health.windows, health.mode) == WindowStatusType.upcoming ? '#B2B2B2' : getThemeColor(health.mode) }} />
             </View>
-            <Text className="main_summary_duration" style={{ color: MainColorType.g01 }}>{getDuration(health.windows, health.mode)}</Text>
+            <Text className="main_summary_duration" style={{ color: MainColorType.g01,marginBottom:rpxToPx(30) }}>{getDuration(health.windows, health.mode)}</Text>
             <View className="border_footer_line" />
         </View>
         <View style={{ backgroundColor: '#fff', width: rpxToPx(750) }}>
@@ -1007,7 +1009,7 @@ export default function MainConsole(props: { type: WindowType }) {
                 }}>
                     <Image className="active_icon" src={require('@assets/_health/walk.png')} />
                     <Text className="active_text">Move More</Text>
-                    <Image className="cell_arrow" src={require('@assets/_health/cell_arrow.png')} />
+                    <IconArrow width={rpxToPx(34)} color={MainColorType.g03}/>
                 </View>
 
             </View>
@@ -1054,7 +1056,8 @@ export default function MainConsole(props: { type: WindowType }) {
                             marginRight:rpxToPx(12)
                         }}/>
                     }
-                    <IconCellArrow color='#B2B2B2' width={rpxToPx(34)} />
+                    <View style={{width:rpxToPx(12)}}/>
+                    <IconArrow width={rpxToPx(34)} color={MainColorType.g03}/>
                     {
                         health.mode == 'FAST' && <View className="border_footer_line" style={{ left: rpxToPx(100) }} />
                     }
@@ -1077,7 +1080,8 @@ export default function MainConsole(props: { type: WindowType }) {
                     {
                         longFastStatus()
                     }
-                    <IconCellArrow color='#B2B2B2' width={rpxToPx(34)} />
+                    <View style={{width:rpxToPx(12)}}/>
+                    <IconArrow width={rpxToPx(34)} color={MainColorType.g03}/>
                 </View>
 
             </View>

+ 3 - 3
src/features/health/MainDayNightCard.tsx

@@ -71,8 +71,8 @@ export default function MainDayNightCard(props: {
 
     const common: RingCommon = {
         useCase: 'ChooseScenario',
-        radius: 37,
-        lineWidth: 14,
+        radius: 23.5,
+        lineWidth: 13,
         isFast: true,
         status: 'WAIT_FOR_START'
     }
@@ -183,7 +183,7 @@ export default function MainDayNightCard(props: {
             />
     }
 
-    return <View onClick={() => props.onClick()} style={{ width: rpxToPx(750 / 3), display: 'flex', flexShrink: 0, flexDirection: 'column', alignItems: 'center', position: 'relative' }}>
+    return <View onClick={() => props.onClick()} style={{ width: rpxToPx(634 / 3), display: 'flex', flexShrink: 0, flexDirection: 'column', alignItems: 'center', position: 'relative' }}>
         <View style={{ position: 'relative' }}>
             {
                 ring()

+ 5 - 15
src/features/health/MainFastEatCard.tsx

@@ -127,8 +127,8 @@ export default function MainFastEatCard(props: {
 
     const common: RingCommon = {
         useCase: 'ChooseScenario',
-        radius: 37,
-        lineWidth: 14,
+        radius: 23.5,
+        lineWidth: 13,
         isFast: true,
         status: 'WAIT_FOR_START'
     }
@@ -202,7 +202,7 @@ export default function MainFastEatCard(props: {
 
             return {
                 color: status == WindowStatusType.upcoming ? '#B2B2B2' : isFastMode ? MainColorType.fast : MainColorType.eat,
-                lineWidth: 4,
+                lineWidth: 2,
                 borderColor: '#F5F5F5',
                 offset: 0
             }
@@ -210,15 +210,6 @@ export default function MainFastEatCard(props: {
         return null;
     }
 
-    function showDotAnimation() {
-        if (health.mode == 'FAST' || health.mode == 'EAT') {
-            const status = getWindowStatus(health.windows, isFastMode ? 'FAST' : 'EAT')
-            if (status == WindowStatusType.process) return true;
-        }
-
-        return false
-    }
-
     function ring() {
 
         return <Rings common={common}
@@ -228,7 +219,6 @@ export default function MainFastEatCard(props: {
             canvasId={'smal11l' + props.id}
             currentDot={currentDot()}
             scale={props.scale ?? 1.0}
-            showCurrentDotAnimation={showDotAnimation()}
         />
     }
 
@@ -390,9 +380,9 @@ export default function MainFastEatCard(props: {
     if (!fastData)
         return <View />
 
-    return <View style={{ alignItems: 'center', display: 'flex', flexDirection: 'column', width: rpxToPx(750 / 3), flexShrink: 0 }} onClick={() => props.onClick()}>
+    return <View style={{ alignItems: 'center', display: 'flex', flexDirection: 'column', width: rpxToPx(634 / 3), flexShrink: 0 }} onClick={() => props.onClick()}>
 
-        <View style={{ width: rpxToPx(750 / 3), }} />
+        <View style={{ width: rpxToPx(634 / 3), }} />
         <View style={{ position: 'relative', }}>
             {
                 ring()

+ 8 - 1
src/features/health/MainHistory.tsx

@@ -118,7 +118,14 @@ export default function MainHistory(props: { type?: string, fast_type?: string }
             </View>
         }
         {
-            health.mode == 'EAT' && health.eatArchived && health.eatArchived.archived && <View className="recent" style={{ justifyContent: 'center' }}>
+            health.mode == 'EAT' && health.eatArchived && health.eatArchived.archived && <View style={{ 
+                display:'flex',
+                flexDirection:'column',
+                alignItems:'center',
+                paddingTop:rpxToPx(52),
+                paddingBottom:rpxToPx(38),
+                backgroundColor:'#fff'
+             }}>
                 <View className="archived_bg" onClick={() => {
                     jumpPage('/_health/pages/archive')
                 }}>

+ 3 - 3
src/features/health/MainSleepActiveCard.tsx

@@ -55,8 +55,8 @@ export default function MainSleepActiveCard(props: {
 
     const common: RingCommon = {
         useCase: 'ChooseScenario',
-        radius: 37,
-        lineWidth: 14,
+        radius: 23.5,
+        lineWidth: 13,
         isFast: true,
         status: 'WAIT_FOR_START'
     }
@@ -164,7 +164,7 @@ export default function MainSleepActiveCard(props: {
             />
     }
 
-    return <View style={{ width: rpxToPx(750 / 3), display: 'flex', flexShrink: 0, flexDirection: 'column', alignItems: 'center' }} onClick={() => props.onClick()}>
+    return <View style={{ width: rpxToPx(634 / 3), display: 'flex', flexShrink: 0, flexDirection: 'column', alignItems: 'center' }} onClick={() => props.onClick()}>
         <View style={{ position: 'relative', alignItems: 'center', display: 'flex', flexDirection: 'column' }}>
             <View className="demo_scale">
                 {

+ 30 - 29
src/features/health/MainSwiper.tsx

@@ -13,14 +13,15 @@ import dayjs from "dayjs";
 
 
 let scrollPage = 0;
+let maxScale = 0.66
 export default function MainSwiper(props: { count: number, pageChanged: Function, typeChanged: Function }) {
     const [current, setCurrent] = useState(1)
     const [type, setType] = useState(WindowType.day)
     const health = useSelector((state: any) => state.health);
 
     const [scale0, setScale0] = useState(1.0)
-    const [scale1, setScale1] = useState(0.8)
-    const [scale2, setScale2] = useState(0.8)
+    const [scale1, setScale1] = useState(maxScale)
+    const [scale2, setScale2] = useState(maxScale)
     const dispatch = useDispatch()
 
     useEffect(()=>{
@@ -68,23 +69,23 @@ export default function MainSwiper(props: { count: number, pageChanged: Function
                 case 3:
                     {
                         scale0 = 1 - Math.abs(x) / pageWidth * 0.2
-                        scale1 = x > 0 ? 1 - (pageWidth - x) / pageWidth * 0.2 : 0.8
-                        scale2 = x < 0 ? 1 - (pageWidth + x) / pageWidth * 0.2 : 0.8
+                        scale1 = x > 0 ? 1 - (pageWidth - x) / pageWidth * 0.2 : maxScale
+                        scale2 = x < 0 ? 1 - (pageWidth + x) / pageWidth * 0.2 : maxScale
                     }
                     break;
                 case 1:
                 case 4:
                     {
-                        scale0 = x < 0 ? 1 - (pageWidth + x) / pageWidth * 0.2 : 0.8
+                        scale0 = x < 0 ? 1 - (pageWidth + x) / pageWidth * 0.2 : maxScale
                         scale1 = 1 - Math.abs(x) / pageWidth * 0.2
-                        scale2 = x > 0 ? 1 - (pageWidth - x) / pageWidth * 0.2 : 0.8
+                        scale2 = x > 0 ? 1 - (pageWidth - x) / pageWidth * 0.2 : maxScale
                     }
                     break;
                 case 2:
                 case 5:
                     {
-                        scale0 = x > 0 ? 1 - (pageWidth - x) / pageWidth * 0.2 : 0.8
-                        scale1 = x < 0 ? 1 - (pageWidth + x) / pageWidth * 0.2 : 0.8
+                        scale0 = x > 0 ? 1 - (pageWidth - x) / pageWidth * 0.2 : maxScale
+                        scale1 = x < 0 ? 1 - (pageWidth + x) / pageWidth * 0.2 : maxScale
                         scale2 = 1 - Math.abs(x) / pageWidth * 0.2
                     }
                     break;
@@ -96,23 +97,23 @@ export default function MainSwiper(props: { count: number, pageChanged: Function
                 case 3:
                     {
                         scale1 = 1 - (Math.abs(x) - pageWidth) / pageWidth * 0.2
-                        scale2 = x > 0 ? 1 - (pageWidth - x + pageWidth) / pageWidth * 0.2 : 0.8
-                        scale0 = x < 0 ? 1 - (pageWidth + x + pageWidth) / pageWidth * 0.2 : 0.8
+                        scale2 = x > 0 ? 1 - (pageWidth - x + pageWidth) / pageWidth * 0.2 : maxScale
+                        scale0 = x < 0 ? 1 - (pageWidth + x + pageWidth) / pageWidth * 0.2 : maxScale
                     }
                     break;
                 case 1:
                 case 4:
                     {
-                        scale1 = x < 0 ? 1 - (pageWidth + x + pageWidth) / pageWidth * 0.2 : 0.8
+                        scale1 = x < 0 ? 1 - (pageWidth + x + pageWidth) / pageWidth * 0.2 : maxScale
                         scale2 = 1 - (Math.abs(x) - pageWidth) / pageWidth * 0.2
-                        scale0 = x > 0 ? 1 - (pageWidth - x + pageWidth) / pageWidth * 0.2 : 0.8
+                        scale0 = x > 0 ? 1 - (pageWidth - x + pageWidth) / pageWidth * 0.2 : maxScale
                     }
                     break;
                 case 2:
                 case 5:
                     {
-                        scale1 = x > 0 ? 1 - (pageWidth - x + pageWidth) / pageWidth * 0.2 : 0.8
-                        scale2 = x < 0 ? 1 - (pageWidth + x + pageWidth) / pageWidth * 0.2 : 0.8
+                        scale1 = x > 0 ? 1 - (pageWidth - x + pageWidth) / pageWidth * 0.2 : maxScale
+                        scale2 = x < 0 ? 1 - (pageWidth + x + pageWidth) / pageWidth * 0.2 : maxScale
                         scale0 = 1 - (Math.abs(x) - pageWidth) / pageWidth * 0.2
                     }
                     break;
@@ -124,23 +125,23 @@ export default function MainSwiper(props: { count: number, pageChanged: Function
                 case 3:
                     {
                         scale2 = 1 - (Math.abs(x) - pageWidth * 2) / pageWidth * 0.2
-                        scale0 = x > 0 ? 1 - (pageWidth - x + pageWidth * 2) / pageWidth * 0.2 : 0.8
-                        scale1 = x < 0 ? 1 - (pageWidth + x + pageWidth * 2) / pageWidth * 0.2 : 0.8
+                        scale0 = x > 0 ? 1 - (pageWidth - x + pageWidth * 2) / pageWidth * 0.2 : maxScale
+                        scale1 = x < 0 ? 1 - (pageWidth + x + pageWidth * 2) / pageWidth * 0.2 : maxScale
                     }
                     break;
                 case 1:
                 case 4:
                     {
-                        scale2 = x < 0 ? 1 - (pageWidth + x + pageWidth * 2) / pageWidth * 0.2 : 0.8
+                        scale2 = x < 0 ? 1 - (pageWidth + x + pageWidth * 2) / pageWidth * 0.2 : maxScale
                         scale0 = 1 - (Math.abs(x) - pageWidth * 2) / pageWidth * 0.2
-                        scale1 = x > 0 ? 1 - (pageWidth - x + pageWidth * 2) / pageWidth * 0.2 : 0.8
+                        scale1 = x > 0 ? 1 - (pageWidth - x + pageWidth * 2) / pageWidth * 0.2 : maxScale
                     }
                     break;
                 case 2:
                 case 5:
                     {
-                        scale2 = x > 0 ? 1 - (pageWidth - x + pageWidth * 2) / pageWidth * 0.2 : 0.8
-                        scale0 = x < 0 ? 1 - (pageWidth + x + pageWidth * 2) / pageWidth * 0.2 : 0.8
+                        scale2 = x > 0 ? 1 - (pageWidth - x + pageWidth * 2) / pageWidth * 0.2 : maxScale
+                        scale0 = x < 0 ? 1 - (pageWidth + x + pageWidth * 2) / pageWidth * 0.2 : maxScale
                         scale1 = 1 - (Math.abs(x) - pageWidth * 2) / pageWidth * 0.2
                     }
                     break;
@@ -194,13 +195,13 @@ export default function MainSwiper(props: { count: number, pageChanged: Function
         <Swiper
             onTransition={onTransition}
             onAnimationFinish={onTransitionend}
-            style={{ height: 140, width: rpxToPx(750) }} circular
-            previousMargin={rpxToPx(250)}
-            nextMargin={rpxToPx(250)}
+            style={{ height: 110, width: rpxToPx(634) }} circular
+            previousMargin={rpxToPx(634/3)}
+            nextMargin={rpxToPx(634/3)}
             onChange={pageChanged}
             current={current}>
             <SwiperItem>
-                <MainDayNightCard scale={current == 0 ? 1 : 0.8} count={props.count} typeChanged={typeChanged} id={1} onClick={() => {
+                <MainDayNightCard scale={current == 0 ? 1 : maxScale} count={props.count} typeChanged={typeChanged} id={1} onClick={() => {
 
                     if (current == 0) {
                         switchMode()
@@ -211,7 +212,7 @@ export default function MainSwiper(props: { count: number, pageChanged: Function
                 }} />
             </SwiperItem>
             <SwiperItem>
-                <MainFastEatCard scale={current == 1 ? 1 : 0.8} count={props.count} typeChanged={typeChanged} id={2} onClick={() => {
+                <MainFastEatCard scale={current == 1 ? 1 : maxScale} count={props.count} typeChanged={typeChanged} id={2} onClick={() => {
                     if (current == 1) {
                         switchMode()
                     }
@@ -221,7 +222,7 @@ export default function MainSwiper(props: { count: number, pageChanged: Function
                 }} />
             </SwiperItem>
             <SwiperItem>
-                <MainSleepActiveCard scale={current == 2 ? 1 : 0.8} count={props.count} typeChanged={typeChanged} id={3} onClick={() => {
+                <MainSleepActiveCard scale={current == 2 ? 1 : maxScale} count={props.count} typeChanged={typeChanged} id={3} onClick={() => {
                     if (current == 2) {
                         switchMode()
                     }
@@ -231,17 +232,17 @@ export default function MainSwiper(props: { count: number, pageChanged: Function
                 }} />
             </SwiperItem>
             {/* <SwiperItem>
-                <MainDayNightCard scale={current==3?1:0.8} count={props.count} typeChanged={typeChanged} id={7} onClick={() => {
+                <MainDayNightCard scale={current==3?1:maxScale} count={props.count} typeChanged={typeChanged} id={7} onClick={() => {
                     setCurrent(3)
                 }} />
             </SwiperItem>
             <SwiperItem>
-                <MainFastEatCard scale={current==4?1:0.8} count={props.count} typeChanged={typeChanged} id={8} onClick={() => {
+                <MainFastEatCard scale={current==4?1:maxScale} count={props.count} typeChanged={typeChanged} id={8} onClick={() => {
                     setCurrent(4)
                 }} />
             </SwiperItem>
             <SwiperItem>
-                <MainSleepActiveCard scale={current==5?1:0.8} count={props.count} typeChanged={typeChanged} id={9} onClick={() => {
+                <MainSleepActiveCard scale={current==5?1:maxScale} count={props.count} typeChanged={typeChanged} id={9} onClick={() => {
                     setCurrent(5)
                 }} />
             </SwiperItem> */}

+ 5 - 5
src/features/trackTimeDuration/components/Rings.weapp.tsx

@@ -339,11 +339,11 @@ export default function Rings(props: {
             const yPrime = center + r * Math.sin(radians);
 
             ctx.beginPath();
-            var dotLineWidth = 2
-            if (lineWidth == 28) {
-                dotLineWidth = 4
+            var dotLineWidth = 1
+            // if (lineWidth == 28) {
+            //     dotLineWidth = 4
 
-            }
+            // }
             ctx.arc(xPrime, yPrime, lineWidth / 2.0 + dotLineWidth / 2, 0, 2 * Math.PI);
             ctx.lineWidth = dotLineWidth;
             ctx.fillStyle = props.currentDot.borderColor
@@ -356,7 +356,7 @@ export default function Rings(props: {
                 ctx.beginPath();
                 // ctx.translate(xPrime, yPrime)
                 ctx.arc(xPrime, yPrime, lineWidth / 2 * dotScale, 0, 2 * Math.PI, false);
-                ctx.globalAlpha = dotAlpha//alphaRef.current
+                // ctx.globalAlpha = dotAlpha//alphaRef.current
                 // ctx.scale(scaleRef.current,scaleRef.current)
                 // ctx.translate(-xPrime, -yPrime)
                 ctx.fillStyle = props.currentDot.color;

+ 1 - 1
src/pages/clock/Clock.tsx

@@ -172,7 +172,7 @@ export default function Clock() {
                 confirm={() => { }}>
                 <View style={{ display: 'flex', flexDirection: 'column' }}>
                     <View style={{ height: navigationBarHeight }} />
-                    <Calendar year={2024} month={9} />
+                    <Calendar year={2024} month={10} />
                 </View>
             </Streak>
         }

+ 12 - 13
src/pages/clock/ClockNew.tsx

@@ -28,6 +28,7 @@ export default function ClockNew() {
     const health = useSelector((state: any) => state.health);
     const [type, setType] = useState(WindowType.day)
     const [showCalendar, setShowCalendar] = useState(false)
+    const [isPulling,setIsPulling] = useState(false)
     const healthRef = useRef(health)
     const dispatch = useDispatch();
     global.dispatch = dispatch;
@@ -121,6 +122,8 @@ export default function ClockNew() {
             dispatch(setWindows((res as any).windows))
             dispatch(setLongFast((res as any).long_fast))
             dispatch(setRefreshs((res as any).refresh_timestamps))
+
+            setIsPulling(false)
         })
         archived()
     }
@@ -156,7 +159,15 @@ export default function ClockNew() {
         if (!health.windows) {
             return <View />
         }
-        return <ScrollView style='height:100vh' scrollY onScroll={e => {
+        return <ScrollView style='height:100vh' 
+        refresherEnabled
+        refresherBackground={MainColorType.g05}
+        onRefresherRefresh={()=>{
+            global.refreshWindow()
+            setIsPulling(true)
+        }}
+        refresherTriggered={isPulling}
+        scrollY onScroll={e => {
             if (e.detail.scrollTop > 240) {
                 dispatch(setTitle(health.mode))
             }
@@ -166,18 +177,6 @@ export default function ClockNew() {
         }}>
             <MainSwiper count={count} pageChanged={pageChanged} typeChanged={typeChanged} />
             <MainConsole type={type} />
-            {/* <View onClick={() => {
-                setShowCalendar(true)
-            }}>Show Calendar</View> */}
-            {/* <NewButton color={getThemeColor('SLEEP')}/> */}
-            {/* <View style={{ backgroundColor: '#fff' }}>
-                <NewButton type={NewButtonType.fill} color={getThemeColor('SLEEP')} title="hello world" onClick={()=>{}}/>
-                <NewButton type={NewButtonType.alpha} color={getThemeColor('SLEEP')} title="hello world" onClick={()=>{}}/>
-                <NewButton type={NewButtonType.fill} color={getThemeColor('SLEEP')} disable title="hello world" />
-                <NewButton type={NewButtonType.alpha} color={getThemeColor('SLEEP')} disable title="hello world" />
-                <NewButton type={NewButtonType.border} color={getThemeColor('SLEEP')} title="hello world" onClick={()=>{}}/>
-                <NewButton type={NewButtonType.border} color={getThemeColor('SLEEP')} disable title="hello world" />s
-            </View> */}
 
             <MainHistory />
             <View style={{ height: 200 }} />

Some files were not shown because too many files changed in this diff