messageActions.js 1.03 KB
'use strict';

import {Actions} from 'react-native-router-flux';
import HomeService from '../../services/HomeService';
// import timeago from 'timeago.js';

const {

    GO_TO_SYS_MESSAGE,
    GO_TO_LIKE_MESSAGE,

} = require('../../constants/actionTypes').default;

// export function saveRequest() {
//     return {
//         type: SETTING_SAVE_REQUEST,
//     };
// }
//
// export function saveSuccess() {
//     return {
//         type: SETTING_SAVE_SUCCESS,
//     };
// }
//
// export function saveFailue() {
//     return {
//         type: SETTING_SAVE_FAILURE,
//     };
// }



// 页面跳转
export function goToStatsPage(type) {
    switch (type) {

        case GO_TO_SYS_MESSAGE:
        {
            Actions.SystemMessage();
            return {
                type: GO_TO_SYS_MESSAGE,
            }
        }
        break;

        case GO_TO_LIKE_MESSAGE:
        {
            Actions.LikeMessage();
            return {
                type: GO_TO_LIKE_MESSAGE,
            }
        }
        break;
        default:

    }
}