Authored by 盖剑秋

Change data field.

... ... @@ -2,6 +2,7 @@
import Immutable, {List, Record} from 'immutable';
import LoadMoreIndicator from './indicator/LoadMoreIndicator'
import React, {Component} from 'react';
import moment from 'moment';
import {
StyleSheet,
... ... @@ -67,7 +68,7 @@ export default class AccountSettlement extends Component {
);
case 'SECTION_CONTENT':
let statusStr = '';
switch (rowData.status) {
switch (rowData.stateId) {
case 1:
statusStr = '已出账单';
break;
... ... @@ -76,10 +77,11 @@ export default class AccountSettlement extends Component {
break;
}
let dateStr = moment(rowData.dateId,'YYYYMMDD').format('YYYY-MM-DD')
return (
<View style={styles.cellContainer}>
<Text style={[styles.inCellText,{flex:0.9}]}>{rowData.brandId}</Text>
<Text style={[styles.inCellText,{flex:1.0}]}>{rowData.dateId}</Text>
<Text style={[styles.inCellText,{flex:1.0}]}>{dateStr}</Text>
<Text style={[styles.inCellText,{flex:0.8}]}>{statusStr}</Text>
<Text style={[styles.inCellText,{flex:1.3}]}>{rowData.orderAmount}</Text>
</View>
... ... @@ -93,7 +95,7 @@ export default class AccountSettlement extends Component {
let isFetching = this.props.isFetching;
let loadText = 'All data loaded';
let loadText = '暂无更多数据';
if (!this.props.reachEnd) {
loadText = isFetching?'正在加载...':'上拉加载更多';
}
... ...
... ... @@ -45,7 +45,7 @@ export function nextPageOfDataRequest(params) {
return (dispatch,getState) => {
const {actStmt} = getState();
if (actStmt.currentPage>=actStmt.pageCount) {//Last page reached....
if (actStmt.currentPage>=actStmt.pageCount||actStmt.isFetching) {//Last page reached....
return;
}
... ...
... ... @@ -31,14 +31,12 @@ export function getGuideDisplayState() {
store.get(CONFIG.storeKey.GUIDE_STATE_KEY)
.then((state) => {
if (state && state.isDisplay) {
// const {user} = getState();
// if (user.getIn(['profile', 'sessionKey']) !== '') {
// Actions.Drawer();
// } else {
// Actions.Login();
// }
Actions.Drawer();
const {user} = getState();
if (user.getIn(['profile', 'sessionKey']) !== '') {
Actions.Drawer();
} else {
Actions.Login();
}
} else {
Actions.Guide();
}
... ...