leon 1 vuosi sitten
vanhempi
commit
211f1087ed
59 muutettua tiedostoa jossa 539 lisäystä ja 372 poistoa
  1. 24 12
      src/_health/base/new_button.tsx
  2. 19 5
      src/_health/base/status_indicator.tsx
  3. 3 1
      src/_health/components/choose_date_time.tsx
  4. 1 1
      src/_health/components/console_cell.scss
  5. 3 3
      src/_health/components/console_cell.tsx
  6. 15 0
      src/_health/components/cover_list.scss
  7. 18 0
      src/_health/components/cover_list.tsx
  8. 6 6
      src/_health/components/fast_sleep_console.tsx
  9. 2 2
      src/_health/components/icon_title_cell.tsx
  10. 3 2
      src/_health/components/no_record.scss
  11. 3 3
      src/_health/components/no_record.tsx
  12. 1 0
      src/_health/components/post_moment_time.tsx
  13. 4 1
      src/_health/components/sticky_date_list.tsx
  14. 0 0
      src/_health/components/time_title_desc.scss
  15. 19 0
      src/_health/components/time_title_desc.tsx
  16. 13 12
      src/_health/pages/add_moment.tsx
  17. 1 1
      src/_health/pages/guide_active.tsx
  18. 1 1
      src/_health/pages/guide_eat.tsx
  19. 1 1
      src/_health/pages/guide_full.tsx
  20. 72 21
      src/_health/pages/log_time.tsx
  21. 0 14
      src/_health/pages/long_fast_setting.scss
  22. 35 34
      src/_health/pages/long_fast_setting.tsx
  23. 6 6
      src/_health/pages/move.tsx
  24. 3 2
      src/_health/pages/move_detail.tsx
  25. 2 2
      src/_health/pages/post_result.tsx
  26. 3 3
      src/_health/pages/schedules.tsx
  27. 1 7
      src/_health/pages/timeline_detail.scss
  28. 40 35
      src/_health/pages/timeline_detail.tsx
  29. 21 2
      src/app.scss
  30. BIN
      src/assets/_health/main_logo.png
  31. BIN
      src/assets/_health/navi_back.png
  32. BIN
      src/assets/_health/setting_album.png
  33. BIN
      src/assets/_health/setting_body.png
  34. BIN
      src/assets/_health/setting_calendar.png
  35. BIN
      src/assets/_health/setting_chart.png
  36. BIN
      src/assets/_health/setting_journal.png
  37. BIN
      src/assets/_health/setting_more.png
  38. BIN
      src/assets/_health/setting_streak.png
  39. BIN
      src/assets/_health/sit.png
  40. BIN
      src/assets/_health/walk.png
  41. BIN
      src/assets/_health/walk2.png
  42. 13 0
      src/components/basic/Icons.tsx
  43. 9 21
      src/features/health/History.scss
  44. 36 26
      src/features/health/HistoryItem.tsx
  45. 2 3
      src/features/health/MainConsole.scss
  46. 7 7
      src/features/health/MainConsole.tsx
  47. 16 22
      src/features/health/MainHistory.tsx
  48. 2 2
      src/features/health/Streak.scss
  49. 1 1
      src/features/health/Streak.tsx
  50. 1 1
      src/features/journal/components/journal_cover.tsx
  51. 12 8
      src/pages/account/Album.tsx
  52. 2 1
      src/pages/account/ChooseAuth.config.ts
  53. 1 1
      src/pages/account/ChooseAuth.scss
  54. 30 8
      src/pages/account/ChooseAuth.tsx
  55. 37 32
      src/pages/account/Journal.tsx
  56. 3 9
      src/pages/account/JournalDetail.scss
  57. 34 39
      src/pages/account/JournalDetail.tsx
  58. 2 3
      src/pages/account/Profile.scss
  59. 11 11
      src/pages/account/Profile.tsx

+ 24 - 12
src/_health/base/new_button.tsx

@@ -1,6 +1,6 @@
 import { View, Text } from '@tarojs/components'
 import './new_button.scss'
-import { rpxToPx } from '@/utils/tools';
+import { rpxToPx, vibrate } from '@/utils/tools';
 import { useState } from 'react';
 import { IconMore } from '@/components/basic/Icons';
 import { MainColorType } from '@/context/themes/color';
@@ -73,6 +73,7 @@ export default function NewButton(props: {
     height?: number,
     fontSize?: number,
     bold?: boolean,
+    fontNormal?:boolean,
     labelBorder?: boolean,
     btnStyle?: any,
 }) {
@@ -88,7 +89,7 @@ export default function NewButton(props: {
                 backgroundColor: isTouched ? hexToHSL(props.color) : props.disable ? '#B2B2B2' : props.color,
                 color: '#fff',
                 fontSize: props.fontSize ?? rpxToPx(30),
-                fontWeight: 'bold',//props.bold ? 'bold' : 'normal',
+                fontWeight: props.fontNormal?'normal':'bold',//props.bold ? 'bold' : 'normal',
                 display: 'flex',
                 alignItems: 'center',
                 justifyContent: 'center',
@@ -104,7 +105,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: 'bold',//props.bold ? 'bold' : 'normal',
+                fontWeight: props.fontNormal?'normal':'bold',//props.bold ? 'bold' : 'normal',
                 display: 'flex',
                 alignItems: 'center',
                 justifyContent: 'center',
@@ -122,7 +123,7 @@ export default function NewButton(props: {
                 backgroundColor: isTouched ? props.color + '26' : 'transparent',
                 color: props.disable ? '#b2b2b2' : props.color,
                 fontSize: props.fontSize ?? rpxToPx(30),
-                fontWeight: 'bold',//props.bold ? 'bold' : 'normal',
+                fontWeight: props.fontNormal?'normal':'bold',//props.bold ? 'bold' : 'normal',
                 display: 'flex',
                 alignItems: 'center',
                 justifyContent: 'center',
@@ -140,7 +141,7 @@ export default function NewButton(props: {
                 backgroundColor: isTouched ? '#b2b2b240' : '#b2b2b210',
                 color: props.disable ? '#b2b2b2' : '#000000',
                 fontSize: props.fontSize ?? rpxToPx(30),
-                fontWeight: 'bold',//props.bold ? 'bold' : 'normal',
+                fontWeight: props.fontNormal?'normal':'bold',//props.bold ? 'bold' : 'normal',
                 display: 'flex',
                 alignItems: 'center',
                 justifyContent: 'center',
@@ -168,7 +169,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',
+                fontWeight: props.fontNormal?'normal':'bold',
                 display: 'flex',
                 alignItems: 'center',
                 justifyContent: 'center',
@@ -196,7 +197,7 @@ export default function NewButton(props: {
                 alignItems: 'center',
                 justifyContent: 'center',
                 fontSize: rpxToPx(28),
-                fontWeight: props.bold ? 'bold' : 'normal',
+                fontWeight: props.fontNormal?'normal':'bold',
                 paddingLeft: rpxToPx(24),
                 paddingRight: rpxToPx(24),
                 boxSizing: 'border-box',
@@ -223,7 +224,10 @@ export default function NewButton(props: {
                     if (process.env.TARO_ENV == 'weapp') {
                         e.stopPropagation()
                     }
-                    if (props.disable) return
+                    if (props.disable) {
+                        vibrate();
+                        return;
+                    }
                     props.onClick()
                 }}
                 onTouchStart={(e) => {
@@ -247,14 +251,19 @@ export default function NewButton(props: {
                 if (process.env.TARO_ENV == 'weapp') {
                     e.stopPropagation()
                 }
-                if (props.disable) return
+                if (props.disable) {
+                    vibrate();
+                    return;
+                }
                 props.onClick()
             }}
                 onTouchStart={(e) => {
                     if (process.env.TARO_ENV == 'weapp') {
                         e.stopPropagation()
                     }
-                    if (props.disable) return
+                    if (props.disable) {
+                        return;
+                    }
                     setIsTouched(true)
                 }}
                 onTouchEnd={(e) => {
@@ -268,13 +277,16 @@ export default function NewButton(props: {
     }
 
     return <View
-        style={{ ...style, ...props.btnStyle, fontWeight: props.type==NewButtonType.link ?  'normal':'bold' , display: 'flex', flexDirection: 'row', alignItems: 'center' }}
+        style={{ ...style, ...props.btnStyle,  display: 'flex', flexDirection: 'row', alignItems: 'center' }}
         catchMove
         onClick={(e) => {
             if (process.env.TARO_ENV == 'weapp') {
                 e.stopPropagation()
             }
-            if (props.disable)  return
+            if (props.disable) {
+                vibrate();
+                return;
+            }
             props.onClick()
         }}
         onTouchStart={(e) => {

+ 19 - 5
src/_health/base/status_indicator.tsx

@@ -8,7 +8,7 @@ export enum StatusType {
     normal = 'normal',
     ing = 'ing',
     img = 'img',
-    missed = 'missed'
+    console='console'
 }
 export default function StatusIndicator(props: {
     type: StatusType,
@@ -17,7 +17,7 @@ export default function StatusIndicator(props: {
     children?: any,
     fontColor?: string,
     fontSize?: number
-
+    defaultSpace?:boolean
 }) {
 
     function indicator() {
@@ -49,6 +49,20 @@ export default function StatusIndicator(props: {
                         props.children
                     }
                 </View>
+            case StatusType.console:
+                return <View style={{
+                    width: rpxToPx(32),
+                    height: rpxToPx(32),
+                    borderRadius: rpxToPx(16),
+                    backgroundColor: props.color,
+                    display: 'flex',
+                    alignItems: 'center',
+                    justifyContent: 'center'
+                }}>
+                    {
+                        props.children
+                    }
+                </View>
         }
         return <View />
     }
@@ -60,8 +74,8 @@ export default function StatusIndicator(props: {
 
     }}>
         <View style={{
-            width: rpxToPx(26),
-            height: rpxToPx(26),
+            width: props.type==StatusType.console?rpxToPx(32):rpxToPx(26),
+            height: props.type==StatusType.console?rpxToPx(32):rpxToPx(26),
             display: 'flex',
             alignItems: 'center',
             justifyContent: 'center',
@@ -76,7 +90,7 @@ export default function StatusIndicator(props: {
             props.text && <View className='h20' style={{
                 color: props.fontColor ? props.fontColor : MainColorType.g01,
                 fontSize: props.fontSize ? props.fontSize : rpxToPx(20),
-                marginLeft: rpxToPx(8)
+                marginLeft: props.type==StatusType.console?rpxToPx(24):props.defaultSpace?rpxToPx(12):rpxToPx(6)
             }}>{props.text}</View>
         }
     </View>

+ 3 - 1
src/_health/components/choose_date_time.tsx

@@ -70,6 +70,7 @@ export default function ChooseDateTime(props: {
                     width={rpxToPx(196)}
                     height={rpxToPx(84)}
                     disable={props.disable}
+                    fontNormal
                     onClick={() => {
                         setChooseDate(true)
                         if (props.choose) {
@@ -98,6 +99,7 @@ export default function ChooseDateTime(props: {
                     width={rpxToPx(136)}
                     height={rpxToPx(84)}
                     disable={props.disable}
+                    fontNormal
                     onClick={() => {
                         setChooseDate(false)
                         if (props.choose) {
@@ -138,7 +140,7 @@ export default function ChooseDateTime(props: {
             </View>
         }
         {
-            props.expand && chooseDate && <View className='card_footer' />
+            props.expand && chooseDate && !props.hideFooter && <View className='card_footer' />
         }
         {
             props.expand && !chooseDate && <View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', width: rpxToPx(698), height: rpxToPx(340) }}>

+ 1 - 1
src/_health/components/console_cell.scss

@@ -4,7 +4,7 @@
     align-items: center;
     padding-right: 40px;
     position: relative;
-    padding-left: 52px;
+    padding-left: 42px;
     background-color: #fff;
     width: 750px;
     box-sizing: border-box;

+ 3 - 3
src/_health/components/console_cell.tsx

@@ -26,11 +26,11 @@ export default function ConsoleCell(props: {
                     props.status
                 }
                 {
-                    props.title ? <View className='h34' style={{ lineHeight: rpxToPx(46) + 'px' }}>{props.title}</View> : props.titleComponent
+                    props.title ? <View className='h34' style={{ lineHeight: rpxToPx(46) + 'px',marginLeft:rpxToPx(56) }}>{props.title}</View> : props.titleComponent
                 }
 
                 {
-                    props.description && <Text className='h24 g02 timeline_desc'>{props.description}{props.subDesc}</Text>
+                    props.description && <Text className='h24 g02 timeline_desc' style={{marginLeft:rpxToPx(56)}}>{props.description}{props.subDesc}</Text>
                 }
                 <View style={{
                     height: props.description ? rpxToPx(28) : rpxToPx(54), flexShrink: 0,
@@ -40,7 +40,7 @@ export default function ConsoleCell(props: {
                 props.right
             }
             {
-                props.showLine && <View className="border_footer_line" style={{ left: props.fullLine ? -rpxToPx(52) : rpxToPx(52) }} />
+                props.showLine && <View className="border_footer_line" style={{ left: props.fullLine ? -rpxToPx(42) : rpxToPx(98) }} />
             }
 
         </View>

+ 15 - 0
src/_health/components/cover_list.scss

@@ -0,0 +1,15 @@
+.media {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    margin-bottom: 16px;
+    flex-shrink: 0;
+    flex: 1;
+}
+
+.media_item {
+    width: 155px;
+    height: 155px;
+    margin-right: 4px;
+    margin-bottom: 4px;
+}

+ 18 - 0
src/_health/components/cover_list.tsx

@@ -0,0 +1,18 @@
+import { View, Image } from "@tarojs/components";
+import Taro from "@tarojs/taro";
+import './cover_list.scss'
+
+export default function CoverList(props: { imgs: any, count: number }) {
+    return <View className="media" style={{ marginRight: props.count == 4 ? 80 : 0 }}>
+        {
+            props.imgs.map((obj, j) => {
+                return <Image className="media_item" mode="aspectFill" onClick={() => {
+                    Taro.previewImage({
+                        current: obj,
+                        urls: props.imgs
+                    })
+                }} src={obj} key={j * 10} />
+            })
+        }
+    </View>
+}

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

@@ -136,21 +136,20 @@ export default function FastSleepConsole(props: { step: number, data: any, del:
         if (finish) {
             color = MainColorType.g03
         }
-
         return color;
     }
 
     function processIcon(item, finish, isError) {
         if (isError) {
-            return <Image style={{ width: rpxToPx(20), height: rpxToPx(20) }} src={require('@assets/_health/tip_error.png')} />
+            return <Image style={{ width: rpxToPx(24), height: rpxToPx(24) }} src={require('@assets/_health/tip_error.png')} />
         }
         if (finish) {
-            return <Image style={{ width: rpxToPx(20), height: rpxToPx(20) }} src={require('@assets/_health/checked.png')} />
+            return <Image style={{ width: rpxToPx(24), height: rpxToPx(24) }} src={require('@assets/_health/checked.png')} />
         }
         if (item.timeline.reminder) {
-            return <IconNotification color="#fff" width={rpxToPx(20)} />
+            return <IconNotification color="#fff" width={rpxToPx(24)} />
         }
-        return <IconNotificationOff color="#fff" width={rpxToPx(20)} />
+        return <IconNotificationOff color="#fff" width={rpxToPx(24)} />
     }
 
     function actionList() {
@@ -302,9 +301,10 @@ export default function FastSleepConsole(props: { step: number, data: any, del:
 
         return <ConsoleCell
             status={
-            <StatusIndicator type={StatusType.img}
+            <StatusIndicator type={StatusType.console}
             color={isError ? MainColorType.error : getIconColor(index, finish)}
             fontColor={ isError ? MainColorType.error : MainColorType.g01 }
+            fontSize={rpxToPx(24)}
             text={time}
             >{
                 processIcon(item, finish, isError)

+ 2 - 2
src/_health/components/icon_title_cell.tsx

@@ -37,14 +37,14 @@ export default function IconTitleCell(props: {
             {
                 props.icon
             }
-            <View className="h34" style={{ flex: 1 }}>{props.title}</View>
+            <View className="h34" style={{ flex: 1,marginLeft:rpxToPx(22) }}>{props.title}</View>
             {
                 props.desc
             }
             <View style={{ width: rpxToPx(12) }} />
             <IconArrow width={rpxToPx(34)} color={MainColorType.g03} />
             {
-                props.showLine && <View className="border_footer_line" style={{ left: rpxToPx(100) }} />
+                props.showLine && <View className="border_footer_line" style={{ left: rpxToPx(98) }} />
             }
 
         </View>

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

@@ -4,7 +4,8 @@
     flex-direction: column;
     align-items: center;
     box-sizing: border-box;
-    padding-top: 80px;
-    padding-bottom: 80px;
+    height: 750px;
+    // padding-top: 80px;
+    // padding-bottom: 80px;
     flex-shrink: 0;
 }

+ 3 - 3
src/_health/components/no_record.tsx

@@ -5,8 +5,8 @@ import { MainColorType } from "@/context/themes/color";
 
 export default function NoRecord(){
     return <View className="no_more_bg">
-        <Image style={{width:rpxToPx(160),height:rpxToPx(160)}} src={require('@assets/_health/null.png')}/>
-        <View style={{height:rpxToPx(40)}}/>
-        <View className="h26" style={{color:MainColorType.g02}}>暂无数据</View>
+        {/* <Image style={{width:rpxToPx(160),height:rpxToPx(160)}} src={require('@assets/_health/null.png')}/> */}
+        <View style={{height:'40%'}}/>
+        <View className="h44 bold" style={{color:MainColorType.g02}}>暂无数据</View>
     </View>
 }

+ 1 - 0
src/_health/components/post_moment_time.tsx

@@ -92,6 +92,7 @@ export default function PostMomentTime(props: {
                             color={getThemeColor(health.mode)}
                             title={durationTime()}
                             height={rpxToPx(84)}
+                            fontNormal
                             onClick={() => {
                                 setShowDurationPicker(true)
                             }}

+ 4 - 1
src/_health/components/sticky_date_list.tsx

@@ -27,7 +27,10 @@ export default function StickyDateList(props: {
             zIndex: 1,
             opacity: props.showDate ? 1 : 0,
             color: MainColorType.g01
-        }}>{props.date}</View>
+        }}>{props.date}
+            <View className="border_header_line"/>
+            <View className="border_footer_line" />
+        </View>
         <ScrollView style='height:100vh'
             scrollY
             refresherEnabled

+ 0 - 0
src/_health/components/time_title_desc.scss


+ 19 - 0
src/_health/components/time_title_desc.tsx

@@ -0,0 +1,19 @@
+import { MainColorType } from "@/context/themes/color";
+import { rpxToPx } from "@/utils/tools";
+import { Text } from "@tarojs/components";
+
+export default function TimeTitleDesc(props: { time: string, dayTag?: string, title?: string, desc?: string, className?: string,key?:any,style?:any }) {
+    return <Text key={props.key} className={props.className} style={{ fontSize: rpxToPx(32), lineHeight: rpxToPx(48) + 'px',...props.style }}>
+        <Text style={{ color: MainColorType.link }}>{props.time}</Text>
+        {
+            props.dayTag && <Text style={{color: MainColorType.link, fontSize: 9, lineHeight: '20px', fontWeight: 'bold', verticalAlign: 'text-top' }}>{props.dayTag}</Text>
+        }
+        <Text> {' '} </Text>
+        {
+            props.title && <Text style={{ color: '#000' }}> {props.title} </Text>
+        }
+        {
+            props.desc && <Text style={{ color: '#000' }}> {props.desc} </Text>
+        }
+    </Text>
+}

+ 13 - 12
src/_health/pages/add_moment.tsx

@@ -63,7 +63,7 @@ export default function AddMoment() {
     }
 
     const [time, setTime] = useState(dayjs().format('HH:mm'))
-    const [selDate,setSelDate] = useState(dayjs().format('YYYY-MM-DD'))
+    const [selDate, setSelDate] = useState(dayjs().format('YYYY-MM-DD'))
     const [title, setTitle] = useState(router.params.title)
 
     const { event_id, is_temp, schedule_id } = router.params
@@ -139,7 +139,7 @@ export default function AddMoment() {
         // }
         // debugger
 
-        var date = new Date(selDate+' '+time+':00')
+        var date = new Date(selDate + ' ' + time + ':00')
 
         var params: any = {
             schedule_id: schedule_id,
@@ -306,18 +306,18 @@ export default function AddMoment() {
         return <View></View>
     }
 
-    function getDate(){
+    function getDate() {
         var sel = dayjs(selDate)
         var now = dayjs().format('YYYY-MM-DD')
         const yesterday = dayjs().subtract(1, 'day');
-        if (sel.format('YYYY-MM-DD')==now){
+        if (sel.format('YYYY-MM-DD') == now) {
             return ''
         }
-        if (yesterday.format('YYYY-MM-DD') == sel.format('YYYY-MM-DD')){
-            return global.languange=='en'?'Yesterday ':'昨天 '
+        if (yesterday.format('YYYY-MM-DD') == sel.format('YYYY-MM-DD')) {
+            return global.languange == 'en' ? 'Yesterday ' : '昨天 '
         }
         else {
-            return global.languange=='en'?sel.format('MMM D '):sel.format('MMMD日 ')
+            return global.languange == 'en' ? sel.format('MMM D ') : sel.format('MMMD日 ')
         }
 
     }
@@ -373,17 +373,18 @@ export default function AddMoment() {
                         }} />
                 </View>
                 {
-                    imgUrl.length > 0 ? <Image src={imgUrl} mode="aspectFill" className="cover" onClick={addImage} /> :
-                        <View className="cover" onClick={addImage}>
+                    imgUrl.length > 0 ? <View className="cover" ><NewButton type={NewButtonType.img} onClick={addImage}><Image src={imgUrl} mode="aspectFill" className="cover" onClick={addImage} /></NewButton></View> :
+                        <View className="cover" ><NewButton type={NewButtonType.img} onClick={addImage}><View className="cover" >
                             <Image src={require('@assets/images/add3.png')} style={{ width: 24, height: 24 }} />
-                        </View>
+                        </View></NewButton></View>
+
                 }
 
             </View>
         </View>
 
 
-        <View style={{flex:1}}/>
+        <View style={{ flex: 1 }} />
 
         <View className="main_footer"><NewButton
             type={NewButtonType.fill}
@@ -406,7 +407,7 @@ export default function AddMoment() {
                 isTemp={is_temp}
                 moment={moment}
                 onChange={(e) => {
-                    const {date, duration, time, isYesterday } = e;
+                    const { date, duration, time, isYesterday } = e;
                     setTime(time)
                     setSelDate(date)
                     setIsYesterday(isYesterday)

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

@@ -149,7 +149,7 @@ export default function GuideActive() {
                         key={i * 100}
                         obj={obj}
                         highlight={highlight ? obj.window == 'ACTIVE' : false}
-                        showLine={i < items.length - 1}
+                        showLine={true}
                         errors={errors}
                         selMode={selMode}
                         disable={isDisable(obj)}

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

@@ -138,7 +138,7 @@ export default function GuideEat() {
                         key={i * 100}
                         obj={obj}
                         highlight={highlight ? obj.window == 'EAT' : false}
-                        showLine={i < items.length - 1}
+                        showLine={true}
                         errors={errors}
                         selMode={selMode}
                         disable={isDisable(obj)}

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

@@ -88,7 +88,7 @@ export default function GuideFull() {
                 <CellFooterText text={footerDesc()} />
             </View>
         </CellFooter>
-        <View style={{height:300,flexShrink:0}}/>
+        <View style={{height:200,flexShrink:0}}/>
         <View style={{flex:1}}/>
         <View className="main_footer">
             <NewButton

+ 72 - 21
src/_health/pages/log_time.tsx

@@ -18,6 +18,8 @@ import NewDurationPicker, { DurationPickerType } from "../base/new_durationpicke
 import showAlert from "@/components/basic/Alert";
 import NewDatePicker, { NewDatePickerType } from "../base/new_date_picker";
 import ChooseDateTime from "../components/choose_date_time";
+import { TimeFormatter } from "@/utils/time_format";
+import StatusIndicator, { StatusType } from "../base/status_indicator";
 
 let useRoute;
 let useNavigation;
@@ -142,7 +144,7 @@ export default function LogTime() {
                 event_id: timeline.event_id,
                 schedule_id: timeline.schedule_id,
                 time: dayjs().format('HH:mm'),
-                date:dayjs().format('YYYY-MM-DD'),
+                date: dayjs().format('YYYY-MM-DD'),
                 extra: {
                     set_time: enterTime,
                     confirm_time: enterTime
@@ -175,7 +177,7 @@ export default function LogTime() {
                     event_id: timeline.event_id,
                     schedule_id: timeline.schedule_id,
                     time: dayjs().format('HH:mm'),
-                    date:dayjs().format('YYYY-MM-DD'),
+                    date: dayjs().format('YYYY-MM-DD'),
                     extra: {
                         set_time: enterTime,
                         confirm_time: enterTime
@@ -255,6 +257,9 @@ export default function LogTime() {
         if (isSingle) {
             return isFast ? MainColorType.fast : MainColorType.sleep
         }
+        else {
+            if (tapIndex == '1' || tapIndex == '2') return MainColorType.sleep
+        }
         return MainColorType.fast
     }
 
@@ -263,7 +268,7 @@ export default function LogTime() {
         // var hour = parseInt(time.split(':')[0])
         // var minute = parseInt(time.split(':')[1])
         // var date = obj.date
-        var now = new Date(obj.date+'T'+time+':'+dayjs().format('ss'))
+        var now = new Date(obj.date + 'T' + time + ':' + dayjs().format('ss'))
         // now.setHours(hour)
         // now.setMinutes(minute)
         // now.setSeconds(0)
@@ -449,7 +454,7 @@ export default function LogTime() {
         var scheduleTime = parseInt(schedule_time.replace(':', ''))
         var date = dayjs().format('YYYY-MM-DD')
         if (scheduleTime > nowTime) {
-            date = dayjs(new Date().getTime()-24*3600*1000).format('YYYY-MM-DD')
+            date = dayjs(new Date().getTime() - 24 * 3600 * 1000).format('YYYY-MM-DD')
         }
         var list = JSON.parse(JSON.stringify(array))
         list[index].date = date
@@ -490,6 +495,20 @@ export default function LogTime() {
 
     }
 
+    function expectText() {
+        var obj = array[0]
+        var timestamp = getTimestamp(obj)
+        var duration = isFast ? data.fast.target.duration : data.sleep.target.duration
+        var time2 = timestamp + duration
+        var strTime = TimeFormatter.dayjsFormat(time2, false)
+        if (isFast) {
+            return 'Expect to end fast at ' + strTime
+        }
+        else {
+            return 'Expect to wake up at ' + strTime
+        }
+    }
+
     function logItem(index: number, iFast: boolean, iStart: boolean, showLine: boolean) {
         const { fast, sleep } = data
         var schedule_time = ''
@@ -561,7 +580,13 @@ export default function LogTime() {
             showError = true
         }
         return <ChooseDateTime
-            title={isSingle ? null : title}
+            title={isSingle ? null : <StatusIndicator
+                type={StatusType.normal}
+                color={iFast ? MainColorType.fast : MainColorType.sleep}
+                fontSize={rpxToPx(34)}
+                text={title}
+                defaultSpace
+            />}
             disable={array[index].disable}
             showError={showError}
             showLine={showLine}
@@ -706,36 +731,62 @@ export default function LogTime() {
             isSingle && isStart && showGoal && <Card>
                 <View style={{ position: 'relative' }}>
                     <View className="card_header" style={{ justifyContent: 'space-between' }}>
-                        <View className="h34">{isFast ? 'Fast Goal' : 'Sleep Goal'}</View>
+                        <View className="h34" style={{marginLeft:rpxToPx(12)}}>{isFast ? 'Fast Goal' : 'Sleep Goal'}</View>
                         <NewButton
                             type={NewButtonType.gray}
                             height={rpxToPx(84)}
                             title={durationTime()}
+                            fontNormal
                             onClick={() => { setExpandIndex(-1) }}
                         />
                     </View>
                     {
-                        expandIndex == -1 && <NewDurationPicker
-                            type={DurationPickerType.normal}
-                            value={isFast ? data.fast.target.duration : data.sleep.target.duration}
-                            onChange={e => {
-                                var temp = JSON.parse(JSON.stringify(data))
-                                if (isFast) {
-                                    temp.fast.target.duration = e
-                                }
-                                else {
-                                    temp.sleep.target.duration = e
-                                }
-                                setData(temp)
-                            }}
-                            color={isFast ? MainColorType.fast : MainColorType.sleep} />
+                        expandIndex == -1 && <View style={{
+                            display: 'flex',
+                            flexDirection: 'column',
+                            alignItems: 'center'
+                        }}>
+                            <NewDurationPicker
+                                type={DurationPickerType.normal}
+                                value={isFast ? data.fast.target.duration : data.sleep.target.duration}
+                                onChange={e => {
+                                    var temp = JSON.parse(JSON.stringify(data))
+                                    if (isFast) {
+                                        temp.fast.target.duration = e
+                                    }
+                                    else {
+                                        temp.sleep.target.duration = e
+                                    }
+                                    setData(temp)
+                                }}
+                                color={isFast ? MainColorType.fast : MainColorType.sleep} />
+                        </View>
                     }
 
                 </View>
             </Card>
         }
+        {
+            isSingle && isStart && showGoal && <View className="h24 g02" style={{
+                width: rpxToPx(750), height: rpxToPx(84),
+                display: 'flex',
+                alignItems: 'center',
+                justifyContent: 'center'
+            }}>{expectText()}</View>
+        }
         <View style={{ flex: 1 }} />
-        <View style={{ marginBottom: rpxToPx(128), display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
+        {/* <View style={{ marginBottom: rpxToPx(128), display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
+            <NewButton
+                color={footerBtnColor()}
+                type={NewButtonType.fill}
+                title={'Log'}
+                width={rpxToPx(646)}
+                height={rpxToPx(96)}
+                disable={errors.length > 0}
+                bold={true}
+                onClick={() => tapCommit(false)} />
+        </View> */}
+        <View className="main_footer">
             <NewButton
                 color={footerBtnColor()}
                 type={NewButtonType.fill}

+ 0 - 14
src/_health/pages/long_fast_setting.scss

@@ -6,20 +6,6 @@
     width: 670px;
 }
 
-.long_fast_card_header{
-    position: relative;
-    display: flex;
-    flex-direction: row;
-    padding-left: 52px;
-    padding-right: 40px;
-    box-sizing: border-box;
-    align-items: center;
-    height: 128px;
-    width: 670px;
-    flex-shrink: 0;
-    flex: 1;
-}
-
 .long_fast_card_footer{
     height: 128px;
     display: flex;

+ 35 - 34
src/_health/pages/long_fast_setting.tsx

@@ -13,12 +13,15 @@ import { useSelector } from "react-redux";
 import { clockTimes } from "@/services/health";
 import Taro from "@tarojs/taro";
 import { jumpPage } from "@/features/trackTimeDuration/hooks/Common";
+import ChooseDateTime from "../components/choose_date_time";
+import StatusIndicator, { StatusType } from "../base/status_indicator";
 
 export default function LongFastSetting() {
     const [showGoal, setShowGoal] = useState(true)
     const [isToday, setIsToday] = useState(true)
     const [duration, setDuration] = useState(24)
     const [time, setTime] = useState(dayjs().format('HH:mm'))
+    const [date, setDate] = useState(dayjs().format('YYYY-MM-DD'))
     const health = useSelector((state: any) => state.health);
 
     useEffect(() => {
@@ -69,8 +72,8 @@ export default function LongFastSetting() {
     return <View className="page_container">
         <Card>
             <View >
-                <View className="long_fast_card_header">
-                    <View className="h34">Goal</View>
+                <View className="card_header" style={{ position: 'relative' }}>
+                    <View className="h34" style={{ marginLeft: rpxToPx(40) }}>Goal</View>
                     <View style={{ flex: 1 }} />
                     <NewButton
                         type={showGoal ? NewButtonType.alpha : NewButtonType.gray}
@@ -82,8 +85,9 @@ export default function LongFastSetting() {
                             setShowGoal(true)
                         }}
                     />
+                    <View className="border_footer_line" style={{ left: rpxToPx(66) }} />
                 </View>
-                <View style={{display:'flex',alignItems:'center',justifyContent:'center'}}>
+                <View style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
                     {
                         showGoal && <NewDurationPicker color={MainColorType.fast}
                             type={DurationPickerType.long}
@@ -104,39 +108,36 @@ export default function LongFastSetting() {
         </Card>
         <View style={{ height: rpxToPx(36) }} />
         <Card>
-            <View >
-                <View className="long_fast_card_header">
-                    <View className="h34">Starts</View>
-                    <View style={{ flex: 1 }} />
-                    <NewButton
-                        type={NewButtonType.gray}
-                        width={rpxToPx(196)}
-                        height={rpxToPx(84)}
-                        title={isToday ? "Today" : "Yesterday"}
-                        onClick={() => {
-                            setIsToday(!isToday)
-                        }}
-                    />
-                    <View style={{ width: rpxToPx(12) }} />
-                    <NewButton
-                        type={!showGoal ? NewButtonType.alpha : NewButtonType.gray}
-                        color={getThemeColor('FAST')}
-                        width={rpxToPx(196)}
-                        height={rpxToPx(84)}
-                        title={time}
-                        onClick={() => {
-                            setShowGoal(false)
-                        }}
-                    />
-                </View>
-                {
-                    !showGoal && <NewTimePicker color={MainColorType.fast} onChange={(e) => {
-                        setTime(e)
-                    }} />
+            <ChooseDateTime
+                title={
+                    <StatusIndicator type={StatusType.normal}
+                        color={'transparent'}
+                        text='Starts'
+                        fontSize={rpxToPx(34)}
+                        defaultSpace
+                    ></StatusIndicator>
                 }
-            </View>
+                showLine={!showGoal}
+                hideFooter={true}
+                expand={!showGoal}
+                choose={() => setShowGoal(false)}
+                color={MainColorType.fast}
+                date={date}
+                time={time}
+                dateChange={(e) => {
+                    setDate(e)
+                    if (e == dayjs().format('YYYY-MM-DD')) {
+                        setIsToday(true)
+                    }
+                    else {
+                        setIsToday(false)
+                    }
+                }}
+                timeChange={(e) => {
+                    setTime(e)
+                }}
+            />
         </Card>
-        {/* <View style={{ flex: 1 }} /> */}
         <View className="main_footer">
             <NewButton type={NewButtonType.fill}
                 color={MainColorType.fast}

+ 6 - 6
src/_health/pages/move.tsx

@@ -13,7 +13,7 @@ import dayjs from "dayjs";
 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 { IconMore, IconSit, IconWalk } from "@/components/basic/Icons";
 import NewHeader, { NewHeaderType } from "../components/new_header";
 import NewButton, { NewButtonType } from "../base/new_button";
 import { MainColorType } from "@/context/themes/color";
@@ -349,10 +349,10 @@ export default function Move() {
                 item.status == 'MISSED' && <Text className="missed">Missed</Text>
             }
             {
-                item.status == 'SEDENTARY' && <Image className="history_item_detail_icon" src={require('@assets/_health/sit.png')} />
+                item.status == 'SEDENTARY' && <IconSit width={rpxToPx(44)} color={MainColorType.g02}/>
             }
             {
-                item.status == 'ACTIVE' && <Image className="history_item_detail_icon" src={require('@assets/_health/walk.png')} />
+                item.status == 'ACTIVE' && <IconWalk width={rpxToPx(44)} color={MainColorType.active}/>
             }
             <View className="border_footer_line" />
         </View>
@@ -560,7 +560,7 @@ export default function Move() {
         return <View className="move_console">
             <View style={{ flex: 1 }} />
             {hourIndex()}
-            <Text className={isExtra() ? 'h24' : '34'} style={{
+            <Text className={isExtra() ? 'h24' : 'h34'} style={{
                 color: MainColorType.g01,
                 lineHeight: isExtra() ? rpxToPx(28) + 'px' : rpxToPx(42) + 'px'
             }}>{getDuration()}</Text>
@@ -725,8 +725,8 @@ export default function Move() {
                         return <View key={index} className="history_item" onClick={() => goDetail(item)}>
                             <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>
+                                <IconWalk width={rpxToPx(32)} color={MainColorType.active}/>
+                                <Text style={{ fontSize: rpxToPx(26),marginLeft:rpxToPx(16) }}> Hours Active {item.active_hours} · Total Steps {item.stat.real_steps}</Text>
                             </View>
                             {/* <View className="border_footer_line" /> */}
                         </View>

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

@@ -10,6 +10,7 @@ import NewHeader, { NewHeaderType } from "../components/new_header";
 import NewButton, { NewButtonType } from "../base/new_button";
 import { MainColorType } from "@/context/themes/color";
 import ListFooter from "../components/list_footer";
+import { IconSit, IconWalk } from "@/components/basic/Icons";
 
 let useRoute;
 let useNavigation;
@@ -137,10 +138,10 @@ export default function MoveDetail() {
                 item.status == 'MISSED' && <Text className="missed">Missed</Text>
             }
             {
-                item.status == 'SEDENTARY' && <Image className="history_item_detail_icon" src={require('@assets/_health/sit.png')} />
+                item.status == 'SEDENTARY' && <IconSit width={rpxToPx(44)} color={MainColorType.g02}/>
             }
             {
-                item.status == 'ACTIVE' && <Image className="history_item_detail_icon" src={require('@assets/_health/walk.png')} />
+                item.status == 'ACTIVE' && <IconWalk width={rpxToPx(44)} color={MainColorType.active}/>
             }
             <View className="border_footer_line" />
         </View>

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

@@ -4,7 +4,7 @@ import './post_result.scss'
 import { getThemeColor } from "@/features/health/hooks/health_hooks";
 import { rpxToPx } from "@/utils/tools";
 import NewButton, { NewButtonType } from "../base/new_button";
-import { IconCheck, IconNotification, IconNotificationOff } from "@/components/basic/Icons";
+import { IconCheck, IconNotification, IconNotificationOff, IconSit, IconWalk } from "@/components/basic/Icons";
 import { MainColorType } from "@/context/themes/color";
 import { useState } from "react";
 import dayjs from "dayjs";
@@ -130,7 +130,7 @@ export default function PostResult() {
         }
 
         if (data.scenario == 'MOVE') {
-            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 data.extra.move_status == 'ACTIVE' ?<IconWalk width={rpxToPx(128)} color={MainColorType.active}/>:<IconSit width={rpxToPx(128)} color={MainColorType.g02}/>
         }
         return <View className="result_icon_bg" style={{ backgroundColor: getMainColor() }}>
             <IconCheck color="#fff" width={rpxToPx(88)} height={rpxToPx(88)} />

+ 3 - 3
src/_health/pages/schedules.tsx

@@ -420,7 +420,7 @@ export default function Schedules() {
                         fontColor={getAddColor()}
                         fontSize={rpxToPx(34)}
                         text={(selMode == 'FAST' || selMode == 'EAT') ? t('health.add_meal') : t('health.add_active')} color={getAddColor()}>
-                        <IconAdd color="#fff" width={rpxToPx(26)} />
+                        <IconAdd color="#fff" width={rpxToPx(20)} />
                     </StatusIndicator>
                     {/* <IconAdd color={getAddColor()} width={rpxToPx(34)} />
                     <View className='toolbar_btn' style={{ color: getAddColor() }} >添加</View> */}
@@ -436,7 +436,7 @@ export default function Schedules() {
                             fontColor={MainColorType.eat}
                             fontSize={rpxToPx(34)}
                             text={t('health.add_meal')} color={MainColorType.eat}>
-                            <IconAdd color="#fff" width={rpxToPx(26)} />
+                            <IconAdd color="#fff" width={rpxToPx(20)} />
                         </StatusIndicator>
                         <View style={{ flex: 1 }} />
                         <View className='border_footer_line' style={{ left: rpxToPx(66) }} />
@@ -447,7 +447,7 @@ export default function Schedules() {
                             fontColor={MainColorType.active}
                             fontSize={rpxToPx(34)}
                             text={t('health.add_active')} color={MainColorType.active}>
-                            <IconAdd color="#fff" width={rpxToPx(26)} />
+                            <IconAdd color="#fff" width={rpxToPx(20)} />
                         </StatusIndicator>
                         <View style={{ flex: 1 }} />
                     </View>

+ 1 - 7
src/_health/pages/timeline_detail.scss

@@ -2,7 +2,7 @@
     background-color: #fff;
     width: 750px;
     padding:40px;
-    padding-bottom: 28px;
+    padding-bottom: 20px;
     display: flex;
     flex-direction: row;
 }
@@ -100,12 +100,6 @@
     margin-top: 10px;
 }
 
-.publish_time{
-    margin-top: 122px;
-    color: #B2B2B2;
-    font-size: 24px;
-}
-
 .myTextarea{
     line-height: 72px;
     font-size: 48px;

+ 40 - 35
src/_health/pages/timeline_detail.tsx

@@ -16,6 +16,9 @@ import { MainColorType } from "@/context/themes/color";
 import NewModal from "../base/new_modal";
 import Card from "../components/card";
 import ChooseDateTime from "../components/choose_date_time";
+import TimeTitleDesc from "../components/time_title_desc";
+import CoverList from "../components/cover_list";
+import ListFooter from "../components/list_footer";
 
 let timestamp = 0;
 let useRoute;
@@ -179,7 +182,7 @@ export default function TimelineDetail() {
             })
             return
         }
-        var dt = new Date(selDate+' '+time+':00')
+        var dt = new Date(selDate + ' ' + time + ':00')
         var params: any = {
             schedule_id: schedule_id,
             description: desc,
@@ -222,6 +225,16 @@ export default function TimelineDetail() {
         return count;
     }
 
+    function imgList() {
+        var array: any = []
+        list && list.map(moment => {
+            moment.media.map((obj) => {
+                array.push(obj.url)
+            })
+        })
+        return array;
+    }
+
     if (!loaded) return <View />
 
     return <View style={{ display: 'flex', flex: 1 }}>
@@ -233,47 +246,32 @@ export default function TimelineDetail() {
             <View className="detail_header_content">
                 <Text className="detail_nickname">{user.nickname}</Text>
                 {
-                    (detail.scenario != 'MEAL' && detail.scenario != 'ACTIVITY') && <View style={{ flexDirection: 'column', display: 'flex' }}>
-
-                        <Text className="detail_time">{dayjs(detail.time.timestamp).format('HH:mm')}
-                            {
-                                detail.title && <Text> {detail.title}</Text>
-                            }
-                        </Text>
-
-                    </View>
+                    (detail.scenario != 'MEAL' && detail.scenario != 'ACTIVITY') &&
+                    <TimeTitleDesc
+                        time={dayjs(detail.time.timestamp).format('HH:mm')}
+                        title={detail.title}
+                    />
                 }
                 {
-                    detail.scenario == 'ACTIVITY' && !list && <View style={{ flexDirection: 'column', display: 'flex' }}>
-
-                        <Text className="detail_time">{dayjs(detail.time.timestamp).format('HH:mm')}
-                            {
-                                detail.title && <Text> {detail.title}</Text>
-                            }
-                        </Text>
-
-                        {/* {
-                        item.media && item.media.length > 0 && <Image mode="aspectFill" src={item.media[0].url} style={{ width: 60, height: 60, marginTop: 5 }} />
-                    } */}
-                    </View>
+                    detail.scenario == 'ACTIVITY' && !list &&
+                    <TimeTitleDesc
+                        time={dayjs(detail.time.timestamp).format('HH:mm')}
+                        title={detail.title}
+                    />
                 }
                 {
                     list && list.map((item, index) => {
                         return <View key={index} style={{ flexDirection: 'column', display: 'flex' }}>
-
-                            <Text className="detail_time">{dayjs(item.time.timestamp).format('HH:mm')}
-                                {
-                                    item.title && <Text> {item.title}</Text>
-                                }
-                                {
-                                    item.description && <Text style={{ color: '#000' }}> {item.description}</Text>
-                                }
-                            </Text>
+                            <TimeTitleDesc
+                                time={dayjs(item.time.timestamp).format('HH:mm')}
+                                title={item.title}
+                                desc={item.description}
+                            />
                         </View>
                     })
                 }
-                {
-                    <View className="media" style={{ marginRight: mediaCount() == 4 ? 80 : 0 }}>
+                {/* {
+                    <View className="media" style={{ marginRight: mediaCount() == 4 ? 80 : 0, marginTop: rpxToPx(24) }}>
                         {
                             list && list.map(moment => {
                                 return moment.media.map((obj, j) => {
@@ -282,13 +280,20 @@ export default function TimelineDetail() {
                             })
 
                         }
+
                     </View>
-                }
+                } */}
+                <View style={{ marginTop: rpxToPx(24) }}>
+                    <CoverList imgs={imgList()} count={mediaCount()} />
+                </View>
                 {
-                    publish && <Text className="publish_time">发布于{dayjs(publish.timestamp).format('MM-DD HH:mm')}</Text>
+                    publish && <View style={{display:'flex',flexDirection:'row',height:rpxToPx(60),alignItems:'center'}}>
+                        <Text className="h24 g02">发布于{dayjs(publish.timestamp).format('MM-DD HH:mm')}</Text>
+                    </View>
                 }
             </View>
         </View>
+        <ListFooter />
         {
             health.mode != 'ACTIVE' && health.mode != 'EAT' && <View className="add_note"><NewButton type={NewButtonType.link} title="写个笔记" onClick={() => {
                 timestamp = new Date().getTime()

+ 21 - 2
src/app.scss

@@ -389,6 +389,18 @@ page {
     bottom: 0;
 }
 
+.border_header_line{
+    height: 2px;
+    transform: scaleY(0.5);
+    // background-color: red;
+    background-color: #000;
+    opacity: 0.1;
+    position: absolute;
+    left: 0;
+    right: 0;
+    top: 0;
+}
+
 
 .border_footer_line {
     height: 2px;
@@ -493,6 +505,13 @@ page {
     line-height: 24px;
 }
 
+view{
+    letter-spacing: -1px;
+}
+text{
+    letter-spacing: -1px;
+}
+
 .bold {
     font-weight: bold;
 }
@@ -581,7 +600,7 @@ page {
     height: 68px;
     flex-shrink: 0;
     align-items: center;
-    justify-content: center;
+    justify-content: flex-start;
     display: flex;
     color: #000;
     font-size: 50px;
@@ -593,6 +612,6 @@ page {
     padding-left: 40px;
     display: flex;
     flex-direction: row;
-    align-items: center;
+    align-items: flex-end;
     background-color: #fff;
 }

BIN
src/assets/_health/main_logo.png


BIN
src/assets/_health/navi_back.png


BIN
src/assets/_health/setting_album.png


BIN
src/assets/_health/setting_body.png


BIN
src/assets/_health/setting_calendar.png


BIN
src/assets/_health/setting_chart.png


BIN
src/assets/_health/setting_journal.png


BIN
src/assets/_health/setting_more.png


BIN
src/assets/_health/setting_streak.png


BIN
src/assets/_health/sit.png


BIN
src/assets/_health/walk.png


BIN
src/assets/_health/walk2.png


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 13 - 0
src/components/basic/Icons.tsx


+ 9 - 21
src/features/health/History.scss

@@ -46,32 +46,18 @@
     color: #000;
 }
 
-.media {
-    display: flex;
-    flex-direction: row;
-    flex-wrap: wrap;
-    margin-bottom: 20px;
-    flex-shrink: 0;
-    flex: 1;
-}
-
-.media_item {
-    width: 155px;
-    height: 155px;
-    margin-right: 4px;
-    margin-bottom: 4px;
-}
-
 .recent {
-    background-color: #fff;
+    background-color: transparent;
     position: relative;
-    height: 108px;
+    height: 120px;
     padding-left: 40px;
     padding-right: 40px;
     display: flex;
     flex-direction: row;
     justify-content: space-between;
-    align-items: center;
+    padding-top: 36px;
+    padding-bottom: 25px;
+    box-sizing: border-box;
 }
 
 .history_duration_bg{
@@ -86,8 +72,10 @@
 }
 
 .archive{
-    width: 34px;
-    height: 34px;
+    width: 36px;
+    height: 36px;
+    padding-top: 12px;
+    padding-bottom: 12px;
 }
 
 .archived_bg{

+ 36 - 26
src/features/health/HistoryItem.tsx

@@ -14,6 +14,8 @@ import { delRecord, makeDone } from "@/services/health";
 import showAlert from "@/components/basic/Alert";
 import { rpxToPx } from "@/utils/tools";
 import NewButton, { NewButtonType } from "@/_health/base/new_button";
+import TimeTitleDesc from "@/_health/components/time_title_desc";
+import CoverList from "@/_health/components/cover_list";
 
 export default function HistoryItem(props: {
     data: any,
@@ -125,6 +127,21 @@ export default function HistoryItem(props: {
         return count;
     }
 
+    function imgList(){
+        let array:any = [];
+        props.data.events.map((item) => {
+            if (item.moments) {
+                item.moments.map(moment => {
+                    moment.media.map((obj) => {
+                        array.push(obj.url)
+                    })
+                })
+            }
+
+        })
+        return array;
+    }
+
     function historyDate() {
         if (!props.preData) {
             return dayjs(props.data.window_range.start_timestamp).format('DD')
@@ -183,37 +200,30 @@ export default function HistoryItem(props: {
         <View className="cell_date" >{historyDate()}</View>
         <View className="history_content" >
 
-            <View style={{ display: 'flex', flexDirection: 'column', marginBottom: rpxToPx(12), flex:1 }}>
+            <View style={{ display: 'flex', flexDirection: 'column', marginBottom: rpxToPx(12), flex: 1 }}>
                 {
                     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>
-                            {
-                                item.moments && item.moments.map((moment, i) => {
-                                    return <Text className="history_item_desc" key={i * 1000}>{moment.description}</Text>
-                                })
-                            }
-                        </Text>
+                        return <TimeTitleDesc
+                            time={item.time && dayjs(item.time.timestamp).format('HH:mm')}
+                            dayTag={dayTag(index)}
+                            title={getTitle(item)}
+                            desc={item.moments && item.moments.length > 0 ? item.moments[0].description : ''}
+                        />
+                        // 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>
+                        //     {
+                        //         item.moments && item.moments.map((moment, i) => {
+                        //             return <Text className="history_item_desc" key={i * 1000}>{moment.description}</Text>
+                        //         })
+                        //     }
+                        // </Text>
                     })
                 }
             </View>
             {
-                mediaCount() > 0 && <View className="media" style={{ marginRight: mediaCount() == 4 ? 80 : 0 }}>
-                    {
-                        props.data.events.map((item) => {
-                            if (item.moments) {
-                                return item.moments.map(moment => {
-                                    return moment.media.map((obj, j) => {
-                                        return <Image className="media_item" mode="aspectFill" onClick={() => preview(obj)} src={obj.url} key={j * 10} />
-                                    })
-                                })
-                            }
-
-                        })
-                    }
-                </View>
+                mediaCount()>0 && <CoverList count={mediaCount()} imgs={imgList()}/>
             }
 
             <View className="history_duration_bg" style={{ marginTop: 0 }}>
@@ -221,7 +231,7 @@ export default function HistoryItem(props: {
                     props.fast_type != 'LF' && ring()
                 }
                 {
-                    props.fast_type == 'LF' && <IconLongFast color={MainColorType.fast} width={rpxToPx(32)}/>
+                    props.fast_type == 'LF' && <IconLongFast color={MainColorType.fast} width={rpxToPx(32)} />
                 }
                 {
                     props.data.window_range.end_timestamp && <Text className="history_item_duration">{formatMilliseconds(props.data.window_range.end_timestamp - props.data.window_range.start_timestamp)}</Text>

+ 2 - 3
src/features/health/MainConsole.scss

@@ -218,9 +218,8 @@
 }
 
 .active_icon {
-  width: 48px;
-  height: 48px;
-  margin-right: 12px;
+  width: 36px;
+  height: 36px;
 }
 
 .active_text {

+ 7 - 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 { IconArrow, IconClose, IconMore, IconNotification, IconNotificationOff, IconSwitch } from "@/components/basic/Icons";
+import { IconArrow, IconClose, IconMore, IconNotification, IconNotificationOff, IconSwitch, IconWalk } from "@/components/basic/Icons";
 import DurationPicker from "@/_health/components/duration_picker";
 import Taro from "@tarojs/taro";
 import { systemLocation } from "@/services/common";
@@ -277,25 +277,25 @@ export default function MainConsole(props: { type: WindowType }) {
         const timeline = scenario.timeline[index]
         if (health.mode == 'DAY' || health.mode == 'NIGHT') {
             if (time > timeline.target.timestamp) {
-                return <Image style={{ width: rpxToPx(20), height: rpxToPx(20) }} src={require('@assets/_health/checked.png')} />
+                return <Image style={{ width: rpxToPx(24), height: rpxToPx(24) }} src={require('@assets/_health/checked.png')} />
             }
         }
         if (timeline.real) {
-            return <Image style={{ width: rpxToPx(20), height: rpxToPx(20) }} src={require('@assets/_health/checked.png')} />
+            return <Image style={{ width: rpxToPx(24), height: rpxToPx(24) }} src={require('@assets/_health/checked.png')} />
         }
-        return timeline.reminder ? <IconNotification color="#fff" width={rpxToPx(20)} /> : <IconNotificationOff color="#fff" width={rpxToPx(20)} />
+        return timeline.reminder ? <IconNotification color="#fff" width={rpxToPx(24)} /> : <IconNotificationOff color="#fff" width={rpxToPx(24)} />
     }
 
     function timelineItem(item: any, index: number, count: number) {
         function statusView() {
-            return <StatusIndicator type={StatusType.img}
+            return <StatusIndicator type={StatusType.console}
                 color={getIconColor(index)}
                 text={itemTitle(item)}
+                fontSize={rpxToPx(24)}
             >{
                     processIcon(index)
                 }</StatusIndicator>
         }
-
         return <ConsoleCell
             status={statusView()}
             title={(item.moment && item.moment.title) ? item.moment.title : item.title}
@@ -892,7 +892,7 @@ export default function MainConsole(props: { type: WindowType }) {
         {
             health.mode == 'ACTIVE' && <View>
                 <View className="main_column_space" /><IconTitleCell
-                    icon={<Image className="active_icon" src={require('@assets/_health/walk.png')} />}
+                    icon={<IconWalk width={rpxToPx(32)} color={MainColorType.active}/>}
                     title="Move More"
                     onClick={() => {
                         jumpPage('/_health/pages/move')

+ 16 - 22
src/features/health/MainHistory.tsx

@@ -137,7 +137,7 @@ export default forwardRef((props: { type?: string, fast_type?: string, updateDat
         if (props.fast_type) {
             params.fast_type = props.fast_type
         }
-
+        setPage(index)
         setLoading(true)
         records(params).then(res => {
             setLoading(false)
@@ -174,16 +174,16 @@ export default forwardRef((props: { type?: string, fast_type?: string, updateDat
         })
     }
 
-    function historyMonth(index, preIndex) {
+    function historyMonth(index) {
         var showDate = false;
         var dateStr = ''
         if (index == 0) {
             var currentDate = dayjs(list[index].window_range.start_timestamp).format('YYYY年M月')
             var now = dayjs().format('YYYY年M月')
-            if (currentDate != now) {
-                showDate = true
-                dateStr = currentDate
-            }
+
+            showDate = true
+            dateStr = currentDate
+
         }
         else {
             var currentDate = dayjs(list[index].window_range.start_timestamp).format('YYYY年M月')
@@ -194,7 +194,7 @@ export default forwardRef((props: { type?: string, fast_type?: string, updateDat
             }
         }
         if (showDate) {
-            return <View className="history_year_month h26 g01">{dateStr}</View>
+            return <View className="history_year_month h30 g01">{dateStr}</View>
         }
         return <View />
     }
@@ -204,18 +204,10 @@ export default forwardRef((props: { type?: string, fast_type?: string, updateDat
 
     if (!user.isLogin) return <View />
 
-    return <View style={{ width: rpxToPx(750), marginTop: rpxToPx(35) }}>
-        {/* <Calendar year={2024} month={8}/> */}
-        {/* <View style={{
-            // position: 'sticky',
-            top: 0,
-            height: 50,
-            backgroundColor: 'blue',
-            zIndex: 100
-        }} /> */}
+    return <View style={{ width: rpxToPx(750), marginTop: rpxToPx(36) }}>
         {
             (list.length >= 0 || health.mode == 'EAT') && <View className="recent">
-                <Text className="h50 bold">Recent</Text>
+                <Text className="h50 bold" >Recent</Text>
                 {
                     health.mode == 'EAT' && <View onClick={() => {
                         jumpPage('/_health/pages/archive')
@@ -224,7 +216,7 @@ export default forwardRef((props: { type?: string, fast_type?: string, updateDat
                     </View>
                 }
 
-                <View className="border_footer_line" />
+                {/* <View className="border_footer_line" /> */}
             </View>
         }
         {
@@ -232,9 +224,10 @@ export default forwardRef((props: { type?: string, fast_type?: string, updateDat
                 display: 'flex',
                 flexDirection: 'column',
                 alignItems: 'center',
-                paddingTop: rpxToPx(52),
-                paddingBottom: rpxToPx(38),
-                backgroundColor: '#fff'
+                paddingTop: rpxToPx(36),
+                paddingBottom: rpxToPx(36),
+                backgroundColor: '#fff',
+                position: 'relative'
             }}>
                 <View className="archived_bg" onClick={() => {
                     jumpPage('/_health/pages/archive')
@@ -254,6 +247,7 @@ export default forwardRef((props: { type?: string, fast_type?: string, updateDat
 
                     }} /> */}
                 </View>
+                <View className="border_footer_line" />
             </View>
         }
         {
@@ -263,7 +257,7 @@ export default forwardRef((props: { type?: string, fast_type?: string, updateDat
             list.map((item, index) => {
                 return <View id={`history-${index}`} key={index}>
                     {
-                        historyMonth(index, index - 1)
+                        historyMonth(index)
                     }
                     <HistoryItem
                         data={item}

+ 2 - 2
src/features/health/Streak.scss

@@ -29,12 +29,12 @@
 @keyframes modalBgAnim1 {
 
     100% {
-        background-color: rgba($color: #000000, $alpha: 0.15);
+        background-color: rgba($color: #000000, $alpha: 0.5);
     }
 }
 
 .modal_dismiss1 {
-    background-color: rgba($color: #000000, $alpha: 0.15);
+    background-color: rgba($color: #000000, $alpha: 0.5);
     animation: modalBgHideAnim1 0.2s linear forwards;
 }
 

+ 1 - 1
src/features/health/Streak.tsx

@@ -108,7 +108,7 @@ export default function Streak(props: {
     if (process.env.TARO_ENV == 'rn') {
         return <View style={{position:'absolute',left:0,right:0,top:0,bottom:0}}
         >
-            <View style={{ flex: 1, backgroundColor: '#ffffff90' }}>
+            <View style={{ flex: 1, backgroundColor: '#00000080' }}>
 
                 <Animated.View className={isDismiss ? 'modal_bottom_content1 modal_bottom_dismiss1' : 'modal_bottom_content1'}
                     style={[{ flexShrink: 0 }, animatedStyle]} onClick={onClick}>

+ 1 - 1
src/features/journal/components/journal_cover.tsx

@@ -158,7 +158,7 @@ export default function JournalCover(props: { imgs: any }) {
         }
     }
 
-    return <View style={{ marginRight: rpxToPx(24) }}>
+    return <View style={{ marginRight: rpxToPx(24),marginBottom:-rpxToPx(4) }}>
         {
             content()
         }

+ 12 - 8
src/pages/account/Album.tsx

@@ -13,6 +13,7 @@ import dayjs from "dayjs";
 import Taro from "@tarojs/taro";
 import StickyDateList from "@/_health/components/sticky_date_list";
 import ListFooter from "@/_health/components/list_footer";
+import CoverList from "@/_health/components/cover_list";
 
 export default function Album() {
 
@@ -81,10 +82,9 @@ export default function Album() {
         if (index == 0) {
             var currentDate = (medias[index].date + '').substring(0, 6)
             var now = dayjs().format('YYYYMM')
-            if (currentDate != now) {
-                showDate = true
-                dateStr = currentDate.substring(0, 4) + '年' + currentDate.substring(4, 6) + '月'
-            }
+
+            showDate = true
+            dateStr = currentDate.substring(0, 4) + '年' + currentDate.substring(4, 6) + '月'
         }
         else {
             var currentDate = (medias[index].date + '').substring(0, 6)
@@ -96,7 +96,7 @@ export default function Album() {
             }
         }
         if (showDate) {
-            return <View className="history_year_month h26 g01">{dateStr}</View>
+            return <View className="history_year_month h30 g01">{dateStr}</View>
         }
         return <View />
     }
@@ -143,7 +143,7 @@ export default function Album() {
     return <StickyDateList onRefresherRefresh={() => {
         setIsPulling(true)
         setPage(1)
-        getAlbumsData(window,1)
+        getAlbumsData(window, 1)
     }} isPulling={isPulling}
         onScroll={onScroll}
         showDate={showDate}
@@ -205,7 +205,11 @@ export default function Album() {
 
                             <Text className="cell_date">{(item.date + '').substring(6, 9)}</Text>
                             <View style={{ display: 'flex', flex: 1 }}>
-                                <View className="media" style={{ marginRight: item.images.length == 4 ? 80 : 0 }}>
+                                <CoverList
+                                    imgs={item.images}
+                                    count={item.images.length}
+                                />
+                                {/* <View className="media" style={{ marginRight: item.images.length == 4 ? 80 : 0 }}>
                                     {
                                         item.images.map((photo, i) => {
                                             return <Image onClick={() => {
@@ -216,7 +220,7 @@ export default function Album() {
                                             }} mode="aspectFill" src={photo} key={i * 900} className="media_item" />
                                         })
                                     }
-                                </View>
+                                </View> */}
                             </View>
                             <View className="border_footer_line" />
                         </View>

+ 2 - 1
src/pages/account/ChooseAuth.config.ts

@@ -4,5 +4,6 @@ export default definePageConfig({
       // 'demo':'../../components/demo'
     },
     // "disableScroll": true
-    "navigationBarTitleText": ""
+    "navigationBarTitleText": "",
+    "navigationBarBackgroundColor":"#f5f5f5"
   })

+ 1 - 1
src/pages/account/ChooseAuth.scss

@@ -2,7 +2,7 @@
     display: flex;
     flex-direction: column;
     align-items: center;
-    padding-top: 200px;
+    padding-top: 128px;
     // justify-content: center;
 }
 

+ 30 - 8
src/pages/account/ChooseAuth.tsx

@@ -1,4 +1,4 @@
-import { View, Text } from "@tarojs/components";
+import { View, Text, Image } from "@tarojs/components";
 import Buttons from '@/components/basic/Buttons'
 import Texts from '@/components/basic/Texts'
 import './ChooseAuth.scss'
@@ -7,12 +7,14 @@ import Taro, { useReady } from "@tarojs/taro";
 import { useDispatch, useSelector } from "react-redux";
 import { useEffect, useState } from "react";
 import { wxLogin } from "@/services/user";
-import { ColorType } from "@/context/themes/color";
+import { ColorType, MainColorType } from "@/context/themes/color";
 import { ChooseScenarioBtn } from "@/features/common/SpecBtns";
 import { useTranslation } from "react-i18next";
 import { jumpPage } from "@/features/trackTimeDuration/hooks/Common";
 import { loginSuccess } from "@/store/user";
 import RequestType, { thirdPartRequest } from "@/services/thirdPartRequest";
+import NewButton, { NewButtonType } from "@/_health/base/new_button";
+import { rpxToPx } from "@/utils/tools";
 
 let useNavigation;
 if (process.env.TARO_ENV == 'rn') {
@@ -115,7 +117,7 @@ export default function Page() {
             console.log(res)
             dispatch(loginSuccess(res));
             setBtnDisable(false)
-            if (!(res as any).is_new_user){
+            if (!(res as any).is_new_user) {
                 Taro.navigateBack({
                     delta: 1
                 })
@@ -161,13 +163,33 @@ export default function Page() {
     }
 
     return <View className="container choose_container">
-        <Texts text='fast16cc' type={TextType.big} />
-        <Text className="slogan">{t('page.choose_auth.slogan')}</Text>
-        {
+        <Image src={require('@assets/_health/main_logo.png')} style={{ width: rpxToPx(160), height: rpxToPx(160) }} />
+        <View className="h50 bold" style={{ marginTop: rpxToPx(24), marginBottom: rpxToPx(12) }}>fast16cc</View>
+        <Text className="h30" style={{ marginBottom: rpxToPx(678) }}>{t('page.choose_auth.slogan')}</Text>
+        <View className="main_footer">
+            {
+                process.env.TARO_ENV == 'weapp' ? <NewButton
+                    type={NewButtonType.fill}
+                    color={MainColorType.success}
+                    title={t('page.choose_auth.btn_wechat')}
+                    width={rpxToPx(646)}
+                    height={rpxToPx(96)}
+                    onClick={getCode}
+                /> :
+                    <NewButton
+                        type={NewButtonType.fill}
+                        color={MainColorType.success}
+                        title={t('page.choose_auth.btn_login')}
+                        width={rpxToPx(646)}
+                        height={rpxToPx(96)}
+                        onClick={login1}
+                    />
+            }
+        </View>
+        {/* {
             process.env.TARO_ENV == 'weapp' ? <ChooseScenarioBtn disable={btnDisable} title={t('page.choose_auth.btn_wechat')} onClick={getCode} background={ColorType.fast} /> :
                 <ChooseScenarioBtn disable={btnDisable} title={t('page.choose_auth.btn_login')} onClick={login1} background={ColorType.fast} />
-            // <Text style={{color:'red'}} onClick={createAccount1}>{t('page.choose_auth.btn_signup')}</Text>
-        }
+        } */}
 
         <View style={{ height: 30 }} />
         {

+ 37 - 32
src/pages/account/Journal.tsx

@@ -11,6 +11,7 @@ import Taro from "@tarojs/taro";
 import StickyDateList from "@/_health/components/sticky_date_list";
 import { MainColorType } from "@/context/themes/color";
 import ListFooter from "@/_health/components/list_footer";
+import TimeTitleDesc from "@/_health/components/time_title_desc";
 
 export default function Journal() {
     const [journals, setJournals] = useState<any>([])
@@ -50,31 +51,33 @@ export default function Journal() {
             page: index,
             limit: 10
         }).then(res => {
+            let list = (res as any).data
+            list.forEach(element => {
+                let array: any = []
+                element.windows.map(item => {
+                    item.events.map(event => {
+                        event.moments && event.moments.map(moment => {
+                            if (moment.media && moment.media.length > 0) {
+                                moment.media.map(media => {
+                                    array.push(media.url)
+                                })
+                            }
+                        })
+
+                    })
+                })
+                element.imgs = array
+            });
             setLoading(false)
             if (index == 1) {
-                let list = (res as any).data
-                // list.forEach(element => {
-                //     let array: any = []
-                //     element.windows.map(item => {
-                //         item.events.map(event => {
-                //             event.moments && event.moments.map(moment => {
-                //                 if (moment.media && moment.media.length > 0) {
-                //                     moment.media.map(media => {
-                //                         array.push(media.url)
-                //                     })
-                //                 }
-                //             })
-
-                //         })
-                //     })
-                //     element.imgs = array
-                // });
+
+
                 setTotal((res as any).total)
-                setJournals((res as any).data)
+                setJournals(list)
                 setIsPulling(false)
             }
             else {
-                setJournals([...journals, ...(res as any).data])
+                setJournals([...journals, ...list])
             }
         }).catch(e => {
             setLoading(false)
@@ -140,7 +143,7 @@ export default function Journal() {
                 }
             })
         })
-        return <View style={{ flex: 1, display: 'flex', flexDirection: 'row', marginBottom: rpxToPx(16), overflow: 'hidden' }} key={index}>
+        return <View style={{ flex: 1, display: 'flex', flexDirection: 'row', marginBottom: rpxToPx(12), overflow: 'hidden' }} key={index}>
             {
                 array.length > 0 && <JournalCover imgs={array} />
             }
@@ -156,12 +159,14 @@ export default function Journal() {
                 {
 
                     window.events.map((item2, index2) => {
-                        return <Text className="line1" style={{ width: array.length > 0 ? rpxToPx(370) : rpxToPx(532) }} key={index2 * 1000}>
-                            <Text className="history_item_title" style={{ color: '#000' }}>{dayjs(item2.time.timestamp).format('HH:mm')} {getTitle(item2)} </Text>
-                            {
-                                item2.moments && item2.moments.length > 0 && item2.moments[0].description && <Text className="history_item_desc">{item2.moments[0].description}</Text>
-                            }
-                        </Text>
+                        return <TimeTitleDesc
+                            key={index2 * 1000}
+                            className="line1"
+                            style={{ width: array.length > 0 ? rpxToPx(370) : rpxToPx(532) }}
+                            time={dayjs(item2.time.timestamp).format('HH:mm')}
+                            title={getTitle(item2)}
+                            desc={item2.moments && item2.moments.length > 0 ? item2.moments[0].description : ''}
+                        />
                     })
                 }
 
@@ -177,10 +182,10 @@ export default function Journal() {
         if (index == 0) {
             var currentDate = (journals[index].date + '').substring(0, 6)
             var now = dayjs().format('YYYYMM')
-            if (currentDate != now) {
-                showDate = true
-                dateStr = currentDate.substring(0, 4) + '年' + currentDate.substring(4, 6) + '月'
-            }
+
+            showDate = true
+            dateStr = currentDate.substring(0, 4) + '年' + currentDate.substring(4, 6) + '月'
+
         }
         else {
             var currentDate = (journals[index].date + '').substring(0, 6)
@@ -192,7 +197,7 @@ export default function Journal() {
             }
         }
         if (showDate) {
-            return <View className="history_year_month h26 g01">{dateStr}</View>
+            return <View className="history_year_month h30 g01">{dateStr}</View>
         }
         return <View />
     }
@@ -204,7 +209,7 @@ export default function Journal() {
         onScroll={onScroll}
         showDate={showDate}
         date={date}
-        loadMore={()=>{
+        loadMore={() => {
             more()
         }}
     ><View style={{ display: 'flex', flexDirection: 'column' }}>

+ 3 - 9
src/pages/account/JournalDetail.scss

@@ -11,8 +11,9 @@
 .header_avatar {
     width: 74px;
     height: 74px;
-    border-radius: 8px;
+    border-radius: 37px;
     margin-right: 24px;
+    background-color: palegoldenrod;
 }
 
 .jounal_content {
@@ -33,13 +34,6 @@
     display: flex;
     flex-direction: row;
     flex-wrap: wrap;
-    margin-top: 24px;
+    margin-top: 12px;
     margin-bottom: 16px;
-}
-
-.journal_img{
-    width: 155px;
-    height: 155px;
-    margin-right: 4px;
-    margin-bottom: 4px;
 }

+ 34 - 39
src/pages/account/JournalDetail.tsx

@@ -7,6 +7,9 @@ import Taro from "@tarojs/taro";
 import dayjs from "dayjs";
 import { rpxToPx } from "@/utils/tools";
 import { MainColorType } from "@/context/themes/color";
+import TimeTitleDesc from "@/_health/components/time_title_desc";
+import CoverList from "@/_health/components/cover_list";
+import ListFooter from "@/_health/components/list_footer";
 
 let useRoute;
 let useNavigation;
@@ -21,7 +24,7 @@ export default function JournalDetail() {
     const user = useSelector((state: any) => state.user);
     const [imgs, setImgs] = useState<any>([])
     const [events, setEvents] = useState<any>([])
-    
+
     let router
     let navigation;
     if (useNavigation) {
@@ -34,7 +37,7 @@ export default function JournalDetail() {
     else {
         router = useRouter()
     }
-    const [data,setData] = useState<any>(JSON.parse(router.params.detail))
+    const [data, setData] = useState<any>(JSON.parse(router.params.detail))
     // const [detail, setDetail] = useState(JSON.parse(router.params.detail))
 
     useEffect(() => {
@@ -72,30 +75,21 @@ export default function JournalDetail() {
         const list = detail.moments
         return <View key={index}>
             {
-                (detail.scenario != 'MEAL' && detail.scenario != 'ACTIVITY') && <View style={{ flexDirection: 'column', display: 'flex',marginBottom:rpxToPx(48) }}>
-
-                    <Text className="detail_time" style={{color:MainColorType.link}}>{dayjs(detail.time.timestamp).format('HH:mm')}
-                        {
-                            detail.title && <Text style={{color:'#000'}}> {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 }} />
-                        } */}
+                (detail.scenario != 'MEAL' && detail.scenario != 'ACTIVITY') && <View style={{ flexDirection: 'column', display: 'flex', marginBottom: rpxToPx(48) }}>
+                    <TimeTitleDesc
+                        time={dayjs(detail.time.timestamp).format('HH:mm')}
+                        title={detail.title}
+                    // desc={item.description}
+                    />
                 </View>
             }
             {
-                detail.scenario == 'ACTIVITY' && !list && <View style={{ flexDirection: 'column', display: 'flex',marginBottom:rpxToPx(48) }}>
-
-                    <Text className="detail_time" style={{color:MainColorType.link}}>{dayjs(detail.time.timestamp).format('HH:mm')}
-                        {
-                            detail.title && <Text style={{color:'#000'}}> {detail.title}</Text>
-                        }
-                    </Text>
+                detail.scenario == 'ACTIVITY' && !list && <View style={{ flexDirection: 'column', display: 'flex', marginBottom: rpxToPx(48) }}>
+                    <TimeTitleDesc
+                        time={dayjs(detail.time.timestamp).format('HH:mm')}
+                        title={detail.title}
+                    // desc={item.description}
+                    />
 
                     {/* {
                         item.media && item.media.length > 0 && <Image mode="aspectFill" src={item.media[0].url} style={{ width: 60, height: 60, marginTop: 5 }} />
@@ -104,16 +98,12 @@ export default function JournalDetail() {
             }
             {
                 list && list.map((item, index) => {
-                    return <View key={index} style={{ flexDirection: 'column', display: 'flex',marginBottom:rpxToPx(48) }}>
-
-                        <Text className="detail_time" style={{color:MainColorType.link}}>{dayjs(item.time.timestamp).format('HH:mm')}
-                            {
-                                item.title && <Text style={{color:'#000'}}> {item.title}</Text>
-                            }
-                            {
-                                item.description && <Text style={{ color: '#000' }}> {item.description}</Text>
-                            }
-                        </Text>
+                    return <View key={index} style={{ flexDirection: 'column', display: 'flex', marginBottom: rpxToPx(48) }}>
+                        <TimeTitleDesc
+                            time={dayjs(detail.time.timestamp).format('HH:mm')}
+                            title={detail.title}
+                            desc={item.description}
+                        />
 
                         {/* {
                             item.media && item.media.length > 0 && <Image mode="aspectFill" src={item.media[0].url} style={{ width: 60, height: 60, marginTop: 5 }} />
@@ -133,7 +123,7 @@ export default function JournalDetail() {
                 <View style={{ flexDirection: 'column', display: 'flex', marginTop: rpxToPx(16) }}>
                     {
                         events.map((item, index) => {
-                            return eventList(item,index)
+                            return eventList(item, index)
                             // if (item.scenario != 'MEAL' && item.scenario != 'ACTIVITY') {
                             //     return <View key={index} style={{ marginBottom: index < events.length - 1 ? rpxToPx(48) : 0, display: 'flex', flexDirection: 'column' }}>
 
@@ -174,20 +164,25 @@ export default function JournalDetail() {
                     }
                 </View>
 
-                <View className="img_container">
-                    {
+                <View className="img_container" style={{marginTop:-rpxToPx(24)}}>
+                    <CoverList 
+                        imgs={imgs}
+                        count={imgs.length}
+                    />
+                    {/* {
                         imgs.map((item, index) => {
                             return <Image key={index} src={item} className="journal_img" mode="aspectFill" onClick={() => {
                                 preview(item)
                             }} />
                         })
-                    }
+                    } */}
                 </View>
 
-                <Text className="h24" style={{color:MainColorType.g02}}>发布于{dayjs(data.publish_timestamp).format('MM-DD HH:mm')}</Text>
+                <Text className="h24" style={{ color: MainColorType.g02 }}>发布于{dayjs(data.publish_timestamp).format('MM-DD HH:mm')}</Text>
             </View>
 
-            
+
         </View>
+        <ListFooter />
     </View>
 }

+ 2 - 3
src/pages/account/Profile.scss

@@ -148,9 +148,8 @@
 }
 
 .profile_cell_icon{
-    width: 48px;
-    height: 48px;
-    margin-right: 12px;
+    width: 36px;
+    height: 36px;
 }
 
 .profile_cell_line{

+ 11 - 11
src/pages/account/Profile.tsx

@@ -339,8 +339,8 @@ export default function Page() {
             <View className="profile_cell_space" />
             <IconTitleCell
                 onClick={goMetric}
-                title="Metric"
-                icon={<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />}
+                title="Body Metrics"
+                icon={<Image src={require('@assets/_health/setting_body.png')} className="profile_cell_icon" />}
             />
 
             <View className="profile_cell_space" />
@@ -348,16 +348,16 @@ export default function Page() {
                 onClick={() => {
                     jumpPage('/pages/account/Album')
                 }}
-                title="Album"
+                title="Photo Album"
                 showLine
-                icon={<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />}
+                icon={<Image src={require('@assets/_health/setting_album.png')} className="profile_cell_icon" />}
             />
             <IconTitleCell
                 onClick={() => {
                     jumpPage('/pages/account/Journal')
                 }}
                 title="Journal"
-                icon={<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />}
+                icon={<Image src={require('@assets/_health/setting_journal.png')} className="profile_cell_icon" />}
             />
 
             <View className="profile_cell_space" />
@@ -367,19 +367,19 @@ export default function Page() {
                 }}
                 title="Schedule"
                 showLine
-                icon={<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />}
+                icon={<Image src={require('@assets/_health/setting_calendar.png')} className="profile_cell_icon" />}
             />
             <IconTitleCell
                 onClick={goCalendar}
-                title="Calendar"
+                title="Streaks"
                 showLine
-                icon={<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />}
+                icon={<Image src={require('@assets/_health/setting_streak.png')} className="profile_cell_icon" />}
             />
             <IconTitleCell
                 onClick={goWeekly}
-                title="Window"
+                title="Windows"
                 showLine
-                icon={<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />}
+                icon={<Image src={require('@assets/_health/setting_chart.png')} className="profile_cell_icon" />}
             />
 
             <View className="profile_cell_space" />
@@ -387,7 +387,7 @@ export default function Page() {
                 onClick={goSetting}
                 title="Settings"
                 showLine
-                icon={<Image src={require('@assets/_health/sit.png')} className="profile_cell_icon" />}
+                icon={<Image src={require('@assets/_health/setting_more.png')} className="profile_cell_icon" />}
             />
             <View style={{ height: 140, flexShrink: 0 }}></View>
 

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä