leon 1 anno fa
parent
commit
7b5d5ac601

+ 3 - 1
src/_health/base/new_modal.tsx

@@ -7,6 +7,7 @@ import { rpxToPx, vibrate } from '@/utils/tools';
 import { MainColorType } from '@/context/themes/color';
 import NewButton, { NewButtonType } from './new_button';
 import { IconClose } from '@/components/basic/Icons';
+import { useTranslation } from 'react-i18next';
 
 
 let ModalRN, Animated
@@ -28,6 +29,7 @@ export default function NewModal(props: {
 }) {
 
     const [isDismiss, setIsDismiss] = useState(false)
+    const {t} = useTranslation()
     let animation, animatedStyle;
     if (process.env.TARO_ENV == 'rn') {
         animation = useRef(new Animated.Value(0)).current;
@@ -154,7 +156,7 @@ export default function NewModal(props: {
                     onClick={() => {
                         props.confirm && props.confirm()
                     }}
-                    style={{ backgroundColor: props.themeColor ?? MainColorType.fast }}>{props.btnTitle ?? '确定'}</View>
+                    style={{ backgroundColor: props.themeColor ?? MainColorType.fast }}>{props.btnTitle ?? t('health.done')}</View>
             </View>
 
         </View>

+ 10 - 3
src/_health/components/add_label.tsx

@@ -50,6 +50,13 @@ export default function AddLabel(props: {
     }
 
     function done() {
+        if (!isEat() && isFullday && strLabel.trim()==''){
+            Taro.showToast({
+                title: t('health.tip_choose_desc'),
+                icon: 'none'
+            })
+            return;
+        }
         var event = ''
         if (props.window) {
             event = props.window == 'EAT' ? 'EAT_CUSTOM' : 'ACTIVE_CUSTOM'
@@ -129,7 +136,7 @@ export default function AddLabel(props: {
         else {
             if (value.length == 0) {
                 Taro.showToast({
-                    title: '请选择或输入标签',
+                    title: isEat()?t('health.tip_choose_meal'):t('health.tip_choose_activity'),
                     icon: 'none'
                 })
                 return;
@@ -230,7 +237,7 @@ export default function AddLabel(props: {
 
     return <NewModal title={isEat() ? t('health.my_meal') : t('health.my_activity')} dismiss={props.disMiss}
         themeColor={props.color ? props.color : getThemeColor(health.mode)}
-        btnTitle={props.justLabel ? '完成' : '下一步'}
+        btnTitle={props.justLabel ? t('health.done') : t('health.next')}
         confirm={() => {
             tapDone()
             // props.disMiss()
@@ -263,7 +270,7 @@ export default function AddLabel(props: {
                 showTimePicker && <NewModal
                     title={t('health.schedule_time')}
                     themeColor={props.color ? props.color : getThemeColor(health.mode)}
-                    btnTitle='完成'
+                    btnTitle={t('health.done')}
                     dismiss={() => {
                         setShowTimePicker(false)
                     }}

+ 7 - 5
src/_health/components/list_footer.tsx

@@ -1,21 +1,23 @@
-import { View,Text,Image } from "@tarojs/components";
+import { View, Text, Image } from "@tarojs/components";
 import './list_footer.scss'
+import { useTranslation } from "react-i18next";
 
-export default function ListFooter(props:{noMore?:boolean,loading?:boolean}){
+export default function ListFooter(props: { noMore?: boolean, loading?: boolean }) {
+    const { t } = useTranslation()
     return <View className="list_footer">
         {/* {
             props.noMore&&<Text className="no_more g02">没有更多了</Text>
         } */}
         {
-            props.loading && <Image src={require('@assets/_health/loading.png')} className="list_footer_loading"/>
+            props.loading && <Image src={require('@assets/_health/loading.png')} className="list_footer_loading" />
         }
         {
             props.loading && <View>
-                <Text className="h30">正在加载...</Text>
+                <Text className="h30">{t('health.loading')}</Text>
             </View>
         }
         {
-            props.noMore&& <Image src={require('@assets/_health/no_more.png')} style={{width:68,height:4}}/>
+            props.noMore && <Image src={require('@assets/_health/no_more.png')} style={{ width: 68, height: 4 }} />
         }
     </View>
 }

+ 4 - 19
src/_health/components/post_moment_time.tsx

@@ -16,6 +16,7 @@ import CellFooterText from '../base/cell_footer_text';
 import ChooseDateTime from './choose_date_time';
 import { MainColorType } from '@/context/themes/color';
 import Taro from '@tarojs/taro';
+import { useTranslation } from 'react-i18next';
 
 let isYesterdayTarget = false
 export default function PostMomentTime(props: {
@@ -34,6 +35,7 @@ export default function PostMomentTime(props: {
     const [showMore, setShowMore] = useState(false)
     const [time, setTime] = useState(props.time)
     const [minutes, setMinutes] = useState(30)
+    const {t} = useTranslation()
 
     function durationTime() {
         var hour = Math.floor(minutes / 60)
@@ -126,29 +128,12 @@ export default function PostMomentTime(props: {
         return scenario.picker_min_timestamp
     }
 
-    function scheduleTime() {
-        if (props.moment) {
-            var timestamp = props.moment.target ? props.moment.target.timestamp : new Date().getTime()
-            var time1 = parseInt(dayjs(timestamp).format('HHmm'))
-            var now = parseInt(dayjs().format('HHmm'))
-            if (time == dayjs(timestamp).format('HH:mm')) {
-                return `Check in:Today ${dayjs(global.set_time).format('HH:mm')}`
-            }
-            if (time1 > now) {
-                isYesterdayTarget = true
-                return `Scheduled for ${dayjs(timestamp).format('HH:mm')} yesterday`
-            }
-            isYesterdayTarget = false
-            return `Scheduled for ${dayjs(timestamp).format('HH:mm')} today`
-        }
-        return 'Scheduled for xxx today'
-    }
     /*
     type={expandIndex == index ? NewButtonType.alpha : NewButtonType.gray}
                     color={iFast ? MainColorType.fast : MainColorType.sleep}
     */
     return <NewModal
-        title='开始时间'
+        title={props.title??'开始时间'}
         dismiss={props.dismiss}
         confirm={() => {
             var date = new Date(selDate + ' ' + time + ':00')
@@ -156,7 +141,7 @@ export default function PostMomentTime(props: {
             if (date.getTime() > now.getTime()) {
                 setTime(dayjs(now.getTime()).format('HH:mm'))
                 Taro.showToast({
-                    title: '不能超过当前时间',
+                    title: t('health.future_time_limit'),
                     icon: 'none'
                 })
                 return

+ 5 - 3
src/_health/components/schedule_item.tsx

@@ -185,7 +185,7 @@ export default function ScheduleItem(props: {
                 disabled={(props.obj.window != 'EAT' && props.obj.window != 'ACTIVE' && !props.disable) || props.obj.window == 'FAST' || props.obj.window == 'SLEEP'}
                 options={[
                     {
-                        text: '删除',
+                        text: t('health.delete'),
                         style: {
                             backgroundColor: '#FF4949'
                         }
@@ -202,8 +202,10 @@ export default function ScheduleItem(props: {
                         // }
                     }
                     showAlert({
-                        title: '删除',
-                        content: '确认删除此计划',
+                        title: t('health.del_title'),
+                        content: '',
+                        cancelText:t('health.del_cancel'),
+                        confirmText:t('health.del_confirm'),
                         showCancel: true,
                         cancel: () => {
                             console.log('cancel')

+ 0 - 1
src/_health/pages/active_plan.tsx

@@ -151,7 +151,6 @@ export default function ActivePlan() {
                 labels={labels}
                 defaultValue={list.length == 0 ? schedule.title : ''}
                 disMiss={() => {
-                    setShowModal(false)
                     setShowModal(false)
                     getDatas()
                 }} />

+ 1 - 0
src/_health/pages/add_moment.tsx

@@ -531,6 +531,7 @@ export default function AddMoment() {
         }
         {
             showTimePicker && <PostMomentTime
+                title={ t('health.log_time_title')}
                 time={time}
                 date={selDate}
                 isTemp={is_temp}

+ 22 - 15
src/_health/pages/guide_active.tsx

@@ -45,7 +45,7 @@ export default function GuideActive() {
     const [showModal, setShowModal] = useState(false)
     const [labels, setLabels] = useState<any>([])
     const [posting, setPosting] = useState(false)
-    const [count,setCount] = useState(0)
+    const [count, setCount] = useState(0)
     const { t } = useTranslation()
 
     let navigation, showActionSheetWithOptions;
@@ -66,11 +66,11 @@ export default function GuideActive() {
             setHighlight(false)
         }, 2000)
 
-        timer = setInterval(()=>{
-            setCount(count=>count+1)
-        },1000)
+        timer = setInterval(() => {
+            setCount(count => count + 1)
+        }, 1000)
 
-        return ()=>{
+        return () => {
             clearInterval(timer)
         }
     }, [])
@@ -112,8 +112,10 @@ export default function GuideActive() {
         var items = list.filter(item => item.window == 'ACTIVE')
         if (scenario.access.max && scenario.access.max <= items.length) {
             showAlert({
-                title: '会员',
-                content: '会员desc',
+                title: t('health.become_member_title'),
+                content: t('health.become_member_desc', { count: scenario.access.max, type: t('health.member_activity') }),
+                cancelText: t('health.not_now'),
+                confirmText: t('health.choose_plan'),
                 showCancel: true,
                 confirm: () => {
                     jumpPage('/pages/store/product_list', 'ProductList', navigation)
@@ -152,7 +154,7 @@ export default function GuideActive() {
             if (labels.length == 0) return <View />
 
             var seconds = new Date().getSeconds()
-            if (seconds % 3 == 0) {
+            if (seconds % 1 == 0) {
                 guideIndex++;
                 if (guideIndex >= labels.length) {
                     guideIndex = 0
@@ -194,18 +196,23 @@ export default function GuideActive() {
                         onDelete={() => {
                             const scenario = getScenario(health.windows, 'ACTIVE')
                             if (scenario.access.min >= items.length) {
-                                showAlert({
-                                    title: '删除',
-                                    content: '最少保留' + items.length + '个',
-                                    showCancel: true,
-                                    confirm: () => {
-                                    }
+
+                                var type = ''
+                                if (global.language == 'en') {
+                                    type = items.length == 1 ? 'activity' : 'activities'
+                                }
+                                else {
+                                    type = '活动'
+                                }
+                                Taro.showToast({
+                                    title: t('health.keep_at_least', { number: items.length, type: type }),
+                                    icon: 'none'
                                 })
                                 return
                             }
                             if (errors.length > 0) {
                                 Taro.showToast({
-                                    title: '请先解决冲突',
+                                    title: t('health.resolve_conflict'),
                                     icon: 'none'
                                 })
                                 return

+ 15 - 10
src/_health/pages/guide_eat.tsx

@@ -105,7 +105,6 @@ export default function GuideEat() {
         }).then(res => {
 
             if ((res as any).result) {
-                debugger
                 dispatch(setSchedules((res as any).schedules))
                 dispatch(setFooter((res as any).footer))
                 setList((res as any).schedules)
@@ -130,8 +129,10 @@ export default function GuideEat() {
         var items = list.filter(item => item.window == 'EAT')
         if (scenario.access.max && scenario.access.max <= items.length) {
             showAlert({
-                title: '会员',
-                content: '会员desc',
+                title: t('health.become_member_title'),
+                content: t('health.become_member_desc', { count: scenario.access.max, type: t('health.member_meal') }),
+                cancelText: t('health.not_now'),
+                confirmText: t('health.choose_plan'),
                 showCancel: true,
                 confirm: () => {
                     jumpPage('/pages/store/product_list', 'ProductList', navigation)
@@ -192,18 +193,22 @@ export default function GuideEat() {
                         onDelete={() => {
                             const scenario = getScenario(health.windows, 'EAT')
                             if (scenario.access.min >= items.length) {
-                                showAlert({
-                                    title: '删除',
-                                    content: '最少保留' + items.length + '个',
-                                    showCancel: true,
-                                    confirm: () => {
-                                    }
+                                var type = ''
+                                if (global.language == 'en') {
+                                    type = items.length == 1 ? 'meal' : 'meals'
+                                }
+                                else {
+                                    type = '餐次'
+                                }
+                                Taro.showToast({
+                                    title: t('health.keep_at_least', { number: items.length, type: type }),
+                                    icon: 'none'
                                 })
                                 return
                             }
                             if (errors.length > 0) {
                                 Taro.showToast({
-                                    title: '请先解决冲突',
+                                    title: t('health.resolve_conflict'),
                                     icon: 'none'
                                 })
                                 return

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

@@ -122,7 +122,7 @@ export default function GuideSleep() {
     function more() {
         if (errors.length > 0) {
             Taro.showToast({
-                title: '请先解决冲突',
+                title: t('health.resolve_conflict'),
                 icon: 'none'
             })
             return;

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

@@ -405,7 +405,7 @@ export default function LogTime() {
         }
         if (findError) {
             Taro.showToast({
-                title: '不能超过当前时间',
+                title: t('health.future_time_limit'),
                 icon: 'none'
             })
             return

+ 64 - 48
src/_health/pages/schedules.tsx

@@ -253,10 +253,12 @@ export default function Schedules() {
 
     function add(isEat) {
         var isMax = false
+        var max = 0
         if (isEat) {
             setIsEat(true)
             var scenario = getScenario(health.windows, 'EAT')
             const countFastWindows = list.filter(item => item.window === 'EAT').length;
+            max = scenario.access.max
             if (scenario.access.max && countFastWindows >= scenario.access.max) {
                 isMax = true
             }
@@ -265,14 +267,18 @@ export default function Schedules() {
             setIsEat(false)
             var scenario = getScenario(health.windows, 'ACTIVE')
             const countFastWindows = list.filter(item => item.window === 'ACTIVE').length;
+            max = scenario.access.max
             if (scenario.access.max && countFastWindows >= scenario.access.max) {
                 isMax = true
             }
         }
         if (isMax) {
+            var type = isEat?t('health.member_meal'):t('health.member_activity')
             showAlert({
-                title: '会员',
-                content: '会员desc',
+                title: t('health.become_member_title'),
+                content: t('health.become_member_desc',{count:max,type:type}),
+                cancelText:t('health.not_now'),
+                confirmText:t('health.choose_plan'),
                 showCancel: true,
                 confirm: () => {
                     jumpPage('/pages/store/product_list', 'ProductList', navigation)
@@ -283,6 +289,49 @@ export default function Schedules() {
         setShowModal(true)
     }
 
+    function checkDel(obj){
+        const {window} = obj
+        if (window == 'EAT'){
+            var scenario = getScenario(health.windows, 'EAT')
+            const countFastWindows = list.filter(item => item.window === 'EAT').length;
+            var min = scenario.access.min
+            if (countFastWindows == min){
+                var type = ''
+                if (global.language == 'en'){
+                    type = min == 1?'meal':'meals'
+                }
+                else {
+                    type = '餐次'
+                }
+                Taro.showToast({
+                    title:t('health.keep_at_least',{number:min,type:type}),
+                    icon:'none'
+                })
+                return false
+            }
+        }
+        else {
+            var scenario = getScenario(health.windows, 'ACTIVE')
+            const countFastWindows = list.filter(item => item.window === 'ACTIVE').length;
+            var min = scenario.access.min
+            if (countFastWindows == min){
+                var type = ''
+                if (global.language == 'en'){
+                    type = min == 1?'activity':'activities'
+                }
+                else {
+                    type = '活动'
+                }
+                Taro.showToast({
+                    title:t('health.keep_at_least',{number:min,type:type}),
+                    icon:'none'
+                })
+                return false
+            }
+        }
+        return true
+    }
+
     function getAddColor() {
         if (selMode == 'FAST' || selMode == 'EAT') {
             return getThemeColor('EAT')
@@ -348,44 +397,6 @@ export default function Schedules() {
         });
     }
 
-
-    function more2() {
-        var items: any = ['设置提醒', '个性化名称'];
-        var temps = list.filter(item => {
-            return !item.specific_time
-        })
-        var needOrder = false
-        if (temps.length > 1) {
-            needOrder = true
-            items.push('排序')
-        }
-        if (errors.length == 0) {
-            items.push(t('health.reset_schedule'))
-        }
-        showActionSheet({
-            showActionSheetWithOptions: showActionSheetWithOptions,
-            title: t('health.more_actions'),
-            itemList: items,
-            success: (res) => {
-                if (res == 0 || res == 1) {
-                    var url = `./schedules_edit?type=${res == 0 ? 'reminder' : 'name'}&mode=${selMode}`
-                    jumpPage(url)
-                }
-                else if (res == 2) {
-                    if (needOrder) {
-                        jumpPage('./schedules_order?list=' + JSON.stringify(temps))
-                        return
-                    }
-                    jumpPage('/_health/pages/guide_begin')
-                }
-                else if (res == 3) {
-                    jumpPage('/_health/pages/guide_begin')
-                }
-
-            }
-        });
-    }
-
     function reset() {
         jumpPage('/_health/pages/guide_begin')
     }
@@ -436,14 +447,14 @@ export default function Schedules() {
                                 <StatusIndicator type={StatusType.img}
                                     fontColor="#000"
                                     fontSize={rpxToPx(24)}
-                                    text='已自动保存' color={MainColorType.success}>
+                                    text={t('health.auto_save')} color={MainColorType.success}>
                                     <IconSuccess color="#fff" width={rpxToPx(26)} />
                                 </StatusIndicator>
                             </View>
                         }
-                        {
+                        {/* {
                             !health.finish_setup && selMode == '' && <View className='success_tip' style={{ backgroundColor: MainColorType.blue + '1A', color: MainColorType.blue }}>You haven't finished setting up your schedule yet!</View>
-                        }
+                        } */}
                         {
                             list.map((obj, i) => {
                                 return <ScheduleItem
@@ -456,7 +467,7 @@ export default function Schedules() {
                                     showLine={i < list.length - 1}
                                     errors={errors}
                                     selMode={selMode}
-                                    disable={!health.finish_setup}
+                                    // disable={!health.finish_setup}
                                     labels={timeLabels}
                                     tapSpecificTime={(detail) => {
                                         obj.time = detail.time
@@ -486,11 +497,15 @@ export default function Schedules() {
                                     onDelete={() => {
                                         if (errors.length > 0) {
                                             Taro.showToast({
-                                                title: '请先解决冲突',
+                                                title: t('health.resolve_conflict'),
                                                 icon: 'none'
                                             })
                                             return
                                         }
+                                        if (!checkDel(obj)){
+                                            return;
+                                        }
+
                                         delSchedule(obj.id).then(res => {
                                             var array = JSON.parse(JSON.stringify(list))
                                             array.splice(i, 1)
@@ -550,7 +565,7 @@ export default function Schedules() {
                 }
 
                 {
-                    errors.length == 0 && health.finish_setup && <View style={{
+                    errors.length == 0 /*&& health.finish_setup*/ && <View style={{
                         backgroundColor: 'transparent',
                         position: 'relative',
                         display: 'flex',
@@ -607,7 +622,7 @@ export default function Schedules() {
                 {/* <ListFooter /> */}
 
                 <View style={{ flex: 1 }} />
-                {
+                {/* {
                     selMode == '' && !health.finish_setup && <View className="main_footer">
                         <NewButton
                             type={NewButtonType.fill}
@@ -621,7 +636,7 @@ export default function Schedules() {
                             }}
                         />
                     </View>
-                }
+                } */}
 
 
                 {/* <View className="edit_footer_btn" style={{ color: getThemeColor(health.mode), backgroundColor: getThemeColor(health.mode) + '33' }} onClick={tapEdit}>批量编辑</View> */}
@@ -645,6 +660,7 @@ export default function Schedules() {
                         op_page={getOpPage()}
                         confirm={(res) => {
                             checkResultData(res)
+                            setShowModal(false)
                         }}
                     />
                 }

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

@@ -19,7 +19,7 @@ export default function StreakCalendar() {
     const health = useSelector((state: any) => state.health);
     const [mode, setMode] = useState('EAT')
     const [selIndex, setSelIndex] = useState(0);
-    const weeks = ['日', '一', '二', '三', '四', '五', '六']
+    const weeks = global.language=='en'?['Sun','Mon','Tue','Wed','Thu','Fri','Sat']:['日', '一', '二', '三', '四', '五', '六']
     const indexBeginWeek = 0;
     const [spaces, setSpaces] = useState<any>([])
     const [days, setDays] = useState<any>([])

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

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

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

@@ -1,3 +1,4 @@
+
 .detail_header {
     background-color: #fff;
     width: 750px;
@@ -9,7 +10,7 @@
     min-height: 100vh;
 }
 
-html page {
+page {
     background-color: #fff;
 }
 

+ 11 - 11
src/_health/pages/timeline_detail.tsx

@@ -79,7 +79,7 @@ export default function TimelineDetail() {
         router = useRouter()
     }
 
-    const { schedule_id, event_id, window_id, isfastsleep, fast_type, disable_edit, uid,autoPost } = router.params
+    const { schedule_id, event_id, window_id, isfastsleep, fast_type, disable_edit, uid, autoPost } = router.params
 
 
     if (process.env.TARO_ENV == 'weapp') {
@@ -175,7 +175,7 @@ export default function TimelineDetail() {
         getDatas()
 
 
-        if (!window_id && ((health.mode != 'ACTIVE' && health.mode != 'EAT') || fast_type == 'LF') && autoPost=='1'){
+        if (!window_id && ((health.mode != 'ACTIVE' && health.mode != 'EAT') || fast_type == 'LF') && autoPost == '1') {
             setShowPop(true)
         }
     }, [])
@@ -478,10 +478,10 @@ export default function TimelineDetail() {
         var list: any = []
         if (window_id) {
             if (detail.archived) {
-                list = ['删除', 'Mark Done']
+                list = [t('health.delete'), 'Mark Done']
             }
             else {
-                list = ['删除']
+                list = [t('health.delete')]
             }
             showActionSheet({
                 showActionSheetWithOptions: showActionSheetWithOptions,
@@ -508,14 +508,14 @@ export default function TimelineDetail() {
         }
 
         if (health.mode != 'ACTIVE' && health.mode != 'EAT') {
-            list = ['删除']
+            list = [t('health.delete')]
         }
         else {
             if (disable_edit == '1') {
-                list = ['删除']
+                list = [t('health.delete')]
             }
             else {
-                list = ['编辑', '删除']
+                list = [t('health.edit'), t('health.delete')]
             }
 
         }
@@ -525,12 +525,12 @@ export default function TimelineDetail() {
             itemList: list,
             success: (res) => {
                 if (res >= 0) {
-                    if (list[res] == '删除') {
+                    if (list[res] == t('health.delete')) {
                         dispatch(setFirstEatId(''))
                         dispatch(setFirstActiveId(''))
                         del()
                     }
-                    else if (list[res] == '编辑') {
+                    else if (list[res] == t('health.edit')) {
                         edit()
                     }
                 }
@@ -861,7 +861,7 @@ export default function TimelineDetail() {
         }
         {
             showTimePicker && <NewModal
-                title='时间'
+                title={t('health.note_time')}
                 dismiss={() => setShowTimePicker(false)}
                 confirm={() => {
                     var str = dayjs().format('HH:mm')
@@ -871,7 +871,7 @@ export default function TimelineDetail() {
                         setTime(str)
                         setCount(count => count + 1)
                         Taro.showToast({
-                            title: '不能超过当前时间',
+                            title: t('health.future_time_limit'),
                             icon: 'none'
                         })
                         return

+ 36 - 2
src/context/locales/en.js

@@ -388,7 +388,7 @@ export default {
                 deluser_title: 'Confirm Deletion of Account',
                 deluser_content: 'This action cannot be undone.\nAre you sure you want to delete this account?',
                 deluser_cancel: 'Cancel',
-                deluser_confirm: 'Confirm Deletion',
+                deluser_confirm: 'Delete',
                 deluser_action_title: 'This account will be deleted permanently.',
                 deluser_action_confirm: 'Delete Account',
                 deluser_action_cancel: 'Cancel',
@@ -925,7 +925,7 @@ export default {
 
         schedule_conflict: 'Schedule Conflict',
         conflict_desc: 'We\'ve detected one or more time conflicts between your current schedule and another schedule.',
-        check_conflict: 'View Conflicts',
+        check_conflict: 'Check',
 
         today: 'Today',
 
@@ -1134,5 +1134,39 @@ export default {
         add_note:'Add Note',
 
         post:'Post',
+        done:'Done',
+        next:'Next',
+        log_time_title:'Start Time',
+        note_time:'Time',
+        future_time_limit:'Future time cannot be selected',
+
+        choose_member:'Choose Membership',
+        edit:'Edit',
+        cancel:'Cancel',
+        log_out:'Log Out',
+        log_out_title:'Confirm Log Out',
+        auto_save: 'Auto-saved',
+
+        resolve_conflict:'Please resolve conflict first',
+        tip_choose_meal:'Enter or choose a meal label',
+        tip_choose_activity:'Enter or choose an activity title',
+        tip_choose_desc:'Enter or choose a time description',
+
+        become_member_title:'Become a Member',
+        become_member_desc:'Members can add more than {{count}} {{type}} to their schedule.',
+        member_activity:'activities',
+        member_meal:'meals',
+        not_now:'Not Now',
+        choose_plan:'Enroll',
+
+        keep_at_least:'Keep at least {{number}} {{type}}',
+        no_vip_title:'Become a Member',
+        no_vip_desc:'You can add unlimited meals or activities to your daily schedule',
+
+        long_fast_alert_title:'Long Fast in Progress',
+        long_fast_alert_desc:'During the long fasting period, Fast with Sleep is temporarily unavailable, but you can still log your sleep under the \'Sleep\' tab.',
+        got_it: 'Got it',
+        loading:'Loading...',
+
     }
 }

+ 101 - 68
src/context/locales/zh.js

@@ -41,7 +41,7 @@ export default {
             title: '我',
             un_login: '未登录',
             stone: '成为 Pro 会员',
-            stone_desc: '解锁会员专享功能',
+            stone_desc: '解锁会员专享功能',
             pro_member: 'Pro 会员',
             member_desc: '{{time}} 到期',
             setting: '设置',
@@ -1066,74 +1066,107 @@ export default {
         my_meal: '我的餐次',
         schedule_time: '计划时间',
 
-        choose_enter_activity_name:'输入或选择活动名称',
-        chose_enter_time_desc:'输入或选择时间描述',
-        choose_enter_meal_label:'输入或选择餐次标签',
-        fix_time:'每天固定时间',
-        see_full_schedule:'查看完整日程',
-        edit_name:'编辑名称',
-        edit_order:'编辑排序',
-        back_no_save:'退出不保存',
-
-        verion_tip:'您已升级到最新版本',
-        verion_done:'完成设置',
-        del_title:'确认删除',
-        del_confirm:'删除',
-        del_cancel:'取消',
-        meal_label:'餐次标签',
-        activity_title:'活动标题',
-
-        done:'完成',
-        share_moment:'分享时刻',
-        no_content:'内容不存在',
-
-        add_my_first_activity:'添加我的第一个活动',
-
-        choose_photo:'从手机相册选择',
-        camera:'拍摄',
-        delete:'删除',
-        photos:'相册',
-
-        upcoming:'即将到来',
-        upcomings:'即将到来',
-        no_data:'暂无数据',
-
-        summary:'摘要',
-        sedentary_hours:'久坐小时数',
-        active_hours:'活跃小时数',
-        missed_hours:'错过小时数',
-        step:'总步数',
-        calories:'总热量消耗',
-        distance:'总距离',
+        choose_enter_activity_name: '输入或选择活动名称',
+        chose_enter_time_desc: '输入或选择时间描述',
+        choose_enter_meal_label: '输入或选择餐次标签',
+        fix_time: '每天固定时间',
+        see_full_schedule: '查看完整日程',
+        edit_name: '编辑名称',
+        edit_order: '编辑排序',
+        back_no_save: '退出不保存',
+
+        verion_tip: '您已升级到最新版本',
+        verion_done: '完成设置',
+        del_title: '确认删除',
+        del_confirm: '删除',
+        del_cancel: '取消',
+        meal_label: '餐次标签',
+        activity_title: '活动标题',
+
+        done: '完成',
+        share_moment: '分享时刻',
+        no_content: '内容不存在',
+
+        add_my_first_activity: '添加我的第一个活动',
+
+        choose_photo: '从手机相册选择',
+        camera: '拍摄',
+        delete: '删除',
+        photos: '相册',
+
+        upcoming: '即将到来',
+        upcomings: '即将到来',
+        no_data: '暂无数据',
+
+        summary: '摘要',
+        sedentary_hours: '久坐小时数',
+        active_hours: '活跃小时数',
+        missed_hours: '错过小时数',
+        step: '总步数',
+        calories: '总热量消耗',
+        distance: '总距离',
         last_updated: '最近更新于',
         // upcoming_check_ins:'接下来的打卡',
-        full_check_in_schedule:'完整打卡日程',
-        waking_hour:'清醒小时',
-        sleeping_hour:'睡眠小时',
-        no_active_hour:'暂无活跃小时',
-        see_full_check:'查看完整打卡日程',
-
-        check_begin_at:'打卡于 {{time}} 开始',
-        kcal:' 千卡',
-        km:' 公里',
-        steps:'步',
-        missed:'错过',
-        hourly:'每小时',
-        past_few_hour:'过去几个小时',
-
-        show_all:'全部打卡 ({{count}})',
-        show_less:'收起',
-        move_every_hour:'每小时走一走',
-        long_fast_subtitle:'24小时及更长时间的断食(辟谷)',
-        fast_sleep_subtitle:'调整你的生物钟',
-        start_fast:'开始断食',
-        end_fast:'结束断食',
-        goal:'目标',
-        how_feeling:'感觉如何?',
-        edit_goal:'编辑目标',
-
-        add_note:'添加笔记',
-
-        post:'发布',
+        full_check_in_schedule: '完整打卡日程',
+        waking_hour: '清醒小时',
+        sleeping_hour: '睡眠小时',
+        no_active_hour: '暂无活跃小时',
+        see_full_check: '查看完整打卡日程',
+
+        check_begin_at: '打卡于 {{time}} 开始',
+        kcal: ' 千卡',
+        km: ' 公里',
+        steps: '步',
+        missed: '错过',
+        hourly: '每小时',
+        past_few_hour: '过去几个小时',
+
+        show_all: '全部打卡 ({{count}})',
+        show_less: '收起',
+        move_every_hour: '每小时走一走',
+        long_fast_subtitle: '24小时及更长时间的断食(辟谷)',
+        fast_sleep_subtitle: '调整你的生物钟',
+        start_fast: '开始断食',
+        end_fast: '结束断食',
+        goal: '目标',
+        how_feeling: '感觉如何?',
+        edit_goal: '编辑目标',
+
+        add_note: '添加笔记',
+
+        post: '发布',
+        done: '完成',
+        next: '下一步',
+        log_time_title: '开始时间',
+        note_time: '时间',
+        future_time_limit: '不能选择未来时间',
+
+        choose_member: '选择会员计划',
+        edit: '编辑',
+
+        cancel: '取消',
+        log_out: '退出登录',
+        log_out_title: '确认退出登录',
+
+        auto_save: '已自动保存',
+        resolve_conflict: '请先解决冲突',
+        tip_choose_meal: '请选择或输入餐次标签',
+        tip_choose_activity: '请选择或输入活动名称',
+        tip_choose_desc: '请选择或输入时间描述',
+
+        become_member_title: '成为会员',
+        become_member_desc: '会员可以在日程中添加超过{{count}}个{{type}}',
+        member_activity:'活动',
+        member_meal:'餐次',
+        not_now: '暂不',
+        choose_plan: '选择计划',
+
+        keep_at_least:'需保留至少{{number}}个{{type}}',
+        no_vip_title:'成为会员',
+        no_vip_desc:'您可在您每天的日程中,添加无限多个餐次或活动',
+        long_fast_alert_title:'长断食进行中',
+        long_fast_alert_desc:'长断食期间,“断食与睡眠”功能暂不可用。不过,您仍可在“睡眠”窗口下记录您的睡眠。',
+        got_it: '我知道了',
+        loading:'正在加载...',
     }
 }

+ 32 - 23
src/features/health/MainConsole.tsx

@@ -67,11 +67,20 @@ export default function MainConsole(props: { type: WindowType }) {
         navigation = useNavigation()
     }
 
+
     useEffect(() => {
+        if(user.isLogin){
+            refreshLabels()
+        }
+    }, [user.isLogin])
+
+
+
+    function refreshLabels() {
         getLabelsEvent({ window: 'ACTIVE' }).then(res => {
             setLabels((res as any).labels)
         })
-    }, [])
+    }
 
     useEffect(() => {
         if (health.fast_with_sleep.status == 'OG2_MISALIGNED' || health.fast_with_sleep.status == 'OG2_NO1') {
@@ -167,7 +176,7 @@ export default function MainConsole(props: { type: WindowType }) {
             case 'MARK_DONE':
                 {
                     setBtnDisable(true)
-                    clockTimes('',{
+                    clockTimes('', {
                         check_items: [{
                             schedule_id: item.schedule_id,
                             date: dayjs().format('YYYYMMDD'),
@@ -639,9 +648,9 @@ export default function MainConsole(props: { type: WindowType }) {
                 list = active.timeline
                 if (active.onboard == false && active.status == 'WFS') {
                     var seconds = new Date().getSeconds()
-                    if (seconds%3==0){
+                    if (seconds % 1 == 0) {
                         guideIndex++;
-                        if (guideIndex>=list.length){
+                        if (guideIndex >= list.length) {
                             guideIndex = 0
                         }
                     }
@@ -673,22 +682,22 @@ export default function MainConsole(props: { type: WindowType }) {
                                 jumpPage('/pages/account/ChooseAuth', 'ChooseAuth', navigation)
                                 return
                             }
-                            if (!health.finish_setup) {
-                                showAlert({
-                                    title: '',
-                                    content: '在整个日程中,创建您的活动安排',
-                                    showCancel: true,
-                                    cancelText: '稍后',
-                                    confirmText: '立即设置',
-                                    cancel: () => {
-                                        global.showIndexAddActive(labels)
-                                    },
-                                    confirm: () => {
-                                        tapGuide()
-                                    }
-                                })
-                                return
-                            }
+                            // if (!health.finish_setup) {
+                            //     showAlert({
+                            //         title: '',
+                            //         content: '在整个日程中,创建您的活动安排',
+                            //         showCancel: true,
+                            //         cancelText: '稍后',
+                            //         confirmText: '立即设置',
+                            //         cancel: () => {
+                            //             global.showIndexAddActive(labels)
+                            //         },
+                            //         confirm: () => {
+                            //             tapGuide()
+                            //         }
+                            //     })
+                            //     return
+                            // }
                             global.showIndexAddActive(labels)
                             // setShowModal(true)
                             // jumpPage('/_health/pages/active_plan?schedule=' + JSON.stringify(list.length > 0 ? list[0] : '{}'))
@@ -717,7 +726,7 @@ export default function MainConsole(props: { type: WindowType }) {
             case 'DAY':
                 return t('health.switch_to', { scenario: t('health.night') })
             case 'NIGHT':
-                return t('health.switch_to', { scenario: global.language == 'en' ? 'Daylight' : '白天' })//'Switch to Daylight'
+                return t('health.switch_to', { scenario: global.language == 'en' ? 'Day' : '白天' })//'Switch to Daylight'
             case 'SLEEP':
                 return t('health.switch_to', { scenario: t('health.active') })
             case 'ACTIVE':
@@ -798,7 +807,7 @@ export default function MainConsole(props: { type: WindowType }) {
         var strYesterday = `${yesterday.getFullYear()}-${TimeFormatter.padZero(yesterday.getMonth() + 1)}-${TimeFormatter.padZero(yesterday.getDate())}`
         var strTomorrow = `${tomorrow.getFullYear()}-${TimeFormatter.padZero(tomorrow.getMonth() + 1)}-${TimeFormatter.padZero(tomorrow.getDate())}`
         Taro.showLoading({
-            title:'加载中'
+            title: '加载中'
         })
         systemLocation({
             lat: res.latitude,
@@ -811,7 +820,7 @@ export default function MainConsole(props: { type: WindowType }) {
         }).then(data => {
             global.refreshWindow()
             Taro.hideLoading()
-        }).catch((e)=>{
+        }).catch((e) => {
             Taro.hideLoading()
         })
     }

+ 0 - 114
src/features/health/MainHistory2.tsx

@@ -594,86 +594,6 @@ export default forwardRef((props: { type?: string, fast_type?: string, updateDat
         return showTip
     }
 
-    function newJournalTip() {
-        if (!props.type) {
-            var show = false
-
-            if (health.mode == 'EAT' && health.eat_journal_tip) {
-                show = true
-            }
-            else if (health.mode == 'ACTIVE' && health.active_journal_tip) {
-                show = true
-            }
-
-
-
-            if (show) {
-                return <View style={{
-                    display: 'flex',
-                    flexDirection: 'column',
-                    alignItems: 'center',
-                    paddingTop: rpxToPx(82),
-                    paddingBottom: rpxToPx(82),
-                    backgroundColor: '#fff',
-                    position: 'relative'
-                }}>
-                    <View className="archived_bg" onClick={() => {
-                        // jumpPage('/_health/pages/archive')
-                        var data = list[0]
-                        jumpPage(`/_health/pages/timeline_detail?window_id=${data.window_id}&type=recent&isfastsleep=0&timestamp=${data.publish.timestamp}`)
-
-                        // getLatestJournal(false, {
-                        //     id: health.mode == 'EAT' ? global.eatTipId : global.activeTipId,
-                        //     user_confirmed: true
-                        // }).then(res => {
-
-                        // })
-                        setTimeout(() => {
-                            if (health.mode == 'EAT') {
-                                dispatch(setEatTip(false))
-                            }
-                            else {
-                                dispatch(setActiveTip(false))
-                            }
-                        }, 1000)
-
-                    }}>
-                        <Text className="archived_text bold" style={{ color: getThemeColor(health.mode) }}>{t('health.new_journal_created')}</Text>
-                        {/* {
-                            health.eatArchived.images.map((item, index) => {
-                                return <Image src={item} key={index} className="archived_img" mode="aspectFill" />
-                            })
-                        } */}
-                        <IconArrow color={MainColorType.g02} width={rpxToPx(34)} />
-                    </View>
-                    <View className="border_footer_line" />
-                </View>
-                // return <View className="h28 bold" 
-                // onClick={()=>{
-                //     if (health.mode == 'EAT'){
-                //         dispatch(setEatTip(false))
-                //     }
-                //     else {
-                //         dispatch(setActiveTip(false))
-                //     }
-                // }}
-                // style={{
-                //     width:rpxToPx(750),
-                //     height:rpxToPx(156),
-                //     display:'flex',
-                //     alignItems:'center',
-                //     justifyContent:'center',
-                //     backgroundColor:'#fff',
-                //     color:getThemeColor(health.mode),
-
-                // }}>
-                //     New Journal Created {'>'}
-                // </View>
-            }
-        }
-        return <View />
-    }
-
     return <View style={{ width: rpxToPx(750), marginTop: rpxToPx(60) }}>
 
         {
@@ -687,38 +607,11 @@ export default forwardRef((props: { type?: string, fast_type?: string, updateDat
                         }, 1000)
                     }} className="archive_bg" style={{ position: 'relative' }}>
                         <Image className="archive_bg" src={require('@assets/_health/journal.png')} />
-                        {/* {
-                            ((health.mode == 'EAT' && health.eatArchivedTotal > 0) ||
-                                (health.mode == 'ACTIVE' && health.activeArchivedTotal > 0)) && <View style={{
-                                    width: rpxToPx(12),
-                                    height: rpxToPx(12),
-                                    borderRadius: rpxToPx(6),
-                                    backgroundColor: 'red',
-                                    position: 'absolute',
-                                    right: -6,
-                                    top: 0
-                                }} />
-                        } */}
 
                     </View>
                 }
             </View>
         }
-        {/* {
-            archiveContent()
-        } */}
-        {/* {
-            newJournalTip()
-        } */}
-        {/* {
-            (health.mode == 'EAT' || health.mode == 'ACTIVE') && <RightArrowRow title={health.mode == 'ACTIVE' ? t('health.title_active_journal') : t('health.title_food_journal')}
-                onClick={() => {
-
-                    var showBadge = (health.mode == 'EAT' && health.eat_journal_tip) ||
-                        (health.mode == 'ACTIVE' && health.active_journal_tip)
-                    jumpPage('/pages/account/Journal?type=' + health.mode + `&show_tip=${showTipF() && false ? '1' : '0'}&show_badge=${showBadge ? 1 : 0}`)
-                }} />
-        } */}
         {
             list.length == 0 && <NoRecord />
         }
@@ -727,13 +620,6 @@ export default forwardRef((props: { type?: string, fast_type?: string, updateDat
                 {
                     list.map((item, index) => {
                         if (itemLayouts.length >= index + 1 && pageTop > 0) {
-                            // if (Math.abs(itemLayouts[index] - pageTop) > 2500) {
-                            //     return <View style={{ height: itemHeights[index] }} id={`history-${index}`} key={index}>
-                            //         {
-                            //             historyMonth(index)
-                            //         }
-                            //     </View>
-                            // }
                             if (Math.abs(itemLayouts[index] - pageTop) > 3000) {
                                 return <View style={{ height: itemHeights[index] }} id={`history-${index}`}>
                                     {/* {index} */}

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

@@ -11,7 +11,7 @@ import { MainColorType } from "@/context/themes/color";
 import { useTranslation } from "react-i18next";
 
 export default function Calendar(props: { year: number, month: number, mode: string }) {
-    const weeks = ['日', '一', '二', '三', '四', '五', '六']
+    const weeks = global.language=='en'?['Sun','Mon','Tue','Wed','Thu','Fri','Sat']:['日', '一', '二', '三', '四', '五', '六']
     const indexBeginWeek = 0;
     const [spaces, setSpaces] = useState<any>([])
     const [days, setDays] = useState<any>([])

+ 3 - 4
src/pages/account/Profile.tsx

@@ -281,7 +281,6 @@ export default function Page() {
     }
 
     function isMember() {
-        console.log('aaaa')
         if (!user.isLogin || !accessObj || !accessObj.access) {
             return false;
         }
@@ -301,7 +300,7 @@ export default function Page() {
             return dayjs(timestamp).format('MMM D HH:mm')
         }
 
-        return dayjs(timestamp).format('YYYY年MM月DD日 HH:mm')
+        return dayjs(timestamp).format('YYYY年MM月D日 HH:mm')
     }
 
     function detail() {
@@ -357,9 +356,9 @@ export default function Page() {
                         <View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
                             <IconVip width={rpxToPx(36)} color={MainColorType.blue} />
                             <View style={{ width: rpxToPx(8) }} />
-                            <View className="h34 bold" style={{ color: MainColorType.blue }}>成为 Pro 会员</View>
+                            <View className="h34 bold" style={{ color: MainColorType.blue }}>{isMember()?t('page.more.pro_member'):t('health.no_vip_title')}</View>
                         </View>
-                        <View className="h24" style={{ color: MainColorType.g02, marginTop: rpxToPx(12) }}>{isMember() ? memberdesc() : '解锁会员专项功能'}</View>
+                        <View className="h24" style={{ color: MainColorType.g02, marginTop: rpxToPx(12),textAlign:'center' }}>{isMember() ? memberdesc() : t('health.no_vip_desc')}</View>
                         <View style={{ height: rpxToPx(18), flexShrink: 0 }} />
                     </View>
                     <IconArrow width={rpxToPx(34)} color={MainColorType.g02} />

+ 13 - 6
src/pages/account/Setting.tsx

@@ -90,8 +90,10 @@ export default function Page() {
     async function logoutF() {
         // var showDayRing = await getStorage('showedDisqualifiedAlert') || false;
         showAlert({
-            title: t('feature.common.modal.logout_title'),
-            content: t('feature.common.modal.logout_content'),
+            title: t('health.log_out_title'),
+            content:'',
+            cancelText:t('health.cancel'),
+            confirmText:t('health.log_out'),
             showCancel: true,
             confirm: () => {
                 logout().then(res => {
@@ -118,9 +120,12 @@ export default function Page() {
                     // }
 
                     if (process.env.TARO_ENV == 'weapp') {
-                        Taro.switchTab({
-                            url: '/pages/clock/Clock'
+                        Taro.reLaunch({
+                            url:'/pages/clock/Clock'
                         })
+                        // Taro.switchTab({
+                        //     url: '/pages/clock/Clock'
+                        // })
                         //check
                         //退出到首页后,点击登录,会再次执行naviback函数
                         // Taro.navigateBack();
@@ -167,13 +172,15 @@ export default function Page() {
     function delUser() {
         dispatch(clear() as any);
         setTimeout(() => {
-            navigation.goBack()
+            Taro.reLaunch({
+                url:'/pages/clock/Clock'
+            })
         }, 1500)
     }
 
     function changeLanguage() {
         showActionSheet({
-            alertText: '更改语言',
+            // alertText: '更改语言',
             itemList: ['中文', 'English', '微信系统语言'],
             success: function (res) {
                 

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

@@ -16,6 +16,7 @@ import { rpxToPx } from "@/utils/tools";
 import AddLabel from "@/_health/components/add_label";
 import { jumpPage } from "@/features/trackTimeDuration/hooks/Common";
 import showAlert from "@/components/basic/Alert";
+import { setTitle } from "@/store/health";
 
 let useNavigation;
 
@@ -65,6 +66,8 @@ export default function Clock() {
                 headerTitle: '',
             });
         }
+
+        dispatch(setTitle(''))
         global.memberAlert = false;
         if (process.env.TARO_ENV == 'weapp') {
             loadWXCache()
@@ -314,8 +317,15 @@ export default function Clock() {
                                 setTimeout(()=>{
                                     setShowModal(false)
                                 },1000)
+
+                                if ((res as any).show_conflict_dialog){
+                                    jumpPage('/_health/pages/schedules?mode='+ '&error=' + JSON.stringify(res))
+                                }
+                                else {
+                                    jumpPage('/_health/pages/schedules?mode=' + health.mode + '&error=' + JSON.stringify(res))
+                                }
+                                
                                 
-                                jumpPage('/_health/pages/schedules?mode=' + health.mode + '&error=' + JSON.stringify(res))
                                 // jumpPage(`./schedules?mode=&schedules=${JSON.stringify((res as any).schedules)}&errors=${JSON.stringify((res as any).error_messages)}`)
                             }
                         })

+ 8 - 9
src/pages/discover/discover.tsx

@@ -76,16 +76,15 @@ export default function Discover() {
                     }
                     if (health.long_fast.status == 'OG') {
                         showAlert({
-                            title: '长断食进行中',
-                            content: '当前有一个正在进行的长断食记录,要转换为间歇性断食吗?',
-                            showCancel: true,
-                            cancelText: '取消',
-                            confirmText: '确定',
+                            title: t('health.long_fast_alert_title'),
+                            content: t('health.long_fast_alert_desc'),
+                            showCancel: false,
+                            confirmText: t('health.got_it'),
                             confirm: () => {
-                                updateFast({ fast_type: 'IF' }).then(res => {
-                                    global.refreshWindow()
-                                    jumpPage('/_health/pages/fast_sleep')
-                                })
+                                // updateFast({ fast_type: 'IF' }).then(res => {
+                                //     global.refreshWindow()
+                                //     jumpPage('/_health/pages/fast_sleep')
+                                // })
                             }
                         })
                         return

+ 6 - 2
src/pages/store/product_list.tsx

@@ -69,6 +69,9 @@ export default function ProductList() {
 
         }
         else {
+            Taro.setNavigationBarTitle({
+                title:t('health.choose_member')
+            })
             getProducts();
         }
     }, [])
@@ -143,6 +146,7 @@ export default function ProductList() {
                 success(dt) {
                     orderCheck(order_no).then(res => {
                         dispatch(setAccessData((res as any).access))
+                        global.refreshWindow()
                         Taro.navigateBack({
                             delta: 1
                         })
@@ -256,10 +260,10 @@ export default function ProductList() {
         </View>
 
     return <View style={{ flex: 1, position: 'relative' }}>
-        <View className='seg_bg'>
+        {/* <View className='seg_bg'>
             <Text className={segmentIndex == 0 ? 'seg_sel' : 'seg_nor'} onClick={() => setSegmentIndex(0)}>Non-renew</Text>
             <Text className={segmentIndex == 1 ? 'seg_sel' : 'seg_nor'} onClick={() => setSegmentIndex(1)}>Auto-renew</Text>
-        </View>
+        </View> */}
         <ScrollView style={{ flex: 1 }}>
             {
                 segmentIndex == 0 && packages.map((item, index) => {

+ 0 - 1
src/services/health.tsx

@@ -222,7 +222,6 @@ export const updateEventDuration = (id, duration) => {
 }
 
 export const clockTimes = (url,params) => {
-    debugger
     return new Promise((resolve, reject) => {
         request({
             url: API_HEALTH_CLOCK+url, method: 'POST', data: { ...params }