increase.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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/increase'
  6. import { getWindowHeight } from '@utils/style'
  7. import './increase.scss'
  8. const RECOMMEND_SIZE = 20
  9. @connect(state => state.home, { ...actions })
  10. class Increase extends Component {
  11. config = {
  12. navigationBarTitleText: '生成报告'
  13. }
  14. state = {
  15. loaded: false,
  16. loading: false,
  17. lastItemId: 0,
  18. hasMore: true
  19. }
  20. componentDidMount() {
  21. // NOTE 暂时去掉不适配的内容
  22. // Taro.showToast({
  23. // title: '注意,由于严选小程序首页界面、接口大幅变动,暂时去掉不相符的部分,后续再跟进改动',
  24. // icon: 'none',
  25. // duration: 6000
  26. // })
  27. }
  28. render() {
  29. // if (!this.state.loaded) {
  30. // return <Loading />
  31. // }
  32. const { } = this.props
  33. return (
  34. <View className='home'>
  35. <ScrollView
  36. scrollY
  37. className='home__wrap'
  38. onScrollToLower={this.loadRecommend}
  39. style={{ height: getWindowHeight() }}
  40. >
  41. <View onClick={this.handlePrevent}>
  42. 新建报告
  43. </View>
  44. </ScrollView>
  45. </View>
  46. )
  47. }
  48. }
  49. export default Increase