...
|
...
|
@@ -15,7 +15,7 @@ const { |
|
|
HOME_FAVORITE_REQUEST,
|
|
|
HOME_FAVORITE_SUCCESS,
|
|
|
HOME_FAVORITE_FAILURE,
|
|
|
|
|
|
|
|
|
HOME_KIDS_FAVORITE_REQUEST,
|
|
|
HOME_KIDS_FAVORITE_SUCCESS,
|
|
|
HOME_KIDS_FAVORITE_FAILURE,
|
...
|
...
|
@@ -24,6 +24,8 @@ const { |
|
|
HOME_LIFESTYLE_FAVORITE_SUCCESS,
|
|
|
HOME_LIFESTYLE_FAVORITE_FAILURE,
|
|
|
|
|
|
HOME_LIFESTYLE_FAVORITE_SET_INDEX,
|
|
|
|
|
|
HOME_SHOP_INFO_REQUEST,
|
|
|
HOME_SHOP_INFO_SUCCESS,
|
|
|
HOME_SHOP_INFO_FAILURE,
|
...
|
...
|
@@ -65,11 +67,13 @@ export default function homeReducer(state=initialState, action) { |
|
|
*** 猜你喜欢列表
|
|
|
*****************************/
|
|
|
case HOME_FAVORITE_REQUEST:
|
|
|
case HOME_KIDS_FAVORITE_REQUEST:
|
|
|
case HOME_LIFESTYLE_FAVORITE_REQUEST:{
|
|
|
case HOME_KIDS_FAVORITE_REQUEST:{
|
|
|
let channelStr = action.payload;
|
|
|
return state.setIn([channelStr, 'favorite', 'isFetching'], true);
|
|
|
}
|
|
|
case HOME_LIFESTYLE_FAVORITE_REQUEST:{
|
|
|
return state.setIn(['lifeStyle', 'isListFetching'], true);
|
|
|
}
|
|
|
case HOME_FAVORITE_SUCCESS:
|
|
|
case HOME_KIDS_FAVORITE_SUCCESS:{
|
|
|
let {channelStr, json} = action.payload;
|
...
|
...
|
@@ -87,22 +91,24 @@ export default function homeReducer(state=initialState, action) { |
|
|
.setIn([channelStr, 'favorite', 'error'], error);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
case HOME_LIFESTYLE_FAVORITE_SUCCESS:{
|
|
|
let {channelStr, json} = action.payload;
|
|
|
return state.setIn([channelStr, 'hotList'], Immutable.fromJS(json.hotList))
|
|
|
.setIn([channelStr, 'newList'], Immutable.fromJS(json.newList))
|
|
|
.setIn([channelStr, 'isFetching'], false)
|
|
|
.setIn([channelStr, 'isFirstLoad'], false)
|
|
|
.setIn([channelStr, 'isListFetching'], false)
|
|
|
.setIn([channelStr, 'endReached'], true);
|
|
|
}
|
|
|
|
|
|
|
|
|
case HOME_LIFESTYLE_FAVORITE_FAILURE:{
|
|
|
let {channelStr, error} = action.payload;
|
|
|
return state.setIn([channelStr, 'isFetching'], false)
|
|
|
.setIn([channelStr, 'listError'], error);
|
|
|
}
|
|
|
|
|
|
|
|
|
case HOME_LIFESTYLE_FAVORITE_SET_INDEX:{
|
|
|
return state.setIn(['lifeStyle', 'selectIndex'], action.payload);
|
|
|
}
|
|
|
|
|
|
/****************************
|
|
|
*** 底部banner
|
...
|
...
|
@@ -129,7 +135,7 @@ export default function homeReducer(state=initialState, action) { |
|
|
let channelStr = action.payload;
|
|
|
return state.setIn([channelStr, 'shop', 'isFetching'], true);
|
|
|
}
|
|
|
|
|
|
|
|
|
case HOME_SHOP_INFO_SUCCESS:{
|
|
|
let {channelStr, json} = action.payload;
|
|
|
return state.setIn([channelStr, 'shop', 'isFetching'], false)
|
...
|
...
|
@@ -150,7 +156,7 @@ export default function homeReducer(state=initialState, action) { |
|
|
.setIn([channelStr, 'cached', 'md5'], data.md5)
|
|
|
.setIn([channelStr, 'cached', 'content_code'], data.content_code);
|
|
|
}
|
|
|
|
|
|
|
|
|
case HOME_FLOOR_DATA_HAS_NOT_CHANGE:{
|
|
|
let channelStr = action.payload;
|
|
|
return state.setIn([channelStr, 'isFetching'], false);
|
...
|
...
|
|