export default [
    {
        url: "/dev-api/login",
        method: "post",
        response: ({ body }) => {
            const { username, password } = body || {};
            if (username === "admin" && password === "admin123") {
                return {
                    code: 200,
                    msg: "success",
                    token: "mock-token-admin",
                };
            }
            return {
                code: 500,
                msg: "账号或密码错误",
            };
        },
    },
    {
        url: "/dev-api/getInfo",
        method: "get",
        response: () => ({
            code: 200,
            msg: "success",
            user: {
                userId: 1,
                userName: "admin",
                nickName: "管理员",
                avatar: "",
            },
            roles: ["admin"],
            permissions: ["*:*:*"],
            isDefaultModifyPwd: false,
            isPasswordExpired: false,
        }),
    },
    {
        url: "/dev-api/logout",
        method: "post",
        response: () => ({
            code: 200,
            msg: "success",
        }),
    },
    {
        url: "/dev-api/captchaImage",
        method: "get",
        response: () => ({
            code: 200,
            msg: "success",
            captchaEnabled: false,
            img: "",
            uuid: "",
        }),
    },
];
