import { observable, action, toJS} from "mobx"
import {WeaTools} from 'ecCom';

class coremailPortal {
  @observable res = {};
  @observable loaded = false;
  @observable state = {};

  @action setState(state) {
    this.state = state;
  }

  @action
  init = (url, params) => {
    //url = '/api/integration/coremail/datas/test';
    WeaTools.callApi(url, 'GET', params).then((res)=> {
      this.loaded = true;
      this.res = res;
    })
  }
}
export default coremailPortal;