|
@@ -757,7 +757,7 @@ export default function TimelineDetail() {
|
|
|
|
|
|
|
|
function goHome() {
|
|
function goHome() {
|
|
|
// jumpPage('/_moment/pages/message')
|
|
// jumpPage('/_moment/pages/message')
|
|
|
- if (!user.isLogin){
|
|
|
|
|
|
|
+ if (!user.isLogin) {
|
|
|
jumpPage('/_account/pages/ChooseAuth')
|
|
jumpPage('/_account/pages/ChooseAuth')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -768,7 +768,53 @@ export default function TimelineDetail() {
|
|
|
jumpPage('/_moment/pages/home?uid=' + (shareUser ? shareUser.id : detail.share_user ? detail.share_user.id : user.id))
|
|
jumpPage('/_moment/pages/home?uid=' + (shareUser ? shareUser.id : detail.share_user ? detail.share_user.id : user.id))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return <View style={{ display: 'flex', flex: 1, flexDirection: 'column', backgroundColor: '#fff', height: '101vh' }}>
|
|
|
|
|
|
|
+ function moreBtn() {
|
|
|
|
|
+ if (!detail.share_user || user.id == detail.share_user.id) {
|
|
|
|
|
+ return <NewButton
|
|
|
|
|
+ type={NewButtonType.more}
|
|
|
|
|
+ onClick={tapMore}
|
|
|
|
|
+ />
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function addNoteBtn() {
|
|
|
|
|
+ if (!uid && (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'))
|
|
|
|
|
+
|
|
|
|
|
+ return <View className="add_note"><NewButton type={NewButtonType.link} title={t('health.add_note')} onClick={() => {
|
|
|
|
|
+ setShowPop(true)
|
|
|
|
|
+
|
|
|
|
|
+ }} /></View>
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return <View style={{ display: 'flex', flex: 1, flexDirection: 'column', backgroundColor: '#fff', minHeight: '101vh' }}>
|
|
|
|
|
+ {/* <View>测试图片原图</View>
|
|
|
|
|
+ <Image src="https://fast-prod.oss-cn-beijing.aliyuncs.com/users/6b3dd3ee205561e227e9e3a6dd30a8d4/food-journal/2024/e5631780-a045-4384-8837-3f34a91f37e1_20241227144547_701.jpg"
|
|
|
|
|
+ style={{width:100,height:100}}
|
|
|
|
|
+ />
|
|
|
|
|
+ <View>测试图片压缩</View>
|
|
|
|
|
+ <Image src="https://fast-prod.oss-cn-beijing.aliyuncs.com/users/6b3dd3ee205561e227e9e3a6dd30a8d4/food-journal/2024/e5631780-a045-4384-8837-3f34a91f37e1_20241227144547_701.jpg?x-oss-process=image/resize,w_400"
|
|
|
|
|
+ style={{width:100,height:100}}
|
|
|
|
|
+ />
|
|
|
|
|
+ <View>测试图片webp</View>
|
|
|
|
|
+ <Image src="https://fast-prod.oss-cn-beijing.aliyuncs.com/users/6b3dd3ee205561e227e9e3a6dd30a8d4/food-journal/2024/e5631780-a045-4384-8837-3f34a91f37e1_20241227144547_701.jpg?x-oss-process=image/format,webp"
|
|
|
|
|
+ style={{width:100,height:100}}
|
|
|
|
|
+ />
|
|
|
|
|
+ <View>测试图片png</View>
|
|
|
|
|
+ <Image src="https://fast-prod.oss-cn-beijing.aliyuncs.com/users/6b3dd3ee205561e227e9e3a6dd30a8d4/food-journal/2024/e5631780-a045-4384-8837-3f34a91f37e1_20241227144547_701.jpg?x-oss-process=image/format,png"
|
|
|
|
|
+ style={{width:100,height:100}}
|
|
|
|
|
+ />
|
|
|
|
|
+ <View>测试图片jpg</View>
|
|
|
|
|
+ <Image src="https://fast-prod.oss-cn-beijing.aliyuncs.com/users/6b3dd3ee205561e227e9e3a6dd30a8d4/food-journal/2024/e5631780-a045-4384-8837-3f34a91f37e1_20241227144547_701.jpg?x-oss-process=image/format,jpg"
|
|
|
|
|
+ style={{width:100,height:100}}
|
|
|
|
|
+ />
|
|
|
|
|
+ <View>测试图片jpg+压缩</View>
|
|
|
|
|
+ <Image src="https://fast-prod.oss-cn-beijing.aliyuncs.com/users/6b3dd3ee205561e227e9e3a6dd30a8d4/food-journal/2024/e5631780-a045-4384-8837-3f34a91f37e1_20241227144547_701.jpg?x-oss-process=image/format,jpg/resize,w_400"
|
|
|
|
|
+ style={{width:100,height:100}}
|
|
|
|
|
+ /> */}
|
|
|
{
|
|
{
|
|
|
!showEmpty && <View className="detail_header">
|
|
!showEmpty && <View className="detail_header">
|
|
|
<Image className="detail_header_header"
|
|
<Image className="detail_header_header"
|
|
@@ -929,11 +975,11 @@ export default function TimelineDetail() {
|
|
|
</View>
|
|
</View>
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ {
|
|
|
|
|
+ moreBtn()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- {!router.params.uid && <NewButton
|
|
|
|
|
- type={NewButtonType.more}
|
|
|
|
|
- onClick={tapMore}
|
|
|
|
|
- />}
|
|
|
|
|
</View>
|
|
</View>
|
|
|
}
|
|
}
|
|
|
</View>
|
|
</View>
|
|
@@ -959,13 +1005,18 @@ export default function TimelineDetail() {
|
|
|
<Text style={{ opacity: 0 }}>{count}</Text>
|
|
<Text style={{ opacity: 0 }}>{count}</Text>
|
|
|
<ListFooter />
|
|
<ListFooter />
|
|
|
{
|
|
{
|
|
|
|
|
+ uid && <View style={{ height: 100 }} />
|
|
|
|
|
+ }
|
|
|
|
|
+ {/* {
|
|
|
!uid && detail.windows && detail.windows[0].status != 'DONE' && ((health.mode != 'ACTIVE' && health.mode != 'EAT') || fast_type == 'LF') && <View className="add_note"><NewButton type={NewButtonType.link} title={t('health.add_note')} onClick={() => {
|
|
!uid && detail.windows && detail.windows[0].status != 'DONE' && ((health.mode != 'ACTIVE' && health.mode != 'EAT') || fast_type == 'LF') && <View className="add_note"><NewButton type={NewButtonType.link} title={t('health.add_note')} onClick={() => {
|
|
|
- // timestamp = new Date().getTime()
|
|
|
|
|
setShowPop(true)
|
|
setShowPop(true)
|
|
|
|
|
|
|
|
}} /></View>
|
|
}} /></View>
|
|
|
- }
|
|
|
|
|
|
|
+ } */}
|
|
|
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ addNoteBtn()
|
|
|
|
|
+ }
|
|
|
{
|
|
{
|
|
|
uid && <View className="main_footer" style={{ backgroundColor: '#fff' }}>
|
|
uid && <View className="main_footer" style={{ backgroundColor: '#fff' }}>
|
|
|
<NewButton
|
|
<NewButton
|