/*
 * @Author: 吴文洁
 * @Date: 2020-08-31 09:34:51
 * @LastEditors: 吴文洁
 * @LastEditTime: 2020-08-31 09:35:25
 * @Description: 
 * @Copyright: 杭州杰竞科技有限公司 版权所有
 */

import Axios from './axios';

class Service {

  static Business(url: string, params: any, option: any) {
    return Axios.post('POST', `business/${url}`, params, option);
  }

  static Apollo(url: string, params: any, option?: any) {
    return Axios.post('POST', `apollo/${url}`, params, option);
  }

  static Sales(url: string, params: any, option: any) {
    return Axios.post('POST', `sales/${url}`, params, option);
  }

  static post(url: string, params: any, option: any) {
    return Axios.post('POST', url, params, option);
  }

  static MFS(url: string, params: any, option: any) {
    return Axios.post('POST', `mfs/${url}`, params, option);
  }

  static postJSON(url: string, params: any, option: any) {
    option = option || {};
    option.contentType = 'application/json; charset=UTF-8';
    return Axios.post('post', url, JSON.stringify(params), option);
  }
}

export default Service;