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.1 KiB
TypeScript

/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-01-24 15:21:35
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-04-24 10:09:34
* @FilePath: \general-ai-platform-web\mock\typing.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
type metaProps = {
code: number; // 接口状态码 200 成功
};
/**成功返回数据结构 */
export interface successMockApiProps {
data: any; // mock业务层数据
meta: metaProps; // 接口信息
status: number; // 200 成功
success: boolean; // true 成功
msg: string | undefined; // 成功提示
isMock: boolean; // true 标识当前是模拟数据
}
/**失败返回数据结构 */
export interface failMockApiProps {
status?: number; // 500 失败
meta: metaProps; // 接口信息
success: boolean; // false 失败
data: any; // mock业务层数据
msg: string | undefined; // 成功提示
isMock: boolean; // true 标识当前是模拟数据
}