Authored by 张文文

我的页面添加“我的身份证” && 提现记录UI调整

... ... @@ -26,6 +26,7 @@ import TalentRankContainer from './containers/TalentRankContainer';
import ShareDetailContainer from './containers/ShareDetailContainer';
import InvitedFriendsContainer from './containers/InvitedFriendsContainer';
import EstimateDetailContainer from './containers/EstimateDetailContainer';
import NameAuthenContainer from './containers/NameAuthenContainer';
import {setChannel, setHost, setPlatform, setServiceHost, setproductPool, setSkns} from './reducers/app/appActions';
import {setOrderCode, setActivityId, setSrc, setJumpUrl} from './reducers/alliance/allianceActions';
... ... @@ -143,6 +144,12 @@ export default function native(platform) {
tab_type={this.props.tab_type}/>
</Provider>
);
} else if (type === 'nameAuthen') {
return (
<Provider store={store}>
<NameAuthenContainer/>
</Provider>
);
} else {
return (
<Provider store={store}>
... ...
... ... @@ -39,6 +39,9 @@ export default class Mine extends Component {
let imageUrl = YH_Image.getSlicedUrl(ico, 50, 50, 2);
let nickname = this.props.profile.nickname;
let uploadStyle = bindStatus ? {color: '#444444'} : {color: '#D0021B'};
let isUpload = bindStatus ? '已上传' : '未上传';
//当前粉丝数空值判断
let fansAmount = this.props.shareTotalInfo.shareTotalInfoData.fans;
fansAmount = fansAmount ? fansAmount : '0';
... ... @@ -70,6 +73,17 @@ export default class Mine extends Component {
<Image style={styles.arrowImage} source={require('../images/arrow.png')}/>
</View>
</TouchableOpacity>
<View style={{height: 1, backgroundColor: '#f0f0f0'}}/>
<TouchableOpacity activeOpacity={1} style={styles.withdrawView} onPress={() => {
this.props.jumpWithUrl && this.props.jumpWithUrl('我的身份证', 'nameAuthen');
}}>
<Text style={styles.hasWithDrawText}>我的身份证</Text>
<View style={[styles.textView, {flexDirection: 'row', paddingRight: 15}]}>
<Text style={[styles.hasWithDrawText, uploadStyle]}>{isUpload}</Text>
<Image style={styles.arrowImage} source={require('../images/arrow.png')}/>
</View>
</TouchableOpacity>
<View style={{height: 10, backgroundColor: '#f0f0f0'}}/>
<TouchableOpacity activeOpacity={1} style={styles.withdrawView} onPress={() => {
... ...
'use strict';
import React, {Component} from 'react';
import {Dimensions, ListView, StyleSheet, Text, View} from 'react-native';
import {Dimensions, ListView, StyleSheet, Text, View, Image, TouchableOpacity} from 'react-native';
import {Immutable} from 'immutable';
... ... @@ -10,23 +10,59 @@ export default class WithdrawalRecord extends Component {
constructor(props) {
super(props);
this._renderRow = this._renderRow.bind(this);
this._renderHeader = this._renderHeader.bind(this);
this.dataSource = new ListView.DataSource({
rowHasChanged: (r1, r2) => !Immutable.is(r1, r2),
});
}
_renderHeader() {
return (<View>
<View style={styles.uploadContainer}>
<Text style={styles.loadStyle}>{'结算收益时需按照国家规定预扣个税,因此需先上传身份证信息 。若未提供正确有效的身份信息将导致扣税失败而影响提现。'}</Text>
<TouchableOpacity style={styles.uploadButton} onPress={()=> {
}}>
<Text style={styles.buttonText}>{'去上传'}</Text>
</TouchableOpacity>
</View>
<View style={styles.withdrawContainer}>
<Text style={styles.tipStyle}>{'每月20日结算上个月预估佣金并预扣个税'}</Text>
<TouchableOpacity style={{flexDirection: 'row', alignItems: 'center'}} onPress={()=> {
}}>
<Text style={styles.tipStyle}>{'结算说明 '}</Text>
<Image source={require('../images/more.png')}/>
</TouchableOpacity>
</View>
</View>
)
}
_renderRow(rowData, sectionID, rowID) {
let showSpace = rowID === rowData.length ? false : true;
return (
<View>
<View style={styles.rowView}>
<Text style={styles.numberText}>处理编号:{rowData.get("settlementCode")}</Text>
<Text style={styles.priceText}>{rowData.get("settlementAmountStr")}</Text>
<Text style={styles.statusText}>{rowData.get("settlementStatus")}</Text>
</View>
<View style={[styles.rowView, {height: 20, marginTop: 4, marginBottom: 12}]}>
<View style={{width: width, height: 0.5, backgroundColor: '#f0f0f0'}}></View>
<View style={styles.detailView}>
<Text>
<Text style={styles.priceText}>税后总收益:</Text>
<Text style={styles.allPriceText}>{rowData.get("settlementAmountStr")}</Text>
</Text>
<Text style={styles.priceText}>提现总收益:{rowData.get("settlementAmountStr")}</Text>
<Text style={styles.priceText}>扣税总收益:{rowData.get("settlementAmountStr")}</Text>
<Text style={styles.timeText}>{rowData.get("settlementTimeStr")}</Text>
<Text style={styles.statusText}>{rowData.get("settlementStatus")}</Text>
</View>
<View style={styles.lineView}/>
{showSpace? <View style={{width: width, height: 10, backgroundColor: '#f0f0f0'}}></View> : null}
</View>
);
}
... ... @@ -46,6 +82,7 @@ export default class WithdrawalRecord extends Component {
contentContainerStyle={styles.contentContainer}
enableEmptySections={true}
dataSource={this.dataSource.cloneWithRows(recordList)}
renderHeader={this._renderHeader}
renderRow={this._renderRow}
onEndReached={() => {
if (recordList.size !== 0) {
... ... @@ -71,9 +108,8 @@ let styles = StyleSheet.create({
},
rowView: {
width: width,
height: 22,
height: 50,
flexDirection: 'row',
marginTop: 12,
paddingLeft: 15,
paddingRight: 15,
alignItems: 'center',
... ... @@ -84,24 +120,37 @@ let styles = StyleSheet.create({
height: 0.5,
backgroundColor: '#e0e0e0'
},
detailView: {
width: width,
paddingTop: 9,
paddingLeft: 15,
paddingRight: 15,
paddingBottom: 20,
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'flex-start',
},
allPriceText:{
fontFamily: 'PingFang-SC-Medium',
fontSize: 14,
color: '#D0021B',
},
numberText: {
fontFamily: 'PingFang-SC-Regular',
fontSize: 14,
color: '#444444',
letterSpacing: -0.19,
},
priceText: {
fontFamily: 'PingFang-SC-Medium',
fontSize: 16,
fontFamily: 'PingFang-SC-Regular',
fontSize: 14,
color: '#444444',
letterSpacing: -0.21,
fontWeight: 'bold'
marginTop: 6,
},
timeText: {
fontFamily: 'PingFang-SC-Regular',
fontSize: 14,
color: '#B0B0B0',
letterSpacing: -0.19,
marginTop: 15,
},
statusText: {
fontFamily: 'PingFang-SC-Regular',
... ... @@ -109,4 +158,54 @@ let styles = StyleSheet.create({
color: '#D0021B',
letterSpacing: -0.29,
},
uploadContainer: {
width: width,
backgroundColor: 'transparent',
flexDirection: 'column',
alignItems: 'center',
paddingTop: 20,
paddingLeft: 15,
paddingRight: 15,
paddingBottom: 20,
},
loadStyle: {
fontFamily: 'PingFang-SC-Regular',
fontSize: 14,
color: '#444444',
backgroundColor: 'transparent',
textAlign: 'left',
},
uploadButton: {
width: 80,
height: 30,
marginTop: 10,
borderRadius: 5,
backgroundColor: '#D0021B',
alignItems: 'center',
justifyContent: 'center',
},
buttonText: {
color: 'white',
fontSize: 14,
fontWeight: 'bold',
},
withdrawContainer: {
width: width,
height: 40,
paddingLeft: 15,
paddingRight: 15,
backgroundColor: '#f0f0f0',
flexDirection: 'row',
justifyContent: 'space-between',
},
tipStyle: {
fontFamily: 'PingFang-SC-Regular',
fontSize: 12,
color: '#B0B0B0',
backgroundColor: 'transparent',
textAlign: 'center',
lineHeight: 40,
},
});
... ...
'use strict'
import React, {Component} from "react";
import {StyleSheet, View, NativeModules, DeviceEventEmitter} from "react-native";
import {bindActionCreators} from "redux";
import {connect} from "react-redux";
import {Map} from "immutable";
import * as allianceActions from '../reducers/alliance/allianceActions';
const actions = [
allianceActions
];
function mapStateToProps(state) {
return {
...state
};
}
function mapDispatchToProps(dispatch) {
const creators = Map()
.merge(...actions)
.filter(value => typeof value === 'function')
.toObject();
return {
actions: bindActionCreators(creators, dispatch),
dispatch
};
}
class NameAuthenContainer extends Component {
constructor(props) {
super(props);
}
componentDidMount() {
}
componentWillUnmount() {
}
render() {
return (
<View style={styles.container}>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
})
export default connect(mapStateToProps, mapDispatchToProps)(NameAuthenContainer);
... ...