{"id":13671811,"url":"https://github.com/duxianwei520/react","last_synced_at":"2025-05-14T08:09:04.498Z","repository":{"id":37335499,"uuid":"75396575","full_name":"duxianwei520/react","owner":"duxianwei520","description":" React+webpack+redux+ant design+axios+less全家桶后台管理框架","archived":false,"fork":false,"pushed_at":"2024-06-20T19:02:50.000Z","size":2836,"stargazers_count":5145,"open_issues_count":24,"forks_count":1774,"subscribers_count":197,"default_branch":"master","last_synced_at":"2025-04-09T02:17:40.483Z","etag":null,"topics":["ant-design-pro","antd","babel","es6","es7","react","redux","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/duxianwei520.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-02T13:08:43.000Z","updated_at":"2025-04-08T16:34:42.000Z","dependencies_parsed_at":"2024-09-29T06:19:02.875Z","dependency_job_id":null,"html_url":"https://github.com/duxianwei520/react","commit_stats":{"total_commits":32,"total_committers":7,"mean_commits":4.571428571428571,"dds":0.40625,"last_synced_commit":"314b0d6db29f6c6201a11f4851bc0a82c7b48fd6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duxianwei520%2Freact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duxianwei520%2Freact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duxianwei520%2Freact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duxianwei520%2Freact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duxianwei520","download_url":"https://codeload.github.com/duxianwei520/react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101558,"owners_count":22014908,"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":["ant-design-pro","antd","babel","es6","es7","react","redux","webpack"],"created_at":"2024-08-02T09:01:19.370Z","updated_at":"2025-05-14T08:08:59.490Z","avatar_url":"https://github.com/duxianwei520.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![CircleCI branch](https://img.shields.io/circleci/project/github/duxianwei520/react/master.svg?style=flat-square)](https://circleci.com/gh/duxianwei520/react)\n[![GitHub forks](https://img.shields.io/github/forks/duxianwei520/react.svg)](https://github.com/duxianwei520/react/network)\n[![GitHub stars](https://img.shields.io/github/stars/duxianwei520/react.svg)](https://github.com/duxianwei520/react/stargazers)\n[![GitHub issues](https://img.shields.io/github/issues/duxianwei520/react.svg)](https://github.com/duxianwei520/react/issues)\n[![GitHub license](https://img.shields.io/github/license/duxianwei520/react.svg)](https://github.com/duxianwei520/react/blob/master/LICENSE)\n[![Coverage Status](https://coveralls.io/repos/github/duxianwei520/react/badge.svg)](https://coveralls.io/github/duxianwei520/react)\n\n## 项目技术栈\n\nnode10.15.3 + react@16.12.0 + redux@3.7.2 + react-router@3.2.0 + webpack@4.41.2 + axios@0.19.0 + less@2.7.1 + antd@3.25.2\n\n## 交流\nQQ群：159697743\n\n## 项目运行\n\n\n```\ngit clone --depth 1 https://github.com/duxianwei520/react.git  \n\ncd react (进入项目)\n\nnpm install (安装依赖包)\n\nnpm start (启动服务)\n\n```\n\n### 如果有小伙伴因为网络原因npm包下载不下来，那么可以最好挂在一个vpn之类的去下载，cnpm不靠谱，不推荐使用\n\n\n## screenshots\n\n\n### login\n\n\u003cimg src=\"https://github.com/duxianwei520/resource/blob/master/react/screenshots/login.gif\" width=\"973\" height=\"557\"/\u003e\n\n### echart\n\n\u003cimg src=\"https://github.com/duxianwei520/resource/blob/master/react/screenshots/echart.gif\" width=\"973\" height=\"557\"/\u003e\n\n\n### set center\n\n\u003cimg src=\"https://github.com/duxianwei520/resource/blob/master/react/screenshots/set.gif\" width=\"973\" height=\"557\"/\u003e\n\n\n### webpack bundle analysis\n\n\u003cimg src=\"https://github.com/duxianwei520/resource/blob/master/react/screenshots/analysis.gif\" width=\"973\" height=\"557\"/\u003e\n\n### build dist folder\n\n\u003cimg src=\"https://github.com/duxianwei520/resource/blob/master/react/screenshots/dist.gif\" width=\"973\" height=\"557\"/\u003e\n\n\n最后的构建命令\n```\nnpm run build (正式环境的打包部署)\nnpm run testing (测试环境的打包部署命令，可以根据具体需求自行配置修改)\n\n```\n\n服务端返回的数据格式也是标准的json，如下所示\n\n```\n{\n  data: {\n    totalCount: 100,\n    currentPage: 1,\n    pageSize: 10,\n    'list': [\n    ],\n  },\n  msg: '',\n  status: 1,\n}\n\n```\n所有异步请求返回都会经过configs里面的ajax.js做处理，如果请求没有任何问题，那status返回值是1；\n如果请求错误，比如说参数错误或者其他报错之类的，那status返回值就是0；\n如果status值是-1，表示登录超时，那么就会跳出登录。\n这些参数都可以根据实际情况进行调整，报错或者成功的提示信息放在msg里面返回。\n当前项目集成了完整的用户管理、角色管理、模块管理等基本的权限管理功能，小伙伴们一定要同时启动npm run mock才可以看到噢\n\n这个react的项目我有在跟nodejs的express框架配合做接口的开发，可以不靠后端输出数据库真实的数据，仓库地址在\n\n```\nhttps://github.com/duxianwei520/express\n\n```\n还有一个原生的nodejs版本的，仓库库地址是\n\n```\nhttps://github.com/duxianwei520/node\n\n```\n基本功能差不多，目前实现了注册登录以及获取用户信息等3个接口的真实api\n\n\n## 说明\n\n\u003e  如有问题请直接在 Issues 中提，或者您发现问题并有非常好的解决方案，欢迎 PR 👍\n\n### 大部分人项目启动不起来的原因，绝大部分的情况都是npm依赖包安装的时候有些依赖包没有下载完全，当前的demo肯定是可以跑起来的\n\n### 取消http请求示例：\n```\nimport axios from 'axios'\nconst axiosHandle = axios.CancelToken.source()\n\nlogin(){\n  this.props.dispatch(fetchLogin(values, (res) =\u003e {},(error)=\u003e{},axiosHandle)\n  取消请求的操作\n  setTimeout(() =\u003e {\n    axiosHandle.cancel('手动取消。')\n  }, 3000)\n}\n\n```\n\n\n## 功能一览\n- [√] 登录，以及登录权限控制\n- [√] 项目公用npm模块dll化\n- [√] redux完整示范\n- [√] mockjs模拟后端返回接口\n- [√] axios异步请求跨域的设置\n- [√] 实时的webpack包大小预览,方便优化\n- [√] draftjs编辑器\n- [√] cypress自动化测试\n\n\n\n## License\n\n[MIT](https://github.com/duxianwei520/react/blob/master/LICENSE)\n\n\n## 交流\n想跟其他的使用react的小伙伴们交流的话，可以加入我创建的reactQQ群：159697743","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduxianwei520%2Freact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduxianwei520%2Freact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduxianwei520%2Freact/lists"}