[mainActions] 백그라운드 데이터 요청 로직 추가 작업 중
This commit is contained in:
@@ -32,6 +32,7 @@ export const types = {
|
|||||||
|
|
||||||
// main actions
|
// main actions
|
||||||
GET_SUB_CATEGORY: "GET_SUB_CATEGORY",
|
GET_SUB_CATEGORY: "GET_SUB_CATEGORY",
|
||||||
|
APPEND_SUB_CATEGORY: "APPEND_SUB_CATEGORY",
|
||||||
GET_TOP_20_SHOW: "GET_TOP_20_SHOW",
|
GET_TOP_20_SHOW: "GET_TOP_20_SHOW",
|
||||||
|
|
||||||
// myPage actions
|
// myPage actions
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
import { URLS } from "../api/apiConfig";
|
import { URLS } from "../api/apiConfig";
|
||||||
import { TAxios } from "../api/TAxios";
|
import { TAxios } from "../api/TAxios";
|
||||||
|
import { CATEGORY_DATA_MAX_RESULTS_LIMIT } from "../utils/Config";
|
||||||
import { types } from "./actionTypes";
|
import { types } from "./actionTypes";
|
||||||
|
|
||||||
// 서브카테고리 조회 IF-LGSP-051
|
// 서브카테고리 조회 IF-LGSP-051
|
||||||
export const getSubCategory = (props) => (dispatch, getState) => {
|
let getSubCategoryKey = null;
|
||||||
const { lgCatCd, patnrIdList, pageSize, tabType, filterType } = props;
|
export const getSubCategory = (params, key) => (dispatch, getState) => {
|
||||||
|
const { lgCatCd, patnrIdList, tabType, pageSize, pageNo, filterType } =
|
||||||
|
params;
|
||||||
|
const maxResults = CATEGORY_DATA_MAX_RESULTS_LIMIT;
|
||||||
|
|
||||||
|
let currentKey = key;
|
||||||
const onSuccess = (response) => {
|
const onSuccess = (response) => {
|
||||||
console.log("getSubCategory onSuccess ", response.data);
|
console.log("getSubCategory onSuccess ", response.data);
|
||||||
|
|
||||||
@@ -24,7 +29,7 @@ export const getSubCategory = (props) => (dispatch, getState) => {
|
|||||||
getState,
|
getState,
|
||||||
"get",
|
"get",
|
||||||
URLS.GET_SUB_CATEGORY,
|
URLS.GET_SUB_CATEGORY,
|
||||||
{ lgCatCd, patnrIdList, pageSize, tabType, filterType },
|
{ lgCatCd, patnrIdList, tabType, filterType },
|
||||||
{},
|
{},
|
||||||
onSuccess,
|
onSuccess,
|
||||||
onFail
|
onFail
|
||||||
|
|||||||
Reference in New Issue
Block a user