import React, {Component} from 'react' import './index.css' import {withRouter} from 'react-router-dom' import { SearchBar, NavBar, Accordion, ActivityIndicator } from 'antd-mobile' import {Icon} from 'antd' import classNames from 'classnames' import {Query} from "react-apollo" import gql from "graphql-tag" import {order_by_id} from "../../../../utils/gql" class Orders extends Component { constructor(props) { super(props) this.state = { accordionKey: undefined } } render() { let {accordionKey} = this.state return (
} onLeftClick={() => { this.props.history.go(-2) }} >订单管理
{accordionKey ? '折叠单项以展开更多分类' : '请选择需要打开的分类'}
{ this.setState({ accordionKey: key[0] }) }}>
) } } class Search extends Component { constructor(props) { super(props) this.state = { value: '', searchValue: '' } } componentDidMount() { this.autoFocusInst.focus(); } onChange= (value) => { this.setState({ value }); }; render() { return (
this.autoFocusInst = ref} placeholder="请在此处输入订单编号" value={this.state.value} onSubmit={searchValue => this.setState({ searchValue })} onCancel={() => this.setState({ value: '' })} onChange={value => this.setState({ value })} />
) } } class SearchQuery extends Component { constructor(props) { super(props) this.state = { } console.log('mount / mount again') } render() { let {id} = this.props return ( { ({loading, error, data}) => { if (loading) { return (
) } if (error) { return 'error!' } console.log(data.orderbyid) return (
1
) } }
) } } class Shiping extends Component { constructor(props) { super(props) this.state = {} } render() { return (
Shiping
) } } class Completed extends Component { constructor(props) { super(props) this.state = {} } render() { return (
Completed
) } } class Commented extends Component { constructor(props) { super(props) this.state = {} } render() { return (
Commented
) } } export default withRouter(Orders)