You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
628 B
TypeScript
18 lines
628 B
TypeScript
import { mockGetBusinessProjectData } from './pools/businessProjectData';
|
|
import { successMockApiProps } from './typing';
|
|
import { fetchCurrPageByList } from './utils/apiMock';
|
|
export default {
|
|
// 实时分析告警列表分页
|
|
'GET /api/businessProject/': async (req: Request, res: Response) => {
|
|
// get 使用 query 读取参数
|
|
const { page, pageSize } = req.query;
|
|
const resData: successMockApiProps = {
|
|
...fetchCurrPageByList({
|
|
...mockGetBusinessProjectData,
|
|
data: { ...mockGetBusinessProjectData.data, page, pageSize: pageSize || 10 },
|
|
}),
|
|
};
|
|
res.json(resData);
|
|
},
|
|
};
|