import * as React from 'react'; import { taker, getApiUrl2 } from '&/helper' import CommonPop from '@beisen/common-pop' import { popSetting } from '../defaultData' import Password from './password' import WxPop from './wxPop' import './index.scss' interface Props{ data:any } export default class BountyHead extends React.Component{ makeCash = (unDrawCashFee:any) => { if(unDrawCashFee < 1||unDrawCashFee == 'NaN') return; this.setState({ cashPopShow: true }) // this.setState({ cashPopShow: true }) } constructor(p:Props){ super(p); this.state={ cashPopShow:false, noWxPopShow:false, resData:undefined } } state:{ cashPopShow:boolean, noWxPopShow:boolean, resData:any } async componentWillMount(){ //GET /api/v2/{tenant_id}/{user_id}/reward/withdraw/detail //获取我的提现信息 const url = getApiUrl2('reward/withdraw/detail'); const response = await taker(url); this.setState({resData:response.Data}) } closePasswordPop = () => { this.setState({cashPopShow:false}) } hideNoWxPop = () => { this.setState({ noWxPopShow: false }) } showWxPop = () => { this.setState({ noWxPopShow: true }) } render(){ const { cashPopShow, noWxPopShow, resData } = this.state; const {data} = this.props; const wxUser = data.getIn(['init', 'wxUser']); return
{ resData && resData.unDrawCashFee } 元
我的资产
{`累计提现金额(元)`} {resData&&resData.drawedCashFeeRank.value} 打败 的员工 { // this.makeCash(resData.unDrawCashFee) wxUser && this.makeCash(resData.unDrawCashFee) } }> 提现 {noWxPopShow && }
{ cashPopShow && { return } } /> }
} }