...
|
...
|
@@ -59,20 +59,20 @@ export default function userReducer(state = initialState, action) { |
|
|
}
|
|
|
|
|
|
case HOME_OVERVIEW_SUCCESS: {
|
|
|
let rise = Math.abs(action.payload.rankChange) == action.payload.rankChange ? true : false;
|
|
|
let nextState = state.set('isFetching', false)
|
|
|
.set('error', null)
|
|
|
.setIn(['overview', 'rank'], action.payload.rankNow)
|
|
|
.setIn(['overview', 'rise'], rise)
|
|
|
.setIn(['overview', 'riseCount'], Math.abs(action.payload.rankChange))
|
|
|
.setIn(['overview', 'goodsCount'], action.payload.buyNumbers)
|
|
|
.setIn(['overview', 'goodsAmount'], action.payload.orderAmount);
|
|
|
return nextState;
|
|
|
}
|
|
|
|
|
|
case HOME_BRABDRANK_SUCCESS: {
|
|
|
let rise = Math.abs(action.payload.rankChange) == action.payload.rankChange ? true : false;
|
|
|
let nextState = state.set('isFetching', false)
|
|
|
.set('error', null)
|
|
|
.setIn(['overview', 'goodsCount'], action.payload.buyNumbers)
|
|
|
.setIn(['overview', 'goodsAmount'], action.payload.orderAmount);
|
|
|
.setIn(['overview', 'rank'], action.payload.rankNow)
|
|
|
.setIn(['overview', 'rise'], rise)
|
|
|
.setIn(['overview', 'riseCount'], Math.abs(action.payload.rankChange))
|
|
|
return nextState;
|
|
|
}
|
|
|
|
...
|
...
|
|