Leon hace 1 año
padre
commit
d0507f7685

+ 1 - 1
config/env.ts

@@ -1,4 +1,4 @@
 
 export const APP_VERSION = '1.0.2'
 export const ANDROID_VERSION = '1.0.0'
-export const WX_VERSION = '1.5.9'
+export const WX_VERSION = '1.6.0'

+ 5 - 4
src/_moment/components/follow_info.tsx

@@ -3,18 +3,19 @@ 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 }) {
+export default function FollowInfo(props: { user: any,timeMode?:boolean }) {
     const { t } = useTranslation()
 
-    console.log(props.user)
+    console.log(props.timeMode)
     return <View style={{
         display: 'flex',
         flexDirection: 'row',
         alignItems: 'center',
-        paddingLeft: rpxToPx(100),
+        justifyContent:props.timeMode?'center':'flex-start',
+        paddingLeft: props.timeMode?0:rpxToPx(100),
         width:rpxToPx(750),
         height:rpxToPx(72),
-        boxSizing:'border-box'
+        boxSizing:'border-box',
     }}>
         <View className="h24 black_25">{t('health.join2')+' '+props.user.nickname}</View>
     </View>

+ 1 - 1
src/_moment/components/long_card.tsx

@@ -125,7 +125,7 @@ export default function LongCard(props: { join?: any, user?: any, hideJoin?: boo
             {
                 props.join && props.join.user_count > 0 && users()
             }
-            <View className="h24">在跟卡</View>
+            <View className="h24" style={{marginLeft:rpxToPx(12)}}>在跟卡</View>
             <IconArrow width={rpxToPx(24)} color={MainColorType.g02}/>
         </View>
 

+ 5 - 5
src/_record/pages/time_record.tsx

@@ -126,7 +126,7 @@ export default function TimeRecord() {
             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'))
+            setPickerTitle(scenario == 'FAST' ? t('health.adjust_fast_end_time') : t('health.adjust_wake_up2'))
         }
         else if (showDurationPicker) {
             setPickerTitle(scenario == 'FAST' ? t('health.adjust_fast_goal') : t('health.adjust_sleep_goal'))
@@ -221,7 +221,7 @@ export default function TimeRecord() {
             setShowHighlight(true)
             setTimeout(() => {
                 setShowHighlight(false)
-            }, 3000)
+            }, 3300)
             setInfo((res as any).data)
             setStatus((res as any).data.status)
             // Taro.showToast({
@@ -261,7 +261,7 @@ export default function TimeRecord() {
             setShowHighlight(true)
             setTimeout(() => {
                 setShowHighlight(false)
-            }, 4000)
+            }, 8000)
             setTimeout(() => {
                 setShowResult(true)
             }, 2000)
@@ -502,7 +502,7 @@ export default function TimeRecord() {
                 {
                     showResult && <NewButton type={NewButtonType.custom} onClick={() => {
                         Taro.redirectTo({
-                            url: `./log_record?scenario=${scenario == 'FAST' ? 'MEAL' : 'ACTIVITY'}`
+                            url: `./log_record?scenario=MEAL`
                         })
                     }}><View
 
@@ -688,7 +688,7 @@ export default function TimeRecord() {
             } */}
 
             {
-                router.params.join_id && <FollowInfo user={long.follow} />
+                router.params.join_id && <FollowInfo user={long.follow} timeMode={true}/>
             }
 
             {/* {

+ 1 - 1
src/context/locales/zh.js

@@ -1291,7 +1291,7 @@ export default {
         adjust_fast_end_time:'结束时间',
         adjust_sleep_goal:'睡眠目标',
         adjust_bed_time:'就寝时间',
-        adjust_wake_up:'起床时间',
+        adjust_wake_up2:'起床时间',
         elapsed:'进度 {{percent}}',
 
         view_in_moments:'去搭子圈查看',

+ 34 - 31
src/pages/clock/ClockIndex.tsx

@@ -174,39 +174,45 @@ export default function ClockIndex() {
 
     if (!loaded) return <View />
 
-    return <View><ScrollView style={{ height: '100vh' }} scrollY><View style={{ position: 'relative' }}>
-        <View className="main_bg" style={{ background: getBackground() }} />
-        <View className="h60 bold" style={{ marginLeft: rpxToPx(52), marginTop: rpxToPx(212) }}>{record.time ? record.time.greeting : ''}</View>
-        <View style={{ display: 'flex', flexDirection: 'row' }}>
-            <View className="h44 bold" style={{ marginLeft: rpxToPx(52), marginTop: rpxToPx(66), marginBottom: rpxToPx(32), position: 'relative', paddingBottom: rpxToPx(20) }}>{t('health.check_in')}
-                <View className="tab_border_line" />
+    return <View style={{ position: 'relative' }}>
+        <ScrollView style={{ height: '100vh' }} scrollY><View style={{ position: 'relative', overflow: 'hidden',minHeight:'101vh' }}>
+            <View className="main_bg" style={{ background: getBackground() }} />
+            <View className="h60 bold" style={{ marginLeft: rpxToPx(52), marginTop: rpxToPx(212) }}>{record.time ? record.time.greeting : ''}</View>
+            <View style={{ display: 'flex', flexDirection: 'row' }}>
+                <View className="h44 bold" style={{ marginLeft: rpxToPx(52), marginTop: rpxToPx(66), marginBottom: rpxToPx(32), position: 'relative', paddingBottom: rpxToPx(20) }}>{t('health.check_in')}
+                    <View className="tab_border_line" />
+                </View>
             </View>
-        </View>
 
 
-        <View className="operate_panel">
-            {
-                scenarios.map((item, index) => {
-                    return <NewButton type={NewButtonType.custom}
-                        key={index}
-                        onClick={() => {
-                            tapItem(index)
-
-                        }}>
-                        <View className="operate_card" >
-                            <View className="h36 bold">{item.title}</View>
-                            <View className="h50 bold">{itemTime(item)}</View>
-                            <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" /> */}
-                                <Image src={item.action_icon} style={{ width: rpxToPx(36), height: rpxToPx(36) }} />
+            <View className="operate_panel">
+                {
+                    scenarios.map((item, index) => {
+                        return <NewButton type={NewButtonType.custom}
+                            key={index}
+                            onClick={() => {
+                                tapItem(index)
+
+                            }}>
+                            <View className="operate_card" >
+                                <View className="h36 bold">{item.title}</View>
+                                <View className="h50 bold">{itemTime(item)}</View>
+                                <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" /> */}
+                                    <Image src={item.action_icon} style={{ width: rpxToPx(36), height: rpxToPx(36) }} />
+                                </View>
                             </View>
-                        </View>
-                    </NewButton>
-                })
-            }
+                        </NewButton>
+                    })
+                }
+            </View>
+            <View style={{height:100}}/>
+
+
         </View>
+        </ScrollView>
         {
             showChoose && <ChooseActions
                 close={() => {
@@ -223,9 +229,6 @@ export default function ClockIndex() {
                 }}
             />
         }
-
-    </View>
-    </ScrollView>
         {
             process.env.TARO_ENV == 'weapp' && <TabBar index={0} />
         }

+ 12 - 10
src/pages/moment/guide.tsx

@@ -1,23 +1,25 @@
 import NewButton, { NewButtonType } from "@/_health/base/new_button";
 import { MainColorType } from "@/context/themes/color";
 import { rpxToPx } from "@/utils/tools";
-import { Button, View, Image,Text } from "@tarojs/components";
+import { Button, View, Image, Text } from "@tarojs/components";
 import './guide.scss'
 import { useSelector } from "react-redux";
 import { jumpPage } from "@/features/trackTimeDuration/hooks/Common";
 import { useTranslation } from "react-i18next";
 
-export default function FriendGuide() {
+export default function FriendGuide(props: { closeShare: any }) {
     const user = useSelector((state: any) => state.user);
-    const {t} = useTranslation()
+    const { t } = useTranslation()
 
     function goLogin() {
-        jumpPage('/_account/pages/ChooseAuth')
+        if (!user.isLogin) {
+            jumpPage('/_account/pages/ChooseAuth')
+        }
     }
 
     function tapAvatar() {
         if (user.isLogin) {
-            jumpPage(`/_account/pages/ProfileSetting?newuser=${user.is_new_user?'1':'0'}`)
+            jumpPage(`/_account/pages/ProfileSetting?newuser=${user.is_new_user ? '1' : '0'}`)
         }
         else {
             goLogin()
@@ -26,15 +28,15 @@ export default function FriendGuide() {
     return <View className="friend_guide_content">
         <View className="avatar_bg" onClick={tapAvatar}>
             {
-                user.isLogin ? <View className="avatar_bg"><Image className='avatar gray_bg' src={user.avatar} mode="aspectFill"/>
-                <Text className="edit_nick">{t('health.edit')}</Text>
-                </View> : <Image className="avatar gray_bg" src={require('@/assets/images/user.png')}/>
+                user.isLogin ? <View className="avatar_bg"><Image className='avatar gray_bg' src={user.avatar} mode="aspectFill" />
+                    <Text className="edit_nick">{t('health.edit')}</Text>
+                </View> : <Image className="avatar gray_bg" src={require('@/assets/images/user.png')} />
             }
         </View>
 
         <View className="h50 bold">和搭子们</View>
         <View className="h50 bold">分享彼此的日常生活</View>
-        <Image className="friend_body" src="https://background-pictures.oss-cn-beijing.aliyuncs.com/inapp/friends_prompt.png"/>
+        <Image className="friend_body" src="https://background-pictures.oss-cn-beijing.aliyuncs.com/inapp/friends_prompt.png" />
         <View className="friend_share_btn_bg">
             <NewButton
                 onClick={goLogin}
@@ -45,7 +47,7 @@ export default function FriendGuide() {
                 height={rpxToPx(96)}
             />
             {
-                user.isLogin && <Button openType="share" className="friend_share_btn" />
+                user.isLogin && <Button openType="share" className="friend_share_btn" onClick={props.closeShare} />
             }
 
         </View>

+ 11 - 7
src/pages/moment/moment_main.tsx

@@ -397,7 +397,11 @@ export default function MomentMain() {
                 </View>
             }
 
-            <FriendGuide />
+            <FriendGuide closeShare={()=>{
+                setTimeout(()=>{
+                    setShowGuide(false)
+                },500)
+            }}/>
             {
                 process.env.TARO_ENV == 'weapp' && <TabBar index={4} />
             }</View>
@@ -500,12 +504,12 @@ export default function MomentMain() {
                 refresherTriggered={isPulling}
                 onScroll={onScroll}
                 onScrollToUpper={() => {
-                    setPage(1)
-                    if (moments.length > 10) {
-                        setMoments(moments.slice(0, 10))
-                        setItemHeights(itemHeights.slice(0, 10))
-                        setItemLayouts(itemLayouts.slice(0, 10))
-                    }
+                    // setPage(1)
+                    // if (moments.length > 10) {
+                    //     setMoments(moments.slice(0, 10))
+                    //     setItemHeights(itemHeights.slice(0, 10))
+                    //     setItemLayouts(itemLayouts.slice(0, 10))
+                    // }
 
                 }}
             // onScrollToLower={props.loadMore}

+ 1 - 1
src/services/http/api.js

@@ -1,4 +1,4 @@
-const online = process.env.TARO_ENV == 'weapp' ? false : false;
+const online = process.env.TARO_ENV == 'weapp' ? true : false;
 
 import { WX_VERSION as _WX_VERSION, APP_VERSION as _APP_VERSION, ANDROID_VERSION as _ANDROID_VERSION } from "../../../config/env";