[포유 작업]#4
- 이전 justforyou관련 삭제
This commit is contained in:
@@ -308,11 +308,7 @@ export const types = {
|
|||||||
SET_MODAL_BORDER: 'SET_MODAL_BORDER',
|
SET_MODAL_BORDER: 'SET_MODAL_BORDER',
|
||||||
SET_BANNER_VISIBILITY: 'SET_BANNER_VISIBILITY',
|
SET_BANNER_VISIBILITY: 'SET_BANNER_VISIBILITY',
|
||||||
|
|
||||||
// 🔽 [추가] JustForYou 상품 관리 부분
|
// 🔽 [추가] JustForYou 상품 관리 부분
|
||||||
GET_RECENTLY_SAW_ITEM: 'GET_RECENTLY_SAW_ITEM',
|
|
||||||
GET_LIKE_BRAND_PRODUCT: 'GET_LIKE_BRAND_PRODUCT',
|
|
||||||
GET_MORE_TO_CONCIDER_AT_THIS_PRICE: 'GET_MORE_TO_CONCIDER_AT_THIS_PRICE',
|
|
||||||
GET_JUSTFORYOU_INFO: 'GET_JUSTFORYOU_INFO',
|
|
||||||
JUSTFORYOU: 'JUSTFORYOU',
|
JUSTFORYOU: 'JUSTFORYOU',
|
||||||
|
|
||||||
// 🔽 Voice Conductor 관련 액션 타입
|
// 🔽 Voice Conductor 관련 액션 타입
|
||||||
|
|||||||
@@ -1,60 +1,9 @@
|
|||||||
import { URLS } from '../api/apiConfig';
|
import { URLS } from '../api/apiConfig';
|
||||||
import { TAxios } from '../api/TAxios';
|
import { TAxios } from '../api/TAxios';
|
||||||
import {
|
import { get } from '../utils/fp';
|
||||||
curry,
|
|
||||||
get,
|
|
||||||
set,
|
|
||||||
} from '../utils/fp';
|
|
||||||
import { types } from './actionTypes';
|
import { types } from './actionTypes';
|
||||||
import { changeAppStatus } from './commonActions';
|
import { changeAppStatus } from './commonActions';
|
||||||
|
|
||||||
// 최근 본 아이템 관련 액션
|
|
||||||
export const getRecentlySawItem = (data) => ({
|
|
||||||
type: types.GET_RECENTLY_SAW_ITEM,
|
|
||||||
payload: data,
|
|
||||||
});
|
|
||||||
|
|
||||||
// 좋아하는 브랜드 제품 관련 액션
|
|
||||||
export const getLikeBrandProduct = (data) => ({
|
|
||||||
type: types.GET_LIKE_BRAND_PRODUCT,
|
|
||||||
payload: data,
|
|
||||||
});
|
|
||||||
|
|
||||||
// 이 가격대에서 고려할 만한 더 많은 제품 관련 액션
|
|
||||||
export const getMoreToConciderAtThisPrice = (data) => ({
|
|
||||||
type: types.GET_MORE_TO_CONCIDER_AT_THIS_PRICE,
|
|
||||||
payload: data,
|
|
||||||
});
|
|
||||||
|
|
||||||
export const getJustForYouInfo = (callback) => (dispatch, getState) => {
|
|
||||||
const onSuccess = (response) => {
|
|
||||||
console.log("getJustForYouInfo onSuccess", response.data);
|
|
||||||
dispatch({
|
|
||||||
type: types.GET_JUSTFORYOU_INFO,
|
|
||||||
payload: get("data.data", response),
|
|
||||||
});
|
|
||||||
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
|
||||||
callback && callback();
|
|
||||||
};
|
|
||||||
|
|
||||||
const onFail = (error) => {
|
|
||||||
console.error("getJustForYouInfo onFail", error);
|
|
||||||
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
|
||||||
callback && callback();
|
|
||||||
};
|
|
||||||
|
|
||||||
TAxios(
|
|
||||||
dispatch,
|
|
||||||
getState,
|
|
||||||
"get",
|
|
||||||
URLS.GET_JUSTFORYOU_INFO,
|
|
||||||
{},
|
|
||||||
{},
|
|
||||||
onSuccess,
|
|
||||||
onFail
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const justForYou = (callback) => (dispatch, getState) => {
|
export const justForYou = (callback) => (dispatch, getState) => {
|
||||||
const macAddress = getState().common.macAddress;
|
const macAddress = getState().common.macAddress;
|
||||||
const macAddr = macAddress?.wired || macAddress?.wifi || "00:1A:2B:3C:4D:5E";
|
const macAddr = macAddress?.wired || macAddress?.wifi || "00:1A:2B:3C:4D:5E";
|
||||||
|
|||||||
@@ -141,8 +141,7 @@ export const URLS = {
|
|||||||
UPDATE_ORDER_PARTIAL_CANCEL: "/lgsp/v1/myinfo/order/orderPartialCancel.lge",
|
UPDATE_ORDER_PARTIAL_CANCEL: "/lgsp/v1/myinfo/order/orderPartialCancel.lge",
|
||||||
PAYMENT_TOTAL_CANCEL: "/lgsp/v1/myinfo/order/paymentTotalCancel.lge",
|
PAYMENT_TOTAL_CANCEL: "/lgsp/v1/myinfo/order/paymentTotalCancel.lge",
|
||||||
|
|
||||||
// foryou controller
|
// foryou controller
|
||||||
GET_JUSTFORYOU_INFO: "/lgsp/v1/justforyou/list.lge",
|
|
||||||
JUSTFORYOU: "/lgsp/v1/recommend/justforyou.lge",
|
JUSTFORYOU: "/lgsp/v1/recommend/justforyou.lge",
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,55 +5,15 @@ import {
|
|||||||
set,
|
set,
|
||||||
} from '../utils/fp';
|
} from '../utils/fp';
|
||||||
|
|
||||||
// 초기 상태 정의
|
|
||||||
// const initialState = {
|
|
||||||
// recentlySawItems: [],
|
|
||||||
// likeBrandProducts: [],
|
|
||||||
// moreToConciderAtThisPrice: [],
|
|
||||||
// };
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
justForYouInfo: {},
|
|
||||||
recommendInfo: {},
|
recommendInfo: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
// const foryouReducer = (state = initialState, action) => {
|
|
||||||
// switch (action.type) {
|
|
||||||
// // 최근 본 아이템
|
|
||||||
// case types.GET_RECENTLY_SAW_ITEM:
|
|
||||||
// return {
|
|
||||||
// ...state,
|
|
||||||
// recentlySawItems: action.payload,
|
|
||||||
// };
|
|
||||||
|
|
||||||
// // 좋아하는 브랜드 제품
|
|
||||||
// case types.GET_LIKE_BRAND_PRODUCT:
|
|
||||||
// return {
|
|
||||||
// ...state,
|
|
||||||
// likeBrandProducts: action.payload,
|
|
||||||
// };
|
|
||||||
|
|
||||||
// // 이 가격대에서 고려할 만한 더 많은 제품
|
|
||||||
// case types.GET_MORE_TO_CONCIDER_AT_THIS_PRICE:
|
|
||||||
// return {
|
|
||||||
// ...state,
|
|
||||||
// moreToConciderAtThisPrice: action.payload,
|
|
||||||
// };
|
|
||||||
|
|
||||||
// default:
|
|
||||||
// return state;
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
|
|
||||||
const justForYouInfo = curry((state, action) =>
|
|
||||||
set("justForYouInfo", get("payload", action), state)
|
|
||||||
);
|
|
||||||
|
|
||||||
const recommendInfo = curry((state, action) =>
|
const recommendInfo = curry((state, action) =>
|
||||||
set("recommendInfo", get("payload", action), state)
|
set("recommendInfo", get("payload", action), state)
|
||||||
);
|
);
|
||||||
|
|
||||||
const handlers = {
|
const handlers = {
|
||||||
[types.GET_JUSTFORYOU_INFO]: justForYouInfo,
|
|
||||||
[types.JUSTFORYOU]: recommendInfo,
|
[types.JUSTFORYOU]: recommendInfo,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import {
|
|||||||
import Spottable from '@enact/spotlight/Spottable';
|
import Spottable from '@enact/spotlight/Spottable';
|
||||||
import { setContainerLastFocusedElement } from '@enact/spotlight/src/container';
|
import { setContainerLastFocusedElement } from '@enact/spotlight/src/container';
|
||||||
|
|
||||||
import { getRecentlySawItem } from '../../../actions/forYouActions';
|
|
||||||
import { sendLogCuration } from '../../../actions/logActions';
|
import { sendLogCuration } from '../../../actions/logActions';
|
||||||
import { getSubCategory } from '../../../actions/mainActions';
|
import { getSubCategory } from '../../../actions/mainActions';
|
||||||
import { pushPanel } from '../../../actions/panelActions';
|
import { pushPanel } from '../../../actions/panelActions';
|
||||||
|
|||||||
Reference in New Issue
Block a user