import request from '@/utils/request';

/**
 * 查询文件夹分类数据
 * @data data
 */
export async function getDocTreeListAPI(data) {
  const res = await request.post('/fm/directory/selectTreeList', data);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}


/**
* 查询文件数据
* @data data
*/
export async function filePageAPI(data) {
  if (!data.lcyStatus) {
    return true
  }
  const res = await request.post('/fm/file/page', data);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}