Reinit project

This commit is contained in:
Limo Saplf
2019-08-31 20:44:15 +08:00
commit b51ae824c7
115 changed files with 20955 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import http from '@/utils/http';
import { Estates, EstateType } from '@/types/common';
import { calcEstate } from '@/utils/transform';
export interface EstateList {
total: number;
list: Estates;
}
export async function getEstateList(pageIndex: number, pageSize: number, type: EstateType) {
const {
ok,
data,
msg,
} = await http.get<EstateList>('/estateorder/list', { type, pageIndex, pageSize });
if (ok && data) {
data.list.forEach(it => it.type = type);
data.list.forEach(calcEstate);
return data;
}
throw Error(msg);
}