加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mock.config.json 6.19 KB
一键复制 编辑 原始数据 按行查看 历史
null 提交于 2022-05-10 20:28 . feat: bugs
{"useApiMock":true,"apiMockConfig":{"globalOpen":true,"rules":[{"ruleId":"5061a0c1-5ae4-4086-bf3c-725f4075e5d3","ruleName":"checked_in","apiName":"request","enable":true,"verifyFail":false,"filterList":[{"propName":"url","propRegString":"https://api/checkin/getCheckinDetails","filterId":"a30c3fc4-3df7-4606-b03e-a0db192a3c65","matchType":"string"}],"returnConfig":{"returnType":"succ","generateType":"manual","manual":{"succ":{"resStr":"{\n \"data\": {\n \"list_of_total\": [\n {\n \"class_name\": \"数据191\",\n \"user_name\": \"詹冬阳\"\n },\n {\n \"class_name\": \"数据191\",\n \"user_name\": \"樊保丹\"\n },\n {\n \"class_name\": \"数据191\",\n \"user_name\": \"史勇喆\"\n },\n {\n \"class_name\": \"计科191\",\n \"user_name\": \"张三\"\n },\n {\n \"class_name\": \"计科192\",\n \"user_name\": \"李四\"\n }\n ],\n \"list_of_checkin\": [\n {\n \"class_name\": \"数据191\",\n \"user_name\": \"詹冬阳\"\n },\n {\n \"class_name\": \"数据191\",\n \"user_name\": \"樊保丹\"\n },\n {\n \"class_name\": \"数据191\",\n \"user_name\": \"史勇喆\"\n }\n ],\n \"list_of_not_checkin\": [\n {\n \"class_name\": \"计科191\",\n \"user_name\": \"张三\"\n },\n {\n \"class_name\": \"计科192\",\n \"user_name\": \"李四\"\n }\n ]\n },\n \"statusCode\": \"200\",\n \"header\": \"\"\n}"},"fail":{"resStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}},"template":{"succ":{"templateStr":"{\n \"data\": \"\",\n \"statusCode\": \"\",\n \"header\": \"\"\n}"},"fail":{"templateStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}}}},{"ruleId":"6a208209-6362-4770-9c38-650f53937898","ruleName":"findpwd","apiName":"request","enable":true,"verifyFail":false,"filterList":[{"propName":"url","propRegString":"https://api/user/forget-password","filterId":"05e43fde-e9e0-4aea-b4ef-1c3bcfbe6f64","matchType":"regExp"}],"returnConfig":{"returnType":"succ","generateType":"manual","manual":{"succ":{"resStr":"{\n \"data\": \"\",\n \"statusCode\": \"200\",\n \"header\": \"\"\n}"},"fail":{"resStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}},"template":{"succ":{"templateStr":"{\n \"data\": \"\",\n \"statusCode\": \"\",\n \"header\": \"\"\n}"},"fail":{"templateStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}}}},{"ruleId":"0f0ce828-5b60-4891-9bd1-5084abd96232","ruleName":"created_lesson","apiName":"request","enable":true,"verifyFail":false,"filterList":[{"propName":"url","propRegString":"https://api/lesson/user","filterId":"d92a387a-aa71-4e70-9519-758cf5327704","matchType":"string"}],"returnConfig":{"returnType":"succ","generateType":"manual","manual":{"succ":{"resStr":"{\n \"data\": {\n \"lesson_list\": [\n {\n \"lesson\": {\n \"lesson_id\":\"01\",\n \"lesson_name\": \"农业大数据\",\n \"created_at\": \"王老师\",\n \"class_name_list\": [\n {\n \"class_name\": \"数据191\"\n },\n {\n \"class_name\": \"数据192\"\n }\n ]\n }\n },\n {\n \"lesson\": {\n \"lesson_id\":\"02\",\n \"lesson_name\": \"大数据应用\",\n \"created_at\": \"张老师\",\n \"class_name_list\": [\n {\n \"class_name\": \"计科191\"\n },\n {\n \"class_name\": \"计科192\"\n }\n ]\n }\n }\n ]\n },\n \"statusCode\": \"\",\n \"header\": \"\"\n}"},"fail":{"resStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}},"template":{"succ":{"templateStr":"{\n \"data\": \"\",\n \"statusCode\": \"\",\n \"header\": \"\"\n}"},"fail":{"templateStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}}}},{"ruleId":"7842cb83-e767-4149-b03e-10203be385f2","ruleName":"add_lesson","apiName":"request","enable":true,"verifyFail":false,"filterList":[{"propName":"url","propRegString":"https://api/lesson","filterId":"af7eecb7-6f52-4dc9-8ecb-28ed61f87938","matchType":"string"}],"returnConfig":{"returnType":"succ","generateType":"manual","manual":{"succ":{"resStr":"{\n \"data\": \"\",\n \"statusCode\": \"200\",\n \"header\": \"\"\n}"},"fail":{"resStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}},"template":{"succ":{"templateStr":"{\n \"data\": \"\",\n \"statusCode\": \"\",\n \"header\": \"\"\n}"},"fail":{"templateStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}}}},{"ruleId":"9707b0d9-5564-425c-baa1-f13a1e38033e","ruleName":"login","apiName":"request","enable":true,"verifyFail":false,"filterList":[{"propName":"url","propRegString":"https://api/auth/login","filterId":"c73cdcc3-bd7e-4e49-8d4c-35e95bff585e","matchType":"string"}],"returnConfig":{"returnType":"succ","generateType":"template","manual":{"succ":{"resStr":"{\n \"data\": \"成功\",\n \"statusCode\": \"200\",\n \"header\": \"\"\n}"},"fail":{"resStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}},"template":{"succ":{"templateStr":"{\n \"data\":{\n \"token\": \"\",\n \"userInfo\": {\n \"phone\": \"15090388081\",\n \"email\": \"2921455327@qq.com\",\n \"role\": 1,\n \"class_id\": \"01\",\n \"real_name\": \"史勇喆\",\n \"class_name\": \"数据191\",\n }\n },\n \"statusCode\": \"200\",\n \"header\": \"\"\n}"},"fail":{"templateStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}}}},{"ruleId":"16b7f2ee-bc59-4166-8da1-596cec0d62a3","ruleName":"register","apiName":"request","enable":true,"verifyFail":false,"filterList":[{"propName":"url","propRegString":"https://api/auth/register","filterId":"1fa8af67-15cf-463b-8156-0f9d0afe5631","matchType":"string"}],"returnConfig":{"returnType":"succ","generateType":"template","manual":{"succ":{"resStr":"{\n \"code\": \"200\",\n \"message\": \"\",\n \"data\": {}\n}"},"fail":{"resStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}},"template":{"succ":{"templateStr":"{\n \"data\": \"\",\n \"statusCode\": \"200\",\n \"header\": \"\"\n}"},"fail":{"templateStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}}}}]}}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化