|
|
@@ -498,8 +498,8 @@ export default function LogRecord() {
|
|
|
setShowResult(true)
|
|
|
setResult(res)
|
|
|
setPosting(false)
|
|
|
- Taro.eventCenter.trigger('refresh_timeline',(res as any).feed_item)
|
|
|
- if (global.refreshHistory){
|
|
|
+ Taro.eventCenter.trigger('refresh_timeline', (res as any).feed_item)
|
|
|
+ if (global.refreshHistory) {
|
|
|
global.refreshHistory()
|
|
|
}
|
|
|
Taro.navigateBack()
|
|
|
@@ -576,7 +576,7 @@ export default function LogRecord() {
|
|
|
setStep(2)
|
|
|
return
|
|
|
}
|
|
|
- if (step == 2) {
|
|
|
+ if (step == 2 && (desc.length > 0 || pics.length > 0)) {
|
|
|
showAlert({
|
|
|
title: t('health.back_no_save'),
|
|
|
content: '',
|
|
|
@@ -685,18 +685,19 @@ export default function LogRecord() {
|
|
|
</View>
|
|
|
}
|
|
|
{
|
|
|
- step == 2 && <View className="cardShowAni">
|
|
|
+ step == 2 && <ScrollView style={{ flex: 1, position: 'relative', zIndex: 1000, height: screenHeight - navigationBarHeight - rpxToPx(276) }} scrollY>
|
|
|
+ <View className="cardShowAni" style={{ paddingTop: rpxToPx(26) }}>
|
|
|
|
|
|
- <View className="content_card">
|
|
|
- <View style={{ display: 'flex', flexDirection: 'row' }} >
|
|
|
- <NewButton type={NewButtonType.custom}
|
|
|
- onClick={() => {
|
|
|
- setStep(0)
|
|
|
- setFocus(false)
|
|
|
- }}>
|
|
|
+ <View className="content_card">
|
|
|
+ <View style={{ display: 'flex', flexDirection: 'row' }} >
|
|
|
+ <NewButton type={NewButtonType.custom}
|
|
|
+ onClick={() => {
|
|
|
+ setStep(0)
|
|
|
+ setFocus(false)
|
|
|
+ }}>
|
|
|
|
|
|
- <View className="sel_tag">
|
|
|
- {/* <View className="h34 bold">{selPostCount}</View>
|
|
|
+ <View className="sel_tag">
|
|
|
+ {/* <View className="h34 bold">{selPostCount}</View>
|
|
|
<View className="h34" style={{ marginLeft: rpxToPx(6) }}>次</View>
|
|
|
<View style={{
|
|
|
width: rpxToPx(2),
|
|
|
@@ -706,92 +707,93 @@ export default function LogRecord() {
|
|
|
marginLeft: rpxToPx(12),
|
|
|
marginRight: rpxToPx(12)
|
|
|
}} /> */}
|
|
|
- <View className="h34 bold">{chooseTitle}</View>
|
|
|
- <View style={{ width: rpxToPx(6) }} />
|
|
|
- <IconArrow width={rpxToPx(34)} color='#000' />
|
|
|
+ <View className="h34 bold">{chooseTitle}</View>
|
|
|
+ <View style={{ width: rpxToPx(6) }} />
|
|
|
+ <IconArrow width={rpxToPx(34)} color='#000' />
|
|
|
|
|
|
- </View>
|
|
|
- </NewButton>
|
|
|
- </View>
|
|
|
- {/* <Input placeholder="hhhhhhh" style={{textAlign:'center'}}/> */}
|
|
|
+ </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" key={index}>
|
|
|
- <Image src={item.url + scale} mode="aspectFill" className="cover" style={{
|
|
|
- margin: 0,
|
|
|
- }} key={index} onClick={() => {
|
|
|
- Taro.previewImage({
|
|
|
- current: pics[index].url,
|
|
|
- urls: pics.map(file => file.url)
|
|
|
- })
|
|
|
- }} />
|
|
|
- <View className="cover_del" onClick={() => {
|
|
|
- showAlert({
|
|
|
- title: t('health.del_title'),
|
|
|
- content: '',
|
|
|
- cancelText: t('health.del_cancel'),
|
|
|
- confirmText: t('health.del_confirm'),
|
|
|
- showCancel: true,
|
|
|
- confirm: () => {
|
|
|
- var array = JSON.parse(JSON.stringify(pics))
|
|
|
- array.splice(index, 1)
|
|
|
- setPics(array)
|
|
|
- }
|
|
|
- })
|
|
|
- }}>
|
|
|
- <View className="cover_del_btn">
|
|
|
- <IconClose width={10} height={10} color="#fff" />
|
|
|
+ <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" key={index}>
|
|
|
+ <Image src={item.url + scale} mode="aspectFill" className="cover" style={{
|
|
|
+ margin: 0,
|
|
|
+ }} key={index} onClick={() => {
|
|
|
+ Taro.previewImage({
|
|
|
+ current: pics[index].url,
|
|
|
+ urls: pics.map(file => file.url)
|
|
|
+ })
|
|
|
+ }} />
|
|
|
+ <View className="cover_del" onClick={() => {
|
|
|
+ showAlert({
|
|
|
+ title: t('health.del_title'),
|
|
|
+ content: '',
|
|
|
+ cancelText: t('health.del_cancel'),
|
|
|
+ confirmText: t('health.del_confirm'),
|
|
|
+ showCancel: true,
|
|
|
+ confirm: () => {
|
|
|
+ var array = JSON.parse(JSON.stringify(pics))
|
|
|
+ array.splice(index, 1)
|
|
|
+ setPics(array)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}>
|
|
|
+ <View className="cover_del_btn">
|
|
|
+ <IconClose width={10} height={10} color="#fff" />
|
|
|
+ </View>
|
|
|
</View>
|
|
|
</View>
|
|
|
- </View>
|
|
|
- })
|
|
|
- }
|
|
|
- {
|
|
|
- pics.length < 9 && <NewButton
|
|
|
- type={NewButtonType.custom}
|
|
|
- onClick={tapPic}>
|
|
|
- <View className="cover" style={{}}><IconCamera color="#000" width={rpxToPx(48)} /></View>
|
|
|
- </NewButton>
|
|
|
- }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ {
|
|
|
+ pics.length < 9 && <NewButton
|
|
|
+ type={NewButtonType.custom}
|
|
|
+ onClick={tapPic}>
|
|
|
+ <View className="cover" style={{}}><IconCamera color="#000" width={rpxToPx(48)} /></View>
|
|
|
+ </NewButton>
|
|
|
+ }
|
|
|
+ </View>
|
|
|
</View>
|
|
|
- </View>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- <View className="time_view" onClick={() => {
|
|
|
- setShowTimePicker(true)
|
|
|
- }}>
|
|
|
- <View style={{ opacity: 0.25 }}>
|
|
|
- <IconClock width={rpxToPx(36)} color={MainColorType.black} />
|
|
|
- </View>
|
|
|
+ <View className="time_view" onClick={() => {
|
|
|
+ setShowTimePicker(true)
|
|
|
+ }}>
|
|
|
|
|
|
- <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>
|
|
|
+ <IconClock width={rpxToPx(36)} color={MainColorType.black_25} />
|
|
|
|
|
|
- {
|
|
|
- router.params.join_id && <FollowInfo user={long.follow} />
|
|
|
- }
|
|
|
|
|
|
+ <View className="h30" style={{ opacity: 0.25, marginLeft: rpxToPx(12) }}>{t('health.time')}</View>
|
|
|
+ <View style={{ flex: 1 }} />
|
|
|
+ <View className="h30" style={{ opacity: 0.25 }}>{getDate() + time}</View>
|
|
|
+ <IconArrow width={rpxToPx(34)} color={MainColorType.black_25} />
|
|
|
+ <View className="border_footer_line" style={{ left: rpxToPx(48) }} />
|
|
|
+ </View>
|
|
|
|
|
|
+ {
|
|
|
+ router.params.join_id && <FollowInfo user={long.follow} />
|
|
|
+ }
|
|
|
|
|
|
- </View>
|
|
|
+
|
|
|
+
|
|
|
+ </View>
|
|
|
+ </ScrollView>
|
|
|
}
|
|
|
{
|
|
|
step == 2 && <View className="main_footer" style={{ backgroundColor: 'transparent' }}>
|