import Taro, { Component } from '@tarojs/taro' import { View, Input, Picker, ScrollView, Button } from '@tarojs/components' import { Loading } from '@components' import { connect } from '@tarojs/redux' import * as actions from '@actions/list' // import { dispatchCartNum } from '@actions/list' import ItemList from './itemlist' import { getWindowHeight } from '@utils/style' import './list.scss' // @connect(state => state.home, { ...actions, }) class List extends Component { config = { navigationBarTitleText: '报告列表' } state = { loaded: false, loading: false, lastItemId: 0, hasMore: true, selectorChecked: { id: 0, key: "按报告类型", value: 'title' }, selector: [{ id: 0, key: "按报告类型", value: 'title' }, { id: 1, key: "按企业名称", value: 'companyName' }, { id: 2, key: "按项目名称", value: 'reportName' }, { id: 3, key: "按关键词", value: 'keyword' },], keyword: "", } componentDidMount() { } // field:this.state.selectorChecked.value onChange = e => { this.setState({ selectorChecked: this.state.selector[e.detail.value], }) } onInput(e) { this.setState({ keyword: e.detail.value }) } onSearch() { if (!this.state.keyword) { } } render() { // if (!this.state.loaded) { // return // } const { } = this.props return ( {this.state.selectorChecked.key} ▼ { }} >搜索 { console.log("----滑到底部") }} style={{ height: (getWindowHeight().substring(0, getWindowHeight().length - 2) - 55) + "px" }} > ) } } export default List