...
|
...
|
@@ -6,8 +6,10 @@ import {Dimensions, Image, ListView, StyleSheet, Text, TouchableOpacity, View, N |
|
|
import {Immutable} from 'immutable';
|
|
|
import ProductListCell from '../../common/components/ListCell/ProductListCell';
|
|
|
import HelpTipsModal from "./HelpTipsModal";
|
|
|
import SureModal from "./SureModal";
|
|
|
import WithdrawModal from "./WithdrawModal";
|
|
|
import GuideModal from "./GuideModal";
|
|
|
import BannerSwiper from './BannerSwiper';
|
|
|
|
|
|
export default class Alliance extends Component {
|
|
|
constructor(props) {
|
...
|
...
|
@@ -30,7 +32,7 @@ export default class Alliance extends Component { |
|
|
<View style={styles.helpView}>
|
|
|
<Text style={styles.canWithDrawText}>可提现金额</Text>
|
|
|
<TouchableOpacity activeOpacity={1} onPress={() => {
|
|
|
this.props.showHelpDialog && this.props.showHelpDialog('仅计算当天凌晨4点前产生的有效订单结算后的可提现金额,具体说明请参见规则说明');
|
|
|
this.props.showHelpDialog && this.props.showHelpDialog('仅计算当天12点前产生的有效订单结算后的可提现金额,具体说明请参见规则说明');
|
|
|
}}>
|
|
|
<Image style={styles.helpImage} source={require('../images/help.png')}/>
|
|
|
</TouchableOpacity>
|
...
|
...
|
@@ -47,7 +49,7 @@ export default class Alliance extends Component { |
|
|
return
|
|
|
}
|
|
|
if (this.props.settlementInfo.settlementInfoData.canSettlement) {
|
|
|
!this.props.addSettlement.isFetching && this.props.showWithdrawalDialog && this.props.showWithdrawalDialog();
|
|
|
!this.props.addSettlement.isFetching && this.props.showSureDialog && this.props.showSureDialog();
|
|
|
} else {
|
|
|
this.props.showHelpDialog && this.props.showHelpDialog('您有正在处理中的提现,请耐心等待完成后再做新的提现操作');
|
|
|
}
|
...
|
...
|
@@ -67,25 +69,39 @@ export default class Alliance extends Component { |
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<View style={{height: 10, backgroundColor: '#f0f0f0'}}/>
|
|
|
<View style={styles.withdrawView}>
|
|
|
</View>
|
|
|
)
|
|
|
}
|
|
|
|
|
|
_renderRow(rowData, sectionID, rowID) {
|
|
|
let paddingLeft = rowID % 2 === 1 ? rowMarginHorizontal / 2 : rowMarginHorizontal;
|
|
|
let customStyle = rowID === 0 || rowID === 1 ? {paddingLeft} : {paddingLeft};
|
|
|
let hasOrder = this.props.recentlyOrder.recentlyOrder_list.toArray().length > 0;
|
|
|
switch (sectionID) {
|
|
|
case 'resourceList': {
|
|
|
return(
|
|
|
<View>
|
|
|
<BannerSwiper resource={rowData} row_ID={rowID} resourceJumpWithUrl={this.props.resourceJumpWithUrl}/>
|
|
|
<View style={{height: 10, backgroundColor: '#f0f0f0'}}/>
|
|
|
</View>
|
|
|
);
|
|
|
}
|
|
|
case 'orderListHeader': {
|
|
|
return (
|
|
|
<View>
|
|
|
<View style={styles.orderView}>
|
|
|
<Text style={[styles.hasWithDrawText, {fontWeight: 'bold'}]}>最近订单</Text>
|
|
|
<Text style={styles.orderTipsText}>当天订单第二天显示</Text>
|
|
|
</View>
|
|
|
<View style={styles.titleBottomLine}/>
|
|
|
{this.props.recentlyOrder.recentlyOrder_list.toArray().length > 0 ? null :
|
|
|
<View style={styles.emptyOrderView}>
|
|
|
<Text style={[styles.hasWithDrawText, {color: '#B0B0B0', justifyContent: 'center', width: 98}]}>您暂时没有订单</Text>
|
|
|
<Text style={[styles.hasWithDrawText, {color: '#B0B0B0', justifyContent: 'center'}]}>您暂时没有订单</Text>
|
|
|
</View>
|
|
|
}
|
|
|
</View>
|
|
|
|
|
|
)
|
|
|
}
|
|
|
|
|
|
_renderRow(rowData, sectionID, rowID) {
|
|
|
let paddingLeft = rowID % 2 === 1 ? rowMarginHorizontal / 2 : rowMarginHorizontal;
|
|
|
let customStyle = rowID === 0 || rowID === 1 ? {paddingLeft} : {paddingLeft};
|
|
|
let hasOrder = this.props.recentlyOrder.recentlyOrder_list.toArray().length > 0;
|
|
|
switch (sectionID) {
|
|
|
case 'orderList': {
|
|
|
let status = rowData.get('status') === '10' ? '待确认' : '';
|
|
|
return (
|
...
|
...
|
@@ -157,12 +173,16 @@ export default class Alliance extends Component { |
|
|
render() {
|
|
|
let {
|
|
|
isShowHelp,
|
|
|
isShowSure,
|
|
|
isShowWithdrawal,
|
|
|
resourceInfo,
|
|
|
recentlyOrder,
|
|
|
topList,
|
|
|
} = this.props;
|
|
|
|
|
|
let dataSource = {
|
|
|
resourceList: resourceInfo.resourceList ? resourceInfo.resourceList.toArray() : [],
|
|
|
orderListHeader: ['最近订单'],
|
|
|
orderList: recentlyOrder.recentlyOrder_list ? recentlyOrder.recentlyOrder_list.toArray() : [],
|
|
|
orderListFooter: ['查看全部'],
|
|
|
productListTitle: ['推荐商品'],
|
...
|
...
|
@@ -178,6 +198,10 @@ export default class Alliance extends Component { |
|
|
tips={this.props.tips}
|
|
|
isShowHelp={isShowHelp}
|
|
|
hiddenHelpDialog={this.props.hiddenHelpDialog}/>
|
|
|
<SureModal
|
|
|
isShow={isShowSure}
|
|
|
hiddenSureDialog={this.props.hiddenSureDialog}
|
|
|
showWithdrawalDialog={this.props.showWithdrawalDialog}/>
|
|
|
<WithdrawModal
|
|
|
isShowWithdrawal={isShowWithdrawal}
|
|
|
hiddenWithDrawDialog={this.props.hiddenWithDrawDialog}/>
|
...
|
...
|
@@ -285,11 +309,26 @@ let styles = StyleSheet.create({ |
|
|
alignItems: 'center',
|
|
|
justifyContent: 'space-between'
|
|
|
},
|
|
|
orderView: {
|
|
|
width: width,
|
|
|
height: 44,
|
|
|
backgroundColor: '#FFFFFF',
|
|
|
flexDirection: 'row',
|
|
|
paddingLeft: 15,
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
hasWithDrawText: {
|
|
|
fontFamily: 'PingFang-SC-Regular',
|
|
|
fontSize: 14,
|
|
|
color: '#444444',
|
|
|
},
|
|
|
orderTipsText: {
|
|
|
marginLeft: 4,
|
|
|
fontFamily: 'PingFang-SC-Regular',
|
|
|
fontSize: 12,
|
|
|
color: '#B0B0B0',
|
|
|
letterSpacing: -0.16,
|
|
|
},
|
|
|
arrowImage: {
|
|
|
width: 16,
|
|
|
height: 16,
|
...
|
...
|
|