import * as service from '../services/Init';
import { message } from 'antd';

import { routerRedux } from 'dva/router'

export default {
  namespace: 'Init',
  state: {
    CommunityList: null,
  },

  reducers: {
    returnCommunityList(state, { CommunityList }) {
      return { ...state, CommunityList };
    },

  },

  effects: {
    
    //获取
    *tosCommunityget({ playload }, { call, put }) {      

      const resp = yield call(service.tosCommunityget, playload);
      let CommunityList = resp.data.communityList;
      yield put({ type: 'returnCommunityList', CommunityList, });
    },
    

  },
};
