actionCreators.js 574 B

1234567891011121314151617181920212223
  1. import axios from 'axios';
  2. import * as constants from './constants';
  3. import {fromJS} from 'immutable';
  4. const setFeature = (data) => ({
  5. type: constants.GET_FEATURE,
  6. data: fromJS(data),
  7. });
  8. export const getFeature = () => {
  9. return (dispatch) => {
  10. // axios.get('/posts/weight/v1/list', {
  11. // params: {
  12. // page: 1,
  13. // size: 3
  14. // }
  15. // }).then(function (res) {
  16. // if (res.success === 1) {
  17. // dispatch(setFeature(res.models));
  18. // }
  19. // });
  20. }
  21. };