import { request } from 'umi';

// export async function getpage(params) {
//   return request('/api​/sysOrg​/page', {
//     method: 'POST',
//     data: {
//       ...params,
//     },
//   });
// }

export async function getpage(params, options) {
  return request('/saasbase/api/organize/page', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
export async function add(params) {
  return request('/saasbase/api/organize/addorg', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}

// export async function add(params) {

//   console.log('查询', params);
//   return request('/​api/sysOrg/add', {
//     method: 'POST',
//     data: {
//       ...params,
//     },
//   });
// }
export async function getlist(params) {
  return request('​/kitchen/api​/organize/getorglist', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
export async function orgdelete(params) {
  return request('​/kitchen/api​/organize/deleteorg', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}

export async function edit(params) {
  return request('​/saasbase/api​/organize/updateorg', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
export async function getdetail(params) {
  return request('/saasbase/api​/sysOrg​/detail', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
export async function gettree(params) {
  return request('​/saasbase/api​/organize/tree', {
    method: 'GET',
    data: {
      ...params,
    },
  });
}
