Authored by hongyong.zhao

ui fix -- reviewed by 傲哲

... ... @@ -22,8 +22,8 @@ export default class ActivityOrderDetail extends Component {
let orderCodes = this.props.orderDetail.orderCodes ? this.props.orderDetail.orderCodes.toArray() : [];
let orderCodeStr = '';
orderCodes&& orderCodes.map(orderCode =>
orderCodeStr = orderCodeStr + orderCode+'\n'
orderCodes&& orderCodes.map((orderCode, itemindex) =>
orderCodeStr = orderCodeStr + orderCode + (itemindex < orderCodes.length - 1 ? '\n' : '')
)
return (
... ... @@ -34,18 +34,20 @@ export default class ActivityOrderDetail extends Component {
<View style={styles.lineView}/>
<View style={styles.content}>
<Text style={styles.contentText}>活动名称:{this.props.orderDetail.activityName}</Text>
<Text style={styles.contentText}>活动时间:{this.props.orderDetail.timeStr}</Text>
<View style={{flexDirection: 'row',width:width, overflow:'hidden'}}>
<Text style={styles.contentText}>活动时间:</Text>
<Text style={styles.contentText} numberOfLines={2}>{this.props.orderDetail.timeStr}</Text>
</View>
<View style={{flexDirection: 'row'}}>
<Text style={styles.contentText}>收益金额:</Text>
<Text style={[styles.contentText, {fontWeight: 'bold', color: '#D0021B'}]}>{this.props.orderDetail.amountStr}</Text>
</View>
<View style={{flexDirection: 'row'}}>
<Text style={styles.contentText}>订单编号:</Text>
<Text style={styles.contentText} numberOfLines={orderCodes.length}>{orderCodeStr}</Text>
<Text style={[styles.contentText, {lineHeight: 18, paddingBottom: 0}]} numberOfLines={orderCodes.length}>{orderCodeStr}</Text>
</View>
</View>
<View style={{height: 10, backgroundColor: '#f0f0f0'}}/>
</View>
)
}
... ... @@ -86,6 +88,7 @@ let styles = StyleSheet.create({
content: {
width: width,
// height: 180,
overflow:'hidden',
padding: 15,
backgroundColor: '#FFFFFF',
},
... ...
'use strict';
import React, {Component} from 'react';
import {DeviceEventEmitter, Dimensions, Image, StyleSheet, Text, TouchableOpacity, View} from 'react-native';
import {DeviceEventEmitter, Dimensions, Image, StyleSheet, Text, TouchableOpacity, View, ScrollView} from 'react-native';
import HelpTipsModal from "./HelpTipsModal";
import SureModal from "./SureModal";
import WithdrawModal from "./WithdrawModal";
... ... @@ -36,9 +36,10 @@ export default class Data extends Component {
statisticsInfo
} = this.props;
let bindStatus = this.props.settlementInfo.settlementInfoData.hasBankCard;
let scrollEnabled = height < 667;
return (
<View style={styles.container}>
<ScrollView style={styles.container} scrollEnabled = {scrollEnabled}>
<HelpTipsModal
tips={this.props.tips}
isShowHelp={isShowHelp}
... ... @@ -109,7 +110,7 @@ export default class Data extends Component {
<Statistics statisticsInfo={statisticsInfo}/>
<Statistics statisticsInfo={statisticsInfo}/>
</ScrollableTabView>
</View>
</ScrollView>
);
}
}
... ... @@ -119,6 +120,7 @@ let {width, height} = Dimensions.get('window');
let styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#f0f0f0'
},
textStyle: {
flex: 1,
... ... @@ -149,7 +151,7 @@ let styles = StyleSheet.create({
amountView: {
width: width,
height: 58,
marginTop: 10,
marginTop: 1,
flexDirection: 'row',
justifyContent: 'space-between'
},
... ... @@ -167,6 +169,7 @@ let styles = StyleSheet.create({
borderWidth: 1,
borderColor: '#D0021B',
borderRadius: 4,
overflow: 'hidden',
paddingTop: 5,
paddingLeft: 18,
paddingRight: 18,
... ...
... ... @@ -55,7 +55,6 @@ export default class Mine extends Component {
<Image style={styles.arrowImage} source={require('../images/arrow.png')}/>
</View>
</TouchableOpacity>
<View style={{height: 10, backgroundColor: '#f0f0f0'}}/>
</View>
);
}
... ...
... ... @@ -37,7 +37,7 @@ export default class OrderIncome extends Component {
this.props.onPressTab && this.props.onPressTab(1, 0);
}}>
<View style={styles.headerContainer}>
<Text style={styles.headerText}>订单收入</Text>
<Text style={this.state.orderType === 1 ? styles.headerText : styles.headerText_unselect}>订单收入</Text>
</View>
{this.state.orderType !== 1 ? null :
<View style={{alignItems: 'center'}}>
... ... @@ -50,7 +50,7 @@ export default class OrderIncome extends Component {
this.props.onPressTab && this.props.onPressTab(2, 0);
}}>
<View style={styles.headerContainer}>
<Text style={styles.headerText}>活动收入</Text>
<Text style={this.state.orderType === 2 ? styles.headerText : styles.headerText_unselect}>活动收入</Text>
</View>
{this.state.orderType !== 2 ? null :
<View style={{alignItems: 'center'}}>
... ... @@ -192,8 +192,10 @@ let styles = StyleSheet.create({
justifyContent: 'center',
},
header: {
width: width,
width: width - 110,
height: 44,
marginLeft:55,
marginRight:55,
flexDirection: 'row',
},
headerText: {
... ... @@ -204,11 +206,18 @@ let styles = StyleSheet.create({
fontWeight: 'bold',
textAlign: 'center',
},
headerText_unselect: {
fontFamily: 'PingFang-SC-Regular',
fontSize: 14,
color: '#B0B0B0',
letterSpacing: -0.19,
textAlign: 'center',
},
subHeader: {
width: width,
height: 44,
paddingLeft: 15,
paddingRight: 15,
paddingLeft: 5,
paddingRight: 5,
flexDirection: 'row',
},
subHeaderContainer: {
... ...
'use strict';
import React, {Component} from 'react';
import {DeviceEventEmitter, Dimensions, Image, StyleSheet, Text, TouchableOpacity, View, ScrollView} from 'react-native';
import {DeviceEventEmitter, Dimensions, Image, StyleSheet, Text, TouchableOpacity, View} from 'react-native';
export default class Statistics extends Component {
constructor(props) {
... ... @@ -20,9 +20,8 @@ export default class Statistics extends Component {
render() {
let {statisticsInfo} = this.props;
let scrollEnabled = height < 667;
return (
<ScrollView style={styles.container} scrollEnabled = {scrollEnabled}>
<View style={styles.container}>
<View style={styles.statisticsView}>
<View style={{width: width / 2, paddingLeft: 30}}>
<Text style={styles.numberText}>¥{statisticsInfo.orderAmountSum}</Text>
... ... @@ -47,7 +46,7 @@ export default class Statistics extends Component {
</View>
</View>
<View style={styles.lineView}/>
</ScrollView>
</View>
);
}
... ...
... ... @@ -72,7 +72,7 @@ export default class ImageSlider extends React.Component {
width: data.length * 12,
borderRadius: 5,
marginLeft: (sliderWidth - data.length * 12) / 2,
paddingBottom: 3,
paddingBottom: 0,
}}
>
{data.map((item, i) => {
... ...
... ... @@ -39,7 +39,7 @@ export default class ImageTwo extends React.Component {
if (!list || list.length === 0) {
return null;
}
let sliderWidth = (width - 39) / 2;
let sliderWidth = (width - 45) / 2;
let sliderHeight = 120 * DEVICE_WIDTH_RATIO;
return (
<View style={{marginLeft: 15, marginRight: 15, marginBottom: 18, flexDirection: 'row',}}>
... ... @@ -50,7 +50,7 @@ export default class ImageTwo extends React.Component {
key={i}
activeOpacity={1}
yh_exposureData={item.yh_exposureData}
style={{width: sliderWidth, height: sliderHeight, marginRight:9}}
style={{width: sliderWidth, height: sliderHeight, marginRight:15}}
onPress={() => {
this.props.resourceJumpWithUrl && this.props.resourceJumpWithUrl(item.url);
}}
... ...
... ... @@ -100,6 +100,7 @@ let styles = StyleSheet.create({
color: '#D0021B',
textAlign: 'center',
textAlignVertical: 'center',
alignSelf: 'center',
},
shareContainer: {
position: 'absolute',
... ...