Authored by 孙凯

修改代码命名 review by 红魔

... ... @@ -27,37 +27,37 @@ export default keyMirror({
GET_COUPON_SUCCESS: null,
GET_COUPON_FAILURE: null,
GETBRANDLIST_FOR_BOY_REQUEST: null,
GETBRANDLIST_FOR_BOY_SUCCESS: null,
GETBRANDLIST_FOR_BOY_FAILURE: null,
GET_BRAND_LIST_FOR_BOY_REQUEST: null,
GET_BRAND_LIST_FOR_BOY_SUCCESS: null,
GET_BRAND_LIST_FOR_BOY_FAILURE: null,
GETBRANDLIST_FOR_GIRL_REQUEST: null,
GETBRANDLIST_FOR_GIRL_SUCCESS: null,
GETBRANDLIST_FOR_GIRL_FAILURE: null,
GET_BRAND_LIST_FOR_GIRL_REQUEST: null,
GET_BRAND_LIST_FOR_GIRL_SUCCESS: null,
GET_BRAND_LIST_FOR_GIRL_FAILURE: null,
GETBRANDLIST_FOR_KID_REQUEST: null,
GETBRANDLIST_FOR_KID_SUCCESS: null,
GETBRANDLIST_FOR_KID_FAILURE: null,
GET_BRAND_LIST_FOR_KID_REQUEST: null,
GET_BRAND_LIST_FOR_KID_SUCCESS: null,
GET_BRAND_LIST_FOR_KID_FAILURE: null,
GETBRANDLIST_FOR_LIFESTYLE_REQUEST: null,
GETBRANDLIST_FOR_LIFESTYLE_SUCCESS: null,
GETBRANDLIST_FOR_LIFESTYLE_FAILURE: null,
GET_BRAND_LIST_FOR_LIFESTYLE_REQUEST: null,
GET_BRAND_LIST_FOR_LIFESTYLE_SUCCESS: null,
GET_BRAND_LIST_FOR_LIFESTYLE_FAILURE: null,
GETBRANDRESOURCE_FOR_BOY_REQUEST: null,
GETBRANDRESOURCE_FOR_BOY_SUCCESS: null,
GETBRANDRESOURCE_FOR_BOY_FAILURE: null,
GET_BRAND_RESOURCE_FOR_BOY_REQUEST: null,
GET_BRAND_RESOURCE_FOR_BOY_SUCCESS: null,
GET_BRAND_RESOURCE_FOR_BOY_FAILURE: null,
GETBRANDRESOURCE_FOR_GIRL_REQUEST: null,
GETBRANDRESOURCE_FOR_GIRL_SUCCESS: null,
GETBRANDRESOURCE_FOR_GIRL_FAILURE: null,
GET_BRAND_RESOURCE_FOR_GIRL_REQUEST: null,
GET_BRAND_RESOURCE_FOR_GIRL_SUCCESS: null,
GET_BRAND_RESOURCE_FOR_GIRL_FAILURE: null,
GETBRANDRESOURCE_FOR_KID_REQUEST: null,
GETBRANDRESOURCE_FOR_KID_SUCCESS: null,
GETBRANDRESOURCE_FOR_KID_FAILURE: null,
GET_BRAND_RESOURCE_FOR_KID_REQUEST: null,
GET_BRAND_RESOURCE_FOR_KID_SUCCESS: null,
GET_BRAND_RESOURCE_FOR_KID_FAILURE: null,
GETBRANDRESOURCE_FOR_LIFESTYLE_REQUEST: null,
GETBRANDRESOURCE_FOR_LIFESTYLE_SUCCESS: null,
GETBRANDRESOURCE_FOR_LIFESTYLE_FAILURE: null,
GET_BRAND_RESOURCE_FOR_LIFESTYLE_REQUEST: null,
GET_BRAND_RESOURCE_FOR_LIFESTYLE_SUCCESS: null,
GET_BRAND_RESOURCE_FOR_LIFESTYLE_FAILURE: null,
SET_BRAND_FILTER: null,
SET_CHANNEL_FILTER: null,
... ...
... ... @@ -9,37 +9,37 @@ const {
SET_BRAND_FILTER,
SET_CHANNEL_FILTER,
GETBRANDLIST_FOR_BOY_REQUEST,
GETBRANDLIST_FOR_BOY_SUCCESS,
GETBRANDLIST_FOR_BOY_FAILURE,
GET_BRAND_LIST_FOR_BOY_REQUEST,
GET_BRAND_LIST_FOR_BOY_SUCCESS,
GET_BRAND_LIST_FOR_BOY_FAILURE,
GETBRANDLIST_FOR_GIRL_REQUEST,
GETBRANDLIST_FOR_GIRL_SUCCESS,
GETBRANDLIST_FOR_GIRL_FAILURE,
GET_BRAND_LIST_FOR_GIRL_REQUEST,
GET_BRAND_LIST_FOR_GIRL_SUCCESS,
GET_BRAND_LIST_FOR_GIRL_FAILURE,
GETBRANDLIST_FOR_KID_REQUEST,
GETBRANDLIST_FOR_KID_SUCCESS,
GETBRANDLIST_FOR_KID_FAILURE,
GET_BRAND_LIST_FOR_KID_REQUEST,
GET_BRAND_LIST_FOR_KID_SUCCESS,
GET_BRAND_LIST_FOR_KID_FAILURE,
GETBRANDLIST_FOR_LIFESTYLE_REQUEST,
GETBRANDLIST_FOR_LIFESTYLE_SUCCESS,
GETBRANDLIST_FOR_LIFESTYLE_FAILURE,
GET_BRAND_LIST_FOR_LIFESTYLE_REQUEST,
GET_BRAND_LIST_FOR_LIFESTYLE_SUCCESS,
GET_BRAND_LIST_FOR_LIFESTYLE_FAILURE,
GETBRANDRESOURCE_FOR_BOY_REQUEST,
GETBRANDRESOURCE_FOR_BOY_SUCCESS,
GETBRANDRESOURCE_FOR_BOY_FAILURE,
GET_BRAND_RESOURCE_FOR_BOY_REQUEST,
GET_BRAND_RESOURCE_FOR_BOY_SUCCESS,
GET_BRAND_RESOURCE_FOR_BOY_FAILURE,
GETBRANDRESOURCE_FOR_GIRL_REQUEST,
GETBRANDRESOURCE_FOR_GIRL_SUCCESS,
GETBRANDRESOURCE_FOR_GIRL_FAILURE,
GET_BRAND_RESOURCE_FOR_GIRL_REQUEST,
GET_BRAND_RESOURCE_FOR_GIRL_SUCCESS,
GET_BRAND_RESOURCE_FOR_GIRL_FAILURE,
GETBRANDRESOURCE_FOR_KID_REQUEST,
GETBRANDRESOURCE_FOR_KID_SUCCESS,
GETBRANDRESOURCE_FOR_KID_FAILURE,
GET_BRAND_RESOURCE_FOR_KID_REQUEST,
GET_BRAND_RESOURCE_FOR_KID_SUCCESS,
GET_BRAND_RESOURCE_FOR_KID_FAILURE,
GETBRANDRESOURCE_FOR_LIFESTYLE_REQUEST,
GETBRANDRESOURCE_FOR_LIFESTYLE_SUCCESS,
GETBRANDRESOURCE_FOR_LIFESTYLE_FAILURE,
GET_BRAND_RESOURCE_FOR_LIFESTYLE_REQUEST,
GET_BRAND_RESOURCE_FOR_LIFESTYLE_SUCCESS,
GET_BRAND_RESOURCE_FOR_LIFESTYLE_FAILURE,
} = require('../../constants/actionTypes').default;
... ... @@ -61,80 +61,80 @@ export function setChannelFilter(filter) {
export function getBrandListForBoyRequest() {
return {
type: GETBRANDLIST_FOR_BOY_REQUEST,
type: GET_BRAND_LIST_FOR_BOY_REQUEST,
};
}
export function getBrandListForBoySuccess(json) {
return {
type: GETBRANDLIST_FOR_BOY_SUCCESS,
type: GET_BRAND_LIST_FOR_BOY_SUCCESS,
payload: json
}
}
export function getBrandListForBoyFailure(error) {
return {
type: GETBRANDLIST_FOR_BOY_FAILURE,
type: GET_BRAND_LIST_FOR_BOY_FAILURE,
payload: error
}
}
export function getBrandListForGirlRequest() {
return {
type: GETBRANDLIST_FOR_GIRL_REQUEST,
type: GET_BRAND_LIST_FOR_GIRL_REQUEST,
};
}
export function getBrandListForGirlSuccess(json) {
return {
type: GETBRANDLIST_FOR_GIRL_SUCCESS,
type: GET_BRAND_LIST_FOR_GIRL_SUCCESS,
payload: json
}
}
export function getBrandListForGirlFailure(error) {
return {
type: GETBRANDLIST_FOR_GIRL_FAILURE,
type: GET_BRAND_LIST_FOR_GIRL_FAILURE,
payload: error
}
}
export function getBrandListForKidRequest() {
return {
type: GETBRANDLIST_FOR_KID_REQUEST,
type: GET_BRAND_LIST_FOR_KID_REQUEST,
};
}
export function getBrandListForKidSuccess(json) {
return {
type: GETBRANDLIST_FOR_KID_SUCCESS,
type: GET_BRAND_LIST_FOR_KID_SUCCESS,
payload: json
}
}
export function getBrandListForKidFailure(error) {
return {
type: GETBRANDLIST_FOR_KID_FAILURE,
type: GET_BRAND_LIST_FOR_KID_FAILURE,
payload: error
}
}
export function getBrandListForLifeStyleRequest() {
return {
type: GETBRANDLIST_FOR_LIFESTYLE_REQUEST,
type: GET_BRAND_LIST_FOR_LIFESTYLE_REQUEST,
};
}
export function getBrandListForLifeStyleSuccess(json) {
return {
type: GETBRANDLIST_FOR_LIFESTYLE_SUCCESS,
type: GET_BRAND_LIST_FOR_LIFESTYLE_SUCCESS,
payload: json
}
}
export function getBrandListForLifeStyleFailure(error) {
return {
type: GETBRANDLIST_FOR_LIFESTYLE_FAILURE,
type: GET_BRAND_LIST_FOR_LIFESTYLE_FAILURE,
payload: error
}
}
... ... @@ -179,80 +179,80 @@ export function getBrandList(channel) {
export function getBrandResourceForBoyRequest() {
return {
type: GETBRANDRESOURCE_FOR_BOY_REQUEST,
type: GET_BRAND_RESOURCE_FOR_BOY_REQUEST,
};
}
export function getBrandResourceForBoySuccess(json) {
return {
type: GETBRANDRESOURCE_FOR_BOY_SUCCESS,
type: GET_BRAND_RESOURCE_FOR_BOY_SUCCESS,
payload: json
}
}
export function getBrandResourceForBoyFailure(error) {
return {
type: GETBRANDRESOURCE_FOR_BOY_FAILURE,
type: GET_BRAND_RESOURCE_FOR_BOY_FAILURE,
payload: error
}
}
export function getBrandResourceForGirlRequest() {
return {
type: GETBRANDRESOURCE_FOR_GIRL_REQUEST,
type: GET_BRAND_RESOURCE_FOR_GIRL_REQUEST,
};
}
export function getBrandResourceForGirlSuccess(json) {
return {
type: GETBRANDRESOURCE_FOR_GIRL_SUCCESS,
type: GET_BRAND_RESOURCE_FOR_GIRL_SUCCESS,
payload: json
}
}
export function getBrandResourceForGirlFailure(error) {
return {
type: GETBRANDRESOURCE_FOR_GIRL_FAILURE,
type: GET_BRAND_RESOURCE_FOR_GIRL_FAILURE,
payload: error
}
}
export function getBrandResourceForKidRequest() {
return {
type: GETBRANDRESOURCE_FOR_KID_REQUEST,
type: GET_BRAND_RESOURCE_FOR_KID_REQUEST,
};
}
export function getBrandResourceForKidSuccess(json) {
return {
type: GETBRANDRESOURCE_FOR_KID_SUCCESS,
type: GET_BRAND_RESOURCE_FOR_KID_SUCCESS,
payload: json
}
}
export function getBrandResourceForKidFailure(error) {
return {
type: GETBRANDRESOURCE_FOR_KID_FAILURE,
type: GET_BRAND_RESOURCE_FOR_KID_FAILURE,
payload: error
}
}
export function getBrandResourceForLifeStyleRequest() {
return {
type: GETBRANDRESOURCE_FOR_LIFESTYLE_REQUEST,
type: GET_BRAND_RESOURCE_FOR_LIFESTYLE_REQUEST,
};
}
export function getBrandResourceForLifeStyleSuccess(json) {
return {
type: GETBRANDRESOURCE_FOR_LIFESTYLE_SUCCESS,
type: GET_BRAND_RESOURCE_FOR_LIFESTYLE_SUCCESS,
payload: json
}
}
export function getBrandResourceForLifeStyleFailure(error) {
return {
type: GETBRANDRESOURCE_FOR_LIFESTYLE_FAILURE,
type: GET_BRAND_RESOURCE_FOR_LIFESTYLE_FAILURE,
payload: error
}
}
... ...
... ... @@ -9,37 +9,37 @@ const {
SET_BRAND_FILTER,
SET_CHANNEL_FILTER,
GETBRANDLIST_FOR_BOY_REQUEST,
GETBRANDLIST_FOR_BOY_SUCCESS,
GETBRANDLIST_FOR_BOY_FAILURE,
GET_BRAND_LIST_FOR_BOY_REQUEST,
GET_BRAND_LIST_FOR_BOY_SUCCESS,
GET_BRAND_LIST_FOR_BOY_FAILURE,
GETBRANDLIST_FOR_GIRL_REQUEST,
GETBRANDLIST_FOR_GIRL_SUCCESS,
GETBRANDLIST_FOR_GIRL_FAILURE,
GET_BRAND_LIST_FOR_GIRL_REQUEST,
GET_BRAND_LIST_FOR_GIRL_SUCCESS,
GET_BRAND_LIST_FOR_GIRL_FAILURE,
GETBRANDLIST_FOR_KID_REQUEST,
GETBRANDLIST_FOR_KID_SUCCESS,
GETBRANDLIST_FOR_KID_FAILURE,
GET_BRAND_LIST_FOR_KID_REQUEST,
GET_BRAND_LIST_FOR_KID_SUCCESS,
GET_BRAND_LIST_FOR_KID_FAILURE,
GETBRANDLIST_FOR_LIFESTYLE_REQUEST,
GETBRANDLIST_FOR_LIFESTYLE_SUCCESS,
GETBRANDLIST_FOR_LIFESTYLE_FAILURE,
GET_BRAND_LIST_FOR_LIFESTYLE_REQUEST,
GET_BRAND_LIST_FOR_LIFESTYLE_SUCCESS,
GET_BRAND_LIST_FOR_LIFESTYLE_FAILURE,
GETBRANDRESOURCE_FOR_BOY_REQUEST,
GETBRANDRESOURCE_FOR_BOY_SUCCESS,
GETBRANDRESOURCE_FOR_BOY_FAILURE,
GET_BRAND_RESOURCE_FOR_BOY_REQUEST,
GET_BRAND_RESOURCE_FOR_BOY_SUCCESS,
GET_BRAND_RESOURCE_FOR_BOY_FAILURE,
GETBRANDRESOURCE_FOR_GIRL_REQUEST,
GETBRANDRESOURCE_FOR_GIRL_SUCCESS,
GETBRANDRESOURCE_FOR_GIRL_FAILURE,
GET_BRAND_RESOURCE_FOR_GIRL_REQUEST,
GET_BRAND_RESOURCE_FOR_GIRL_SUCCESS,
GET_BRAND_RESOURCE_FOR_GIRL_FAILURE,
GETBRANDRESOURCE_FOR_KID_REQUEST,
GETBRANDRESOURCE_FOR_KID_SUCCESS,
GETBRANDRESOURCE_FOR_KID_FAILURE,
GET_BRAND_RESOURCE_FOR_KID_REQUEST,
GET_BRAND_RESOURCE_FOR_KID_SUCCESS,
GET_BRAND_RESOURCE_FOR_KID_FAILURE,
GETBRANDRESOURCE_FOR_LIFESTYLE_REQUEST,
GETBRANDRESOURCE_FOR_LIFESTYLE_SUCCESS,
GETBRANDRESOURCE_FOR_LIFESTYLE_FAILURE,
GET_BRAND_RESOURCE_FOR_LIFESTYLE_REQUEST,
GET_BRAND_RESOURCE_FOR_LIFESTYLE_SUCCESS,
GET_BRAND_RESOURCE_FOR_LIFESTYLE_FAILURE,
} = require('../../constants/actionTypes').default;
... ... @@ -59,11 +59,11 @@ export default function brandReducer(state=initialState, action) {
return state.set('channelFliter', action.payload);
}
case GETBRANDLIST_FOR_BOY_REQUEST:
case GET_BRAND_LIST_FOR_BOY_REQUEST:
{
return state;
}
case GETBRANDLIST_FOR_BOY_SUCCESS:
case GET_BRAND_LIST_FOR_BOY_SUCCESS:
{
let {
all_list,
... ... @@ -75,15 +75,15 @@ export default function brandReducer(state=initialState, action) {
.setIn(['brandListForBoy', 'hot_list'], Immutable.fromJS(hot_list))
.setIn(['brandListForBoy', 'new_list'], Immutable.fromJS(new_list));
}
case GETBRANDLIST_FOR_BOY_FAILURE:
case GET_BRAND_LIST_FOR_BOY_FAILURE:
{
return state;
}
case GETBRANDLIST_FOR_GIRL_REQUEST:
case GET_BRAND_LIST_FOR_GIRL_REQUEST:
{
return state;
}
case GETBRANDLIST_FOR_GIRL_SUCCESS:
case GET_BRAND_LIST_FOR_GIRL_SUCCESS:
{
let {
all_list,
... ... @@ -95,15 +95,15 @@ export default function brandReducer(state=initialState, action) {
.setIn(['brandListForGirl', 'hot_list'], Immutable.fromJS(hot_list))
.setIn(['brandListForGirl', 'new_list'], Immutable.fromJS(new_list));
}
case GETBRANDLIST_FOR_GIRL_FAILURE:
case GET_BRAND_LIST_FOR_GIRL_FAILURE:
{
return state;
}
case GETBRANDLIST_FOR_KID_REQUEST:
case GET_BRAND_LIST_FOR_KID_REQUEST:
{
return state;
}
case GETBRANDLIST_FOR_KID_SUCCESS:
case GET_BRAND_LIST_FOR_KID_SUCCESS:
{
let {
all_list,
... ... @@ -115,15 +115,15 @@ export default function brandReducer(state=initialState, action) {
.setIn(['brandListForKid', 'hot_list'], Immutable.fromJS(hot_list))
.setIn(['brandListForKid', 'new_list'], Immutable.fromJS(new_list));
}
case GETBRANDLIST_FOR_KID_FAILURE:
case GET_BRAND_LIST_FOR_KID_FAILURE:
{
return state;
}
case GETBRANDLIST_FOR_LIFESTYLE_REQUEST:
case GET_BRAND_LIST_FOR_LIFESTYLE_REQUEST:
{
return state;
}
case GETBRANDLIST_FOR_LIFESTYLE_SUCCESS:
case GET_BRAND_LIST_FOR_LIFESTYLE_SUCCESS:
{
let {
all_list,
... ... @@ -135,15 +135,15 @@ export default function brandReducer(state=initialState, action) {
.setIn(['brandListForLifeStyle', 'hot_list'], Immutable.fromJS(hot_list))
.setIn(['brandListForLifeStyle', 'new_list'], Immutable.fromJS(new_list));
}
case GETBRANDLIST_FOR_LIFESTYLE_FAILURE:
case GET_BRAND_LIST_FOR_LIFESTYLE_FAILURE:
{
return state;
}
case GETBRANDRESOURCE_FOR_BOY_REQUEST:
case GET_BRAND_RESOURCE_FOR_BOY_REQUEST:
{
return state;
}
case GETBRANDRESOURCE_FOR_BOY_SUCCESS:
case GET_BRAND_RESOURCE_FOR_BOY_SUCCESS:
{
let {
banner,
... ... @@ -155,16 +155,16 @@ export default function brandReducer(state=initialState, action) {
.setIn(['reourceForBoy', 'custom_brands'], Immutable.fromJS(custom_brands))
.setIn(['reourceForBoy', 'brandsText'], Immutable.fromJS(brandsText))
}
case GETBRANDRESOURCE_FOR_BOY_FAILURE:
case GET_BRAND_RESOURCE_FOR_BOY_FAILURE:
{
return state;
}
case GETBRANDRESOURCE_FOR_GIRL_REQUEST:
case GET_BRAND_RESOURCE_FOR_GIRL_REQUEST:
{
return state;
}
case GETBRANDRESOURCE_FOR_GIRL_SUCCESS:
case GET_BRAND_RESOURCE_FOR_GIRL_SUCCESS:
{
let {
banner,
... ... @@ -176,16 +176,16 @@ export default function brandReducer(state=initialState, action) {
.setIn(['reourceForGirl', 'custom_brands'], Immutable.fromJS(custom_brands))
.setIn(['reourceForGirl', 'brandsText'], Immutable.fromJS(brandsText))
}
case GETBRANDRESOURCE_FOR_GIRL_FAILURE:
case GET_BRAND_RESOURCE_FOR_GIRL_FAILURE:
{
return state;
}
case GETBRANDRESOURCE_FOR_KID_REQUEST:
case GET_BRAND_RESOURCE_FOR_KID_REQUEST:
{
return state;
}
case GETBRANDRESOURCE_FOR_KID_SUCCESS:
case GET_BRAND_RESOURCE_FOR_KID_SUCCESS:
{
let {
banner,
... ... @@ -197,16 +197,16 @@ export default function brandReducer(state=initialState, action) {
.setIn(['reourceForKid', 'custom_brands'], Immutable.fromJS(custom_brands))
.setIn(['reourceForKid', 'brandsText'], Immutable.fromJS(brandsText))
}
case GETBRANDRESOURCE_FOR_KID_FAILURE:
case GET_BRAND_RESOURCE_FOR_KID_FAILURE:
{
return state;
}
case GETBRANDRESOURCE_FOR_LIFESTYLE_REQUEST:
case GET_BRAND_RESOURCE_FOR_LIFESTYLE_REQUEST:
{
return state;
}
case GETBRANDRESOURCE_FOR_LIFESTYLE_SUCCESS:
case GET_BRAND_RESOURCE_FOR_LIFESTYLE_SUCCESS:
{
let {
banner,
... ... @@ -218,7 +218,7 @@ export default function brandReducer(state=initialState, action) {
.setIn(['reourceForLifeStyle', 'custom_brands'], Immutable.fromJS(custom_brands))
.setIn(['reourceForLifeStyle', 'brandsText'], Immutable.fromJS(brandsText))
}
case GETBRANDRESOURCE_FOR_LIFESTYLE_FAILURE:
case GET_BRAND_RESOURCE_FOR_LIFESTYLE_FAILURE:
{
return state;
}
... ...