import React, {Component} from 'react' import {NavBar, Icon, ActivityIndicator} from 'antd-mobile' import {productbyid} from "../../../utils/gql" import {Query} from "react-apollo" import gql from "graphql-tag" import './index.css' import {withRouter} from 'react-router-dom' class Detail extends Component { constructor(props) { super(props) this.state = { id: '' } } componentWillMount() { let {location} = this.props if(location && location.state) { this.setState({ id: location.state.id }) } } render() { let {id} = this.state let contentHeight = window.innerHeight return (