leon 1 éve
szülő
commit
4163a4fc56

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

@@ -48,7 +48,7 @@ export default function RecentItem(props: { data: any, index: number }) {
         hasText = false
     }
 
-    const spaceY = rpxToPx(7)
+    const spaceY = rpxToPx(12)
 
     return <View>
         {

+ 13 - 2
src/_moment/pages/home.scss

@@ -18,14 +18,25 @@ page{
     height: 126px;
     border-radius: 63px;
     right: 40px;
-    bottom: -20px;
+    bottom: -36px;
     background-color: pink;
 }
 
 .home_nickname{
     position: absolute;
-    color: #000;
+    color: #fff;
     right: 186px;
     bottom: 20px;
     font-weight: bold;
+}
+
+.following{
+    width: 665px;
+    height: 72px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    color: #000;
+    background-color: #9999991a;
+    border-radius: 18px;
 }

+ 53 - 26
src/_moment/pages/home.tsx

@@ -18,10 +18,9 @@ if (process.env.TARO_ENV == 'rn') {
     useRoute = require("@react-navigation/native").useRoute
     useNavigation = require("@react-navigation/native").useNavigation
 }
-
-
+let timer
 export default function UserHome() {
-    let myScrollTop = 0
+    
     const user = useSelector((state: any) => state.user);
     const [profile, setProfile] = useState<any>(null)
     const [loaded, setLoaded] = useState(false)
@@ -40,6 +39,9 @@ export default function UserHome() {
     const [list, setList] = useState<any>([])
     const query = Taro.createSelectorQuery()
 
+    const [myScrollTop,setMyScrollTop] = useState(0)
+    const [count,setCount] = useState(0)
+
 
     let router
     let navigation;
@@ -59,6 +61,15 @@ export default function UserHome() {
         moments(1)
     }, [])
 
+    useEffect(()=>{
+        timer = setInterval(()=>{
+            setCount(count=>count+1)
+        },1000)
+        return ()=>{
+            clearInterval(timer)
+        }
+    },[])
+
     useEffect(() => {
         if (list.length == 0) return
 
@@ -103,7 +114,7 @@ export default function UserHome() {
             page: index,
             limit: 10
         }
-        if (index != 1 && list.length>0) {
+        if (index != 1 && list.length > 0) {
             params.last_timestamp = list[list.length - 1].time.timestamp
         }
         getUserMoments(params).then(res => {
@@ -127,7 +138,7 @@ export default function UserHome() {
     function measureItemLayouts() {
         if (list.length <= 10) {
             list.forEach((item, index) => {
-                query.select(`#history2-${index}`).boundingClientRect()
+                query.select(`#history3-${index}`).boundingClientRect()
             });
             query.exec((res) => {
                 var layouts: any = []
@@ -145,7 +156,7 @@ export default function UserHome() {
         else {
             list.forEach((item, index) => {
                 if (index >= itemLayouts.length) {
-                    query.select(`#history2-${index}`).boundingClientRect()
+                    query.select(`#history3-${index}`).boundingClientRect()
                 }
             });
             query.exec((res) => {
@@ -168,10 +179,10 @@ export default function UserHome() {
     function onScroll(e) {
         // var top = e.detail.scrollTop
         // myScrollTop = top
-        console.log('deltaY',e.detail.deltaY)
         var top = e.detail.scrollTop - e.detail.deltaY
-        myScrollTop = e.detail.scrollTop
+        // myScrollTop = e.detail.scrollTop
         setPageTop(top)
+        setMyScrollTop(e.detail.scrollTop)
     }
 
     function tapFollow() {
@@ -202,7 +213,7 @@ export default function UserHome() {
 
     if (!loaded) return <View />
 
-    console.log(pageTop)
+    // console.log(list.length,pageTop,itemLayouts,)
     return <ScrollView style='height:100vh'
         enableBackToTop
         scrollY={true}
@@ -223,40 +234,56 @@ export default function UserHome() {
             }
 
         }}
-    onScrollToLower={loadMore}
+        onScrollToLower={loadMore}
     ><View>
             <View className="home_top">
-                <View className="cover" />
+                <Image className="cover" mode="aspectFill" src={profile.cover}/>
                 <Image className="home_avatar" src={profile.avatar} />
-                <View className="home_nickname">{profile.nickname}</View>
+                <View className="home_nickname bold">{profile.nickname}</View>
                 <View style={{
                     position: 'fixed',
                     top: 0,
                     left: 0,
                     zIndex: 10,
-                    height: navigationBarHeight, width: rpxToPx(750), backgroundColor: pageTop>=rpxToPx(380)?'#fff':'transparent', display: 'flex',
+                    height: navigationBarHeight, width: rpxToPx(750), backgroundColor: pageTop >= rpxToPx(380) ? '#f5f5f5' : 'transparent', display: 'flex',
                     flexDirection: 'column', justifyContent: 'flex-end'
                 }}>
                     <View style={{ height: 44, width: rpxToPx(750), position: 'relative', display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
-                        <View onClick={() => {
+                        {/* <View onClick={() => {
                             Taro.navigateBack()
-                        }} style={{ position: 'absolute', left: 0, top: 0, bottom: 0, width: 80, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>Back</View>
+                        }} style={{ position: 'absolute', left: 0, top: 0, bottom: 0, width: 80, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>Back</View> */}
+                        <Image src={require('@assets/_health/navi_back.png')} style={{
+                            position: 'absolute',
+                            width: rpxToPx(92),
+                            height: rpxToPx(64),
+                            left: 0,
+                            top: 22 - rpxToPx(32)
+                        }}
+                            onClick={() => {
+                                Taro.navigateBack()
+                            }}
+                        />
                         <Text style={{
-                            color:pageTop>=rpxToPx(380)?'#000':'transparent'
-                        }}>{profile.nickname}</Text>
+                            color: pageTop >= rpxToPx(380) ? '#000' : 'transparent'
+                        }} className="bold">{profile.nickname}</Text>
                     </View>
                 </View>
             </View>
+            <View style={{height:rpxToPx(62)}}></View>
             {
-                router.params.uid != user.id && <View style={{ marginTop: rpxToPx(62), marginLeft: rpxToPx(45) }}>
+                router.params.uid != user.id && <View style={{  marginLeft: rpxToPx(45) }}>
                     {
-                        profile.relation == 'FRIEND' || profile.relation == 'FOLLOWING' ? <NewButton type={NewButtonType.fill}
-                            width={rpxToPx(665)}
-                            height={rpxToPx(72)}
-                            title="following"
-                            color={MainColorType.g02}
-                            onClick={tapFollowing}
-                        /> : <NewButton type={NewButtonType.fill}
+                        profile.relation == 'FRIEND' || profile.relation == 'FOLLOWING' ? 
+                        // <NewButton type={NewButtonType.fill}
+                        //     width={rpxToPx(665)}
+                        //     height={rpxToPx(72)}
+                        //     title="following"
+                        //     color={MainColorType.g02}
+                        //     onClick={tapFollowing}
+                        // />
+                        <View onClick={tapFollowing} className="following h30 bold">following</View> 
+                        
+                        : <NewButton type={NewButtonType.fill}
                             width={rpxToPx(665)}
                             height={rpxToPx(72)}
                             title="follow"
@@ -276,7 +303,7 @@ export default function UserHome() {
                         }
 
                     }
-                    return <View key={index} id={`history2-${index}`}>
+                    return <View key={index} id={`history3-${index}`}>
                         <RecentItem data={item} index={index} />
                     </View>
                 })

+ 4 - 0
src/_moment/pages/message.scss

@@ -1,3 +1,7 @@
+page{
+  background-color: #fff;
+}
+
 .message_item{
   height: 138px;
   width: 750px;

+ 6 - 3
src/_moment/pages/message.tsx

@@ -10,8 +10,9 @@ import { rpxToPx } from '@/utils/tools'
 import NewButton, { NewButtonType } from '@/_health/base/new_button'
 import Taro from '@tarojs/taro'
 import NoRecord from '@/_health/components/no_record'
+import relativeTime from 'dayjs/plugin/relativeTime';
 
-
+dayjs.extend(relativeTime);
 export default function Message() {
   const [list, setList] = useState<any>([])
   const [loaded, setLoaded] = useState(false)
@@ -89,7 +90,9 @@ export default function Message() {
 
   function messageItem(item, index) {
     return <View key={index} className='message_item' >
-      <Image className='message_item_avatar' src={item.user.avatar} />
+      <Image className='message_item_avatar' src={item.user.avatar} onClick={() => {
+            jumpPage('./home?uid=' + item.user.id)
+          }}/>
       <View style={{ display: 'flex', flexDirection: 'column', flex: 1 }}>
         <Text className='h28 g02'>
           <Text onClick={() => {
@@ -97,7 +100,7 @@ export default function Message() {
           }} className='h28 bold link' style={{ color: MainColorType.link }}>{item.user.nickname} </Text>
           关注了我
         </Text>
-        <Text className='h22 g02' style={{ marginTop: rpxToPx(12) }}>{dayjs(item.timestamp).format('MM-DD HH:mm')}</Text>
+        <Text className='h22 g02' style={{ marginTop: rpxToPx(12) }}>{dayjs(item.timestamp).fromNow()}</Text>
 
       </View>
       {

+ 1 - 1
src/_moment/pages/relation.config.ts

@@ -6,6 +6,6 @@ export default definePageConfig({
     "navigationBarTitleText": "",
     "navigationBarBackgroundColor": "#f5f5f5",
     "backgroundColor": "#ffffff",
-    // "navigationStyle": "custom",
+    "navigationStyle": "custom",
     "disableScroll": true
 })

+ 29 - 0
src/_moment/pages/relation.scss

@@ -1,3 +1,7 @@
+page{
+    background-color: #fff;
+}
+
 .relation_item {
     display: flex;
     flex-direction: row;
@@ -15,4 +19,29 @@
     width: 86px;
     height: 86px;
     border-radius: 43px;
+}
+
+.relation_tab_item{
+    display: flex;
+    position: relative;
+    padding: 5px 20px;
+}
+
+.sel_line1{
+    position: absolute;
+    left: 20px;
+    right: 20px;
+    bottom: -5px;
+    height: 4px;
+    border-radius: 1px;
+    background-color: #0080FF;
+}
+.line{
+    position: absolute;
+    left: 0;
+    right: 0;
+    bottom: -5px;
+    height: 4px;
+    border-radius: 1px;
+    background-color: transparent;
 }

+ 75 - 30
src/_moment/pages/relation.tsx

@@ -12,8 +12,6 @@ import NoRecord from "@/_health/components/no_record";
 
 export default function Relation() {
     const [count, setCount] = useState(0)
-    const [count2, setCount2] = useState(0)
-    const [count3, setCount3] = useState(0)
     const [friends, setFriends] = useState<any>([])
     const [followers, setFollowers] = useState<any>([])
     const [followings, setFollowings] = useState<any>([])
@@ -26,6 +24,9 @@ export default function Relation() {
     const [isLoading, setIsLoading] = useState(false)
     const [total, setTotal] = useState(-1)
 
+    const systemInfo: any = Taro.getWindowInfo ? Taro.getWindowInfo() : Taro.getSystemInfoSync();
+    const navigationBarHeight = systemInfo.statusBarHeight + 44;
+
     useEffect(() => {
         // getRelation()
         // getFollowers()
@@ -249,7 +250,7 @@ export default function Relation() {
                 />
             }
             <IconArrow width={rpxToPx(34)} color={MainColorType.g02} />
-            <View className="border_footer_line" style={{left:rpxToPx(150)}}/>
+            <View className="border_footer_line" style={{ left: rpxToPx(150) }} />
         </View>
     }
 
@@ -260,34 +261,77 @@ export default function Relation() {
     // if (loaded && list.length == 0)
     //     return <NoRecord />
 
-    return <ScrollView style='height:100vh'
-        enableBackToTop
-        scrollY={true}
-        refresherEnabled={true}
-        upperThreshold={70}
-        lowerThreshold={140}
-        refresherBackground={MainColorType.g05}
-        onRefresherRefresh={onRefresh}
-        refresherTriggered={isPulling}
-        onScroll={onScroll}
-        onScrollToUpper={() => {
+    return <View >
+        <View style={{
+            position: 'fixed',
+            top: 0,
+            left: 0,
+            zIndex: 10,
+            height: navigationBarHeight, width: rpxToPx(750), backgroundColor: '#f5f5f5', display: 'flex',
+            flexDirection: 'column', justifyContent: 'flex-end'
+        }}>
+            <View style={{ height: 44, width: rpxToPx(750), position: 'relative', display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
+                {/* <View onClick={() => {
+                            Taro.navigateBack()
+                        }} style={{ position: 'absolute', left: 0, top: 0, bottom: 0, width: 80, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>Back</View> */}
+                <Image src={require('@assets/_health/navi_back.png')} style={{
+                    position: 'absolute',
+                    width: rpxToPx(92),
+                    height: rpxToPx(64),
+                    left: 0,
+                    top: 22 - rpxToPx(32)
+                }}
+                    onClick={() => {
+                        Taro.navigateBack()
+                    }}
+                />
+                <View style={{ display: 'flex', flexDirection: 'row', height: 44, alignItems: 'center', justifyContent: 'center' }}>
+                    <View className="relation_tab_item" onClick={() => { setIndex(0) }}>
+                        <View style={{ color: index == 0 ? '#000' : MainColorType.g02, fontWeight: 'bold' }}>搭子</View>
+                        <View className={index == 0 ? 'sel_line1' : 'line'}></View>
+                    </View>
+
+                    <View className="relation_tab_item" onClick={() => { setIndex(1) }}>
+                        <View style={{ color: index == 1 ? '#000' : MainColorType.g02, fontWeight: 'bold' }}>关注</View>
+                        <View className={index == 1 ? 'sel_line1' : 'line'}></View>
+                    </View>
 
-        }}
-        onScrollToLower={more}
-    ><View >
-            <View style={{ display: 'flex', flexDirection: 'row', height: 50 }}>
-                <View style={{ flex: 1, color: index == 0 ? '#000' : MainColorType.g02, textAlign: 'center' }} onClick={() => { setIndex(0) }}>搭子</View>
-                <View style={{ flex: 1, color: index == 1 ? '#000' : MainColorType.g02, textAlign: 'center' }} onClick={() => { setIndex(1) }}>关注</View>
-                <View style={{ flex: 1, color: index == 2 ? '#000' : MainColorType.g02, textAlign: 'center' }} onClick={() => { setIndex(2) }}>粉丝</View>
+                    <View className="relation_tab_item" onClick={() => { setIndex(2) }}>
+                        <View style={{ color: index == 2 ? '#000' : MainColorType.g02, fontWeight: 'bold' }}>粉丝</View>
+                        <View className={index == 2 ? 'sel_line1' : 'line'}></View>
+                    </View>
+                    {/* <View style={{ flex: 1, color: index == 0 ? '#000' : MainColorType.g02, textAlign: 'center' }} onClick={() => { setIndex(0) }}>搭子</View>
+                    <View style={{ flex: 1, color: index == 1 ? '#000' : MainColorType.g02, textAlign: 'center' }} onClick={() => { setIndex(1) }}>关注</View>
+                    <View style={{ flex: 1, color: index == 2 ? '#000' : MainColorType.g02, textAlign: 'center' }} onClick={() => { setIndex(2) }}>粉丝</View> */}
+                </View>
             </View>
-            {
-                userList()
-            }
-            {
-                loaded && list.length == 0 && <NoRecord />
-            }
+        </View><ScrollView style={{
+            marginTop: navigationBarHeight,
+            height: '95vh'
+        }}
+            enableBackToTop
+            scrollY={true}
+            refresherEnabled={true}
+            upperThreshold={70}
+            lowerThreshold={140}
+            refresherBackground={MainColorType.g05}
+            onRefresherRefresh={onRefresh}
+            refresherTriggered={isPulling}
+            onScroll={onScroll}
+            onScrollToUpper={() => {
 
-            {/* {
+            }}
+            onScrollToLower={more}
+        ><View >
+
+                {
+                    userList()
+                }
+                {
+                    loaded && list.length == 0 && <NoRecord />
+                }
+
+                {/* {
             index == 0 && friendsList()
         }
         {
@@ -296,7 +340,8 @@ export default function Relation() {
         {
             index == 2 && followerList()
         } */}
-        </View>
-    </ScrollView>
+            </View>
+        </ScrollView>
+    </View>
 
 }

+ 2 - 2
src/app.config.ts

@@ -11,7 +11,7 @@ const appConfig = defineAppConfig({
     'pages/account/Journal',
     'pages/account/JournalDetail',
     'pages/discover/discover',
-    'pages/friend/friend'
+    'pages/moment/moment'
   ],
   entryPagePath: 'pages/clock/Clock',
   // subPackages: [
@@ -151,7 +151,7 @@ process.env.TARO_ENV === 'weapp' && (appConfig.tabBar = {
       text: '发现',
     },
     {
-      pagePath: 'pages/friend/friend',
+      pagePath: 'pages/moment/moment',
       text: '搭子圈',
     },
     {

BIN
src/assets/_health/social.png


BIN
src/assets/_health/social_sel.png


BIN
src/assets/_health/user.png


BIN
src/assets/_health/wechat.png


BIN
src/assets/images/user.png


+ 28 - 0
src/components/basic/Icons.tsx

@@ -658,4 +658,32 @@ export const IconShare = (props: { width: number, color: string }) => {
     </g>
 </svg>`
     return Icon(props.width, props.width, icon);
+}
+
+export const IconMenu = (props: { width: number, color: string }) => {
+    const icon = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none"
+    version="1.1" width="24" height="24" viewBox="0 0 24 24">
+    <defs>
+        <clipPath id="master_svg0_430_2768">
+            <rect x="0" y="0" width="24" height="24" rx="0" />
+        </clipPath>
+    </defs>
+    <g clip-path="url(#master_svg0_430_2768)">
+        <g>
+            <line x1="4" y1="12" x2="14" y2="12" fill-opacity="0" stroke-opacity="1"
+                stroke="${props.color}" fill="none" stroke-width="2" stroke-linecap="ROUND"
+                stroke-linejoin="round" />
+        </g>
+        <g>
+            <line x1="4" y1="6" x2="20" y2="6" fill-opacity="0" stroke-opacity="1" stroke="${props.color}"
+                fill="none" stroke-width="2" stroke-linecap="ROUND" stroke-linejoin="round" />
+        </g>
+        <g>
+            <line x1="4" y1="18" x2="20" y2="18" fill-opacity="0" stroke-opacity="1"
+                stroke="${props.color}" fill="none" stroke-width="2" stroke-linecap="ROUND"
+                stroke-linejoin="round" />
+        </g>
+    </g>
+</svg>`
+    return Icon(props.width, props.width, icon);
 }

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

@@ -47,7 +47,7 @@ export default function Component(props: { index: number }) {
                 break;
             case 4:
                 Taro.switchTab({
-                    url: '/pages/friend/friend'
+                    url: '/pages/moment/moment'
                 })
                 break;
         }
@@ -62,7 +62,7 @@ export default function Component(props: { index: number }) {
             <View className={selIndex == 0 ? 'tabbar-item-text-sel' : 'tabbar-item-text'}>{t('health.today')}</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/user_sel.png') : require('@assets/_health/user.png')} />
+            <Image className='tabbar-icon' src={selIndex == 4 ? require('@assets/_health/social_sel.png') : require('@assets/_health/social.png')} />
             <View className={selIndex == 4 ? 'tabbar-item-text-sel' : 'tabbar-item-text'}>{t('health.moments')}</View>
         </View>
         <View className={selIndex == 1 ? 'tabbar-item tabbar-item-sel' : 'tabbar-item'} onClick={() => switchTab(1)}>

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

@@ -40,8 +40,9 @@
 }
 
 .avatar_placeholder {
-    width: 100px;
-    height: 100px;
+    width: 160px;
+    height: 160px;
+    border-radius: 80px;
 }
 
 .nickname {

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

@@ -299,12 +299,9 @@ export default function Page() {
     }
 
     function isMember() {
-        console.log('member info',accessObj)
         if (!user.isLogin || !accessObj || !accessObj.access) {
             return false;
         }
-        
-        console.log('member info',accessObj.access)
         switch (accessObj.access.member.subscription_status) {
             case 'INITIAL':
             case 'INACTIVE':
@@ -343,7 +340,7 @@ export default function Page() {
                     }}
                 >{user.isLogin ? user.nickname : t('page.more.un_login')}</Text>
                 <View className="avatar" style={{
-                    opacity: user.isLogin ? 1 : 0.4,
+                    opacity: user.isLogin ? 1 : 1,
                     background: user.isLogin ? 'transparent' : '#fff'
                 }}>
                     {

+ 0 - 0
src/pages/friend/empty_content.scss → src/pages/moment/empty_content.scss


+ 0 - 0
src/pages/friend/empty_content.tsx → src/pages/moment/empty_content.tsx


+ 0 - 0
src/pages/friend/guide.scss → src/pages/moment/guide.scss


+ 1 - 1
src/pages/friend/guide.tsx → src/pages/moment/guide.tsx

@@ -24,7 +24,7 @@ export default function FriendGuide() {
     return <View className="friend_guide_content">
         <View className="avatar_bg" onClick={tapAvatar}>
             {
-                user.isLogin ? <Image className='avatar gray_bg' src={user.avatar} mode="aspectFill"/> : <View className="avatar gray_bg" />
+                user.isLogin ? <Image className='avatar gray_bg' src={user.avatar} mode="aspectFill"/> : <Image className="avatar gray_bg" src={require('@/assets/images/user.png')}/>
             }
         </View>
 

+ 0 - 0
src/pages/friend/friend.config.ts → src/pages/moment/moment.config.ts


+ 2 - 1
src/pages/friend/friend.scss → src/pages/moment/moment.scss

@@ -1,5 +1,6 @@
 .new_message_bg{
-    margin-bottom: 60px;
+    margin-top: 30px;
+    margin-bottom: 30px;
     display: flex;
     align-items: center;
     justify-content: center;

+ 4 - 5
src/pages/friend/friend.tsx → src/pages/moment/moment.tsx

@@ -14,7 +14,7 @@ import { useTranslation } from "react-i18next";
 import { windows } from "@/services/health";
 import { setFastWithSleep, setFinishSetup, setLongFast, setRefreshs, setWindows } from "@/store/health";
 import { getInfoSuccess } from "@/store/user";
-import FriendMain from "./friend_main";
+import MomentMain from "./moment_main";
 
 
 export default function Friend() {
@@ -50,10 +50,9 @@ export default function Friend() {
             if (global.shareData) {
                 console.log(global.shareData)
             }
-            console.log('share_url', '/pages/friend/friend?type=share&uid=' + user.id)
             return {
-                title: 'Friends ',
-                path: '/pages/friend/friend?type=share&uid=' + user.id,
+                title: user.nickname+': 快来和搭子们一起,分享彼此的日常生活',
+                path: '/pages/moment/moment?type=share&uid=' + user.id,
                 // imageUrl: imageUrl
             }
         })
@@ -110,5 +109,5 @@ export default function Friend() {
     }
     if (!loaded)
         return <View />
-    return <FriendMain />
+    return <MomentMain />
 }

+ 2 - 2
src/pages/friend/moment_item.scss → src/pages/moment/moment_item.scss

@@ -1,8 +1,8 @@
 .moment_item {
     display: flex;
     flex-direction: row;
-    padding-bottom: 60px;
-    padding-top: 60px;
+    padding-bottom: 30px;
+    padding-top: 30px;
     padding-left: 40px;
     padding-right: 40px;
     position: relative;

+ 11 - 6
src/pages/friend/moment_item.tsx → src/pages/moment/moment_item.tsx

@@ -19,7 +19,7 @@ dayjs.extend(relativeTime);
 dayjs.extend(isToday);
 dayjs.extend(isTomorrow);
 dayjs.extend(isYesterday);
-dayjs.extend(relativeTime);
+
 
 
 export default function MomentItem(props: { data: any }) {
@@ -42,7 +42,6 @@ export default function MomentItem(props: { data: any }) {
             jumpPage('/_health/pages/move_detail?id=' + link.move.id)
             return;
         }
-        debugger
         jumpPage(`/_health/pages/timeline_detail?disable_edit=1&window_id=${link.window_id}`)
     }
 
@@ -61,7 +60,7 @@ export default function MomentItem(props: { data: any }) {
         }
 
         return <Image onClick={(e) => {
-            if (process.env.TARO_ENV == 'weapp'){
+            if (process.env.TARO_ENV == 'weapp') {
                 e.stopPropagation()
             }
             Taro.previewImage({
@@ -75,9 +74,15 @@ export default function MomentItem(props: { data: any }) {
         <View className="moment_detail" onClick={goDetail}>
             <View className="h34 bold" style={{ color: MainColorType.link, marginBottom: rpxToPx(6) }} onClick={goProfile}>{user.nickname}</View>
             {
-                (moment.title || moment.description) && <TimeTitleDesc time="" title={moment.title} desc={moment.description} />
+                moment.title && <View className="h22 g02" style={{ marginBottom: rpxToPx(6) }}>{moment.title}</View>
+            }
+            {
+                moment.description && <TimeTitleDesc time="" title='' desc={moment.description} />
             }
-            <View style={{ height: rpxToPx(12) }} />
+            {
+                moment.description && <View style={{ height: rpxToPx(12) }} />
+            }
+
             {
                 moment.media.length > 1 && <CoverList imgs={formatImages(moment.media)} count={moment.media.length} />
             }
@@ -116,6 +121,6 @@ export default function MomentItem(props: { data: any }) {
                 </View>
             </View>
         </View>
-        <View className="border_footer_line"/>
+        <View className="border_footer_line" />
     </View>
 }

+ 41 - 11
src/pages/friend/friend_main.tsx → src/pages/moment/moment_main.tsx

@@ -16,10 +16,11 @@ import { setFastWithSleep, setFinishSetup, setLongFast, setRefreshs, setWindows
 import { getInfoSuccess } from "@/store/user";
 import showActionSheet from "@/components/basic/ActionSheet";
 import { jumpPage } from "@/features/trackTimeDuration/hooks/Common";
-import './friend.scss'
+import './moment.scss'
 import ListFooter from "@/_health/components/list_footer";
 import { MainColorType } from "@/context/themes/color";
 import dayjs from "dayjs";
+import { IconClose, IconMenu } from "@/components/basic/Icons";
 
 
 
@@ -34,7 +35,7 @@ let timer;
 
 let myScrollTop = 0
 
-export default function FriendMain() {
+export default function MomentMain() {
     const user = useSelector((state: any) => state.user);
 
 
@@ -232,6 +233,7 @@ export default function FriendMain() {
     function onRefresh() {
         setIsPulling(true)
         getMoments(1)
+        getDashBoard()
     }
 
     function getMoments(index) {
@@ -330,9 +332,22 @@ export default function FriendMain() {
     function friendGuide() {
         return <View style={{ position: 'fixed', left: 0, top: 0, width: rpxToPx(750), height: '100vh', zIndex: 100 }}>
             <View style={{ height: navigationBarHeight, width: rpxToPx(750), backgroundColor: '#fff' }} />
-            <View onClick={() => {
+            {/* <View onClick={() => {
                 setCloseGuide(true)
-            }}>关闭</View>
+            }}>关闭</View> */}
+            {
+                user.isLogin && <View style={{
+                    position: 'absolute', left: 0, top: navigationBarHeight-44, width: 44, height: 44,
+                    display: 'flex', alignItems: 'center', justifyContent: 'center'
+                }}
+                    onClick={() => {
+                        setCloseGuide(true)
+                    }}
+                >
+                    <IconClose color="#000" width={20} height={20} />
+                </View>
+            }
+
             <FriendGuide />
             {
                 process.env.TARO_ENV == 'weapp' && <TabBar index={4} />
@@ -342,9 +357,18 @@ export default function FriendMain() {
     function empty() {
         return <View style={{ position: 'fixed', left: 0, top: 0, width: rpxToPx(750), height: '100vh', zIndex: 100 }}>
             <View style={{ height: navigationBarHeight, width: rpxToPx(750), backgroundColor: '#fff' }} />
-            <View onClick={() => {
-                setCloseGuide(true)
-            }}>关闭</View>
+            {
+                user.isLogin && <View style={{
+                    position: 'absolute', left: 0, top: navigationBarHeight-44, width: 44, height: 44,
+                    display: 'flex', alignItems: 'center', justifyContent: 'center'
+                }}
+                    onClick={() => {
+                        setCloseGuide(true)
+                    }}
+                >
+                    <IconClose color="#000" width={20} height={20} />
+                </View>
+            }
             <EmptyContent friends={dashBoard.friends} />
             {
                 process.env.TARO_ENV == 'weapp' && <TabBar index={4} />
@@ -361,12 +385,18 @@ export default function FriendMain() {
                 top: 0,
                 left: 0,
                 zIndex: 10,
-                height: navigationBarHeight, width: rpxToPx(750), backgroundColor: '#fff', display: 'flex',
+                height: navigationBarHeight, width: rpxToPx(750), backgroundColor: '#f5f5f5', display: 'flex',
                 flexDirection: 'column', justifyContent: 'flex-end'
             }}>
                 <View style={{ height: 44, width: rpxToPx(750), position: 'relative', display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
-                    <View style={{fontWeight:'bold',}}>{t('health.moments')}</View>
-                    <View onClick={more} style={{ position: 'absolute', left: 0, top: 0, bottom: 0, width: 80, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>More</View>
+                    <View style={{ fontWeight: 'bold', }}>{t('health.moments')}</View>
+                    <View onClick={more} style={{ position: 'absolute', left: 10, top: 0, bottom: 0, width: 44, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
+                        <IconMenu color="#000" width={rpxToPx(40)} />
+                    </View>
+                    <View style={{ position: 'absolute', left: 54, top: 0, bottom: 0, width: 44, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
+                        <Image src={require('@assets/_health/wechat.png')} style={{ width: rpxToPx(48), height: rpxToPx(48) }} />
+                        <Button openType="share" style={{ position: 'absolute', left: 0, right: 0, top: 0, bottom: 0, opacity: 0 }} />
+                    </View>
                 </View>
             </View>
             <ScrollView style={{
@@ -393,7 +423,7 @@ export default function FriendMain() {
                 }}
             // onScrollToLower={props.loadMore}
             >
-                <View style={{ backgroundColor: '#fff', minHeight: '100vh', paddingTop: rpxToPx(60), paddingBottom: 100 }}>
+                <View style={{ backgroundColor: '#fff', minHeight: '100vh', paddingTop: rpxToPx(30), paddingBottom: 100 }}>
                     {
                         dashBoard && dashBoard.new_message && <View className="new_message_bg">