Przeglądaj źródła

language update

leon 1 rok temu
rodzic
commit
beacf1ee42

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

@@ -17,7 +17,7 @@ export default function Recents() {
     const historyRef = useRef()
     function detail() {
         return <View style={{ display: 'flex', flexDirection: 'column', height: '100vh' }}>
-            <NewHeader type={NewHeaderType.left} title={t('health.recents')} />
+            <NewHeader type={NewHeaderType.left} title={t('health.check_ins')} />
             <ScrollView style={{ width: rpxToPx(750), flexDirection: 'row', display: 'flex', height: rpxToPx(72) }} scrollX enableFlex showScrollbar={false}>
                 <View style={{ width: rpxToPx(40), flexShrink: 0 }} />
                 <NewButton type={NewButtonType.img} onClick={() => setMode('EAT')}>
@@ -68,7 +68,7 @@ export default function Recents() {
 
         // secondPage={true}
         // titleColor={'#fff'}
-        title={t('health.recents')}
+        title={t('health.check_ins')}
         type={TemplateType.customHeader}
         // refresh={() => { refresh() }}
         // triggered={triggered}

+ 27 - 13
src/_health/pages/timeline_detail.tsx

@@ -8,7 +8,7 @@ import dayjs from "dayjs";
 import { getScenario, getThemeColor } from "@/features/health/hooks/health_hooks";
 import { baseUrl, SHARE_COVER_URL } from "@/services/http/api";
 import { checkAuthorized } from "@/utils/check_authorized";
-import { createMoment, delEvents, delRecord, getEvents, getRecordDetail, makeDone, windows } from "@/services/health";
+import { createMoment, delEvents, delRecord, getEvents, getRecordDetail, homeInfo, makeDone, windows } from "@/services/health";
 import NewButton, { NewButtonType } from "../base/new_button";
 import { IconClose, IconError, IconLongFast, IconShare } from "@/components/basic/Icons";
 import { rpxToPx, vibrate } from "@/utils/tools";
@@ -37,6 +37,7 @@ import LongCard from "@/_moment/components/long_card";
 import { setFollow } from "@/store/long";
 import MomentDetailShare from "@/pages/moment/moment_detail_share";
 import { followUser } from "@/services/friend";
+import { setActions, setEvents, setTimeData } from "@/store/record";
 
 let useRoute;
 let useNavigation;
@@ -365,9 +366,29 @@ export default function TimelineDetail() {
                 dispatch(setLongFast((res as any).long_fast))
             }).catch(e => {
             })
+
+            homeInfo().then(res => {
+                console.log('events', res)
+                dispatch(setEvents((res as any).events))
+                dispatch(setActions((res as any).actions))
+
+                dispatch(setTimeData(getTime(res)))
+            }).catch(e => {
+            })
         }
     }, [user.isLogin])
 
+    function getTime(res) {
+        var now = dayjs().format('HH:mm')
+        for (var i = 0; i < res.time_messages.length; i++) {
+            var obj = res.time_messages[i]
+            if (now >= obj.start_time && now < obj.end_time) {
+                return obj
+            }
+        }
+        return res.time_messages[res.time_messages.length - 1]
+    }
+
     useEffect(() => {
         if (desc.length > 0 || imgUrl.length > 0) {
             setBtnDisable(false)
@@ -604,9 +625,9 @@ export default function TimelineDetail() {
     function edit() {
         if (list.length == 0) return
         var id = list[0].id
-        global.edit_timeline = detail
-        jumpPage(`./add_moment?edit=1&event_id=${event_id}&id=${id}`)
-        // jumpPage('./add_moment?edit=1&event_id='+id+'&detail='+JSON.stringify(detail))
+        // global.edit_timeline = detail
+        // jumpPage(`./add_moment?edit=1&event_id=${event_id}&id=${id}`)
+        jumpPage(`/_record/pages/log_record?edit=1&event_id=${detail.id}&scenario=${detail.scenario}`)
     }
 
     function del() {
@@ -718,18 +739,11 @@ export default function TimelineDetail() {
             })
             return
         }
-
-        if (health.mode != 'ACTIVE' && health.mode != 'EAT') {
+        if (detail.window != 'ACTIVE' && detail.window != 'EAT') {
             list = [t('health.delete')]
         }
         else {
-            if (disable_edit == '1') {
-                list = [t('health.delete')]
-            }
-            else {
-                list = [t('health.edit'), t('health.delete')]
-            }
-
+            list = [t('health.edit'), t('health.delete')]
         }
         showActionSheet({
             showActionSheetWithOptions: showActionSheetWithOptions,

+ 16 - 2
src/_moment/components/follow_info.tsx

@@ -1,9 +1,23 @@
+import { MainColorType } from "@/context/themes/color";
 import { rpxToPx } from "@/utils/tools";
 import { View, Text, Textarea, Image, Input, ScrollView } from "@tarojs/components";
 import { useTranslation } from "react-i18next";
 
 export default function FollowInfo(props: { user: any }) {
-    const {t} = useTranslation()
+    const { t } = useTranslation()
+
+    console.log(props.user)
+    return <View style={{
+        display: 'flex',
+        flexDirection: 'row',
+        alignItems: 'center',
+        paddingLeft: rpxToPx(100),
+        width:rpxToPx(750),
+        height:rpxToPx(72),
+        boxSizing:'border-box'
+    }}>
+        <View className="h24 black_25">{t('health.join2')+' '+props.user.nickname}</View>
+    </View>
 
     return <View style={{
         width: rpxToPx(698),
@@ -32,7 +46,7 @@ export default function FollowInfo(props: { user: any }) {
                 borderRadius: rpxToPx(18),
                 marginLeft: rpxToPx(8),
                 marginRight: rpxToPx(8),
-            }} src={props.user.avatar} mode="aspectFill"/>
+            }} src={props.user.avatar} mode="aspectFill" />
             {/* <View className="h26">跟卡</View> */}
         </View>
     </View>

+ 21 - 19
src/_moment/components/long_card.tsx

@@ -35,29 +35,31 @@ export default function LongCard(props: { join?: any, user?: any, hideJoin?: boo
         }
 
         if (window == 'ACTIVE' || window == 'EAT') {
-            jumpPage(`/_health/pages/add_moment?join_id=${key}&is_temp=${true}&window=${window}&title=${props.title ?? long.title}`)
+            jumpPage(`/_record/pages/log_record?scenario=${window=='EAT'?'MEAL':'ACTIVITY'}&join_id=${key}`)
+            // jumpPage(`/_health/pages/add_moment?join_id=${key}&is_temp=${true}&window=${window}&title=${props.title ?? long.title}`)
         }
         else {
             if (window == 'FAST') {
-                if (getScenario(health.windows, 'FAST').status == 'WFS') {
-                    //jumpPage(`/_health/pages/log_time?index=${health.mode == 'FAST' ? 0 : 1}&single=1&is_start=1&window=${health.mode}&op_page=${health.mode == 'FAST' ? 'HOME_FAST' : 'HOME_SLEEP'}`)
-                    jumpPage(`/_health/pages/log_time?join_id=${key}&index=0&single=1&is_start=1&window=${window}`)
-                }
-                else {
-                    //jumpPage(`/_health/pages/log_time?type=home&index=${health.mode == 'FAST' ? 3 : 2}&single=${sceniaro.status == 'OG' ? 1 : 0}&is_start=0&window=${health.mode}&op_page=${health.mode == 'FAST' ? 'HOME_FAST' : 'HOME_SLEEP'}`)
-                    jumpPage(`/_health/pages/log_time?join_id=${key}&index=3&single=1&is_start=0&window=${window}`)
-                }
-
+                // if (getScenario(health.windows, 'FAST').status == 'WFS') {
+                //     //jumpPage(`/_health/pages/log_time?index=${health.mode == 'FAST' ? 0 : 1}&single=1&is_start=1&window=${health.mode}&op_page=${health.mode == 'FAST' ? 'HOME_FAST' : 'HOME_SLEEP'}`)
+                //     jumpPage(`/_health/pages/log_time?join_id=${key}&index=0&single=1&is_start=1&window=${window}`)
+                // }
+                // else {
+                //     //jumpPage(`/_health/pages/log_time?type=home&index=${health.mode == 'FAST' ? 3 : 2}&single=${sceniaro.status == 'OG' ? 1 : 0}&is_start=0&window=${health.mode}&op_page=${health.mode == 'FAST' ? 'HOME_FAST' : 'HOME_SLEEP'}`)
+                //     jumpPage(`/_health/pages/log_time?join_id=${key}&index=3&single=1&is_start=0&window=${window}`)
+                // }
+                jumpPage(`/_record/pages/time_record?scenario=${window}&join_id=${key}`)
             }
-            else {
-                if (getScenario(health.windows, 'SLEEP').status == 'WFS') {
-                    //jumpPage(`/_health/pages/log_time?index=${health.mode == 'FAST' ? 0 : 1}&single=1&is_start=1&window=${health.mode}&op_page=${health.mode == 'FAST' ? 'HOME_FAST' : 'HOME_SLEEP'}`)
-                    jumpPage(`/_health/pages/log_time?join_id=${key}&index=1&single=1&is_start=1&window=${window}`)
-                }
-                else {
-                    //jumpPage(`/_health/pages/log_time?type=home&index=${health.mode == 'FAST' ? 3 : 2}&single=${sceniaro.status == 'OG' ? 1 : 0}&is_start=0&window=${health.mode}&op_page=${health.mode == 'FAST' ? 'HOME_FAST' : 'HOME_SLEEP'}`)
-                    jumpPage(`/_health/pages/log_time?join_id=${key}&index=2&single=1&is_start=0&window=${window}`)
-                }
+            else if (window=='SLEEP'){
+                jumpPage(`/_record/pages/time_record?scenario=${window}&join_id=${key}`)
+                // if (getScenario(health.windows, 'SLEEP').status == 'WFS') {
+                //     //jumpPage(`/_health/pages/log_time?index=${health.mode == 'FAST' ? 0 : 1}&single=1&is_start=1&window=${health.mode}&op_page=${health.mode == 'FAST' ? 'HOME_FAST' : 'HOME_SLEEP'}`)
+                //     jumpPage(`/_health/pages/log_time?join_id=${key}&index=1&single=1&is_start=1&window=${window}`)
+                // }
+                // else {
+                //     //jumpPage(`/_health/pages/log_time?type=home&index=${health.mode == 'FAST' ? 3 : 2}&single=${sceniaro.status == 'OG' ? 1 : 0}&is_start=0&window=${health.mode}&op_page=${health.mode == 'FAST' ? 'HOME_FAST' : 'HOME_SLEEP'}`)
+                //     jumpPage(`/_health/pages/log_time?join_id=${key}&index=2&single=1&is_start=0&window=${window}`)
+                // }
             }
 
         }

+ 14 - 0
src/_moment/pages/long_detail.tsx

@@ -62,6 +62,20 @@ export default function LongDetail() {
     function join() {
         const { window } = router.params
         const key = router.params.join_id
+
+        if (window == 'ACTIVE' || window == 'EAT') {
+            jumpPage(`/_record/pages/log_record?scenario=${window=='EAT'?'MEAL':'ACTIVITY'}&join_id=${key}`)
+        }
+        else {
+            if (window == 'FAST') {
+                jumpPage(`/_record/pages/time_record?scenario=${window}&join_id=${key}`)
+            }
+            else if (window=='SLEEP'){
+                jumpPage(`/_record/pages/time_record?scenario=${window}&join_id=${key}`)
+            }
+
+        }
+        return
         if (window == 'ACTIVE' || window == 'EAT') {
             jumpPage(`/_health/pages/add_moment?join_id=${key}&title=${long.title}&is_temp=${true}&window=${window}`)
         }

+ 26 - 8
src/_record/components/picker_card.tsx

@@ -1,7 +1,7 @@
 import { View } from "@tarojs/components";
 import './picker_card.scss'
 import NewButton, { NewButtonType } from "@/_health/base/new_button";
-import { rpxToPx } from "@/utils/tools";
+import { rpxToPx, vibrate } from "@/utils/tools";
 import { MainColorType } from "@/context/themes/color";
 import { IconClose } from "@/components/basic/Icons";
 import NewDurationPicker, { DurationPickerType } from "@/_health/base/new_durationpicker";
@@ -9,33 +9,47 @@ import { useState } from "react";
 import NewDateTimePicker from "@/_health/base/new_date_time_picker";
 import dayjs from "dayjs";
 
-export default function PickerCard(props: { onClose: any, onConfirm: any, type: string, value: any }) {
+export default function PickerCard(props: { onClose: any, onConfirm: any, title: string, type: string, value: any, error?: string, onChange?: any }) {
     const [value, setValue] = useState(props.value)
+    const [pickerError, setPickerError] = useState('')
     return <View className="picker_card_bg_1">
         <View className="picker_card">
             <View className="picker_card_close" onClick={props.onClose}>
                 <IconClose color="#000" width={rpxToPx(56)} height={rpxToPx(56)} />
             </View>
-            <View className="h50 bold" style={{ marginTop: rpxToPx(120) }}>时间</View>
+            <View className="h50 bold" style={{ marginTop: rpxToPx(120) }}>{props.title}</View>
             <View className="h24" style={{
                 height: rpxToPx(36), marginTop: rpxToPx(16),
                 marginBottom: rpxToPx(8),
                 color: MainColorType.error
-            }}></View>
+            }}>{props.error ? props.error : pickerError}</View>
             <View style={{ height: rpxToPx(360) }}>
                 {
-                    props.type == 'duration' && <NewDurationPicker color={MainColorType.black} type={DurationPickerType.normal} value={props.value} onChange={(e) => {
+                    props.type == 'duration' && <NewDurationPicker color={MainColorType.black} type={DurationPickerType.normal} value={value} onChange={(e) => {
                         setValue(e)
+                        if (props.onChange) {
+                            props.onChange()
+                        }
+
                     }} />
                 }
                 {
-                    props.type == 'datetime' && <NewDateTimePicker color={MainColorType.black} date={dayjs(props.value).format('YYYY-MM-DD')} count={1} time={dayjs(props.value).format('HH:mm')}
+                    props.type == 'datetime' && <NewDateTimePicker color={MainColorType.orange} date={dayjs(value).format('YYYY-MM-DD')} count={1} time={dayjs(value).format('HH:mm')}
                         minTimestamp={new Date(props.value).getTime() - 24 * 3600 * 1000}
                         maxTimestamp={new Date().getTime()}
                         onChange={(e) => {
                             var dt = new Date(`${e[0]}T${e[1]}:00`)
                             setValue(dt.getTime())
-                        }} color={MainColorType.orange} />
+                            if (props.onChange) {
+                                props.onChange()
+                            }
+                            if (dt.getTime() > new Date().getTime()) {
+                                setPickerError('不能大于当前时间')
+                            }
+                            else {
+                                setPickerError('')
+                            }
+                        }} />
                 }
             </View>
             <View style={{ height: rpxToPx(60) }} />
@@ -44,8 +58,12 @@ export default function PickerCard(props: { onClose: any, onConfirm: any, type:
                 width={rpxToPx(578)}
                 height={rpxToPx(96)}
                 color={MainColorType.orange}
-                title="确定"
+                title={global.language=='en'?'Done':'确定'}
                 onClick={() => {
+                    if (pickerError.length > 0) {
+                        vibrate()
+                        return
+                    }
                     props.onConfirm(value)
                 }}
             />

+ 8 - 2
src/_record/pages/log_record.scss

@@ -62,10 +62,16 @@
     height: 128px;
     border-radius: 21px;
     margin-top: 60px;
-    text-align: center;
+    box-sizing: border-box;
+    padding-left: 60px;
+    // text-align: center;
     background-color: #fff;
 }
 
+.input_content_placeholder{
+    text-align: center;
+}
+
 .form_btns {
     display: flex;
     flex-direction: row;
@@ -147,7 +153,7 @@
     display: flex;
     flex-direction: row;
     flex-wrap: wrap;
-    width: 80%;
+    width: 100%;
 }
 
 .time_view {

+ 56 - 24
src/_record/pages/log_record.tsx

@@ -14,7 +14,7 @@ import NewButton, { NewButtonType } from "@/_health/base/new_button";
 import dayjs from "dayjs";
 import { TimeFormatter } from "@/utils/time_format";
 import { useSelector } from "react-redux";
-import { addEvents, addUserTag, createMoment, updateMoment, userTags } from "@/services/health";
+import { addEvents, addUserTag, createMoment, eventDetail, updateMoment, userTags } from "@/services/health";
 import PostMomentTime from "@/_health/components/post_moment_time";
 import ShareBtn from "@/components/basic/ShareBtn";
 import { jumpPage } from "@/features/trackTimeDuration/hooks/Common";
@@ -22,6 +22,7 @@ import ChooseActions from "@/pages/clock/components/choose_actions";
 import PickerCard from "../components/picker_card";
 import { IconCamera, IconClock } from "../components/record_icon";
 import QuickLog from "../components/quick_log";
+import FollowInfo from "@/_moment/components/follow_info";
 
 let useRoute;
 let useNavigation;
@@ -77,15 +78,17 @@ export default function LogRecord() {
         router = useRouter()
     }
 
-    const { event_id, is_temp, schedule_id, scenario, imgs, only_text, quick } = router.params
+    const { event_id, is_temp, schedule_id, scenario, imgs, only_text, quick, join_id } = router.params
 
     const moment = router.params.moment ? JSON.parse(router.params.moment) : null
 
     const window = router.params.window ?? health.mode
     const [pics, setPics] = useState<any>(imgs ? JSON.parse(imgs) : [])
     const [focus, setFocus] = useState(only_text ? true : false)
+    const [inputFocus, setInputFocus] = useState(false)
     const [quickStatus, setQuickStatus] = useState(quick ? true : false)
 
+
     if (process.env.TARO_ENV == 'weapp') {
 
 
@@ -120,8 +123,22 @@ export default function LogRecord() {
         if (router.params.quick) {
             quickSave()
         }
+
+        if (router.params.edit){
+            eventDetail(router.params.event_id).then(res=>{
+                
+            })
+        }
     }, [])
 
+    useEffect(() => {
+        if (step == 1) {
+            setTimeout(() => {
+                setInputFocus(true)
+            }, 300)
+        }
+    }, [step])
+
     function getTags() {
         userTags({ scenario: scenario }).then(res => {
             if (chooseTitle == '') {
@@ -176,13 +193,16 @@ export default function LogRecord() {
         //, t('health.delete')
         showActionSheet({
             title: '',
-            itemList: [t('health.choose_photo'), t('health.import_wechat'), t('health.camera')],
+            itemList: [t('health.add_photos'), t('health.camera2'), t('health.import_chat')],
             success: function (res) {
                 switch (res) {
                     case 0:
                         addImage(false)
                         break;
                     case 1:
+                        addImage(true)
+                        break;
+                    case 2:
                         Taro.chooseMessageFile({
                             count: 9 - pics.length,
                             type: 'image',
@@ -194,9 +214,6 @@ export default function LogRecord() {
                             },
                         })
                         break;
-                    case 2:
-                        addImage(true)
-                        break;
                     case 3:
                         // setImgUrl('')
                         break;
@@ -376,20 +393,20 @@ export default function LogRecord() {
         // console.log('打卡提交数据', params)
         if (posting) return
         setPosting(true)
-        Taro.showLoading({
-            title: t('health.uploading')
-        })
+        // Taro.showLoading({
+        //     title: t('health.uploading')
+        // })
         addEvents(params).then(res => {
             setShowResult(true)
             setResult(res)
             setPosting(false)
-            Taro.hideLoading()
+            // Taro.hideLoading()
             Taro.reLaunch({
                 url: '/pages/moment/moment'
             })
         }).catch(e => {
             setPosting(false)
-            Taro.hideLoading()
+            // Taro.hideLoading()
         })
         // createMoment(params).then(res => {
         //     // setTimeout(() => {
@@ -574,9 +591,9 @@ export default function LogRecord() {
         {
             step == 0 && <ScrollView style={{ flex: 1, position: 'relative', zIndex: 1000, height: screenHeight - navigationBarHeight }} scrollY>
                 {/* <Snapshot id="temp"> */}
-                <View className="cardShowAni" style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', marginTop: rpxToPx(152) }}>
+                <View className="cardShowAni" style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', marginTop: rpxToPx(26) }}>
                     <Image src={BASE_IMG_URL + 'tag.svg'} style={{ width: rpxToPx(96), height: rpxToPx(96), marginBottom: rpxToPx(24) }} />
-                    <View className="h50 bold" style={{ textAlign: 'center', width: rpxToPx(600), }}>{scenario == 'MEAL' ? '选择打卡的餐次' : '选择打卡的活动'}</View>
+                    <View className="h50 bold" style={{ textAlign: 'center', width: rpxToPx(600), }}>{t('health.add_a_tag')}</View>
                     <View className="operate_bg">
                         {
                             tags.map((item, index) => {
@@ -601,7 +618,7 @@ export default function LogRecord() {
                         }
 
                         <View className="operate_item h34"
-                            style={{ backgroundColor: MainColorType.white_25 }}
+                            style={{ backgroundColor: MainColorType.white_25, marginBottom: rpxToPx(100) }}
                             onClick={() => {
                                 setTitle('')
                                 setChooseTitle('')
@@ -609,7 +626,7 @@ export default function LogRecord() {
                                 setStep(1)
                             }}><View className="first_letter h36">
                                 <Image src={BASE_IMG_URL + 'edit.svg'} style={{ width: rpxToPx(36), height: rpxToPx(36) }} />
-                            </View>自定义</View>
+                            </View>{t('health.custom')}</View>
                     </View>
                 </View>
                 {/* </Snapshot> */}
@@ -618,9 +635,14 @@ export default function LogRecord() {
         {
             step == 1 && <View className="cardShowAni" style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', marginTop: rpxToPx(300) }}>
                 <View className="input_form">
-                    <Input className="input_content h36" placeholder="请输入自定义名称" value={title}
-                        focus
-                        maxlength={10}
+                    <Input className="input_content h36" placeholder={t('health.custom_name')} value={title}
+                        placeholderClass="input_content_placeholder"
+                        focus={inputFocus}
+                        autoFocus={inputFocus}
+                        maxlength={30}
+                        onBlur={() => {
+                            setInputFocus(false)
+                        }}
                         onInput={(e: any) => {
                             setTitle(e.target.value)
                             setChooseTitle(e.target.value)
@@ -632,7 +654,7 @@ export default function LogRecord() {
                                     setStep(0)
                                 }}
                             >
-                                <View className="h30 bold">取消</View>
+                                <View className="h30 bold">{t('health.cancel')}</View>
                             </NewButton>
                         </View>
                         <View className="form_cancel">
@@ -648,7 +670,7 @@ export default function LogRecord() {
                             >
                                 <View className={title.length == 0 ? 'form_cancel form_confirm h30 bold' : 'form_cancel h30 bold'}
 
-                                >确定</View>
+                                >{t('health.confirm')}</View>
                             </NewButton>
                         </View>
                     </View>
@@ -684,21 +706,24 @@ export default function LogRecord() {
                             </View>
                         </NewButton>
                     </View>
+                    {/* <Input placeholder="hhhhhhh" style={{textAlign:'center'}}/> */}
 
                     <Textarea placeholder={t('health.add_text')} className="textarea2 h44"
                         placeholder-style="color:rgba(0,0,0,0.2)"
                         value={desc}
                         focus={focus}
+                        onBlur={() => {
+                            setFocus(false)
+                        }}
                         onInput={e => {
                             setDesc(e.detail.value)
                         }} />
                     <View className="form2">
                         {
                             pics.map((item, index) => {
-                                return <View className="cover" style={{ borderRadius: 0 }} key={index}>
+                                return <View className="cover" key={index}>
                                     <Image src={item.url + scale} mode="aspectFill" className="cover" style={{
                                         margin: 0,
-                                        borderRadius: 0
                                     }} key={index} onClick={() => {
                                         Taro.previewImage({
                                             current: pics[index].url,
@@ -742,14 +767,21 @@ export default function LogRecord() {
                 <View className="time_view" onClick={() => {
                     setShowTimePicker(true)
                 }}>
-                    <IconClock width={rpxToPx(36)} color={MainColorType.black_25} />
-                    <View className="h30" style={{ opacity: 0.3, marginLeft: rpxToPx(12) }}>时间</View>
+                    <View style={{ opacity: 0.25 }}>
+                        <IconClock width={rpxToPx(36)} color={MainColorType.black} />
+                    </View>
+
+                    <View className="h30" style={{ opacity: 0.3, marginLeft: rpxToPx(12) }}>{t('health.time')}</View>
                     <View style={{ flex: 1 }} />
                     <View className="h30" style={{ opacity: 0.3 }}>{getDate() + time}</View>
                     <IconArrow width={rpxToPx(34)} color={MainColorType.g02} />
                     <View className="border_footer_line" style={{ left: rpxToPx(48) }} />
                 </View>
 
+                {
+                    router.params.join_id && <FollowInfo user={long.follow} />
+                }
+
 
 
             </View>

+ 54 - 33
src/_record/pages/time_record.tsx

@@ -19,6 +19,7 @@ import ShareBtn from "@/components/basic/ShareBtn";
 import PickerCard from "../components/picker_card";
 import showActionSheet from "@/components/basic/ActionSheet";
 import { useTranslation } from "react-i18next";
+import FollowInfo from "@/_moment/components/follow_info";
 
 let timer
 let useRoute;
@@ -32,6 +33,7 @@ export default function TimeRecord() {
     const systemInfo: any = Taro.getWindowInfo ? Taro.getWindowInfo() : Taro.getSystemInfoSync();
     const navigationBarHeight = systemInfo.statusBarHeight + 44;
     const record = useSelector((state: any) => state.record);
+    const long = useSelector((state: any) => state.long);
     const user = useSelector((state: any) => state.user);
     const [enterTime] = useState(new Date().getTime())
 
@@ -54,6 +56,10 @@ export default function TimeRecord() {
 
     const [posting, setPosting] = useState(false)
 
+    const [postError, setPostError] = useState('')
+
+    const [pickerTitle,setPickerTitle] = useState('')
+
     const { t } = useTranslation()
 
     let router
@@ -69,7 +75,7 @@ export default function TimeRecord() {
         router = useRouter()
     }
 
-    const { scenario } = router.params
+    const { scenario, join_id } = router.params
 
 
     if (process.env.TARO_ENV == 'weapp') {
@@ -101,6 +107,19 @@ export default function TimeRecord() {
         picker1Ref.current = showDatePicker
         picker2Ref.current = showEndDatePicker
         picker3Ref.current = showDurationPicker
+        if (!showDatePicker && !showEndDatePicker) {
+            setPostError('')
+        }
+
+        if (showDatePicker){
+            setPickerTitle(scenario=='FAST'?t('health.adjust_fast_start_time'):t('health.adjust_bed_time'))
+        }
+        else if (showEndDatePicker){
+            setPickerTitle(scenario=='FAST'?t('health.adjust_fast_end_time'):t('health.adjust_wake_up'))
+        }
+        else if (showDurationPicker){
+            setPickerTitle(scenario=='FAST'?t('health.adjust_fast_goal'):t('health.adjust_sleep_goal'))
+        }
     }, [status, showDatePicker, showEndDatePicker, showDurationPicker])
 
 
@@ -184,10 +203,8 @@ export default function TimeRecord() {
         // console.log('打卡提交数据', params)
         if (posting) return
         setPosting(true)
-        Taro.showLoading({
-            title: t('health.uploading')
-        })
         addEvents(params).then(res => {
+
             Taro.eventCenter.trigger('refreshClockIndex')
             Taro.eventCenter.trigger('refreshMoments', '')
             setShowHighlight(true)
@@ -201,10 +218,8 @@ export default function TimeRecord() {
             //     icon: 'success'
             // })
             setPosting(false)
-            Taro.hideLoading()
         }).catch(e => {
             setPosting(false)
-            Taro.hideLoading()
         })
     }
 
@@ -231,9 +246,6 @@ export default function TimeRecord() {
 
         if (posting) return
         setPosting(true)
-        Taro.showLoading({
-            title: t('health.uploading')
-        })
         addEvents(params).then(res => {
             setShowHighlight(true)
             setTimeout(() => {
@@ -252,10 +264,8 @@ export default function TimeRecord() {
             //     icon: 'success'
             // })
             setPosting(false)
-            Taro.hideLoading()
         }).catch(e => {
             setPosting(false)
-            Taro.hideLoading()
         })
     }
 
@@ -268,10 +278,11 @@ export default function TimeRecord() {
         }
         if (posting) return
         setPosting(true)
-        Taro.showLoading({
-            title: t('health.uploading')
-        })
         addEvents(data).then(res => {
+            if ((res as any).result == false) {
+                setPostError((res as any).error_messages[0])
+                return
+            }
             Taro.eventCenter.trigger('refreshClockIndex')
             Taro.eventCenter.trigger('refreshMoments', '')
             setInfo((res as any).data)
@@ -280,17 +291,15 @@ export default function TimeRecord() {
             setShowEndDatePicker(false)
             setCount((count) => count + 1)
             setPosting(false)
-            Taro.hideLoading()
         }).catch(e => {
             setPosting(false)
-            Taro.hideLoading()
         })
     }
 
     function more() {
         showActionSheet({
-            title: '操作',
-            itemList: ['放弃', '重新开始'],
+            // title: '操作',
+            itemList: [t('health.discard'), t('health.discard_restart')],
             success: (res) => {
                 switch (res) {
                     case 0:
@@ -333,7 +342,7 @@ export default function TimeRecord() {
 
             return {
                 target: str,
-                goal: 'Edit Goal',
+                goal: t('health.adjust_goal'),
                 color: MainColorType.orange
             }
         }
@@ -430,22 +439,22 @@ export default function TimeRecord() {
                                         setShowDatePicker(true)
                                     }}>
                                         <View className="operate_item" >
-                                            <View className="g02 h24 white_50">STARTED</View>
+                                            <View className="g02 h24 white_50">{scenario=='FAST'?t('health.started'):t('health.bedtime1')}</View>
                                             <View className="h44 bold white" style={{ marginTop: rpxToPx(8), marginBottom: rpxToPx(8) }}>{TimeFormatter.dateTimeFormate(info.time.start_timestamp, true)}</View>
-                                            <View className="h30 bold white_50" style={{ color: MainColorType.white }}>Edit Start</View>
+                                            <View className="h30 bold white_50" style={{ color: MainColorType.white }}>{scenario=='FAST'?t('health.adjust_start'):t('health.adjust_bedtime')}</View>
                                         </View>
                                     </NewButton>
                                     <NewButton type={NewButtonType.custom} onClick={() => {
                                         setShowEndDatePicker(true)
                                     }}>
                                         <View className="operate_item" style={{ backgroundColor: showHighlight ? '#ffffff80' : 'transparent' }} >
-                                            <View className="g02 h24 white_50">FINISHED</View>
+                                            <View className="g02 h24 white_50">{scenario=='FAST'?t('health.finished'):t('health.wokeup')}</View>
                                             <View className="h44 bold white" style={{ marginTop: rpxToPx(8), marginBottom: rpxToPx(8) }}>{TimeFormatter.dateTimeFormate(info.time.end_timestamp, true)}</View>
-                                            <View className="h30 bold white_50" style={{ color: MainColorType.white }}>Edit Finish</View>
+                                            <View className="h30 bold white_50" style={{ color: MainColorType.white }}>{scenario=='FAST'?t('health.adjust_end'):t('health.adjust_wake_up')}</View>
                                         </View>
                                     </NewButton>
                                 </View> :
-                                    <View className="white bold" style={{ fontSize: rpxToPx(72), display: 'flex', alignItems: 'center', justifyContent: 'center', flex: 1 }}>You've made it!</View>
+                                    <View className="white bold" style={{ fontSize: rpxToPx(72), display: 'flex', alignItems: 'center', justifyContent: 'center', flex: 1 }}>{t('health.fast_finished')}</View>
                             }
 
 
@@ -508,9 +517,9 @@ export default function TimeRecord() {
     function naviTitle() {
         switch (status) {
             case 'WFS':
-                return scenario == 'FAST' ? 'Upcoming fast' : 'Upcoming sleep'
+                return scenario == 'FAST' ? t('health.upcoming_fast') : t('health.upcoming_sleep')
             case 'OG':
-                return scenario == 'FAST' ? 'Fasting' : 'Sleeping'
+                return scenario == 'FAST' ? t('health.you_are_fasting') : t('health.your_are_sleeping')
             case 'DONE':
                 return scenario == 'FAST' ? 'Fast completed' : 'Sleep completed'
         }
@@ -580,18 +589,18 @@ export default function TimeRecord() {
                             setShowDatePicker(true)
                         }}>
                             <View className="operate_item" style={{ backgroundColor: showHighlight ? '#ffffff80' : 'transparent' }}>
-                                <View className="black_50 h24">STARTED</View>
+                                <View className="black_50 h24">{scenario=='FAST'?t('health.started'):t('health.bedtime1')}</View>
                                 <View className="h44 bold" style={{ marginTop: rpxToPx(8), marginBottom: rpxToPx(8) }}>{TimeFormatter.abbrTimestampFormat(info.time.start_timestamp)}</View>
-                                <View className="h30 bold" style={{ color: MainColorType.orange }}>Edit Start</View>
+                                <View className="h30 bold" style={{ color: MainColorType.orange }}>{scenario=='FAST'?t('health.adjust_start'):t('health.adjust_bedtime')}</View>
                             </View>
                         </NewButton>
                         <NewButton type={NewButtonType.custom} onClick={() => {
                             setShowDurationPicker(true)
                         }}>
                             <View className="operate_item">
-                                <View className="black_50 h24">{TimeFormatter.formateDurationBySeconds(info.time.duration / 1000)} Goal</View>
-                                <View className="h44 bold" style={{ marginTop: rpxToPx(8), marginBottom: rpxToPx(8) }}>{TimeFormatter.abbrTimestampFormat(info.time.target_end_timestamp, true)}</View>
-                                <View className="h30 bold" style={{ color: MainColorType.orange }}>Edit Goal</View>
+                                <View className="black_50 h24">{t('health.time_goal',{time:TimeFormatter.formateDurationBySeconds(info.time.duration / 1000)})}</View>
+                                <View className="h44 bold" style={{ marginTop: rpxToPx(8), marginBottom: rpxToPx(8) }}>{TimeFormatter.abbrTimestampFormat(info.time.target_end_timestamp)}</View>
+                                <View className="h30 bold" style={{ color: MainColorType.orange }}>{t('health.adjust_goal')}</View>
                             </View>
                         </NewButton>
                     </View>
@@ -647,7 +656,7 @@ export default function TimeRecord() {
 
 
             </View>
-            {
+            {/* {
                 status == 'WFS' && <View className="eat_card" onClick={() => {
                     Taro.redirectTo({
                         url: `./log_record?scenario=${scenario == 'FAST' ? 'MEAL' : 'ACTIVITY'}`
@@ -659,6 +668,10 @@ export default function TimeRecord() {
                         <IconArrow width={rpxToPx(34)} color={MainColorType.black_25} />
                     </View>
                 </View>
+            } */}
+
+            {
+                router.params.join_id && <FollowInfo user={long.follow} />
             }
 
             {/* {
@@ -789,6 +802,8 @@ export default function TimeRecord() {
             showDatePicker && <PickerCard onClose={() => { setShowDatePicker(false) }}
                 value={info.time.start_timestamp}
                 type="datetime"
+                title={pickerTitle}
+                error={postError}
                 onConfirm={(e) => {
                     update({
                         start_timestamp: e
@@ -804,6 +819,8 @@ export default function TimeRecord() {
             showEndDatePicker && <PickerCard onClose={() => { setShowEndDatePicker(false) }}
                 value={info.time.end_timestamp}
                 type="datetime"
+                title={pickerTitle}
+                error={postError}
                 onConfirm={(e) => {
                     update({
                         end_timestamp: e
@@ -819,11 +836,15 @@ export default function TimeRecord() {
             showDurationPicker && <PickerCard onClose={() => { setShowDurationPicker(false) }}
                 value={info.time.duration}
                 type="duration"
+                title={pickerTitle}
                 onConfirm={(e) => {
                     var obj = JSON.parse(JSON.stringify(info))
                     obj.time.duration = e
                     setInfo(obj)
-                    if (status == 'WFS') return
+                    if (status == 'WFS') {
+                        setShowDurationPicker(false)
+                        return
+                    }
                     update({
                         duration: e
                     })

+ 1 - 1
src/components/navigation/TabBar.tsx

@@ -59,7 +59,7 @@ export default function Component(props: { index: number }) {
         </View>
         <View className={selIndex == 0 ? 'tabbar-item tabbar-item-sel' : 'tabbar-item'} onClick={() => switchTab(0)}>
             <Image className='tabbar-icon' src={selIndex == 0 ? require('@assets/_health/home_sel.png') : require('@assets/_health/home.png')} />
-            <View className={selIndex == 0 ? 'tabbar-item-text-sel' : 'tabbar-item-text'}>{t('health.today')}</View>
+            <View className={selIndex == 0 ? 'tabbar-item-text-sel' : 'tabbar-item-text'}>{t('health.home')}</View>
         </View>
         <View className={selIndex == 4 ? 'tabbar-item tabbar-item-sel' : 'tabbar-item'} onClick={() => switchTab(4)}>
             <Image className='tabbar-icon' src={selIndex == 4 ? require('@assets/_health/social_sel.png') : require('@assets/_health/social.png')} />

+ 46 - 6
src/context/locales/en.js

@@ -1244,11 +1244,51 @@ export default {
         no_join_yet: 'No joins yet',
         be_first: 'Be the first to join!',
         join_now: 'Join now',
-        back_moment:'Back to Moments',
-        view_profile:'View Profile',
-        join2:'Join',
-        joins:'Joins',
-        show_joins:'Show Joins',
-        total_joins:'Total Joins {{total}}',
+        back_moment: 'Back to Moments',
+        view_profile: 'View Profile',
+        join2: 'Join',
+        joins: 'Joins',
+        show_joins: 'Show Joins',
+        total_joins: 'Total Joins {{total}}',
+        check_in: 'Check In',
+        home: 'Home',
+
+        add_photos: 'Add Photos',
+        add_text: 'Add Text',
+        camera2: 'Camera',
+        import_chat: 'Import from Chats',
+        custom: 'Custom',
+        add_a_tag: 'Add a Tag',
+        custom_name: 'Enter a custom name',
+        confirm: 'OK',
+        time: 'Time',
+        check_ins:'Check-ins',
+        schedule_reminder:'Schedule Reminders',
+
+        upcoming_fast: 'Upcoming fast',
+        upcoming_sleep: 'Upcoming sleep',
+        you_are_fasting: 'You\'re fasting',
+        your_are_sleeping: 'You\'re sleeping',
+        fast_finished: 'Fast finished',
+        sleep_finished: 'Sleep finished',
+
+        started: 'STARTED',
+        time_goal: '{{time}} GOAL',
+        finished: 'ENDED',
+        adjust_goal: 'Adjust Goal',
+        adjust_start: 'Adjust Start',
+        adjust_end: 'Adjust End',
+        adjust_bedtime: 'Adjust Bedtime',
+        adjust_wake_up: 'Adjust Wake Up',
+        bedtime1:'BEDTIME',
+        wokeup:'WOKE UP',
+        discard: 'Discard',
+        discard_restart: 'Discard and Restart',
+        adjust_fast_goal:'Adjust Fast goal',
+        adjust_fast_start_time:'Adjust Fasting Start Time',
+        adjust_fast_end_time:'Adjust Fasting End Time',
+        adjust_sleep_goal:'Adjust Sleep Goal',
+        adjust_bed_time:'Adjust Bedtime',
+        adjust_wake_up:'Adjust Wake Up'
     }
 }

+ 52 - 12
src/context/locales/zh.js

@@ -1239,17 +1239,57 @@ export default {
         friends: '搭子',
         follow_back: '回关',
 
-        call_friends_join:'喊好友一起打卡',
-        join:'跟卡',
-        call_me_join:'{{name}} 喊我一起打卡',
-        no_join_yet:'还没有人跟卡',
-        be_first:'成为第一个跟卡者!',
-        join_now:'立即跟卡',
-        back_moment:'返回到搭子圈',
-        view_profile:'查看主页',
-        join2:'接龙',
-        joins:'接龙历史',
-        show_joins:'查看接龙历史',
-        total_joins:'累计获得 {{total}} 次跟卡',
+        call_friends_join: '喊好友一起打卡',
+        join: '跟卡',
+        call_me_join: '{{name}} 喊我一起打卡',
+        no_join_yet: '还没有人跟卡',
+        be_first: '成为第一个跟卡者!',
+        join_now: '立即跟卡',
+        back_moment: '返回到搭子圈',
+        view_profile: '查看主页',
+        join2: '接龙',
+        joins: '接龙历史',
+        show_joins: '查看接龙历史',
+        total_joins: '累计获得 {{total}} 次跟卡',
+        check_in: '打卡',
+        home: '首页',
+
+        add_photos: '添加图片',
+        add_text: '添加文字',
+        camera2: '相机',
+        import_chat: '从聊天导入',
+        custom: '自定义',
+        add_a_tag: '添加标签',
+        custom_name: '输入自定义名称',
+        confirm: '确认',
+        time: '时间',
+        check_ins:'打卡记录',
+        schedule_reminder:'日程提醒',
+
+        upcoming_fast: '断食待开始',
+        upcoming_sleep: '睡眠待开始',
+        you_are_fasting: '断食进行中',
+        your_are_sleeping: '睡眠进行中',
+        fast_finished: '断食已完成',
+        sleep_finished: '睡眠已完成',
+
+        started: '开始',
+        time_goal: '{{time}}目标',
+        finished: '结束',
+        adjust_goal: '调整目标',
+        adjust_start: '调整开始',
+        adjust_end: '调整结束',
+        adjust_bedtime: '调整就寝',
+        adjust_wake_up: '调整起床',
+        bedtime1:'就寝',
+        wokeup:'起床',
+        discard: '放弃',
+        discard_restart: '放弃并重新开始',
+        adjust_fast_goal:'调整断食目标',
+        adjust_fast_start_time:'调整断食开始时间',
+        adjust_fast_end_time:'调整断食结束时间',
+        adjust_sleep_goal:'调整睡眠目标',
+        adjust_bed_time:'调整就寝时间',
+        adjust_wake_up:'调整起床时间'
     }
 }

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

@@ -398,18 +398,11 @@ export default function Page() {
                 onClick={() => {
                     jumpPage('/_health/pages/recents')
                 }}
-                title={t('health.recents')}
+                title={t('health.check_ins')}
                 showLine
                 icon={<Image src={require('@assets/_health/setting_album.png')} className="profile_cell_icon" />}
             />
-            <IconTitleCell
-                onClick={() => {
-                    jumpPage('/_health/pages/schedules?mode=')
-                }}
-                title={t('health.schedules')}
-                showLine
-                icon={<Image src={require('@assets/_health/setting_calendar.png')} className="profile_cell_icon" />}
-            />
+            
             <IconTitleCell
                 onClick={() => {
                     jumpPage('/pages/account/Journal')
@@ -432,9 +425,16 @@ export default function Page() {
             <IconTitleCell
                 onClick={goCalendar}
                 title={t('health.streaks')}
-                // showLine
+                showLine
                 icon={<Image src={require('@assets/_health/setting_streak.png')} className="profile_cell_icon" />}
             />
+            <IconTitleCell
+                onClick={() => {
+                    jumpPage('/_health/pages/schedules?mode=')
+                }}
+                title={t('health.schedule_reminder')}
+                icon={<Image src={require('@assets/_health/setting_calendar.png')} className="profile_cell_icon" />}
+            />
             {/* <IconTitleCell
                 onClick={goWeekly}
                 title={t('health.windows')}

+ 9 - 0
src/pages/clock/ClockIndex.scss

@@ -23,3 +23,12 @@
     padding: 36px 40px;
 }
 
+.tab_border_line{
+    position: absolute;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    height: 6px;
+    background-color: #000;
+}
+

+ 27 - 5
src/pages/clock/ClockIndex.tsx

@@ -1,5 +1,5 @@
 import { jumpPage } from "@/features/trackTimeDuration/hooks/Common";
-import { View, Image } from "@tarojs/components";
+import { View, Image, ScrollView } from "@tarojs/components";
 import './ClockIndex.scss'
 import TabBar from "@/components/navigation/TabBar";
 import { IconClose, IconNext } from "@/components/basic/Icons";
@@ -15,12 +15,15 @@ import Taro from "@tarojs/taro";
 import ChooseActions from "./components/choose_actions";
 import NewButton, { NewButtonType } from "@/_health/base/new_button";
 import { BASE_IMG_URL } from "@/services/http/api";
+import { useTranslation } from "react-i18next";
+import NoData from "@/_health/components/no_data";
 
 var timer
 export default function ClockIndex() {
     const user = useSelector((state: any) => state.user);
     const record = useSelector((state: any) => state.record);
     const [loaded, setLoaded] = useState(false)
+    const [showRetry, setShowRetry] = useState(false)
     const [home, setHome] = useState<any>(null)
     const [count, setCount] = useState(0)
     const [currentTimeData, setCurrentTimeData] = useState<any>(null)
@@ -28,6 +31,7 @@ export default function ClockIndex() {
     const [selScenario, setSelScenario] = useState('')
     const [scenarios, setScenarios] = useState<any>([])
     const dispatch = useDispatch();
+    const { t } = useTranslation()
     global.dispatch = dispatch;
 
     // const list = [{
@@ -67,9 +71,12 @@ export default function ClockIndex() {
             setLoaded(true)
             setHome(res)
             setCount(1)
-            setScenarios((res as any).scenarios??[])
+            setScenarios((res as any).scenarios ?? [])
             dispatch(setEvents((res as any).events))
             dispatch(setActions((res as any).actions))
+            setShowRetry(false)
+        }).catch(e => {
+            setShowRetry(true)
         })
     }
 
@@ -157,9 +164,17 @@ export default function ClockIndex() {
         return ''
     }
 
+
+
+    if (!loaded && showRetry) return <NoData refresh={
+        () => {
+            getHomeData()
+        }
+    } />
+
     if (!loaded) return <View />
 
-    return <View style={{ position: 'relative' }}>
+    return <ScrollView style={{ height: '100vh' }} scrollY><View style={{ position: 'relative', minHeight: '101vh' }}>
         <View className="main_bg" style={{ background: getBackground() }} />
         <View
             onClick={() => {
@@ -171,7 +186,12 @@ export default function ClockIndex() {
             }}
             style={{ height: 100, width: 100, opacity: 0 }}>demo</View>
         <View className="h60 bold" style={{ marginLeft: rpxToPx(52) }}>{record.time ? record.time.greeting : ''}</View>
-        <View className="h44 bold" style={{ marginLeft: rpxToPx(52), marginTop: rpxToPx(66), marginBottom: rpxToPx(58) }}>打卡</View>
+        <View style={{ display: 'flex', flexDirection: 'row' }}>
+            <View className="h44 bold" style={{ marginLeft: rpxToPx(52), marginTop: rpxToPx(66), marginBottom: rpxToPx(58), position: 'relative', paddingBottom: rpxToPx(26) }}>{t('health.check_in')}
+                <View className="tab_border_line" />
+            </View>
+        </View>
+
 
         <View className="operate_panel">
             {
@@ -188,7 +208,8 @@ export default function ClockIndex() {
                             <View style={{ flex: 1 }} />
                             <View style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
                                 <Image src={item.icon} style={{ width: rpxToPx(48), height: rpxToPx(48) }} />
-                                <IconNext width={rpxToPx(36)} color="#000" />
+                                {/* <IconNext width={rpxToPx(36)} color="#000" /> */}
+                                <Image src={item.action_icon} style={{ width: rpxToPx(36), height: rpxToPx(36) }} />
                             </View>
                         </View>
                     </NewButton>
@@ -215,4 +236,5 @@ export default function ClockIndex() {
         {
             process.env.TARO_ENV == 'weapp' && <TabBar index={0} />
         }</View>
+    </ScrollView>
 }

+ 1 - 1
src/pages/clock/components/choose_actions.scss

@@ -5,7 +5,7 @@
     top: 0;
     width: 100vw;
     height: 100vh;
-    background-color: rgba($color: #000, $alpha: 1);
+    background-color: rgba($color: #000, $alpha: 0.9);
     display: flex;
     flex-direction: column;
     align-items: center;

+ 39 - 7
src/pages/clock/components/choose_actions.tsx

@@ -11,6 +11,8 @@ import { MainColorType } from '@/context/themes/color'
 import { useEffect } from 'node_modules/@types/react'
 
 export default function ChooseActions(props: { close: any, quick: any, chooseText: any, chooseImg: any }) {
+    const systemInfo: any = Taro.getWindowInfo ? Taro.getWindowInfo() : Taro.getSystemInfoSync();
+    const navigationBarHeight = systemInfo.statusBarHeight + 44;
     const { t } = useTranslation()
 
     function camera() {
@@ -154,28 +156,58 @@ export default function ChooseActions(props: { close: any, quick: any, chooseTex
 
     return <View className="actions_bg" catchMove onClick={props.close}>
 
-
+        <View className="navi_bar" style={{
+            position: 'fixed',
+            left: 0,
+            right: 0,
+            top: 0, height: navigationBarHeight, zIndex: 1000
+        }}>
+            <View style={{
+                position: 'absolute',
+                left: 0,
+                right: 0,
+                bottom: 0,
+                height: 44,
+                display: 'flex',
+                alignItems: 'center',
+                justifyContent: 'center'
+            }}>
+                <View style={{
+                    position: 'absolute',
+                    width: rpxToPx(92),
+                    height: rpxToPx(64),
+                    left: 22,
+                    top: 22 - rpxToPx(32)
+                }}
+                    onClick={() => {
+                        Taro.navigateBack()
+                    }}>
+                    <IconClose color="#fff" width={rpxToPx(64)} height={rpxToPx(64)} />
+                </View>
+            </View>
+        </View>
         <NewButton type={NewButtonType.img} onClick={album}>
-            <View className='action_btn h30 bold cardShowAni'>Add Photos
+            <View className='action_btn h30 bold cardShowAni'>{t('health.add_photos')}
                 <Image className='action_btn_img' src={BASE_IMG_URL + 'image.svg'} />
             </View>
         </NewButton>
         <NewButton type={NewButtonType.img} onClick={text}>
-            <View className='action_btn h30 bold cardShowAni'>Add Text
+            <View className='action_btn h30 bold cardShowAni'>{t('health.add_text')}
                 <Image className='action_btn_img' src={BASE_IMG_URL + 'text.svg'} />
             </View>
         </NewButton>
         <NewButton type={NewButtonType.img} onClick={camera}>
-            <View className='action_btn h30 bold cardShowAni'>Camera
+            <View className='action_btn h30 bold cardShowAni'>{t('health.camera2')}
                 <Image className='action_btn_img' src={BASE_IMG_URL + 'camera.svg'} />
             </View>
         </NewButton>
 
         <NewButton type={NewButtonType.img} onClick={chat}>
-            <View className='action_btn h30 bold cardShowAni'>Import from Chats
+            <View className='action_btn h30 bold cardShowAni'>{t('health.import_chat')}
                 <Image className='action_btn_img' src={BASE_IMG_URL + 'wechat.svg'} />
             </View>
         </NewButton>
+        <View style={{height:rpxToPx(120)}}/>
 
         {/* <View className='cardShowAni' style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', height: rpxToPx(64), marginTop: rpxToPx(26) }}>
             <View className='or_line'/>
@@ -189,8 +221,8 @@ export default function ChooseActions(props: { close: any, quick: any, chooseTex
         </NewButton> */}
 
 
-        <View className='btnAni' style={{ marginBottom: rpxToPx(84), marginTop: rpxToPx(60) }} onClick={props.close}>
+        {/* <View className='btnAni' style={{ marginBottom: rpxToPx(84), marginTop: rpxToPx(60) }} onClick={props.close}>
             <IconClose color="#fff" width={rpxToPx(64)} height={rpxToPx(64)} />
-        </View>
+        </View> */}
     </View>
 }

+ 13 - 0
src/services/health.tsx

@@ -510,3 +510,16 @@ export const checkSummary = (params) => {
         })
     })
 }
+
+export const eventDetail = (id) =>{
+    return new Promise((resolve, reject) => {
+        request({
+            url: API_USER_EVENTS+'/'+id, method: 'GET', data: { }
+        }).then(res => {
+            resolve(res);
+            // dispatch(loginSuccess(res));
+        }).catch(e => {
+            reject(e)
+        })
+    })
+}