[actions, api, reducers] action 추가 및 오타 수정
Detail Notes : 1. brandAction, getBrandBestSeller 추가 2. brandReducer 추가 3. 오타 수정
This commit is contained in:
@@ -32,7 +32,7 @@ export const types = {
|
||||
GET_BRAND_RECOMMENDED_SHOW_INFO: "GET_BRAND_RECOMMENDED_SHOW_INFO",
|
||||
GET_BRAND_SERIES_INFO: "GET_BRAND_SERIES_INFO",
|
||||
GET_BRAND_CATEGORY_INFO: "GET_BRAND_CATEGORY_INFO",
|
||||
GET_BRAND_BEST_SELLET: "GET_BRAND_BEST_SELLET",
|
||||
GET_BRAND_BEST_SELLER: "GET_BRAND_BEST_SELLER",
|
||||
GET_BRAND_CREATORS_INFO: "GET_BRAND_CREATORS_INFO",
|
||||
|
||||
// main actions
|
||||
|
||||
@@ -116,3 +116,32 @@ export const getBrandTSVInfo = (props) => (dispatch, getState) => {
|
||||
onFail
|
||||
);
|
||||
};
|
||||
|
||||
// Featured Brand Best Seller 상품 목록 조회 IF-LGSP-312
|
||||
export const getBrandBestSeller = (props) => (dispatch, getState) => {
|
||||
const { patnrId } = props;
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("@@ getBrandBestSeller onSuccess ", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_BEST_SELLER,
|
||||
payload: response.data.data,
|
||||
});
|
||||
};
|
||||
|
||||
const onFail = (error) => {
|
||||
console.error("@@ getBrandBestSeller onFail ", error);
|
||||
};
|
||||
|
||||
TAxios(
|
||||
dispatch,
|
||||
getState,
|
||||
"get",
|
||||
URLS.GET_BRAND_BEST_SELLER,
|
||||
{ patnrId },
|
||||
{},
|
||||
onSuccess,
|
||||
onFail
|
||||
);
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ export const URLS = {
|
||||
GET_BRAND_RECOMMENDED_SHOW_INFO: "/lgsp/v1/brand/recommend.lge",
|
||||
GET_BRAND_SERIES_INFO: "/lgsp/v1/brand/series.lge",
|
||||
GET_BRAND_CATEGORY_INFO: "/lgsp/v1/brand/category.lge",
|
||||
GET_BRAND_BEST_SELLET: "/lgsp/v1/brand/best.lge",
|
||||
GET_BRAND_BEST_SELLER: "/lgsp/v1/brand/bestSeller.lge",
|
||||
GET_BRAND_CREATORS_INFO: "/lgsp/v1/brand/creators.lge",
|
||||
|
||||
//on-sale controller
|
||||
|
||||
@@ -5,6 +5,7 @@ const initialState = {
|
||||
brandLayoutInfoData: {},
|
||||
brandLiveChannelInfoData: {},
|
||||
brandTsvInfoData: {},
|
||||
brandBestSellerData: {},
|
||||
};
|
||||
|
||||
export const brandReducer = (state = initialState, action) => {
|
||||
@@ -33,6 +34,12 @@ export const brandReducer = (state = initialState, action) => {
|
||||
brandTsvInfoData: action.payload,
|
||||
};
|
||||
|
||||
case types.GET_BRAND_BEST_SELLER:
|
||||
return {
|
||||
...state,
|
||||
brandBestSellerData: action.payload,
|
||||
};
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user