Skip to content

一个简单的基于 Ant Design 和 umi 的 react 电商后台管理平台。

Notifications You must be signed in to change notification settings

lightzhu/Sale-Admin

Repository files navigation

基于 Ant Design 和 umi 的 react 电商后台管理平台

This project is initialized with Ant Design Pro.

一个简单的电商商品管理后台。

发不到 github page

修改 config,添加

  history: 'hash', // 使用hash模式,默认是browser
  base: '/Sale-Admin/', // 指定跟路径
  publicPath: '/Sale-Admin/', // 指定公共静态资源目录
  // 参考更多:https://pro.ant.design/docs/deploy-cn

前端展示

[特卖商城后台管理] http://www.2048888.xyz/sale-admin/


[国内资源加速] https://lightzhu.gitee.io/sale-admin

Environment Prepare

Install node_modules:

npm install

or

yarn

解决一些安装报错

npm install --no-optional

Provided Scripts

Ant Design Pro provides some useful script to help you quick start and build with web project, code style check and test.

Scripts provided in package.json. It's safe to modify or add additional script:

Start project

npm start

Build project

npm run build

Check code style

npm run lint

You can also use script to auto fix some lint error:

npm run lint:fix

Test code

npm test

More

  • dva 的 connect 方法中使用到了 dva-loading,会自动在 reducers 中的 state 新增了 loading 对象,

  • 请求前:global 为 false,effects 和 models 为空对象 laoding: { effects: {} global: false models: {} }

  • 请求中: global 为 true; effects 的 key 为 dispatch 的 type 值,value 为 true; models 的 key 为 namespace 值,value 为 true

  • loading: { effects: {users/user/fetch: true} global: true models: {users: true} }

  • 请求完成: global 为 false; effects 的 key 为 dispatch 的 type 值,value 为 false; models 的 key 为 namespace 值,value false;

  • loading: { effects: {users/user/fetch: false} global: false models: {users: false} }

About

一个简单的基于 Ant Design 和 umi 的 react 电商后台管理平台。

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published