...
|
...
|
@@ -24,7 +24,8 @@ class TalentRank extends Component { |
|
|
let monthRankData = this.props.talentRank.monthRank;
|
|
|
let totalRankData = this.props.talentRank.totalRank;
|
|
|
let myRank = monthRank ? monthRankData.toJS() : totalRankData.toJS();
|
|
|
let { amountStr, nickname, image, rankNum } = myRank;
|
|
|
let { amountStr, nickname, image, rankNum ,amount} = myRank;
|
|
|
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
<View style={[styles.topContainer, styles.center]}>
|
...
|
...
|
@@ -45,7 +46,8 @@ class TalentRank extends Component { |
|
|
<View style={[styles.container, styles.leftContainer]}>
|
|
|
<Text style={styles.amountName}>{`${monthRank ? '本月' : '总'}预估收入`}</Text>
|
|
|
<View style={styles.amountContainer}>
|
|
|
<Text style={styles.amount}>{amountStr}</Text>
|
|
|
<Text style={[styles.amountUnit,styles.textLeft]}>¥</Text>
|
|
|
<Text style={[styles.amount,styles.textLeft]}>{amount}</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
<View style={[styles.container, styles.middleContainer]}>
|
...
|
...
|
@@ -57,7 +59,6 @@ class TalentRank extends Component { |
|
|
<Text style={[styles.amount, styles.textRight, styles.marginTop5]}>{rankNum && rankNum != 0 ? rankNum : '未上榜'}</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
<View style={styles.view10} />
|
|
|
<ScrollView ref="scrollView" style={styles.container}
|
|
|
contentContainerStyle={styles.contentContainerStyle}
|
|
|
horizontal={true}
|
...
|
...
|
@@ -88,7 +89,7 @@ class TalentRank extends Component { |
|
|
pageSize: 10,
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
_toggleRank(monthRank) {
|
|
|
// this.setState({height: 400});
|
|
|
this.setState({monthRank: monthRank});
|
...
|
...
|
@@ -162,9 +163,7 @@ const styles = StyleSheet.create({ |
|
|
},
|
|
|
amountContainer: {
|
|
|
marginTop: 5 * DEVICE_WIDTH_RATIO,
|
|
|
height: 29 * DEVICE_WIDTH_RATIO,
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'flex-end',
|
|
|
},
|
|
|
amountUnit: {
|
|
|
fontSize: 14,
|
...
|
...
|
@@ -180,7 +179,7 @@ const styles = StyleSheet.create({ |
|
|
fontWeight: '500',
|
|
|
textAlignVertical: 'bottom',
|
|
|
includeFontPadding: false,
|
|
|
color: '#000000'
|
|
|
color: '#000000',
|
|
|
},
|
|
|
middleContainer: {
|
|
|
paddingTop: 14 * DEVICE_WIDTH_RATIO,
|
...
|
...
|
@@ -206,13 +205,13 @@ const styles = StyleSheet.create({ |
|
|
textRight: {
|
|
|
textAlign: 'right',
|
|
|
},
|
|
|
textLeft: {
|
|
|
textAlign: 'left',
|
|
|
},
|
|
|
marginTop5: {
|
|
|
marginTop: 5 * DEVICE_WIDTH_RATIO,
|
|
|
},
|
|
|
view10: {
|
|
|
height: 10 * DEVICE_WIDTH_RATIO,
|
|
|
backgroundColor: '#E0E0E0',
|
|
|
},
|
|
|
|
|
|
positionFixed: {
|
|
|
position: 'absolute',
|
|
|
right: 0,
|
...
|
...
|
@@ -220,4 +219,4 @@ const styles = StyleSheet.create({ |
|
|
contentContainerStyle: {
|
|
|
width: 2 * width,
|
|
|
}
|
|
|
}); |
|
|
\ No newline at end of file |
|
|
}); |
...
|
...
|
|