Authored by 张文文

提现记录页面获取身份证绑定状态

... ... @@ -17,17 +17,21 @@ export default class WithdrawalRecord extends Component {
}
_renderHeader() {
let uploadStatus = this.props.identityCardInfo.data;
return (<View>
<View style={styles.uploadContainer}>
<Text style={styles.loadStyle}>{'结算收益时需按照国家规定预扣个税,因此需先上传身份证信息 。若未提供正确有效的身份信息将导致扣税失败而影响提现。'}</Text>
<TouchableOpacity style={styles.uploadButton} onPress={()=> {
}}>
<Text style={styles.buttonText}>{'去上传'}</Text>
</TouchableOpacity>
</View>
{ uploadStatus ?
null
:
<View style={styles.uploadContainer}>
<Text style={styles.loadStyle}>{'结算收益时需按照国家规定预扣个税,因此需先上传身份证信息 。若未提供正确有效的身份信息将导致扣税失败而影响提现。'}</Text>
<TouchableOpacity style={styles.uploadButton} onPress={()=> {
this.props.jumpWithUrl && this.props.jumpWithUrl('我的身份证', 'nameAuthen')
}}>
<Text style={styles.buttonText}>{'去上传'}</Text>
</TouchableOpacity>
</View>
}
<View style={styles.withdrawContainer}>
<Text style={styles.tipStyle}>{'每月20日结算上个月预估佣金并预扣个税'}</Text>
... ...
... ... @@ -8,7 +8,7 @@ import {Map} from 'immutable';
import * as allianceActions from '../reducers/alliance/allianceActions';
import WithdrawalRecord from "../components/WithdrawalRecord";
import LoadingIndicator from '../../common/components/LoadingIndicator';
import {StyleSheet, View} from "react-native";
import ReactNative, {StyleSheet, View} from "react-native";
const actions = [
allianceActions,
... ... @@ -37,28 +37,37 @@ class WithdrawalRecordContainer extends Component {
constructor(props) {
super(props);
this._onEndReached = this._onEndReached.bind(this);
this._jumpWithUrl = this._jumpWithUrl.bind(this);
}
componentDidMount() {
this.props.actions.getSettlementRecord();
this.props.actions.getIdentityCardInfo();
}
componentWillUnmount() {
}
_jumpWithUrl(title = '', type = '') {
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.minealliance","params":{"title":"${title}","type":"${type}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
_onEndReached() {
this.props.actions.getSettlementRecord();
}
render() {
let {settlementRecordList} = this.props.alliance;
let {settlementRecordList, identityCardInfo} = this.props.alliance;
let isFetching = settlementRecordList.isFetching;
return (
<View style={styles.container}>
<WithdrawalRecord
settlementRecordList={settlementRecordList}
onEndReached={this._onEndReached}/>
identityCardInfo={identityCardInfo}
onEndReached={this._onEndReached}
jumpWithUrl={this._jumpWithUrl}/>
<LoadingIndicator isVisible={isFetching}/>
</View>
)
... ... @@ -71,4 +80,4 @@ let styles = StyleSheet.create({
},
});
export default connect(mapStateToProps, mapDispatchToProps)(WithdrawalRecordContainer);
\ No newline at end of file
export default connect(mapStateToProps, mapDispatchToProps)(WithdrawalRecordContainer);
... ...