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.
32 lines
1.4 KiB
TypeScript
32 lines
1.4 KiB
TypeScript
/*
|
|
* @Author: donghao donghao@supervision.ltd
|
|
* @Date: 2024-01-24 17:18:11
|
|
* @LastEditors: donghao donghao@supervision.ltd
|
|
* @LastEditTime: 2024-01-25 13:44:15
|
|
* @FilePath: \general-ai-platform-web\mock\modelVersion.ts
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
*/
|
|
/**算法模型模块 mock */
|
|
|
|
import { mockGetAlgorithmModelFkSelectData , mockGetAlgorithmModelListData} from './pools/algorithmModelData';
|
|
import { successMockApiProps } from './typing';
|
|
import { fetchCurrPageByList, fetchMockSuccessFullByOther } from './utils/apiMock';
|
|
export default {
|
|
// 选择模型
|
|
'POST /api/v1/algorithm_model/getAlgorithmModelFkSelect': async (req: Request, res: Response) => {
|
|
const resData: successMockApiProps = {
|
|
...fetchMockSuccessFullByOther(mockGetAlgorithmModelFkSelectData),
|
|
};
|
|
res.send(resData);
|
|
},
|
|
// 模型列表
|
|
'POST /api/v1/algorithm_model/getAlgorithmModelList': async (req: Request, res: Response) => {
|
|
console.log(req, 'getModelVersionList_req')
|
|
const { page , pageSize} = req.body;
|
|
const resData: successMockApiProps = {
|
|
...fetchCurrPageByList({...mockGetAlgorithmModelListData, data: {...mockGetAlgorithmModelListData.data, page, pageSize: pageSize || 10} }),
|
|
};
|
|
res.send(resData);
|
|
},
|
|
};
|