Authored by 王海元

联盟分销UI调整 --review by 孙凯

... ... @@ -26,6 +26,7 @@ export default class Alliance extends Component {
return (
<View>
<View style={styles.headerBackground}>
<View style={styles.header}/>
<View style={styles.helpView}>
<Text style={styles.canWithDrawText}>可提现金额</Text>
<TouchableOpacity activeOpacity={1} onPress={() => {
... ... @@ -86,6 +87,7 @@ export default class Alliance extends Component {
let hasOrder = this.props.recentlyOrder.recentlyOrder_list.toArray().length > 0;
switch (sectionID) {
case 'orderList': {
let status = rowData.get('status') === '10' ? '待确认' : '';
return (
<View>
<TouchableOpacity activeOpacity={1} onPress={() => {
... ... @@ -99,7 +101,10 @@ export default class Alliance extends Component {
{rowData.get('isNew') === 1 ? <Text style={styles.statusText}>新客订单</Text> : null}
</View>
</View>
<Text style={styles.priceText}>{rowData.get('amountStr')}</Text>
<View>
<Text style={styles.priceText}>{rowData.get('amountStr')}</Text>
<Text style={[styles.timeText, {fontSize:12, textAlign:'right'}]}>{status}</Text>
</View>
</View>
<View style={styles.lineView}/>
</TouchableOpacity>
... ... @@ -224,7 +229,8 @@ let styles = StyleSheet.create({
backgroundColor: '#444444',
paddingTop: 20,
paddingLeft: 15,
paddingBottom: 20
paddingBottom: 20,
position: 'relative'
},
helpView: {
width: width,
... ... @@ -331,7 +337,8 @@ let styles = StyleSheet.create({
fontSize: 16,
color: '#444444',
letterSpacing: -0.21,
fontWeight: 'bold'
fontWeight: 'bold',
textAlign: 'right'
},
timeText: {
fontFamily: 'PingFang-SC-Regular',
... ...
... ... @@ -18,6 +18,7 @@ export default class OrderDetail extends Component {
}
_renderHeader() {
let status = this.props.orderDetail.status === '10' ? '(待确认)' : '';
return (
<View>
<View style={styles.header}>
... ... @@ -31,6 +32,7 @@ export default class OrderDetail extends Component {
<View style={{flexDirection: 'row'}}>
<Text style={styles.contentText}>收益金额:</Text>
<Text style={[styles.contentText, {fontWeight: 'bold', color: '#D0021B'}]}>{this.props.orderDetail.amountStr}</Text>
<Text style={styles.contentText}>{status}</Text>
</View>
</View>
<View style={{height: 10, backgroundColor: '#f0f0f0'}}/>
... ...
... ... @@ -81,7 +81,7 @@ export default class OrderIncome extends Component {
}}>
<View style={styles.headerContainer}>
<View style={[styles.subHeaderContainer, this.state.orderStatus === 1 ? {backgroundColor: '#444444'} : null]}>
<Text style={[styles.subHeaderText, this.state.orderStatus === 1 ? {color: 'white'} : null]}>已付款</Text>
<Text style={[styles.subHeaderText, this.state.orderStatus === 1 ? {color: 'white'} : null]}>待提现</Text>
</View>
</View>
</TouchableOpacity>
... ... @@ -91,7 +91,7 @@ export default class OrderIncome extends Component {
}}>
<View style={styles.headerContainer}>
<View style={[styles.subHeaderContainer , this.state.orderStatus === 2 ? {backgroundColor: '#444444'} : null]}>
<Text style={[styles.subHeaderText, this.state.orderStatus === 2 ? {color: 'white'} : null]}>待结算</Text>
<Text style={[styles.subHeaderText, this.state.orderStatus === 2 ? {color: 'white'} : null]}>提现中</Text>
</View>
</View>
</TouchableOpacity>
... ... @@ -101,7 +101,7 @@ export default class OrderIncome extends Component {
}}>
<View style={styles.headerContainer}>
<View style={[styles.subHeaderContainer, this.state.orderStatus === 3 ? {backgroundColor: '#444444'} : null]}>
<Text style={[styles.subHeaderText, this.state.orderStatus === 3 ? {color: 'white'} : null]}>结算中</Text>
<Text style={[styles.subHeaderText, this.state.orderStatus === 3 ? {color: 'white'} : null]}>提现成功</Text>
</View>
</View>
</TouchableOpacity>
... ... @@ -113,7 +113,7 @@ export default class OrderIncome extends Component {
}
_renderRow(rowData, sectionID, rowID) {
let status = rowData.get('status') === '10' ? '待确认' : '';
return (
<View>
<TouchableOpacity activeOpacity={1} onPress={() => {
... ... @@ -127,7 +127,10 @@ export default class OrderIncome extends Component {
{rowData.get('isNew') === 1 ? <Text style={styles.statusText}>新客订单</Text> : null}
</View>
</View>
<Text style={styles.priceText}>{rowData.get('amountStr')}</Text>
<View>
<Text style={styles.priceText}>{rowData.get('amountStr')}</Text>
<Text style={[styles.timeText, {fontSize:12, textAlign:'right'}]}>{status}</Text>
</View>
</View>
<View style={styles.lineView}/>
</TouchableOpacity>
... ... @@ -225,7 +228,7 @@ let styles = StyleSheet.create({
},
underLine: {
width: 56,
height: 1,
height: 2,
backgroundColor: '#444444',
},
lineView: {
... ...
'use strict';
import React from 'react';
import ReactNative from 'react-native';
const {
AppRegistry,
StyleSheet,
Text,
View,
Dimensions,
TouchableOpacity,
Modal,
} = ReactNative;
export default class OrderCell extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<View style={styles.modalContainer}>
<View style={styles.modalView}>
<View style={styles.confirmTitleContainer}>
<Text style={styles.confirmTitle}>提现成功</Text>
<Text style={styles.confirmContent}>提现单状态会在4-8分钟后更新,请耐心等待</Text>
</View>
<View style={{width: '100%', height: 0.5, backgroundColor: '#e0e0e0'}}/>
<View style={styles.confirmBtnContainer}>
<TouchableOpacity style={styles.click} onPress={() => {
this.props.hiddenTipModalstate && this.props.hiddenTipModalstate();
}}>
<Text style={styles.sure}>确定</Text>
</TouchableOpacity>
</View>
</View>
</View>
);
}
};
let {width, height} = Dimensions.get('window');
let styles = StyleSheet.create({
modalView: {
width: 270,
borderRadius: 5,
alignItems: 'center',
backgroundColor: '#ffffff',
},
confirmBtnContainer: {
width: '100%',
height: 44.5,
flexDirection: 'row',
},
confirmTitleContainer: {
alignItems: 'center'
},
confirmTitle: {
marginTop: 20,
marginBottom: 8,
color: '#D0021B',
fontSize: 17,
textAlign: 'center',
fontFamily: 'PingFang-SC-Regular',
fontWeight: 'bold'
},
confirmContent: {
marginLeft: 30,
marginRight: 30,
marginBottom: 20,
color: '#444444',
fontSize: 14,
lineHeight: 24,
textAlign: 'center',
letterSpacing: -0.09,
fontFamily: 'PingFang-SC-Regular',
includeFontPadding: false,
},
click: {
width: '100%',
alignItems: 'center',
justifyContent: 'center'
},
sure: {
fontSize: 17,
color: '#444444',
letterSpacing: -0.41,
fontWeight: 'bold'
},
});
... ... @@ -30,6 +30,7 @@ let InitialState = Record({
isFetching: true,
error: null,
amountStr: '',
status: '',
orderStatus: '',
orderCode: '',
orderTimeStr: '',
... ...
... ... @@ -123,6 +123,7 @@ export default function couponReducer(state = initialState, action) {
case ORDER_DETAIL_SUCCESS: {
let {
amountStr,
status,
orderCode,
orderStatus,
orderTimeStr,
... ... @@ -131,6 +132,7 @@ export default function couponReducer(state = initialState, action) {
} = action.payload;
return state.setIn(['orderDetail', 'isFetching'], false)
.setIn(['orderDetail', 'amountStr'], amountStr)
.setIn(['orderDetail', 'status'], status)
.setIn(['orderDetail', 'orderCode'], orderCode)
.setIn(['orderDetail', 'orderStatus'], orderStatus)
.setIn(['orderDetail', 'orderTimeStr'], orderTimeStr)
... ...