Leon 1 tahun lalu
induk
melakukan
b6aa033137

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

@@ -277,6 +277,7 @@ export default function AddMoment() {
         createMoment(params).then(res => {
             // setTimeout(() => {
             setPosting(false)
+            Taro.eventCenter.trigger('refreshMoments', '')
             // }, 1000)
 
             if (process.env.TARO_ENV == 'weapp') {

+ 2 - 26
src/_health/pages/log_time.tsx

@@ -1191,7 +1191,7 @@ export default function LogTime() {
 
     function joinContent() {
         if (router.params.join_id && !router.params.hide_more) {
-            const { index, window, is_start, single, join_status } = router.params
+            const { index, window, is_start, single } = router.params
             var status = getScenario(health.windows, window).status
             return <View style={{ width: rpxToPx(400), height: rpxToPx(72), marginBottom: rpxToPx(24) }}>
                 <NewButton type={NewButtonType.link}
@@ -1203,31 +1203,7 @@ export default function LogTime() {
                     }}
                 />
             </View>
-            // return <View onClick={() => {
-            //     moreOption(status == 'OG')
-            // }} className="h26" style={{ color: MainColorType.link }}>更多选项</View>
-            // debugger
-            // if (window == 'FAST') {
-
-            //     // if (index )
-            //     if (join_status == 'OG' && getScenario(health.windows, window).status == 'OG') {
-            //         return <View onClick={()=>{
-            //             moreOption(true)
-            //         }} className="h26" style={{ color: MainColorType.link }}>更多选项</View>
-            //     }
-            //     else if (join_status == 'DONE' && getScenario(health.windows, 'FAST').status == 'WFS') {
-            //         return <View onClick={()=>{
-            //             moreOption(false)
-            //         }} className="h26" style={{ color: MainColorType.link }}>更多选项</View>
-            //     }
-            // }
-            // else {
-            //     if (join_status == 'OG' && getScenario(health.windows, 'SLEEP').status == 'OG') {
-            //         return <View onClick={cancelAlert} className="h26" style={{ color: MainColorType.link }}>更多选项</View>
-            //     } else if (join_status == 'DONE' && getScenario(health.windows, 'SLEEP').status == 'WFS') {
-            //         return <View className="h26" style={{ color: MainColorType.link }}>更多选项</View>
-            //     }
-            // }
+
         }
         return <View />
     }

+ 28 - 8
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 } from "@/services/health";
+import { createMoment, delEvents, delRecord, getEvents, getRecordDetail, 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";
@@ -27,13 +27,14 @@ import { TimeFormatter } from "@/utils/time_format";
 import TargetProgress from "../components/target_progress";
 import formatMilliseconds from "@/utils/format_time";
 import SingleImage from "../components/single_img";
-import { setFirstActiveId, setFirstEatId, setShowActionTip } from "@/store/health";
+import { setFastWithSleep, setFirstActiveId, setFirstEatId, setLongFast, setShowActionTip, setWindows } from "@/store/health";
 import FastSleepPopupContent from "../components/fast_sleep_popup_content";
 import { StatusType } from "../base/status_indicator";
 import 'dayjs/locale/zh-cn';
 import 'dayjs/locale/en';
 import { getInfoSuccess } from "@/store/user";
 import LongCard from "@/_moment/components/long_card";
+import { setFollow } from "@/store/long";
 
 let useRoute;
 let useNavigation;
@@ -64,6 +65,7 @@ export default function TimelineDetail() {
     const [count, setCount] = useState(0)
     const [fastSleepPop, setFastSleepPop] = useState(false)
     const [shareUser, setShareUser] = useState<any>(null)
+    const [join, setJoin] = useState<any>(null)
     const [showEmpty, setShowEmpty] = useState(false)
     const dispatch = useDispatch()
 
@@ -98,7 +100,7 @@ export default function TimelineDetail() {
         })
     }
 
-    if (process.env.TARO_ENV == 'weapp' && global.allowShare) {
+    if (process.env.TARO_ENV == 'weapp'/* && global.allowShare*/) {
         Taro.updateShareMenu({
             withShareTicket: true,
             success() { }
@@ -297,7 +299,7 @@ export default function TimelineDetail() {
             setBottom(res.height > 0 ? res.height : 20)
         })
 
-        getDatas()
+        // getDatas()
 
 
         if (!window_id && ((health.mode != 'ACTIVE' && health.mode != 'EAT') || fast_type == 'LF') && autoPost == '1') {
@@ -308,6 +310,18 @@ export default function TimelineDetail() {
         }
     }, [])
 
+    useEffect(() => {
+        getDatas()
+        if (user.isLogin) {
+            windows().then(res => {
+                dispatch(setFastWithSleep((res as any).fast_with_sleep))
+                dispatch(setWindows((res as any).windows))
+                dispatch(setLongFast((res as any).long_fast))
+            }).catch(e => {
+            })
+        }
+    }, [user.isLogin])
+
     useEffect(() => {
         if (desc.length > 0 || imgUrl.length > 0) {
             setBtnDisable(false)
@@ -323,7 +337,6 @@ export default function TimelineDetail() {
 
     function getDatas() {
         var showWindow = true
-        console.log('获取接口数据')
 
         if (!window_id || op_page == 'HOME_EAT' || op_page == 'HOME_ACTIVE') showWindow = false
         if (window_id == 'undefined') showWindow = false
@@ -344,9 +357,10 @@ export default function TimelineDetail() {
                 setHistory((res as any).events)
                 // setList((res as any).moments)
                 setPublish((res as any).publish)
-
+                setJoin((res as any).join)
                 if ((res as any).share_user) {
                     setShareUser((res as any).share_user)
+                    dispatch(setFollow((res as any).share_user))
                 }
                 console.log('获取window数据成功')
             }).catch(e => {
@@ -368,8 +382,10 @@ export default function TimelineDetail() {
                 setDetail(res)
                 setList((res as any).moments)
                 setPublish((res as any).publish)
+                setJoin((res as any).join)
                 if ((res as any).share_user) {
                     setShareUser((res as any).share_user)
+                    dispatch(setFollow((res as any).share_user))
                 }
                 console.log('获取event数据成功')
             }).catch(e => {
@@ -779,7 +795,8 @@ export default function TimelineDetail() {
     }
 
     function addNoteBtn() {
-        if (!uid && (detail.share_user && user.id != detail.share_user.id)) {
+        if (!detail) return null
+        if (!uid && (detail && detail.share_user && user.id != detail.share_user.id)) {
             return null
         }
         if (detail.windows && detail.windows[0].status != 'DONE' && ((health.mode != 'ACTIVE' && health.mode != 'EAT') || fast_type == 'LF'))
@@ -962,7 +979,10 @@ export default function TimelineDetail() {
                             canvasId={`double_${detail.windows[0].window_range.start_timestamp}`}
                         />
                     }
-                    <LongCard join={{}} link={{}}/>
+                    {
+                        join && <LongCard join={join} />
+                    }
+
                     {
                         publish && <View style={{ display: 'flex', flexDirection: 'row', height: rpxToPx(60), marginTop: rpxToPx(17), alignItems: 'center' }}>
                             {/* <Text className="h24 g02">{publish.edited ? '编辑于' : '发布于'}{dayjs(publish.timestamp).format('M月D日 HH:mm')}</Text> */}

+ 2 - 2
src/_moment/components/long_card.scss

@@ -1,7 +1,7 @@
 .long_card_bg {
     background-color: #fafafa;
     border-radius: 12px;
-    width: 572px;
+    // width: 572px;
     box-sizing: border-box;
     padding-left: 20px;
     padding-right: 24px;
@@ -22,6 +22,6 @@
     height: 40px;
     border-radius: 20px;
     border: solid 2px #fff;
-    background-color: antiquewhite;
+    background-color: #f0f0f0;
     box-sizing: border-box;
 }

+ 24 - 14
src/_moment/components/long_card.tsx

@@ -8,10 +8,8 @@ import { useDispatch, useSelector } from "react-redux";
 import { getScenario } from "@/features/health/hooks/health_hooks";
 import { setFollow, setJoinData } from "@/store/long";
 
-export default function LongCard(props: { join?: any, link?: any, user?: any, hideJoin?: boolean }) {
-    const { status, key, from } = props.join
-    const { window } = props.link
-    const linkStatus = props.link.status
+export default function LongCard(props: { join?: any,  user?: any, hideJoin?: boolean,share?:any }) {
+    const { status, key, from,window } = props.join
     const health = useSelector((state: any) => state.health);
     const dispatch = useDispatch()
     let type = 0
@@ -19,7 +17,7 @@ export default function LongCard(props: { join?: any, link?: any, user?: any, hi
         if (process.env.TARO_ENV == 'weapp') {
             e.stopPropagation()
         }
-        if (props.user){
+        if (props.user) {
             dispatch(setFollow(props.user))
         }
         dispatch(setJoinData(props.join))
@@ -31,22 +29,22 @@ export default function LongCard(props: { join?: any, link?: any, user?: any, hi
             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}&join_status=${linkStatus}`)
+                    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}&join_status=${linkStatus}`)
+                    jumpPage(`/_health/pages/log_time?join_id=${key}&index=3&single=1&is_start=0&window=${window}`)
                 }
 
             }
             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}&join_status=${linkStatus}`)
+                    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}&join_status=${linkStatus}`)
+                    jumpPage(`/_health/pages/log_time?join_id=${key}&index=2&single=1&is_start=0&window=${window}`)
                 }
             }
 
@@ -55,14 +53,26 @@ export default function LongCard(props: { join?: any, link?: any, user?: any, hi
 
     }
 
-    function share() {
+    function goDetail() {
+        if (props.user) {
+            dispatch(setFollow(props.user))
+        }
+        dispatch(setJoinData(props.join))
+        jumpPage(`/_moment/pages/long_detail?join_id=${key}&window=${window}`)
+    }
 
+    function share() {
+        global.join_id = key
+        if (props.share){
+            props.share()
+        }
     }
 
     function users() {
         return <View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
             {
                 props.join.users.map((item, index) => {
+                    if (index>4) return 
                     return <Image className="long_avatar" style={{
                         zIndex: 10 - index,
                         marginLeft: index == 0 ? 0 : -rpxToPx(20)
@@ -70,12 +80,12 @@ export default function LongCard(props: { join?: any, link?: any, user?: any, hi
                 })
             }
             {/* <View className="long_avatar"></View> */}
-            <View className="h26" style={{ marginLeft: rpxToPx(6) }}>跟卡</View>
+            <View className="h26" style={{ marginLeft: rpxToPx(6) }}>{props.join.users.length>5?`+${props.join.users.length-5} more `:''}跟卡</View>
         </View>
     }
 
     if (from)
-        return <View className="long_card_bg" style={{
+        return <View onClick={goDetail} className="long_card_bg" style={{
             flexDirection: 'column',
             paddingTop: rpxToPx(18),
             paddingBottom: rpxToPx(18)
@@ -99,7 +109,7 @@ export default function LongCard(props: { join?: any, link?: any, user?: any, hi
             </View>
         </View>
     if (status == 'JOIN')
-        return <View className="long_card_bg long_card_begin">
+        return <View onClick={goDetail} className="long_card_bg long_card_begin">
             {
                 (!props.join || props.join.user_count == 0) && <View className="h26 g02">一起接龙打卡</View>
             }
@@ -111,7 +121,7 @@ export default function LongCard(props: { join?: any, link?: any, user?: any, hi
         </View>
 
     if (status == 'SHARE') {
-        return <View className="long_card_bg long_card_begin">
+        return <View onClick={goDetail} className="long_card_bg long_card_begin">
             {
                 (!props.join || props.join.user_count == 0) && <View className="h26 g02">一起接龙打卡</View>
             }

+ 1 - 1
src/_moment/pages/home.scss

@@ -19,7 +19,7 @@ page{
     border-radius: 63px;
     right: 40px;
     bottom: -36px;
-    background-color: pink;
+    background-color: #f0f0f0;
 }
 
 .home_nickname{

+ 11 - 0
src/_moment/pages/long_detail.config.ts

@@ -0,0 +1,11 @@
+export default definePageConfig({
+    usingComponents: {
+        // 'ec-canvas': '../../lib/ec-canvas/ec-canvas',
+        // 'demo':'../../components/demo'
+    },
+    "navigationBarTitleText": "",
+    "navigationBarBackgroundColor": "#f5f5f5",
+    // "backgroundColor": "#ffffff",
+    "navigationStyle": "custom",
+    // "disableScroll": true
+})

+ 44 - 9
src/_moment/pages/long_detail.scss

@@ -1,37 +1,72 @@
-.main_avatar{
+.main_avatar {
     width: 126px;
     height: 126px;
     border-radius: 63px;
-    margin-bottom: 66px;
+    margin-bottom: 12px;
+    background-color: #f0f0f0;
 }
 
-.member_group{
+.member_group {
     background-color: #fff;
     border-radius: 24px;
     padding: 0 40px;
     box-sizing: border-box;
     width: 694px;
+    margin-top: 48px;
 }
 
-.members{
+.members {
     display: flex;
     flex-direction: row;
     flex-wrap: wrap;
-
+    padding-top: 40px;
 }
 
-.member_item{
+.member_item {
     display: flex;
     flex-direction: column;
     align-items: center;
+    margin-bottom: 26px;
+    width: 20%;
 }
 
-.member_avatar{
+.member_avatar {
     width: 96px;
     height: 96px;
     border-radius: 48px;
+    background-color: #f0f0f0;
+}
+
+.member_relation {}
+
+.join_count {
+    height: 88px;
+    position: relative;
+    line-height: 88px;
+    font-size: 26px;
+}
+
+.full_avatar_bg {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100vw;
+    height: 100vh;
+    z-index: 100;
+    background-color: #000;
+    display: flex;
+    align-items: center;
+    justify-content: center;
 }
 
-.member_relation{
-    
+.join_no_data {
+    background-color: #fff;
+    width: 694px;
+    height: 520px;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    border-radius: 24px;
+    margin-top:48px;
 }

+ 200 - 8
src/_moment/pages/long_detail.tsx

@@ -1,13 +1,205 @@
-import { View,Image } from "@tarojs/components";
+import { View, Image } from "@tarojs/components";
 import './long_detail.scss'
+import { useEffect, useState } from "react";
+import Taro, { useRouter } from "@tarojs/taro";
+import { joinDetail } from "@/services/friend";
+import NewButton, { NewButtonType } from "@/_health/base/new_button";
+import { jumpPage } from "@/features/trackTimeDuration/hooks/Common";
+import { rpxToPx } from "@/utils/tools";
+import { MainColorType } from "@/context/themes/color";
+import { getScenario } from "@/features/health/hooks/health_hooks";
+import { useDispatch, useSelector } from "react-redux";
+import { IconClose } from "@/components/basic/Icons";
 
-export default function LongDetail(){
-    return <View>
-        <Image className="main_avatar" src=""/>
-        <View className="h26 g02">累计获得 10888 次跟卡</View>
-        <View className="member_group">
-            <View>56人已跟卡</View>
-            <View className="members"></View>
+let useRoute;
+let useNavigation;
+let scenario = '';
+if (process.env.TARO_ENV == 'rn') {
+    useRoute = require("@react-navigation/native").useRoute
+    useNavigation = require("@react-navigation/native").useNavigation
+}
+
+export default function LongDetail() {
+    let router
+    let navigation;
+    if (useNavigation) {
+        navigation = useNavigation()
+    }
+
+    if (process.env.TARO_ENV == 'rn') {
+        router = useRoute()
+    }
+    else {
+        router = useRouter()
+    }
+    const health = useSelector((state: any) => state.health);
+    const [detail, setDetail] = useState<any>(null)
+    const systemInfo: any = Taro.getWindowInfo ? Taro.getWindowInfo() : Taro.getSystemInfoSync();
+    const navigationBarHeight = systemInfo.statusBarHeight + 44;
+    const [showFull, setShowFull] = useState(false)
+    const [selUser, setSelUser] = useState<any>(null)
+    // const [loaded, setLoaded] = useState(false)
+
+    useEffect(() => {
+        getDetail()
+    }, [])
+
+    function getDetail() {
+        joinDetail(router.params.join_id).then(res => {
+            setDetail(res)
+        })
+    }
+
+    function join() {
+        const { window } = router.params
+        const key = router.params.join_id
+        if (window == 'ACTIVE' || window == 'EAT') {
+            jumpPage(`/_health/pages/add_moment?join_id=${key}&is_temp=${true}&window=${window}`)
+        }
+        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}`)
+                }
+
+            }
+            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}`)
+                }
+            }
+
+        }
+    }
+    if (!detail) return <View />
+
+    return <View style={{
+        display: 'flex',
+        flexDirection: 'column',
+        alignItems: 'center',
+        height: '100vh'
+    }}>
+        <View style={{
+            position: 'fixed',
+            top: 0,
+            left: 0,
+            zIndex: 10,
+            height: navigationBarHeight, width: rpxToPx(750), display: 'flex',
+            flexDirection: 'column', justifyContent: 'flex-end'
+        }}>
+            <View style={{ height: 44, width: rpxToPx(750), position: 'relative', display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
+                <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>
         </View>
+        <Image className="main_avatar" style={{ marginTop: navigationBarHeight }} src={detail.user.avatar} />
+        <View className="h34 bold">{detail.user.nickname}</View>
+        <View className="h22 g02">{detail.user.relation_desc}</View>
+        <View className="h26 g02">累计获得 {detail.user.joined_total} 次跟卡</View>
+        {
+            detail.join_count > 0 && <View className="member_group">
+                <View className="join_count">{detail.join_count}人已跟卡
+                    <View className="border_footer_line" />
+                </View>
+                <View className="members">
+                    {
+                        detail.join_users.map((item, index) => {
+                            return <View key={index} className="member_item" onClick={() => {
+                                setSelUser(item)
+                                setShowFull(true)
+                            }}>
+                                <Image className="member_avatar" src={item.avatar} />
+                                <View className="h22 g02" style={{ marginTop: rpxToPx(12) }}>{item.relation_desc}</View>
+                            </View>
+                        })
+                    }
+                </View>
+            </View>
+        }
+        {
+            detail.join_count == 0 && <View className="join_no_data">
+                <Image src={require('@assets/_health/social2.png')} style={{width:rpxToPx(108),height:rpxToPx(108)}}/>
+                <View className="h34 g01" style={{ marginBottom: rpxToPx(12), marginTop: rpxToPx(24) }}>No joins,yet</View>
+                <View className="h26 g01">Be ths first to joins</View>
+            </View>
+        }
+
+        <View style={{ flex: 1 }} />
+        {
+            detail.join_count > 0 && <View style={{ width: rpxToPx(275), height: rpxToPx(40), marginBottom: rpxToPx(24) }}>
+                <NewButton
+                    type={NewButtonType.link}
+                    title="查看完整历史"
+                    onClick={() => {
+                        jumpPage('./long_full?join_id=' + router.params.join_id)
+                    }}
+                />
+            </View>
+        }
+
+
+        <NewButton type={NewButtonType.fill}
+            width={rpxToPx(646)}
+            height={rpxToPx(96)}
+            title="Join"
+            onClick={join}
+            color={MainColorType.eat}
+        />
+        <View style={{ height: rpxToPx(128) }} />
+        {
+            showFull && <View className="full_avatar_bg">
+                <Image style={{
+                    width: rpxToPx(750),
+                    height: rpxToPx(750)
+                }} src={selUser.avatar} />
+                <View style={{
+                    position: 'absolute', left: 10, top: navigationBarHeight - 44, width: 44, height: 44,
+                    display: 'flex', alignItems: 'center', justifyContent: 'center'
+                }} onClick={() => {
+                    setShowFull(false)
+                }}>
+                    <IconClose color="#fff" width={30} height={30} />
+                </View>
+                <View style={{
+                    position: 'absolute',
+                    bottom: rpxToPx(128),
+                    left: rpxToPx(56)
+                }}>
+                    <NewButton
+                        type={NewButtonType.fill}
+                        color={MainColorType.blue}
+                        title="View Profile"
+                        width={rpxToPx(646)}
+                        height={rpxToPx(96)}
+                        onClick={() => {
+                            jumpPage(`./home?uid=${selUser.id}`)
+                            setTimeout(() => {
+                                setShowFull(false)
+                            }, 1000)
+                        }}
+                    />
+                </View>
+            </View>
+        }
+
     </View>
 }

+ 11 - 0
src/_moment/pages/long_full.config.ts

@@ -0,0 +1,11 @@
+export default definePageConfig({
+    usingComponents: {
+        // 'ec-canvas': '../../lib/ec-canvas/ec-canvas',
+        // 'demo':'../../components/demo'
+    },
+    "navigationBarTitleText": "完整接龙历史",
+    "navigationBarBackgroundColor": "#f5f5f5",
+    // "backgroundColor": "#ffffff",
+    // "navigationStyle": "custom",
+    // "disableScroll": true
+})

+ 22 - 0
src/_moment/pages/long_full.scss

@@ -0,0 +1,22 @@
+page {
+    background-color: #fff
+}
+
+.long_full_item{
+    height: 138px;
+    display: flex;
+    align-items: center;
+    box-sizing: border-box;
+    padding: 0 40px;
+    width: 750px;
+    position: relative;
+    flex-direction: row;
+    background-color: #f0f0f0;
+}
+
+.full_item_avatar{
+    width: 86px;
+    height: 86px;
+    border-radius: 43px;
+    margin-right: 24px;
+}

+ 67 - 3
src/_moment/pages/long_full.tsx

@@ -1,5 +1,69 @@
-import { View } from "@tarojs/components";
+import { View, Image } from "@tarojs/components";
+import './long_full.scss'
+import { useEffect, useState } from "react";
+import Taro, { useRouter } from "@tarojs/taro";
+import { joinDetail, joinHistory } from "@/services/friend";
+import { MainColorType } from "@/context/themes/color";
+import dayjs from "dayjs";
+import { rpxToPx } from "@/utils/tools";
+import { jumpPage } from "@/features/trackTimeDuration/hooks/Common";
+import { IconArrow } from "@/components/basic/Icons";
 
-export default function LongFull(){
-    return <View></View>
+let useRoute;
+let useNavigation;
+let scenario = '';
+if (process.env.TARO_ENV == 'rn') {
+    useRoute = require("@react-navigation/native").useRoute
+    useNavigation = require("@react-navigation/native").useNavigation
+}
+
+export default function LongFull() {
+    let router
+    let navigation;
+    if (useNavigation) {
+        navigation = useNavigation()
+    }
+
+    if (process.env.TARO_ENV == 'rn') {
+        router = useRoute()
+    }
+    else {
+        router = useRouter()
+    }
+    const [users, setUsers] = useState<any>([])
+
+    useEffect(() => {
+        getDetail()
+    }, [])
+
+    function getDetail() {
+        joinHistory(router.params.join_id).then(res => {
+            setUsers((res as any).data)
+        })
+    }
+
+    function goHome(item){
+        jumpPage(`./home?uid=${item.id}`)
+    }
+
+    return <View>
+        {
+            users.map((item, index) => {
+                return <View key={index} className="long_full_item" onClick={()=>goHome(item)}>
+                    <Image className="full_item_avatar" src={item.avatar} />
+                    <View className="h34 bold" style={{ color: MainColorType.link }}>{item.nickname}</View>
+                    <View style={{ flex: 1 }} />
+                    <View className="h20 g02">{dayjs(item.join_timestamp).format('M月D日 HH:mm加入打卡')}</View>
+                    <IconArrow width={rpxToPx(34)} color={MainColorType.g02} />
+                    <View className="border_footer_line" style={{left:rpxToPx(150)}}/>
+                </View>
+            })
+        }
+        {/* <Image className="main_avatar" src="" />
+        <View className="h26 g02">累计获得 10888 次跟卡</View>
+        <View className="member_group">
+            <View>56人已跟卡</View>
+            <View className="members"></View>
+        </View> */}
+    </View>
 }

TEMPAT SAMPAH
src/assets/_health/social2.png


+ 4 - 0
src/pages/moment/moment.tsx

@@ -101,11 +101,15 @@ export default function Friend() {
                 var imgs = detail.moment.media
                 var imageUrl = imgs.length > 0 ? imgs[0].url : defaultImg
                 var sharePath = `/_health/pages/timeline_detail?window_id=${detail.link.window_id}&event_id=${detail.link.event_id}&uid=${detail.user.id}&disable_edit=1&enter_type=share`
+                if (global.join_id){
+                    sharePath += `&join_id=${global.join_id}`
+                }
                 var nickname = detail.user ? detail.user.nickname : user.nickname
                 if (nickname.length > 10) {
                     nickname.substring(0, 10) + '...'
                 }
                 global.momentShareData = null
+                global.join_id = null
                 return {
                     title: nickname + ': ' + title,
                     path: sharePath,

+ 5 - 3
src/pages/moment/moment_item.tsx

@@ -43,7 +43,7 @@ export default function MomentItem(props: { data: any }) {
             jumpPage('/_health/pages/move_detail?id=' + link.move.id)
             return;
         }
-        jumpPage(`/_health/pages/timeline_detail?disable_edit=1&window_id=${link.window_id}`)
+        jumpPage(`/_health/pages/timeline_detail?disable_edit=1&window_id=${link.window_id}&event_id=${link.event_id}`)
     }
 
     function singleImage() {
@@ -71,9 +71,11 @@ export default function MomentItem(props: { data: any }) {
     }
 
     function tapShare(e) {
-        if (process.env.TARO_ENV == 'weapp') {
+        global.momentShareData = props.data;
+        if (process.env.TARO_ENV == 'weapp' && e && e.stopPropagation) {
             e.stopPropagation()
         }
+
     }
 
     const kSpace = rpxToPx(12)
@@ -131,7 +133,7 @@ export default function MomentItem(props: { data: any }) {
                 />
             }
             {
-                join && <LongCard join={join} link={link} user={user}/>
+                join && <LongCard join={join} user={user} share={tapShare} />
             }
 
             <View style={{ padding: kSpace }} />

+ 26 - 1
src/services/friend.tsx

@@ -1,4 +1,4 @@
-import { API_FOLLOW_USER, API_USER_MESSAGES, API_FRIEND_MOMENTS, API_MY_FOLLOWINGS, API_MY_FRIENDS, API_USER_DASHBOARD, API_USER_PROFILE, API_USER_MOMENTS } from "./http/api";
+import { API_FOLLOW_USER, API_USER_MESSAGES, API_FRIEND_MOMENTS, API_MY_FOLLOWINGS, API_MY_FRIENDS, API_USER_DASHBOARD, API_USER_PROFILE, API_USER_MOMENTS, API_JOIN_DETAIL, API_JOIN_HISTORY } from "./http/api";
 import { request } from "./http/request";
 
 //关注
@@ -134,3 +134,28 @@ export const getUserMoments = (params) => {
     })
 }
 
+export const joinDetail = (key) => {
+    return new Promise((resolve, reject) => {
+        request({
+            url: API_JOIN_DETAIL, method: 'GET', data: {join_key:key}
+        }).then(res => {
+            resolve(res);
+            // dispatch(loginSuccess(res));
+        }).catch(e => {
+            reject(e)
+        })
+    })
+}
+
+export const joinHistory = (key) => {
+    return new Promise((resolve, reject) => {
+        request({
+            url: API_JOIN_HISTORY, method: 'GET', data: {join_key:key}
+        }).then(res => {
+            resolve(res);
+            // dispatch(loginSuccess(res));
+        }).catch(e => {
+            reject(e)
+        })
+    })
+}

+ 3 - 0
src/services/http/api.js

@@ -130,3 +130,6 @@ export const API_FRIEND_MOMENTS = `${baseUrl}/api/user/feeds`
 export const API_USER_MOMENTS = `${baseUrl}/api/user/moments`
 export const API_USER_PROFILE = `${baseUrl}/api/user/profile`
 export const API_USER_MESSAGES = `${baseUrl}/api/user/messages`
+
+export const API_JOIN_DETAIL = `${baseUrl}/api/join/users` //打卡接龙详情
+export const API_JOIN_HISTORY = `${baseUrl}/api/join/histories` //完整接龙历史