[포유 작업]#1
- action, reducer 에 recommendProduct 관련 추가. - 로그 관련으로 Config에 pickedforyou추가 - homepanel pickforyou노출 건으로 추가. - homepanel getSubCategory에 파라미터 추가. - bestseller,pickedforyou노출 변경.(foru api에서 내려주는걸로) - subCategory 노출 변경. foru api에서 내려주는 아이템 2개 추가및 기존 데이터 중복시 제거.
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
import { URLS } from '../api/apiConfig';
|
||||
import { TAxios } from '../api/TAxios';
|
||||
import { convertUtcToLocal } from '../components/MediaPlayer/util';
|
||||
import { CATEGORY_DATA_MAX_RESULTS_LIMIT, LOG_CONTEXT_NAME, LOG_MESSAGE_ID } from '../utils/Config';
|
||||
import {
|
||||
CATEGORY_DATA_MAX_RESULTS_LIMIT,
|
||||
LOG_CONTEXT_NAME,
|
||||
LOG_MESSAGE_ID,
|
||||
} from '../utils/Config';
|
||||
import * as HelperMethods from '../utils/helperMethods';
|
||||
import { types } from './actionTypes';
|
||||
import { addReservation, changeAppStatus, deleteReservation } from './commonActions';
|
||||
import {
|
||||
addReservation,
|
||||
changeAppStatus,
|
||||
deleteReservation,
|
||||
} from './commonActions';
|
||||
|
||||
//IF-LGSP-007
|
||||
export const getMainLiveShow = (props) => (dispatch, getState) => {
|
||||
@@ -155,7 +163,7 @@ let lastSubCategoryParams = {};
|
||||
export const getSubCategory =
|
||||
(params, pageNo = 1, key = null, clear = false) =>
|
||||
(dispatch, getState) => {
|
||||
const { lgCatCd, patnrIdList, tabType, filterType } = params;
|
||||
const { lgCatCd, patnrIdList, tabType, filterType, recommendIncFlag } = params;
|
||||
let pageSize = params.pageSize || CATEGORY_DATA_MAX_RESULTS_LIMIT;
|
||||
|
||||
if (pageNo === 1) {
|
||||
@@ -179,21 +187,34 @@ export const getSubCategory =
|
||||
if (pageNo === 1) {
|
||||
getSubCategoryKey = new Date();
|
||||
currentKey = getSubCategoryKey;
|
||||
|
||||
// ✅ recommendProduct 분리
|
||||
const { recommendProduct, ...restData } = response.data.data;
|
||||
|
||||
dispatch({
|
||||
type: types.GET_SUB_CATEGORY,
|
||||
payload: response.data.data,
|
||||
payload: {
|
||||
...restData,
|
||||
recommendProduct,
|
||||
},
|
||||
categoryParams: {
|
||||
lgCatCd,
|
||||
patnrIdList,
|
||||
tabType,
|
||||
filterType,
|
||||
recommendIncFlag,
|
||||
pageSize,
|
||||
},
|
||||
});
|
||||
} else if (getSubCategoryKey === currentKey) {
|
||||
const { recommendProduct, ...restData } = response.data.data;
|
||||
|
||||
dispatch({
|
||||
type: types.GET_SUB_CATEGORY,
|
||||
payload: response.data.data,
|
||||
payload: {
|
||||
...restData,
|
||||
recommendProduct,
|
||||
},
|
||||
append: true,
|
||||
startIndex: (pageNo - 1) * pageSize,
|
||||
});
|
||||
@@ -212,7 +233,7 @@ export const getSubCategory =
|
||||
getState,
|
||||
'get',
|
||||
URLS.GET_SUB_CATEGORY,
|
||||
{ lgCatCd, patnrIdList, pageSize, pageNo, tabType, filterType },
|
||||
{ lgCatCd, patnrIdList, pageSize, pageNo, tabType, filterType,recommendIncFlag },
|
||||
{},
|
||||
onSuccess,
|
||||
onFail
|
||||
|
||||
Reference in New Issue
Block a user