import * as React from 'react'; import Header from '&/components/common/componentHeader'; import ScrollWrap from '&/components/common/scrollWrap'; import Footer from '&/components/common/componentFooter'; import Loading from '@beisen/loading'; import {getApiUrl2,taker,encodeURIFn,getBSGlobal,getToUserId} from '&/helper'; import './index.scss'; export default class MyAllBounty extends React.Component<{}, {}>{ state={ isFetching:true, unDrawCashFee:0, getValue:0, getTrend:1, putValue:0, putTrend:1 } async componentDidMount(){ const toUserId = getToUserId() const url = `${getApiUrl2('user/reward/card')}?to_user_id=${toUserId}`; const res = await taker(url); console.log(res) this.setState({ isFetching:false, unDrawCashFee:res.Data && res.Data.unDrawCashFee ? res.Data.unDrawCashFee:0, getValue:res.Data && res.Data.rankDetail[1] && res.Data.rankDetail[1].value ?res.Data.rankDetail[1].value:0 , getTrend:res.Data && res.Data.rankDetail[1] && res.Data.rankDetail[1].trend ?res.Data.rankDetail[1].trend:1, putValue:res.Data && res.Data.rankDetail[0] && res.Data.rankDetail[0].value ?res.Data.rankDetail[0].value:0, putTrend:res.Data && res.Data.rankDetail[0] && res.Data.rankDetail[0].trend ?res.Data.rankDetail[0].trend:1 }) } render() { const myId = getBSGlobal('loginUserInfo').Id; const toUserId = getToUserId(); const isMe = toUserId == myId; const settings = { color: '#FED00F', icon: 'font-my-all-bounty-title-icon', title: isMe?'我的赏金':'ta的赏金', } const {isFetching} = this.state const apiServer = getBSGlobal('apiPath'); const uid = getBSGlobal('loginUserInfo').Id; const bountyYrl = apiServer+'/'+uid+'/UIBuilder#/BountySetting'; const url = encodeURIFn(bountyYrl); return