appActions.js 1.61 KB
'use strict';

import ReactNative from 'react-native';

const {
	SET_PLATFORM,
	SET_CHANNEL,
    SET_HOST,
	SET_TYPE,
	SET_SHOP,
	SET_BRANDID,
	SET_ORIGINPARAMS,
	SET_SALETYPE,
	SET_SERVICE_HOST,
	SET_ACTIVITY_ID,
	SET_BANNER_URL,
	SET_LIST_TYPE,
} = require('../../constants/actionTypes').default;

export function setPlatform(platform) {
    return {
        type: SET_PLATFORM,
        payload: platform
    };
}

export function setChannel(channel) {
    return {
        type: SET_CHANNEL,
        payload: channel
    };
}

export function setHost(host) {
    return {
        type: SET_HOST,
        payload: host
    };
}

export function setServiceHost(host) {
    return {
        type: SET_SERVICE_HOST,
        payload: host
    };
}

export function setType(type) {
    return {
        type: SET_TYPE,
        payload: type
    };
}

export function setShop(shopid) {
    return {
        type: SET_SHOP,
        payload: shopid
    };
}

export function setBrandId(brand_id) {
    return {
        type: SET_BRANDID,
        payload: brand_id
    };
}

export function setOriginParams(originParams) {
    return {
        type: SET_ORIGINPARAMS,
        payload: originParams
    };
}

export function setSaleType(saleType) {
    return {
        type: SET_SALETYPE,
        payload: saleType
    };
}

export function setActivityId(activityId) {
    return {
        type: SET_ACTIVITY_ID,
        payload: activityId
    };
}

export function setBannerUrl(bannerUrl) {
	return {
		type: SET_BANNER_URL,
		payload: bannerUrl
	};
}

export function setListType(listType) {
	return {
		type: SET_LIST_TYPE,
		payload: listType
	};
}