MainHistory2.tsx 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751
  1. import { View, Text, Image } from "@tarojs/components";
  2. import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
  3. import { getLatestJournal, records } from "@/services/health";
  4. import './History.scss'
  5. import Calendar from "./calendar";
  6. import { useDispatch, useSelector } from "react-redux";
  7. import HistoryItem from "./HistoryItem";
  8. import { rpxToPx } from "@/utils/tools";
  9. import { jumpPage } from "../trackTimeDuration/hooks/Common";
  10. import Taro, { useReady } from "@tarojs/taro";
  11. import { getScenario, getThemeColor } from "./hooks/health_hooks";
  12. import { TimeFormatter } from "@/utils/time_format";
  13. import dayjs from "dayjs";
  14. import { MainColorType } from "@/context/themes/color";
  15. import { IconArrow, IconCellArrow } from "@/components/basic/Icons";
  16. import NoRecord from "@/_health/components/no_record";
  17. import ListFooter from "@/_health/components/list_footer";
  18. import { useTranslation } from "react-i18next";
  19. import { setActiveTip, setEatTip, setFirstActiveId, setFirstEatId } from "@/store/health";
  20. import RightArrowRow from "@/_health/components/right_arrow_row";
  21. let lastMode = ''
  22. let myScrollTop = 0
  23. export default forwardRef((props: { type?: string, fast_type?: string, updateDate?: any, refreshSuccess?: any }, ref) => {
  24. const [itemLayouts, setItemLayouts] = useState<any>([])
  25. const [itemHeights, setItemHeights] = useState<any>([])
  26. const [list, setList] = useState<any>([])
  27. const [page, setPage] = useState(1)
  28. const [total, setTotal] = useState(0)
  29. const [loaded, setLoaded] = useState(false)
  30. const health = useSelector((state: any) => state.health);
  31. const user = useSelector((state: any) => state.user);
  32. const [loading, setLoading] = useState(false)
  33. const [showEatArchive, setShowEatArchive] = useState(true)
  34. const [showActiveArchive, setShowActiveArchive] = useState(true)
  35. const [fastList, setFastList] = useState<any>([])
  36. const [eatList, setEatList] = useState<any>([])
  37. const [activeList, setActiveList] = useState<any>([])
  38. const [sleepList, setSleepList] = useState<any>([])
  39. const [pageTop, setPageTop] = useState(0)
  40. const dispatch = useDispatch()
  41. const { t } = useTranslation()
  42. useImperativeHandle(ref, () => ({
  43. onScroll: onScroll,
  44. refresh: refresh,
  45. more: more
  46. }))
  47. useEffect(() => {
  48. if (list.length > 0) {
  49. setTimeout(() => {
  50. measureItemLayouts()
  51. }, 300)
  52. }
  53. }, [list])
  54. useEffect(() => {
  55. if (!user.isLogin) {
  56. setList([])
  57. }
  58. }, [user.isLogin])
  59. global.refreshOtherHistory = () => {
  60. refresh()
  61. }
  62. useEffect(() => {
  63. // if (props.type == 'FAST,SLEEP' || (props.fast_type && props.fast_type == 'LF')) {
  64. // }
  65. // else {
  66. // global.refreshHistory = () => {
  67. // refresh()
  68. // // refreshFast()
  69. // // refreshSleep()
  70. // // refreshEat()
  71. // // refreshActive()
  72. // refreshItem('FAST')
  73. // refreshItem('SLEEP')
  74. // refreshItem('EAT')
  75. // refreshItem('ACTIVE')
  76. // }
  77. // }
  78. }, [])
  79. useEffect(() => {
  80. if (props.type) {
  81. loadData(1)
  82. }
  83. }, [props.type])
  84. useEffect(() => {
  85. if (lastMode != health.mode) {
  86. lastMode = health.mode
  87. // loadData(1)
  88. setPage(1)
  89. switch (health.mode) {
  90. case 'DAY':
  91. case 'NIGHT':
  92. debugger
  93. setList([])
  94. return
  95. case 'FAST':
  96. if (fastList.length > 0) {
  97. setList(fastList)
  98. return;
  99. }
  100. break
  101. case 'EAT':
  102. if (eatList.length > 0) {
  103. setList(eatList)
  104. return;
  105. }
  106. break
  107. case 'SLEEP':
  108. if (sleepList.length > 0) {
  109. setList(sleepList)
  110. return;
  111. }
  112. break
  113. case 'ACTIVE':
  114. if (activeList.length > 0) {
  115. setList(activeList)
  116. return;
  117. }
  118. break
  119. }
  120. loadData(1)
  121. }
  122. }, [health.mode])
  123. function measureItemLayouts() {
  124. const query = Taro.createSelectorQuery()
  125. list.forEach((item, index) => {
  126. query.select(`#history-${index}`).boundingClientRect()
  127. });
  128. query.exec((res) => {
  129. var layouts: any = []
  130. var heights: any = []
  131. res.forEach((rect, index) => {
  132. if (rect) {
  133. layouts[index] = rect.top + myScrollTop
  134. heights[index] = rect.height
  135. }
  136. });
  137. setItemLayouts(layouts)
  138. setItemHeights(heights)
  139. })
  140. }
  141. function onScroll(e) {
  142. // var top = e.detail.scrollTop
  143. // myScrollTop = top
  144. var top = e.detail.scrollTop - e.detail.deltaY
  145. myScrollTop = e.detail.scrollTop
  146. setPageTop(top)
  147. if (itemLayouts.length > 0) {
  148. var i = -1
  149. var date = ''
  150. list.forEach((item, index) => {
  151. if (top >= itemLayouts[index] - 50) {
  152. i = index
  153. date = dayjs(item.window_range.start_timestamp).format('YYYY年M月')
  154. }
  155. })
  156. if (props.updateDate) {
  157. props.updateDate({
  158. show: i != -1,
  159. date: date
  160. })
  161. }
  162. }
  163. else {
  164. if (props.updateDate) {
  165. props.updateDate({
  166. show: false,
  167. date: ''
  168. })
  169. }
  170. }
  171. }
  172. function refresh() {
  173. loadData(1)
  174. setPage(1)
  175. }
  176. function more() {
  177. if (loading) return;
  178. if (total == list.length) return;
  179. var index = page;
  180. index++;
  181. setPage(index)
  182. loadData(index)
  183. }
  184. function refreshItem(type) {
  185. setPage(1)
  186. var params: any = {
  187. window: type,
  188. limit: 10,
  189. page: 1
  190. }
  191. records(params).then(res => {
  192. var array = (res as any).data
  193. array.map(item => {
  194. var temps: any = []
  195. var lastType = ''
  196. var lastTextArray: any = []
  197. var lastImageArray: any = []
  198. item.events.map(event => {
  199. event.moments && event.moments.map(moment => {
  200. switch (moment.type) {
  201. case 'TEXT':
  202. {
  203. lastTextArray.push({
  204. title: moment.title,
  205. description: moment.description,
  206. event_id: event.id
  207. })
  208. if (lastType == 'PIC') {
  209. temps.push({
  210. type: 'PIC',
  211. data: JSON.parse(JSON.stringify(lastImageArray))
  212. })
  213. lastImageArray = []
  214. }
  215. lastType = 'TEXT'
  216. }
  217. break;
  218. case 'PIC':
  219. {
  220. lastImageArray.push(moment.media[0].url)
  221. if (lastType == 'TEXT') {
  222. temps.push({
  223. type: 'TEXT',
  224. data: JSON.parse(JSON.stringify(lastTextArray))
  225. })
  226. lastTextArray = []
  227. }
  228. lastType = 'PIC'
  229. }
  230. break;
  231. case 'PIC_TEXT':
  232. if (lastType == 'PIC') {
  233. temps.push({
  234. type: 'PIC',
  235. data: JSON.parse(JSON.stringify(lastImageArray))
  236. })
  237. lastImageArray = []
  238. }
  239. if (lastType == 'TEXT') {
  240. temps.push({
  241. type: 'TEXT',
  242. data: JSON.parse(JSON.stringify(lastTextArray))
  243. })
  244. lastTextArray = []
  245. }
  246. temps.push({
  247. type: 'PIC_TEXT',
  248. data: [
  249. {
  250. title: moment.title,
  251. description: moment.description,
  252. url: moment.media[0].url,
  253. event_id: event.id
  254. }
  255. ]
  256. })
  257. lastType = 'PIC_TEXT'
  258. break;
  259. }
  260. })
  261. })
  262. if (lastType == 'PIC') {
  263. temps.push({
  264. type: 'PIC',
  265. data: JSON.parse(JSON.stringify(lastImageArray))
  266. })
  267. lastImageArray = []
  268. }
  269. if (lastType == 'TEXT') {
  270. temps.push({
  271. type: 'TEXT',
  272. data: JSON.parse(JSON.stringify(lastTextArray))
  273. })
  274. lastTextArray = []
  275. }
  276. item.dataArray = temps;
  277. })
  278. switch (type) {
  279. case 'FAST':
  280. setFastList(array)
  281. break
  282. case 'SLEEP':
  283. setSleepList(array)
  284. break
  285. case 'EAT':
  286. setEatList(array)
  287. break
  288. case 'ACTIVE':
  289. setActiveList(array)
  290. break
  291. }
  292. })
  293. }
  294. function loadData(index: number) {
  295. var params: any = {
  296. window: props.type ? props.type : health.mode,
  297. limit: 10,
  298. page: index
  299. }
  300. if (props.fast_type) {
  301. params.fast_type = props.fast_type
  302. }
  303. console.log(props.type, health.mode)
  304. debugger
  305. setPage(index)
  306. setLoading(true)
  307. records(params).then(res => {
  308. var array = (res as any).data
  309. array.map(item => {
  310. var temps: any = []
  311. var lastType = ''
  312. var lastTextArray: any = []
  313. var lastImageArray: any = []
  314. item.events.map(event => {
  315. event.moments && event.moments.map(moment => {
  316. switch (moment.type) {
  317. case 'TEXT':
  318. {
  319. lastTextArray.push({
  320. title: moment.title,
  321. description: moment.description,
  322. event_id: event.id
  323. })
  324. if (lastType == 'PIC') {
  325. temps.push({
  326. type: 'PIC',
  327. data: JSON.parse(JSON.stringify(lastImageArray))
  328. })
  329. lastImageArray = []
  330. }
  331. lastType = 'TEXT'
  332. }
  333. break;
  334. case 'PIC':
  335. {
  336. lastImageArray.push(moment.media[0].url)
  337. if (lastType == 'TEXT') {
  338. temps.push({
  339. type: 'TEXT',
  340. data: JSON.parse(JSON.stringify(lastTextArray))
  341. })
  342. lastTextArray = []
  343. }
  344. lastType = 'PIC'
  345. }
  346. break;
  347. case 'PIC_TEXT':
  348. if (lastType == 'PIC') {
  349. temps.push({
  350. type: 'PIC',
  351. data: JSON.parse(JSON.stringify(lastImageArray))
  352. })
  353. lastImageArray = []
  354. }
  355. if (lastType == 'TEXT') {
  356. temps.push({
  357. type: 'TEXT',
  358. data: JSON.parse(JSON.stringify(lastTextArray))
  359. })
  360. lastTextArray = []
  361. }
  362. temps.push({
  363. type: 'PIC_TEXT',
  364. data: [
  365. {
  366. title: moment.title,
  367. description: moment.description,
  368. url: moment.media[0].url,
  369. event_id: event.id
  370. }
  371. ]
  372. })
  373. lastType = 'PIC_TEXT'
  374. break;
  375. }
  376. })
  377. })
  378. if (lastType == 'PIC') {
  379. temps.push({
  380. type: 'PIC',
  381. data: JSON.parse(JSON.stringify(lastImageArray))
  382. })
  383. lastImageArray = []
  384. }
  385. if (lastType == 'TEXT') {
  386. temps.push({
  387. type: 'TEXT',
  388. data: JSON.parse(JSON.stringify(lastTextArray))
  389. })
  390. lastTextArray = []
  391. }
  392. item.dataArray = temps;
  393. })
  394. setLoading(false)
  395. setLoaded(true)
  396. if (index == 1) {
  397. // console.log(props.type,health.mode)
  398. if (!props.type && array.length > 0) {
  399. if (health.mode == 'EAT') {
  400. setEatList(array)
  401. // dispatch(setFirstEatId(array[0].window_id))
  402. // if (health.first_eat_id.length > 0 && health.first_eat_id != array[0].window_id) {
  403. // dispatch(setEatTip(true))
  404. // }
  405. }
  406. else if (health.mode == 'ACTIVE') {
  407. setActiveList(array)
  408. // dispatch(setFirstActiveId(array[0].window_id))
  409. // if (health.first_active_id.length > 0 && health.first_active_id != array[0].window_id) {
  410. // dispatch(setActiveTip(true))
  411. // }
  412. }
  413. else if (health.mode == 'FAST') {
  414. setFastList(array)
  415. }
  416. else if (health.mode == 'SLEEP') {
  417. setSleepList(array)
  418. }
  419. }
  420. setList(array)
  421. setTotal((res as any).total)
  422. if (props.refreshSuccess) {
  423. props.refreshSuccess()
  424. }
  425. }
  426. else {
  427. setList([...list, ...array])
  428. }
  429. // if ((res as any).data.length > 0) {
  430. // setTimeout(() => {
  431. // // var array:any = [];
  432. // // (res as any).data.map((item,index)=>{
  433. // // array.push('#history_id_'+index)
  434. // // })
  435. // // var ids = array.join(',')
  436. // // console.log(array)
  437. // // console.log(ids)
  438. // const query = Taro.createSelectorQuery();
  439. // query.selectAll('#history_id_0').boundingClientRect((rect) => {
  440. // console.log(rect)
  441. // }).exec();
  442. // }, 1000)
  443. // }
  444. }).catch(e => {
  445. setLoading(false)
  446. })
  447. }
  448. function historyMonth(index) {
  449. var showDate = false;
  450. var dateStr = ''
  451. if (index == 0) {
  452. var currentDate = global.language == 'en' ? dayjs(list[index].window_range.start_timestamp).format('YYYY') : dayjs(list[index].window_range.start_timestamp).format('YYYY年')
  453. var now = global.language == 'en' ? dayjs().format('YYYY') : dayjs().format('YYYY年')
  454. if (currentDate != now) {
  455. showDate = true
  456. dateStr = currentDate
  457. }
  458. }
  459. else {
  460. var currentDate = global.language == 'en' ? dayjs(list[index].window_range.start_timestamp).format('YYYY') : dayjs(list[index].window_range.start_timestamp).format('YYYY年')
  461. var now = global.language == 'en' ? dayjs(list[index - 1].window_range.start_timestamp).format('YYYY') : dayjs(list[index - 1].window_range.start_timestamp).format('YYYY年')
  462. if (currentDate != now) {
  463. showDate = true
  464. dateStr = currentDate
  465. }
  466. }
  467. if (showDate) {
  468. return <View className="history_year_month h42 bold" style={{marginBottom:rpxToPx(60)}}>{dateStr}</View>
  469. }
  470. return <View />
  471. }
  472. function hideLine(index) {
  473. var currentDate = dayjs(list[index].window_range.start_timestamp).format('YYYY年M月D日')
  474. if (list.length > index + 1) {
  475. var nextDate = dayjs(list[index + 1].window_range.start_timestamp).format('YYYY年M月D日')
  476. if (currentDate == nextDate) return true
  477. }
  478. return false
  479. }
  480. function archiveContent() {
  481. if (health.mode != 'EAT' && health.mode != 'ACTIVE') {
  482. return
  483. }
  484. if (health.mode == 'EAT') {
  485. if (!showEatArchive || !health.eatArchived || !health.eatArchived.archived) {
  486. return
  487. }
  488. }
  489. if (health.mode == 'ACTIVE') {
  490. if (!showActiveArchive || !health.activeArchived || !health.activeArchived.archived) {
  491. return
  492. }
  493. }
  494. return <View style={{
  495. display: 'flex',
  496. flexDirection: 'column',
  497. alignItems: 'center',
  498. paddingTop: rpxToPx(82),
  499. paddingBottom: rpxToPx(82),
  500. backgroundColor: '#fff',
  501. position: 'relative'
  502. }}>
  503. <View className="archived_bg" onClick={() => {
  504. jumpPage('/_health/pages/archive')
  505. setTimeout(() => {
  506. health.mode == 'EAT' ? setShowEatArchive(false) : setShowActiveArchive(false)
  507. }, 1000)
  508. }}>
  509. <Text className="archived_text bold" style={{ color: getThemeColor(health.mode) }}>[{health.eatArchived.real_count}/{health.eatArchived.target_count} Meals] Archived {TimeFormatter.dateDescription(new Date(health.eatArchived.timestamp).getTime(), true, false)}</Text>
  510. {
  511. health.eatArchived.images.map((item, index) => {
  512. return <Image src={item} key={index} className="archived_img" mode="aspectFill" />
  513. })
  514. }
  515. <IconArrow color={MainColorType.g02} width={rpxToPx(34)} />
  516. </View>
  517. <View className="border_footer_line" />
  518. </View>
  519. }
  520. if (!loaded || health.mode == 'DAY' || health.mode == 'NIGHT')
  521. return <View />
  522. if (!user.isLogin) return <View />
  523. function showTipF() {
  524. var showTip = false
  525. if (getScenario(health.windows, health.mode).status == 'OG') {
  526. if (health.mode == 'EAT') {
  527. showTip = !global.hideEatArchiveTip
  528. }
  529. else if (health.mode == 'ACTIVE') {
  530. showTip = !global.hideActiveArchiveTip
  531. }
  532. }
  533. return showTip
  534. }
  535. function newJournalTip() {
  536. if (!props.type) {
  537. var show = false
  538. if (health.mode == 'EAT' && health.eat_journal_tip) {
  539. show = true
  540. }
  541. else if (health.mode == 'ACTIVE' && health.active_journal_tip) {
  542. show = true
  543. }
  544. if (show) {
  545. return <View style={{
  546. display: 'flex',
  547. flexDirection: 'column',
  548. alignItems: 'center',
  549. paddingTop: rpxToPx(82),
  550. paddingBottom: rpxToPx(82),
  551. backgroundColor: '#fff',
  552. position: 'relative'
  553. }}>
  554. <View className="archived_bg" onClick={() => {
  555. // jumpPage('/_health/pages/archive')
  556. var data = list[0]
  557. jumpPage(`/_health/pages/timeline_detail?window_id=${data.window_id}&type=recent&isfastsleep=0&timestamp=${data.publish.timestamp}`)
  558. getLatestJournal(false, {
  559. id: health.mode == 'EAT' ? global.eatTipId : global.activeTipId,
  560. user_confirmed: true
  561. }).then(res => {
  562. })
  563. setTimeout(() => {
  564. if (health.mode == 'EAT') {
  565. dispatch(setEatTip(false))
  566. }
  567. else {
  568. dispatch(setActiveTip(false))
  569. }
  570. }, 1000)
  571. }}>
  572. <Text className="archived_text bold" style={{ color: getThemeColor(health.mode) }}>{t('health.new_journal_created')}</Text>
  573. {/* {
  574. health.eatArchived.images.map((item, index) => {
  575. return <Image src={item} key={index} className="archived_img" mode="aspectFill" />
  576. })
  577. } */}
  578. <IconArrow color={MainColorType.g02} width={rpxToPx(34)} />
  579. </View>
  580. <View className="border_footer_line" />
  581. </View>
  582. // return <View className="h28 bold"
  583. // onClick={()=>{
  584. // if (health.mode == 'EAT'){
  585. // dispatch(setEatTip(false))
  586. // }
  587. // else {
  588. // dispatch(setActiveTip(false))
  589. // }
  590. // }}
  591. // style={{
  592. // width:rpxToPx(750),
  593. // height:rpxToPx(156),
  594. // display:'flex',
  595. // alignItems:'center',
  596. // justifyContent:'center',
  597. // backgroundColor:'#fff',
  598. // color:getThemeColor(health.mode),
  599. // }}>
  600. // New Journal Created {'>'}
  601. // </View>
  602. }
  603. }
  604. return <View />
  605. }
  606. return <View style={{ width: rpxToPx(750), marginTop: rpxToPx(60) }}>
  607. {
  608. (list.length >= 0 || health.mode == 'EAT') && <View className="new_header_bg">
  609. <Text className="h50 bold">{t('health.recents')}</Text>
  610. {
  611. false && (health.mode == 'EAT' || health.mode == 'ACTIVE') && <View onClick={() => {
  612. jumpPage('/pages/account/Journal?type=' + health.mode + `&show_tip=${showTipF() ? '1' : '0'}`)
  613. setTimeout(() => {
  614. health.mode == 'EAT' ? setShowEatArchive(false) : setShowActiveArchive(false)
  615. }, 1000)
  616. }} className="archive_bg" style={{ position: 'relative' }}>
  617. <Image className="archive_bg" src={require('@assets/_health/journal.png')} />
  618. {/* {
  619. ((health.mode == 'EAT' && health.eatArchivedTotal > 0) ||
  620. (health.mode == 'ACTIVE' && health.activeArchivedTotal > 0)) && <View style={{
  621. width: rpxToPx(12),
  622. height: rpxToPx(12),
  623. borderRadius: rpxToPx(6),
  624. backgroundColor: 'red',
  625. position: 'absolute',
  626. right: -6,
  627. top: 0
  628. }} />
  629. } */}
  630. </View>
  631. }
  632. </View>
  633. }
  634. {/* {
  635. archiveContent()
  636. } */}
  637. {/* {
  638. newJournalTip()
  639. } */}
  640. {/* {
  641. (health.mode == 'EAT' || health.mode == 'ACTIVE') && <RightArrowRow title={health.mode == 'ACTIVE' ? t('health.title_active_journal') : t('health.title_food_journal')}
  642. onClick={() => {
  643. var showBadge = (health.mode == 'EAT' && health.eat_journal_tip) ||
  644. (health.mode == 'ACTIVE' && health.active_journal_tip)
  645. jumpPage('/pages/account/Journal?type=' + health.mode + `&show_tip=${showTipF() && false ? '1' : '0'}&show_badge=${showBadge ? 1 : 0}`)
  646. }} />
  647. } */}
  648. {
  649. list.length == 0 && <NoRecord />
  650. }
  651. {
  652. list.length > 0 && <View style={{ minHeight: rpxToPx(464), backgroundColor: '#fff',paddingTop:rpxToPx(60) }}>
  653. {
  654. list.map((item, index) => {
  655. if (itemLayouts.length >= index + 1 && index>5) {
  656. if (Math.abs(itemLayouts[index] - pageTop) > 2500) {
  657. return <View style={{ height: itemHeights[index] }} id={`history-${index}`} key={index}>
  658. {
  659. historyMonth(index)
  660. }
  661. </View>
  662. }
  663. }
  664. return <View id={`history-${index}`} key={index}>
  665. {
  666. historyMonth(index)
  667. }
  668. <HistoryItem
  669. data={item}
  670. preData={index > 0 ? list[index - 1] : null}
  671. index={index}
  672. mode={props.type ?? health.mode}
  673. fast_type={props.fast_type}
  674. type={props.type}
  675. hideLine={hideLine(index)}
  676. onClick={() => {
  677. }} />
  678. </View>
  679. })
  680. }
  681. </View>
  682. }
  683. {/* <View style={{ height: rpxToPx(40), flexShrink: 0, backgroundColor: '#fff' }} /> */}
  684. <ListFooter noMore={(list.length > 0) && (total == list.length)} loading={loading}/>
  685. </View>
  686. })