Leon 2 rokov pred
rodič
commit
03f92cbc38

+ 2 - 2
ios/hola.xcodeproj/project.pbxproj

@@ -550,7 +550,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 16;
+				CURRENT_PROJECT_VERSION = 17;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = hola/Info.plist;
@@ -583,7 +583,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 16;
+				CURRENT_PROJECT_VERSION = 17;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				INFOPLIST_FILE = hola/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
ios/main.jsbundle


+ 14 - 7
src/components/input/LimitPickers.tsx

@@ -60,8 +60,8 @@ const Component = forwardRef((props: {
         const month = date.getMonth() + 1;
         const day = date.getDate();
         // const weekday = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'][date.getDay()];
-        const weekday = TimeFormatter.getDayOfWeek(date.getDay());
-        const formattedDate = global.language=='en'?`${weekday} ${TimeFormatter.getMonth(month)} ${day}`:`${TimeFormatter.getMonth(month)}${day}日 ${weekday}`;
+        const weekday = TimeFormatter.getDayOfWeek(date.getDay(), true);
+        const formattedDate = global.language == 'en' ? `${weekday} ${TimeFormatter.getMonth(month)} ${day}` : `${TimeFormatter.getMonth(month)}${day}日 ${weekday}`;
         if (i == 0) {
             days.push(TimeFormatter.getTodayUnit());
         }
@@ -170,22 +170,29 @@ const Component = forwardRef((props: {
         const day = date.getDate();
         const time = `${year}-${expandZero(month)}-${expandZero(day)}T${expandZero(hours[values[1]])}:${expandZero(minutes[values[2]])}:${expandZero((new Date(global.set_time)).getSeconds())}`;
         if (getTimestamp(time) > global.set_time) {
+            setValues([values[0], (new Date(global.set_time)).getHours(), (new Date(global.set_time)).getMinutes()])
+            setTimeout(() => {
+                setValues([values[0], (new Date(global.set_time)).getHours(), (new Date(global.set_time)).getMinutes()])
+            }, 300);
             Taro.showToast({
                 icon: 'none',
                 title: t('feature.common.toast.min_time_value'),
             })
-            setValues([values[0], (new Date(global.set_time)).getHours(), (new Date(global.set_time)).getMinutes()])
             return
         }
         else {
             var limitDate = new Date(props.limit)
 
             if (getTimestamp(time) < props.limit) {
+
+                setValues([(props.limitDay ? props.limitDay - 1 : 6) - getDaysDiff(limitDate), limitDate.getHours(), limitDate.getMinutes()])
+                setTimeout(() => {
+                    setValues([(props.limitDay ? props.limitDay - 1 : 6) - getDaysDiff(limitDate), limitDate.getHours(), limitDate.getMinutes()])
+                }, 300)
                 Taro.showToast({
                     icon: 'none',
                     title: t('feature.common.toast.max_time_value'),
                 })
-                setValues([(props.limitDay ? props.limitDay - 1 : 6) - getDaysDiff(limitDate), limitDate.getHours(), limitDate.getMinutes()])
                 return
             }
         }
@@ -227,7 +234,7 @@ const Component = forwardRef((props: {
             <Text className='modal_title' style={{ color: color }}>{props.title ? props.title : '测试标题 '}</Text>
             <View style={{ backgroundColor: 'transparent', position: 'relative' }}>
                 <PickerView
-                    itemStyle={{ color: '#fff',margin:0,padding:0 }}
+                    itemStyle={{ color: '#fff', margin: 0, padding: 0 }}
                     value={values}
                     className="picker"
                     maskClass="picker-mask"
@@ -265,11 +272,11 @@ const Component = forwardRef((props: {
             </View>
             <View className='modal_operate'>
                 <View className='modal_btn' style={{ backgroundColor: color + alpha }} onClick={cancel}>
-                    <Text className='modal_cancel_text' style={{ color: color,fontWeight:'bold' }}>{t('feature.common.picker_cancel_btn')}</Text>
+                    <Text className='modal_cancel_text' style={{ color: color, fontWeight: 'bold' }}>{t('feature.common.picker_cancel_btn')}</Text>
                 </View>
                 <View className='btn_space' />
                 <View className='modal_btn' style={{ backgroundColor: color }} onClick={confirm}>
-                    <Text className='modal_confirm_text' style={{ color: '#000',fontWeight:'bold' }}>{t('feature.common.picker_confirm_btn')}</Text>
+                    <Text className='modal_confirm_text' style={{ color: '#000', fontWeight: 'bold' }}>{t('feature.common.picker_confirm_btn')}</Text>
                 </View>
 
 

+ 0 - 2
src/components/input/SlidngScale.tsx

@@ -102,12 +102,10 @@ export default function Component(props: {
             if (isEnd && !isDraging) {
                 props.updateStatus(true)
                 setEnableText(true)
-                console.log('true')
             }
             else {
                 props.updateStatus(false)
                 setEnableText(false)
-                console.log('false')
             }
         }
     }, [isEnd, isDraging])

+ 31 - 8
src/components/layout/layout.tsx

@@ -7,13 +7,13 @@ import { rpxToPx } from "@/utils/tools";
 
 let useNavigation;
 let GradientText
+let RefreshControl;
 if (process.env.TARO_ENV == 'rn') {
+    RefreshControl = require("react-native").RefreshControl
     GradientText = require('@/components/basic/GradientText').default
     useNavigation = require("@react-navigation/native").useNavigation
 }
 
-
-
 export default function Layout(props: {
     children: React.ReactNode,
     type: TemplateType,
@@ -25,9 +25,12 @@ export default function Layout(props: {
     header?: React.ReactNode,
     secondPage?: boolean,
     isFastSleepTheme?: boolean,
-    titleShowStyle: NaviBarTitleShowType
+    titleShowStyle: NaviBarTitleShowType,
+    showPullToRefresh?: boolean
 }) {
     const { children, type, triggered } = props;
+    const [isRefreshing, setIsRefreshing] = useState(false)
+
     const [showTitle, setShowTitle] = useState(props.titleShowStyle == NaviBarTitleShowType.alwayShow)
     let navigation;
     if (useNavigation) {
@@ -48,6 +51,16 @@ export default function Layout(props: {
 
     }, [showTitle])
 
+    function onRefresh() {
+        if (props.refresh) {
+            props.refresh()
+        }
+        setIsRefreshing(true)
+        setTimeout(() => {
+            setIsRefreshing(false)
+        }, 1000)
+    }
+
     function onScroll(e) {
         if (props.titleShowStyle == NaviBarTitleShowType.scrollToShow) {
             if (e.detail.scrollTop > 70) {
@@ -75,10 +88,10 @@ export default function Layout(props: {
         if (process.env.TARO_ENV == 'rn') {
             return <GradientText style={{
                 fontSize: props.secondPage ? rpxToPx(56) : rpxToPx(72),
-                fontWeight:'bold',
-                marginLeft:rpxToPx(46),
-                marginTop:rpxToPx(24),
-                marginBottom:rpxToPx(24)
+                fontWeight: 'bold',
+                marginLeft: rpxToPx(46),
+                marginTop: rpxToPx(24),
+                marginBottom: rpxToPx(24)
             }}>{props.title}</GradientText>
         }
         return <Text className='layout_title fast_sleep_text'
@@ -178,7 +191,17 @@ export default function Layout(props: {
             </View>
         case TemplateType.customHeader:
             if (process.env.TARO_ENV == 'rn') {
-                return <ScrollView onScroll={onScroll} showsVerticalScrollIndicator={false}>
+                return <ScrollView onScroll={onScroll}
+                    refreshControl={
+                        props.showPullToRefresh ? <RefreshControl
+                            tintColor='white'
+                            colors={['white']} // 设置刷新指示器的颜色为白色
+                            progressBackgroundColor="white" // 设置刷新指示器的背景颜色为白色
+                            refreshing={isRefreshing}
+                            onRefresh={onRefresh}
+                        /> : null
+                    }
+                    showsVerticalScrollIndicator={false}>
                     <View className='flex'>
                         {
                             props.header

+ 114 - 104
src/context/locales/en.js

@@ -12,7 +12,7 @@ export default {
     },
     page: {
         clock: {
-            title: 'Cricadian Clock',
+            title: 'Circadian Clock',
         },
         activity: {
             title: 'Activity',
@@ -23,21 +23,24 @@ export default {
         food: {
             title: 'Food',
         },
+        workout:{
+            title:'Workouts'
+        },
         more: {
             title: 'More',
-            un_login: 'Not Logged In',
-            stone: 'Reverse Aging Stone',
+            un_login: 'Not logged in',
+            stone: 'Reverse aging stone',
             stone_desc: 'Member system upgrading, during which metric recording is temporarily exempt from reverse aging stone recording. Please stay tuned.',
             setting: 'Settings',
-            reset_session: 'Reset Session',
-            debug_mode: 'Debug Mode'
+            reset_session: 'Reset session',
+            debug_mode: 'Debug mode'
         },
         choose_scenario: {
-            title: 'Choose Cricadian Clock',
+            title: 'Select Circadian Clock',
             title_size: 25,
             sub_title: 'Fasting and sleep constitute the biological clock',
             btn_next: 'Next',
-            btn_more: 'Learn More',
+            btn_more: 'Learn more',
         },
         set_schedule: {
             fast_title: 'Fast Schedule',
@@ -64,27 +67,27 @@ export default {
         choose_auth: {
             app_name: '',
             btn_create_account: '',
-            btn_login: 'Log In',
-            btn_wechat: 'WeChat Log In',
-            btn_signup: 'Sign Up',
-            slogan: 'Healthy Cricadian Clock'
+            btn_login: 'Log in',
+            btn_wechat: 'WeChat login',
+            btn_signup: 'Sign up',
+            slogan: 'Healthy Circadian Clock'
         },
         auth: {
             agreement: 'I have read and agreed to the User Agreement and Privacy Policy',
         },
         records_history: {
-            time_title: 'Fasting and Sleep',
+            time_title: 'Fast and Sleep',
             metric_title: '{{title}} Records',
             activity_title: '{{title}} Records',
-            del_success: 'Deletion Successful'
+            del_success: 'Deletion successful'
         },
         setting: {
             title: 'Settings',
             version: 'Version',
-            logout: 'Log Out'
+            logout: 'Log out'
         },
         user_profile: {
-            title: 'Edit Profile',
+            title: 'Edit profile',
             nickname: 'Nickname',
             save: 'Save'
         }
@@ -95,13 +98,17 @@ export default {
             action_sheet_cancel: 'Cancel',
             picker_cancel_btn: 'Cancel',
             picker_confirm_btn: 'Confirm',
-            wait_for_end: 'Waiting for End',
-            not_started: 'Not Started',
-            not_completed: 'Not Completed',
+            wait_for_end: 'Awaiting end',
+            not_started: 'Not started',
+            not_completed: 'Not completed',
             btn_next: 'Next',
             btn_done: 'Done',
-            btn_set_and_next: 'Set and Next',
-            btn_set_and_done: 'Set and Done',
+            btn_set_and_next: 'Set and next',
+            btn_set_and_done: 'Set and done',
+            drag_order:'Press and drag to change order',
+            maintain:'Item under maintenance',
+            multi_timezones:'Multiple time zones',
+            different_timezone:'Different time zone',
             toast: {
                 min_value: 'Cannot go any lower',
                 max_value: 'Cannot go any higher',
@@ -127,44 +134,44 @@ export default {
                 delete_all_cancel_btn: 'Cancel',
                 delete_all_confirm_btn: 'Confirm',
 
-                logout_title: 'Log Out',
+                logout_title: 'Log out',
                 logout_content: 'Are you sure you want to log out?',
 
-                deluser_title: 'Delete Account',
+                deluser_title: 'Delete account',
                 deluser_content: 'Are you sure you want to delete this account?',
 
-                reset_session_title: 'Reset Session',
+                reset_session_title: 'Reset session',
                 reset_session_content: 'Are you sure you want to reset the session?'
             },
             no_data: {
-                title: 'Failed to Load',
+                title: 'Failed to load',
                 retry_btn: 'Retry',
-                no_record: 'No Records'
+                no_record: 'No records'
             }
         },
 
 
         auth: {
             create_account: {
-                title: 'Sign Up',
-                sub_title: 'Create Username',
+                title: 'Sign up',
+                sub_title: 'Create username',
                 input_username_placeholder: 'Username',
                 input_email_placeholder: 'Email',
                 footer_desc: 'Already have an account?',
-                footer_login: 'Go to Login',
+                footer_login: 'Go to login',
                 btn_next: 'Next'
             },
             login: {
-                input_account_placeholder: 'Username or Email',
+                input_account_placeholder: 'Username or email',
                 input_password_placeholder: 'Password',
                 footer_desc: 'Don\'t have an account?',
-                footer_sign_up: 'Sign Up'
+                footer_sign_up: 'Sign up'
             },
             create_password: {
-                title: 'Create Password',
-                sub_title: 'Enter and Confirm Password',
+                title: 'Create password',
+                sub_title: 'Enter and confirm password',
                 input_password_placeholder: 'Password',
-                input_password_confirm_placeholder: 'Confirm Password',
+                input_password_confirm_placeholder: 'Confirm password',
                 btn_next: 'Next'
             }
         },
@@ -181,7 +188,7 @@ export default {
                 ended_sleeping: 'Ended sleeping'
             },
             change_tz_alert: {
-                title: 'Detected New Time Zone',
+                title: 'New Time Zone Detected',
                 content: 'Changed to {{tz}} for you.',
                 confirm: 'Got it'
             },
@@ -190,26 +197,26 @@ export default {
                 fast_ongoing: 'Fasting',
                 sleep_wait_for_start: 'Sleep',
                 sleep_ongoing: 'Sleeping',
-                sleep_ongoing1: 'Sleep pending start',
+                sleep_ongoing1: 'Sleep awaiting start',
                 sleep_ongoing3: 'Sleep ended'
 
             },
             follow_wx_pub: {
                 // Unfollowed state
-                modal_unfollowed_title: 'Schedule Reminder',
+                modal_unfollowed_title: 'Schedule reminder',
                 modal_unfollowed_content: 'Follow our public account to enable schedule reminders!',
                 modal_unfollowed_cancel_btn: 'Back',
                 modal_unfollowed_confirm_btn: 'Enable',
 
-                h5_unfollowed_title: 'Enable Schedule Reminders',
+                h5_unfollowed_title: 'Enable schedule reminders',
 
                 // Followed state
-                modal_followed_title: 'Schedule Reminder Enabled',
+                modal_followed_title: 'Schedule reminder enabled',
                 modal_followed_content: 'Do you want to go to the public account to check?',
                 modal_followed_cancel_btn: 'Back',
-                modal_followed_confirm_btn: 'Go to Check',
+                modal_followed_confirm_btn: 'Go to check',
 
-                h5_followed_title: 'Schedule Reminders',
+                h5_followed_title: 'Schedule reminders',
 
             },
             console: {
@@ -217,45 +224,45 @@ export default {
                 fast_end: 'End fasting',
                 sleep_start: 'Start sleeping',
                 sleep_end: 'End sleeping',
-                total_duration: 'Total Duration',
-                countup: 'In Progress',
-                countdown_not_due: 'Time Remaining',
-                timeout: 'Time Expired',
-                fast_duration: 'Fasting Target Duration',
-                sleep_duration: 'Sleep Target Duration',
-                real_fast_start_dt: 'Fast Start Time',
-                real_fast_end_dt: 'Fast End Time',
-                real_sleep_start_dt: 'Sleep Start Time',
-                real_sleep_end_dt: 'Sleep End Time',
+                total_duration: 'Total duration',
+                countup: 'In progress',
+                countdown_not_due: 'Time remaining',
+                timeout: 'Time expired',
+                fast_duration: 'Fasting target duration',
+                sleep_duration: 'Sleep target duration',
+                real_fast_start_dt: 'Fast start time',
+                real_fast_end_dt: 'Fast end time',
+                real_sleep_start_dt: 'Sleep start time',
+                real_sleep_end_dt: 'Sleep end time',
             },
             schedule: {
                 section_title: 'Today',
-                follow_tip: 'Enable Schedule Reminders',
+                follow_tip: 'Enable schedule reminders',
                 timeout_tip: 'Complete the record and restore the schedule.',
-                action_sheet_adjust_schedule: 'Adjust Schedule',
-                duration_goals_by_stage: 'View Fasting Stage Goals',
-                current_stage: 'View Current Fasting Stage',
+                action_sheet_adjust_schedule: 'Adjust schedule',
+                duration_goals_by_stage: 'View fasting stage goals',
+                current_stage: 'View current fasting stage',
                 timeline: 'Schedule',
-                stage: 'Stage',
+                stage: 'Stages',
 
             },
             record_fast_sleep: {
                 header: {
                     latest_record: 'Recent',
-                    btn_show_all: 'View More'
+                    btn_show_all: 'View more'
                 },
                 item: {
                     fast: 'Fast',
                     sleep: 'Sleep'
                 },
                 timeline: 'Timeline',
-                stage: 'Stage',
-                pop_title: 'Details'
+                stage: 'Stages',
+                pop_title: 'Detail'
             },
 
             action_sheet: {
-                change_schedule: 'Adjust Schedule',
-                switch_scenario: 'Select Circadian Rhythm',
+                change_schedule: 'Adjust schedule',
+                switch_scenario: 'Select circadian clock',
                 cancel: 'Cancel'
             },
             dial: {
@@ -291,12 +298,15 @@ export default {
                 }
             },
             stage: {
-                a: 'Pre-sleep Fasting',
-                b: 'Fasting during Sleep',
-                c: 'Post-wake Fasting',
-                wait_for_start: 'Waiting to Start',
-                not_completed: 'Not Completed',
-                not_started: 'Not Started'
+                a: 'Pre-sleep fast',
+                b: 'Overnight fast',
+                c: 'Post-sleep fast',
+                a_ing: 'Pre-sleep fasting',
+                b_ing: 'Overnight fasting',
+                c_ing: 'Post-sleep fasting',
+                wait_for_start: 'Awaiting start',
+                not_completed: 'Not completed',
+                not_started: 'Not started'
             },
         },
         food: {
@@ -304,17 +314,17 @@ export default {
                 alert_text: 'Edit this meal',
                 edit_title: 'Operate on the current photo',
                 tag: 'Tag',
-                start_time: 'Start Time',
-                end_time: 'End Time',
-                edit_pic: 'Edit Picture',
-                share_pic: 'Share Picture',
+                start_time: 'Start time',
+                end_time: 'End time',
+                edit_pic: 'Edit picture',
+                share_pic: 'Share picture',
             },
             picker_tag_title: 'Tag',
-            picker_start_title: 'Start Time',
-            picker_end_title: 'End Time',
-            camera: 'Take Food Photo',
-            album: 'Choose from Album',
-            share_title: 'My Food Diary',
+            picker_start_title: 'Start time',
+            picker_end_title: 'End time',
+            camera: 'Take food photo',
+            album: 'Choose from album',
+            share_title: 'My food diary',
             prompt: 'Prompt',
             prompt_detail: 'The order of the diary list has changed, click to refresh',
             sence_desc: 'Take pictures of food, record pre-meal hunger\nRecord post-meal satiety',
@@ -332,47 +342,47 @@ export default {
             disable_switch_modal_btn: 'Got it'
         },
         workout: {
-            share_title: 'My Workout Diary',
-            finish_title: '{{name}} Timer Training',
+            share_title: 'My workout diary',
+            finish_title: '{{name}} Timer training',
             finish_current: 'Please finish the current workout first',
-            add_more: 'Add More',
-            choose_workout: 'Choose Exercise',
-            order: 'Adjust Order',
+            add_more: 'Add more',
+            choose_workout: 'Choose exercise',
+            order: 'Adjust order',
             choose_workout_desc: 'Choose exercises frequently practiced in fitness training\nor daily activities'
         },
         track_something: {
-            btn_record: 'Record',
-            picker_datetime: 'Record Time',
+            btn_record: 'Track',
+            picker_datetime: 'Record time',
             activity: {
-                pop_title: 'Details',
+                pop_title: 'Detail',
                 btn_status: {
-                    idle: 'Clock In',
-                    ing: 'Clocking In...',
-                    retry: 'Still Clocking In...',
-                    success: 'Clock In Successful',
-                    fail: 'Clock In Failed'
+                    idle: 'Track',
+                    ing: 'Tracking',
+                    retry: 'Still tracking',
+                    success: 'Tracked',
+                    fail: 'Tracking failed'
                 },
-                open: 'Open',
-                un_open: 'Not Open',
-                un_login: 'Not Logged In',
-                today_un_check: 'To Clock In Today',
-                check_history: 'View History',
-                login_then_check: 'Clock In after Logging In',
-                open_then_check: 'Clock In Steps after Opening',
+                open: 'Enable',
+                un_open: 'No record',
+                un_login: 'Not logged in',
+                today_un_check: 'Track now',
+                check_history: 'View history',
+                login_then_check: 'Log in to track',
+                open_then_check: 'Enable steps count',
                 total: 'Total',
-                sync: 'Sync',
-                check: 'Clock In'
+                sync: 'Auto synced',
+                check: 'Tracked'
             },
             metric: {
                 share_title: 'My Metric Records',
-                no_record: 'No Records',
-                un_login: 'Not Logged In',
-                login_can_check: 'Record after Logging In',
-                check_unlock_data: 'Record to Unlock Trends',
-                choose_metric: 'Choose Metric',
+                no_record: 'No record',
+                un_login: 'Not logged in',
+                login_can_check: 'Record after logging in',
+                check_unlock_data: 'Track now',
+                choose_metric: 'Choose metric',
                 choose_metric_desc: 'Select metrics based on your needs.',
-                order: 'Adjust Order',
-                composite:'Composite'
+                order: 'Adjust order',
+                composite:'Comp'
 
             },
             werun_auth: {

+ 10 - 0
src/context/locales/zh.js

@@ -23,6 +23,9 @@ export default {
         food: {
             title: '饮食',
         },
+        workout:{
+            title:'运动'
+        },
         more: {
             title: '更多',
             un_login: '未登录',
@@ -104,6 +107,10 @@ export default {
             btn_done: '完成',
             btn_set_and_next: "下一步",// "Set and Next"
             btn_set_and_done: "完成",// "Set and Done"
+            drag_order:'长按可拖动排序',
+            maintain:'项目维护中',
+            multi_timezones:'跨多时区',
+            different_timezone:'不同于当前时区',
             toast: {
                 min_value: '不能再小了',
                 max_value: '不能再大了',
@@ -298,6 +305,9 @@ export default {
                 a: '睡前断食',
                 b: '睡眠中断食',
                 c: '起床后断食',
+                a_ing: '睡前断食',
+                b_ing: '睡眠中断食',
+                c_ing: '起床后断食',
                 wait_for_start: '待开始',
                 not_completed: '未完成',
                 not_started: '未开始'

+ 14 - 9
src/features/trackSomething/components/Metric.tsx

@@ -160,16 +160,16 @@ export default function Component(props: any) {
     }
 
     function record(item: any) {
-
         if (user.isLogin) {
             //check data 
             var schemas = item.schemas
             for (var i = 0; i < schemas.length; i++) {
                 var obj = schemas[i]
-                if ((!obj.min && obj.min!=0) ||!obj.max || !obj.step || (!obj.default_value && obj.default_value!=0)){
+                if ((!obj.min && obj.min != 0) || !obj.max || !obj.step || (!obj.default_value && obj.default_value != 0)) {
+                    
                     Taro.showToast({
-                        title:'项目维护中',
-                        icon:'none'
+                        title: t('feature.common.maintain'),
+                        icon: 'none'
                     })
                     return;
                 }
@@ -177,7 +177,7 @@ export default function Component(props: any) {
 
 
             var now = new Date();
-            var t = (now.getHours() < 10 ? '0' + now.getHours() : now.getHours()) + ":" + (now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes());
+            // var t = (now.getHours() < 10 ? '0' + now.getHours() : now.getHours()) + ":" + (now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes());
             // setStrTime(t)
             setStrTime(TimeFormatter.dateTimeFormate(now.getTime()))
             setTime(now.getTime())
@@ -200,14 +200,14 @@ export default function Component(props: any) {
     //获取参考值
     function getTargetValue(item) {
         for (var i = 0; i < item.references.length; i++) {
-            if (item.references[i].selected){
+            if (item.references[i].selected) {
                 for (var j = 0; j < item.references[i].categories.length; j++) {
                     if (item.references[i].categories[j].is_default) {
                         return item.references[i].categories[j].value_range
                     }
                 }
             }
-            
+
         }
         return null
     }
@@ -216,7 +216,7 @@ export default function Component(props: any) {
         return <View>
 
 
-            <View className="metric_container">
+            <View className="metric_container" >
                 {
                     list.map((item: any, index: number) => {
                         var unit = ''
@@ -268,7 +268,11 @@ export default function Component(props: any) {
                 }
 
             </View>
-            <View className="space_width" ></View>
+            {
+                process.env.TARO_ENV=='weapp'?<View className="space_width" ></View>:
+                <View style={{height:0}}></View>
+            }
+            
         </View>
     }
 
@@ -511,6 +515,7 @@ export default function Component(props: any) {
             refresh={() => { getCards() }}
             triggered={triggered}
             titleShowStyle={NaviBarTitleShowType.scrollToShow}
+            showPullToRefresh={true}
         />
         {
             modalContent()

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

@@ -41,7 +41,7 @@ export default function Component(props: { themeColor: string, cancel: Function,
     return <View className='modal_content'>
         <View className='modal_title_view'>
             <Text className='modal_title1'>{t('feature.track_something.metric.order')}</Text>
-            <Text className='modal_subtitle'>长按可拖动排序</Text>
+            <Text className='modal_subtitle'>{t('feature.common.drag_order')}</Text>
         </View>
         <View className='modal_order_detail'>
             <MoveOrderList itemHeight={40} array={list} color={color} update={(temps)=>{setList(temps)}}/>

+ 2 - 2
src/features/trackTimeDuration/components/Console.tsx

@@ -362,8 +362,8 @@ export default function Component(props: { isNextStep?: boolean }) {
         if (props.isNextStep) t = sleepDuration / 60000
         var hour = Math.floor(t / 60)
         var minute = Math.floor(t % 60)
-        var hourUnit = TimeFormatter.getPickerDurationHoursUnit()
-        var minuteUnit = TimeFormatter.getPickerDurationMinutesUnit()
+        var hourUnit = TimeFormatter.getHoursUnit(hour)
+        var minuteUnit = TimeFormatter.getMinutesUnit(minute)
         return `${hour > 0 ? hour + hourUnit : ''}${minute > 0 ? minute + minuteUnit : ''}`
     }
 

+ 20 - 8
src/features/trackTimeDuration/components/RecordFastSleep.tsx

@@ -21,6 +21,11 @@ import TimelineStage from "./TimelineStage";
 import { jumpPage } from "../hooks/Common";
 // import { sqrt } from 'mathjs'
 
+let AppState;
+if (process.env.TARO_ENV == 'rn') {
+    AppState = require("react-native").AppState
+}
+
 export default function RecordFastSleep(props: { data: any, type: string, delSuccess?: Function }) {
     const [showDetailModal, setShowDetailModal] = useState(false)
     const [segmentIndex, setSegmentIndex] = useState(0)
@@ -30,8 +35,15 @@ export default function RecordFastSleep(props: { data: any, type: string, delSuc
     const canvasId = props.data.id
     const record = props.data;
 
+    const handleAppStateChange = (nextAppState) => {
+        checkTimezone()
+    };
+
     useEffect(() => {
         checkTimezone()
+        if (process.env.TARO_ENV == 'rn') {
+            AppState.addEventListener('change', handleAppStateChange);
+        }
         // console.log(sqrt(-4).toString())
     }, [props.data])
 
@@ -61,7 +73,7 @@ export default function RecordFastSleep(props: { data: any, type: string, delSuc
         }
 
         if (props.data.sleep) {
-            if (props.data.sleep.real_start_time_zone){
+            if (props.data.sleep.real_start_time_zone) {
                 if (tempTZ == '') {
                     tempTZ = props.data.sleep.real_start_time_zone
                 }
@@ -73,7 +85,7 @@ export default function RecordFastSleep(props: { data: any, type: string, delSuc
                 }
             }
 
-            if (props.data.sleep.real_end_time_zone){
+            if (props.data.sleep.real_end_time_zone) {
                 if (tempTZ != props.data.sleep.real_end_time_zone) {
                     isMulti = true
                 }
@@ -81,8 +93,8 @@ export default function RecordFastSleep(props: { data: any, type: string, delSuc
                     isDiff = true
                 }
             }
-            
-            
+
+
         }
         setDiffTimeZone(isDiff)
         setMultiTimeZone(isMulti)
@@ -102,10 +114,10 @@ export default function RecordFastSleep(props: { data: any, type: string, delSuc
 
     function subTitle(timestamp) {
         if (multiTimeZone) {
-            return 'Multiple time zones'
+            return t('feature.common.multi_timezones')
         }
         if (diffTimeZone) {
-            return 'Different time zone'
+            return t('feature.common.different_timezone')
         }
         return TimeFormatter.getDateAndWeek(timestamp)
     }
@@ -250,10 +262,10 @@ export default function RecordFastSleep(props: { data: any, type: string, delSuc
 
     function getArrowText() {
         if (multiTimeZone) {
-            return 'Multiple time zones'
+            return t('feature.common.multi_timezones')
         }
         if (diffTimeZone) {
-            return 'Different time zone'
+            return t('feature.common.different_timezone')
         }
         return recordTime()
     }

+ 5 - 5
src/features/trackTimeDuration/components/SetSchedule.rn.tsx

@@ -353,12 +353,12 @@ export default function Component() {
         var leftHours = Math.floor(count/60)
         var leftMinutes = count%60
         return scenario.step == 'fast' ? t('page.set_schedule.fast_target_desc', {
-            target_time: (hours > 0 ? hours + TimeFormatter.getPickerDurationHoursUnit() : '') + (minutes > 0 ? minutes + TimeFormatter.getPickerDurationMinutesUnit() : ''), 
-            left_time: (leftHours > 0 ? leftHours + TimeFormatter.getPickerDurationHoursUnit() : '') + (leftMinutes > 0 ? leftMinutes + TimeFormatter.getPickerDurationMinutesUnit() : '')
+            target_time: (hours > 0 ? hours + TimeFormatter.getHoursUnit(hours) : '') + (minutes > 0 ? minutes + TimeFormatter.getMinutesUnit(minutes) : ''), 
+            left_time: (leftHours > 0 ? leftHours + TimeFormatter.getHoursUnit(leftHours) : '') + (leftMinutes > 0 ? leftMinutes + TimeFormatter.getMinutesUnit(leftMinutes) : '')
         }) :
             t('page.set_schedule.sleep_target_desc', {
-                target_time: (hours > 0 ? hours + TimeFormatter.getPickerDurationHoursUnit() : '') + (minutes > 0 ? minutes + TimeFormatter.getPickerDurationMinutesUnit() : ''), 
-                left_time: (leftHours > 0 ? leftHours + TimeFormatter.getPickerDurationHoursUnit() : '') + (leftMinutes > 0 ? leftMinutes + TimeFormatter.getPickerDurationMinutesUnit() : '')
+                target_time: (hours > 0 ? hours + TimeFormatter.getHoursUnit(hours) : '') + (minutes > 0 ? minutes + TimeFormatter.getMinutesUnit(minutes) : ''), 
+                left_time: (leftHours > 0 ? leftHours + TimeFormatter.getHoursUnit(leftHours) : '') + (leftMinutes > 0 ? leftMinutes + TimeFormatter.getMinutesUnit(leftMinutes) : '')
             })
     }
 
@@ -377,7 +377,7 @@ export default function Component() {
                 <Text className="cell_header">{scenario.step == 'fast' ? t('page.set_schedule.fast_target') : t('page.set_schedule.sleep_target')}</Text>
                 <View className="cell_full" onClick={() => { setIsModalTimePicker(false); setIsOpen(true) }}>
                     <Text className="cell_title">{t('feature.track_time_duration.dial.duration')}</Text>
-                    <Text className="cell_value" style={{ color: scenario.step == 'fast' ? ColorType.fast : ColorType.sleep }}>{hours > 0 ? hours + TimeFormatter.getPickerDurationHoursUnit() : ''}{minutes > 0 ? minutes + TimeFormatter.getPickerDurationMinutesUnit() : ''}</Text>
+                    <Text className="cell_value" style={{ color: scenario.step == 'fast' ? ColorType.fast : ColorType.sleep }}>{hours > 0 ? hours + TimeFormatter.getHoursUnit(hours) : ''}{minutes > 0 ? minutes + TimeFormatter.getMinutesUnit(minutes) : ''}</Text>
                     <Image className="cell_arrow" src={require('@/assets/images/arrow3.png')} />
                 </View>
                 <Text className="cell_footer">{getTargetDesc()}</Text>

+ 1 - 1
src/features/trackTimeDuration/components/SetSchedule.weapp.tsx

@@ -360,7 +360,7 @@ export default function Component() {
         </View>
         <View className="duration_bg" style={{ opacity: operateType == 1 || operateType == 2 ? 1 : 0.4, backgroundColor: global.isDebug ? 'pink' : 'transparent' }} onClick={() => { setIsModalTimePicker(false);setIsOpen(true) }}>
           <Text className="duration_title schedule_text_key">{t('feature.track_time_duration.dial.duration')}</Text>
-          <Text className="duration_value schedule_text_value"  >{hours > 0 ? hours + TimeFormatter.getPickerDurationHoursUnit() : ''}{minutes > 0 ? minutes + '分钟' : ''}</Text>
+          <Text className="duration_value schedule_text_value"  >{hours > 0 ? hours + TimeFormatter.getHoursUnit(hours) : ''}{minutes > 0 ? minutes + '分钟' : ''}</Text>
         </View>
 
       </View>

+ 9 - 3
src/features/trackTimeDuration/components/Stage.rn.tsx

@@ -86,7 +86,9 @@ export default function Component(props: { data: any }) {
             </View>
             <View className="timeline-detail" style={{ color: ColorType.fast, opacity: 1,marginTop:rpxToPx(0) }}>
 
-                <Text className="scenario_name" style={{color: ColorType.fast, opacity: 1}}>{t('feature.track_time_duration.stage.a')}</Text>
+                <Text className="scenario_name" style={{color: ColorType.fast, opacity: 1}}>
+                    {props.data.status == 'ONGOING1' ?t('feature.track_time_duration.stage.a_ing'):t('feature.track_time_duration.stage.a')}
+                    </Text>
                 <View className="timeline-date2" style={{ color: ColorType.fast, opacity: 1 }}>{getStepATime(props.data)}</View>
 
             </View>
@@ -112,7 +114,9 @@ export default function Component(props: { data: any }) {
             </View>
             <View className="timeline-detail" style={{ color: ColorType.sleep, opacity: 1,marginTop:rpxToPx(0) }}>
 
-                <Text className="scenario_name" style={{color: ColorType.sleep, opacity: 1}}>{t('feature.track_time_duration.stage.b')}</Text>
+                <Text className="scenario_name" style={{color: ColorType.sleep, opacity: 1}}>
+                    {props.data.status == 'ONGOING2' ?t('feature.track_time_duration.stage.b_ing'):t('feature.track_time_duration.stage.b')}
+                    </Text>
                 <View className="timeline-date2" style={{ color: ColorType.sleep, opacity: 1 }}>{getStepBTime(props.data)}</View>
 
             </View>
@@ -137,7 +141,9 @@ export default function Component(props: { data: any }) {
                 </View>
             </View>
             <View className="timeline-detail" style={{ color: ColorType.fast, opacity: 1,marginTop:rpxToPx(0) }}>
-                <Text className="scenario_name" style={{color: ColorType.fast, opacity: 1}}>{t('feature.track_time_duration.stage.c')}</Text>
+                <Text className="scenario_name" style={{color: ColorType.fast, opacity: 1}}>
+                    {props.data.status == 'ONGOING3' ?t('feature.track_time_duration.stage.c_ing'):t('feature.track_time_duration.stage.c')}
+                    </Text>
                 <View className="timeline-date2" style={{ color: ColorType.fast, opacity: 1 }}>{getStepCTime(props.data)}</View>
 
             </View>

+ 0 - 1
src/features/trackTimeDuration/components/Stage.scss

@@ -92,7 +92,6 @@
 }
 
 .scenario_name{
-    font-weight: bold;
     font-size: 32px;
     line-height: 32px;
 }

+ 3 - 3
src/features/trackTimeDuration/hooks/Console.tsx

@@ -11,7 +11,7 @@ export const pickerDurations = () => {
         var count = i * 5 + 60;
         var hour = Math.floor(count / 60);
         var minute = count % 60;
-        list.push(`${hour > 0 ? hour + TimeFormatter.getPickerDurationHoursUnit() : ''}${minute > 0 ? minute + '分钟' : ''}`);
+        list.push(`${hour > 0 ? hour + TimeFormatter.getHoursUnit(hour) : ''}${minute > 0 ? minute + '分钟' : ''}`);
     }
     return list;
 }
@@ -30,11 +30,11 @@ export const durationDatas = (common: any) => {
     }
     var minutes: string[] = []
     for (let i = 0; i < 60; i += step) {
-        minutes.push(i + TimeFormatter.getPickerDurationMinutesUnit())
+        minutes.push(i + TimeFormatter.getMinutesUnit(i))
     }
     var hours: string[] = []
     for (let i = min; i <= max; i++) {
-        hours.push(i + TimeFormatter.getPickerDurationHoursUnit())
+        hours.push(i + TimeFormatter.getHoursUnit(i))
     }
     return [hours, minutes]
 }

+ 5 - 4
src/features/workout/Workout.tsx

@@ -237,7 +237,7 @@ export default function Component(props: any) {
             if (item.code != '_walk') {
                 if (item.schemas.length==0 ||!item.schemas[0].format){
                     Taro.showToast({
-                        title:'项目维护中',
+                        title:t('feature.common.maintain'),
                         icon:'none'
                     })
                     return;
@@ -552,7 +552,7 @@ export default function Component(props: any) {
     }
 
     function headerView() {
-        return <TitleView title={t('page.activity.title')} showAddBtn={loaded && !showErrorPage ? true : false} onClick={addBtnClick}>
+        return <TitleView title={t('page.workout.title')} showAddBtn={loaded && !showErrorPage ? true : false} onClick={addBtnClick}>
         </TitleView>
     }
 
@@ -565,7 +565,7 @@ export default function Component(props: any) {
     }
 
     function detail() {
-        return <View className="activity_container" style={{ marginBottom: 50 }}>
+        return <View className="activity_container" style={{ marginBottom: process.env.TARO_ENV=='weapp'?50:0 }}>
             {
                 list.map((item: any, index) => {
                     var value = '0'
@@ -890,11 +890,12 @@ export default function Component(props: any) {
 
     return <View style={{ position: 'relative' }}>
         <Layout type={TemplateType.customHeader} header={headerView()} children={showErrorPage ? <NoData refresh={() => { getCards() }} /> : detail()}
-            title={t('page.activity.title')}
+            title={t('page.workout.title')}
             // type={process.env.TARO_ENV == 'rn' ? TemplateType.flex : TemplateType.grid}
             refresh={() => { getCards() }}
             triggered={triggered}
             titleShowStyle={NaviBarTitleShowType.scrollToShow}
+            showPullToRefresh={true}
         />
         {
             modalContent()

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

@@ -585,7 +585,7 @@ export default function IndexPage() {
             user.isLogin && checkData && (checkData as any).latest_record &&
             <RecordFastSleep type='latest' data={(checkData as any).latest_record} delSuccess={getCheckData} />
           }
-          <View style={{ height: 100 }} />
+          <View style={{ height: process.env.TARO_ENV=='rn'?0:100 }} />
         </View>
 
         {

+ 41 - 8
src/pages/food/Food.tsx

@@ -2,31 +2,64 @@ import { View } from "@tarojs/components";
 import Tabbar from "@/components/navigation/TabBar";
 import './Food.scss'
 import FoodJournal from "@/features/food/FoodJournal";
-import { useDidShow, useReady, useShareAppMessage } from "@tarojs/taro";
+import { useDidShow, useReady, useRouter, useShareAppMessage } from "@tarojs/taro";
 import { useTranslation } from "react-i18next";
 import { useDispatch } from "react-redux";
 import { setFoodTabBadge } from "@/store/common";
+import Taro from "@tarojs/taro";
+import { useEffect } from "react";
 
 export default function Page() {
-    const {t} = useTranslation()
+    const { t } = useTranslation()
     const dispatch = useDispatch();
-    
-    useDidShow(()=>{
+    const router = useRouter();
+
+    useEffect(() => {
+        const params = router.params;
+        if (params && params.showFull && params.url) {
+            setTimeout(() => {
+                Taro.previewImage({
+                    current: params.url,
+                    urls: [params.url]
+                })
+            }, 150)
+
+        }
+
+        // Taro.previewImage({
+        //     current: 'www.baidu.com',
+        //     urls: ['www.baidu.com']
+        // })
+        // Taro.showModal({
+        //     title:'图片已删除',
+        //     showCancel:false
+        // })
+    }, [])
+
+
+
+
+    useDidShow(() => {
         dispatch(setFoodTabBadge(false))
+
     })
-    
+
 
     if (process.env.TARO_ENV == 'weapp') {
         useShareAppMessage((e) => {
+            var path = 'pages/food/Food'
+            if (global.food_share_img_url) {
+                path += '?showFull=true&url=' + global.food_share_img_url
+            }
             return {
                 title: t('feature.food.share_title'),
-                path: 'pages/food/Food',
-                imageUrl:global.food_share_img_url?global.food_share_img_url:''
+                path: path,
+                imageUrl: global.food_share_img_url ? global.food_share_img_url : ''
             }
         })
     }
 
-    
+
 
     return <View>
         <FoodJournal />

+ 62 - 8
src/pages/rn/RNMain.tsx

@@ -19,7 +19,8 @@ import Food from '@/pages/food/Food'
 import Working from '@/pages/workout/Working'
 import WorkoutDetail from '@/pages/workout/WorkoutDetail'
 import DemoA from '../clock/demoA';
-import { View } from '@tarojs/components';
+import {Image} from 'react-native';
+// import { View,Image } from '@tarojs/components';
 
 // 创建底部 Tab 导航器
 const Tab = createBottomTabNavigator();
@@ -80,12 +81,63 @@ export default function RNMain() {
         tabBarActiveTintColor: 'white', // 活动标签的颜色
         tabBarInactiveTintColor: 'gray', // 非活动标签的颜色
       })}>
-        <Tab.Screen name="Clock" component={ClockPage} />
-        <Tab.Screen name='DemoA' component={DemoAPage} />
-        {/* <Tab.Screen name="Food" component={FoodPage} /> */}
-        <Tab.Screen name="Metric" component={MetricPage} />
-        <Tab.Screen name="Workout" component={WorkoutPage} />
-        <Tab.Screen name="Profile" component={ProfilePage} />
+        <Tab.Screen name="Circadian Clock" component={ClockPage} options={{
+          tabBarIcon: ({size,focused,color}) => {
+            return (
+              <Image
+              resizeMode='contain'
+                style={{ width: size, height: size }}
+                source={require('@assets/images/camera.png')}
+              />
+            );
+          },
+        }}/>
+        {/* <Tab.Screen name='DemoA' component={DemoAPage} /> */}
+        <Tab.Screen name="Food" component={DemoAPage} options={{
+          tabBarIcon: ({size,focused,color}) => {
+            return (
+              <Image
+              resizeMode='contain'
+                style={{ width: size, height: size }}
+                source={require('@assets/images/camera.png')}
+              />
+            );
+          },
+        }}/>
+        <Tab.Screen name="Metrics" component={MetricPage} options={{
+          tabBarIcon: ({size,focused,color}) => {
+            return (
+              <Image
+              resizeMode='contain'
+                style={{ width: size, height: size }}
+                source={require('@assets/images/camera.png')}
+              />
+            );
+          },
+        }}/>
+        
+        <Tab.Screen name="Workouts" component={WorkoutPage} options={{
+          tabBarIcon: ({size,focused,color}) => {
+            return (
+              <Image
+              resizeMode='contain'
+                style={{ width: size, height: size }}
+                source={require('@assets/images/camera.png')}
+              />
+            );
+          },
+        }}/>
+        <Tab.Screen name="More" component={ProfilePage} options={{
+          tabBarIcon: ({size,focused,color}) => {
+            return (
+              <Image
+              resizeMode='contain'
+                style={{ width: size, height: size }}
+                source={require('@assets/images/camera.png')}
+              />
+            );
+          },
+        }}/>
       </Tab.Navigator>
     )
   }
@@ -117,7 +169,9 @@ export default function RNMain() {
         <Stack.Screen name='Auth' component={Auth} />
         <Stack.Screen name='Setting' component={Setting} />
         <Stack.Screen name='ChooseScenario' component={ChooseScenario} />
-        <Stack.Screen name='RecordsHistory' component={RecordsHistory} />
+        <Stack.Screen name='RecordsHistory' component={RecordsHistory} options={{
+          headerBackTitle:'hello world'
+        }}/>
         <Stack.Screen name='SetSchedule' component={SetSchedule} />
         <Stack.Screen name='ProfileSetting' component={ProfileSetting} />
         <Stack.Screen name='EditPage' component={EditPage} />

+ 40 - 25
src/utils/time_format.ts

@@ -303,14 +303,14 @@ export class TimeFormatter {
 
     // 根据间隔的大小返回不同的格式
     if (diff < 60000) {
-      return `${seconds}${TimeFormatter.getDurationSecondsUnit(seconds)}`;
+      return `${seconds}${TimeFormatter.getSecondsUnit(seconds)}`;
     } else if (diff < 3600000) {
-      return `${minutes}${TimeFormatter.getDurationMinutesUnit(minutes)}`;
+      return `${minutes}${TimeFormatter.getMinutesUnit(minutes)}`;
     } else {
       if (minutes == 0) {
-        return `${hours}${TimeFormatter.getDurationHoursUnit(hours)}`;
+        return `${hours}${TimeFormatter.getHoursUnit(hours)}`;
       }
-      return `${hours}${TimeFormatter.getDurationHoursUnit(hours)}${minutes}${TimeFormatter.getDurationMinutesUnit(minutes)}`;
+      return `${hours}${TimeFormatter.getHoursUnit(hours)}${minutes}${TimeFormatter.getMinutesUnit(minutes)}`;
     }
   }
   //格式化时间间隔
@@ -327,7 +327,7 @@ export class TimeFormatter {
     } else if (diff < 3600000) {
       return `00:${TimeFormatter.padZero(minutes)}:${TimeFormatter.padZero(seconds)}`;
     } else {
-      if (ingoreSeconds) return `${hours}${TimeFormatter.getDurationHoursUnit(hours)}${minutes}${TimeFormatter.getDurationMinutesUnit(minutes)}`;
+      if (ingoreSeconds) return `${hours}${TimeFormatter.getHoursUnit(hours)}${minutes}${TimeFormatter.getMinutesUnit(minutes)}`;
       return `${TimeFormatter.padZero(hours)}:${TimeFormatter.padZero(minutes)}:${TimeFormatter.padZero(seconds)}`;
     }
   }
@@ -402,13 +402,13 @@ export class TimeFormatter {
     const seconds = Math.floor(left % 60);
     var str = ''
     if (hours > 0) {
-      str = str + hours + TimeFormatter.getDurationHoursUnit(hours)
+      str = str + hours + TimeFormatter.getHoursUnit(hours)
     }
     if (minutes > 0) {
-      str = str + minutes + TimeFormatter.getDurationMinutesUnit(minutes)
+      str = str + minutes + TimeFormatter.getMinutesUnit(minutes)
     }
     if (seconds > 0) {
-      str = str + seconds + TimeFormatter.getDurationSecondsUnit(seconds)
+      str = str + seconds + TimeFormatter.getSecondsUnit(seconds)
     }
     return str
   }
@@ -421,15 +421,15 @@ export class TimeFormatter {
     var units: any = []
     if (hours > 0) {
       values.push(hours)
-      units.push(TimeFormatter.getDurationHoursUnit(hours))
+      units.push(TimeFormatter.getHoursUnit(hours))
     }
     if (minutes > 0) {
       values.push(minutes)
-      units.push(TimeFormatter.getDurationMinutesUnit(minutes))
+      units.push(TimeFormatter.getMinutesUnit(minutes))
     }
     if (seconds > 0) {
       values.push(seconds)
-      units.push(TimeFormatter.getDurationSecondsUnit(seconds))
+      units.push(TimeFormatter.getSecondsUnit(seconds))
     }
 
     return {
@@ -472,23 +472,34 @@ export class TimeFormatter {
   }
 
   //获取时长单位
-  static getPickerDurationHoursUnit = () => {
-    return global.language == 'en' ? ' H ' : '小时'
-  }
-  static getPickerDurationMinutesUnit = () => {
-    return global.language == 'en' ? ' M' : '分钟'
-  }
-
-  static getDurationHoursUnit = (hours) => {
-    return global.language == 'en' ? hours > 1 ? 'Hours ' : ' Hour ' : '小时'
+  static  getSecondsUnit = (seconds,isFull?:boolean) =>{
+    if (global.language=='en'){
+      if (isFull){
+        return seconds>1?' seconds ':' second '
+      }
+      return seconds>1?' secs ':' sec '
+    }
+    return  '秒'
   }
 
-  static getDurationMinutesUnit = (minutes) => {
-    return global.language == 'en' ? minutes > 1 ? ' Minutes ' : ' Minute ' : '分钟'
+  static  getMinutesUnit = (minutes,isFull?:boolean) =>{
+    if (global.language=='en'){
+      if (isFull){
+        return minutes>1?' minutes ':' minute '
+      }
+      return minutes>1?' mins ':' min '
+    }
+    return  '分钟'
   }
 
-  static getDurationSecondsUnit = (seconds) => {
-    return global.language == 'en' ? seconds > 1 ? ' Seconds ' : ' Second ' : '秒'
+  static  getHoursUnit = (hours,isFull?:boolean) =>{
+    if (global.language=='en'){
+      if (isFull){
+        return hours>1?' hours ':' hour '
+      }
+      return hours>1?' hrs ':' hr '
+    }
+    return  '小时'
   }
 
   static getTodayUnit = () => {
@@ -507,12 +518,16 @@ export class TimeFormatter {
     return global.language == 'en' ? 'Just now' : '刚刚'
   }
 
-  static getDayOfWeek = (index) => {
+  static getDayOfWeek = (index,isFull?:boolean) => {
     var weeks = ['日', '一', '二', '三', '四', '五', '六']
     var weeks2 = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'
     ];
+    var weeksFull = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
 
     if (global.language == 'en') {
+      if (isFull){
+        return weeksFull[index]
+      }
       return weeks2[index]
     }
     return '星期' + weeks[index]

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov