import request from '@/utils/request';

/**
 * 查询项目列表
 * @data data
 */
export async function projectsPageAPI(data) {
    const res = await request.post('/pro/projects/page', data);
    if (res.data.code == 0) {
        return res.data.data;
    }
    return Promise.reject(new Error(res.data.message));
}
/**
 * 项目详情
 * @id id
 */
export async function projectsGetByIdAPI(id) {
    const res = await request.get(`/pro/projects/getById/${id}`);
    if (res.data.code == 0) {
      return res.data.data;
    }
    return Promise.reject(new Error(res.data.message));
  }