{"id":15485837,"url":"https://github.com/licoy/logic-axios","last_synced_at":"2025-07-01T09:08:22.984Z","repository":{"id":57677541,"uuid":"472603890","full_name":"Licoy/logic-axios","owner":"Licoy","description":"a logic axios request encapsulation","archived":false,"fork":false,"pushed_at":"2022-03-22T07:24:55.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T20:55:59.784Z","etag":null,"topics":["axios","easy","http","logic-axios","request","simple"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/logic-axios","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Licoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-22T03:39:59.000Z","updated_at":"2022-03-22T05:26:17.000Z","dependencies_parsed_at":"2022-09-10T18:20:15.937Z","dependency_job_id":null,"html_url":"https://github.com/Licoy/logic-axios","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Licoy/logic-axios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Licoy%2Flogic-axios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Licoy%2Flogic-axios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Licoy%2Flogic-axios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Licoy%2Flogic-axios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Licoy","download_url":"https://codeload.github.com/Licoy/logic-axios/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Licoy%2Flogic-axios/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933327,"owners_count":23386785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axios","easy","http","logic-axios","request","simple"],"created_at":"2024-10-02T06:03:39.324Z","updated_at":"2025-07-01T09:08:22.959Z","avatar_url":"https://github.com/Licoy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 简介\n\n一个基于业务思考封装的`axios`依赖包。\n\n## 安装\n\n### npm\n\n```shell\nnpm i logic-axios\n```\n\n### yarn\n\n```shell\nyarn add logic-axios\n```\n\n## 使用\n\n### 创建实例\n\n```js\nimport {createLogicAxios} from \"logic-axios\";\n\nconst logicAxios = createLogicAxios('http://localhost:8080');\n```\n\n### 发起请求\n\n```js\nconst {data} = await logicAxios.get(\"/user/info\");\nconsole.log(data)\n```\n\n### 分页查询\n\n```js\nconst page = await logicAxios.page(\"/users\", {page: 1, pageSize: 10});\nconsole.log(page.records)\n```\n\n提示：分页的格式对应于`MybatisPlus`框架的分页响应结构，其定义为：[IPage.java](\nhttps://github.com/baomidou/mybatis-plus/blob/3.0/mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/IPage.java)\n\n## 开源协议\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flicoy%2Flogic-axios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flicoy%2Flogic-axios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flicoy%2Flogic-axios/lists"}