list.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import Taro, { Component } from '@tarojs/taro'
  2. import { View, Text, Image, ScrollView } from '@tarojs/components'
  3. import { Loading } from '@components'
  4. import { connect } from '@tarojs/redux'
  5. import * as actions from '@actions/list'
  6. // import { dispatchCartNum } from '@actions/list'
  7. import ItemList from './itemlist'
  8. import { getWindowHeight } from '@utils/style'
  9. import './list.scss'
  10. // @connect(state => state.home, { ...actions, })
  11. class List extends Component {
  12. config = {
  13. navigationBarTitleText: '报告列表'
  14. }
  15. state = {
  16. loaded: false,
  17. loading: false,
  18. lastItemId: 0,
  19. hasMore: true
  20. }
  21. componentDidMount() {
  22. }
  23. render() {
  24. // if (!this.state.loaded) {
  25. // return <Loading />
  26. // }
  27. const { } = this.props
  28. return (
  29. <View className='home'>
  30. <ScrollView
  31. scrollY
  32. className='home__wrap'
  33. onScrollToLower={() => { console.log("----") }}
  34. style={{ height: getWindowHeight() }}
  35. >
  36. <ItemList />
  37. </ScrollView>
  38. </View>
  39. )
  40. }
  41. }
  42. export default List