├── .gitignore
├── React从入门到实战
├── 9.React Hook新特性
│ └── code
│ │ └── react-hook-demo
│ │ ├── README.md
│ │ ├── public
│ │ ├── robots.txt
│ │ └── manifest.json
│ │ ├── .gitignore
│ │ └── src
│ │ └── components
│ │ └── Demo13
│ │ └── MainPage.jsx
├── 13.React UmiJS框架
│ └── code
│ │ ├── umi-create-app
│ │ ├── mock
│ │ │ └── .gitkeep
│ │ ├── .env
│ │ ├── .eslintrc
│ │ ├── src
│ │ │ ├── locales
│ │ │ │ ├── zh-CN.js
│ │ │ │ └── en-US.js
│ │ │ ├── global.css
│ │ │ ├── assets
│ │ │ │ └── yay.jpg
│ │ │ ├── app.js
│ │ │ ├── components
│ │ │ │ └── loading.jsx
│ │ │ ├── layouts
│ │ │ │ ├── index.js
│ │ │ │ ├── index.css
│ │ │ │ └── __tests__
│ │ │ │ │ └── index.test.js
│ │ │ ├── pages
│ │ │ │ ├── news
│ │ │ │ │ └── $news.jsx
│ │ │ │ ├── ucenter
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── index.css
│ │ │ │ ├── __tests__
│ │ │ │ │ └── index.test.js
│ │ │ │ ├── index.js
│ │ │ │ └── user
│ │ │ │ │ └── index.jsx
│ │ │ └── models
│ │ │ │ └── user.js
│ │ ├── .prettierignore
│ │ ├── .prettierrc
│ │ ├── webpack.config.js
│ │ ├── .editorconfig
│ │ └── .gitignore
│ │ ├── umi-hello-demo
│ │ └── pages
│ │ │ ├── .umi
│ │ │ ├── umiExports.ts
│ │ │ ├── polyfills.js
│ │ │ └── history.js
│ │ │ ├── index.css
│ │ │ ├── user
│ │ │ ├── index.css
│ │ │ └── index.js
│ │ │ └── index.js
│ │ ├── umi-create-demo
│ │ ├── .eslintignore
│ │ ├── src
│ │ │ ├── e2e
│ │ │ │ ├── __mocks__
│ │ │ │ │ └── antd-pro-merge-less.js
│ │ │ │ └── topMenu.e2e.js
│ │ │ ├── layouts
│ │ │ │ └── BlankLayout.jsx
│ │ │ ├── pages
│ │ │ │ ├── user
│ │ │ │ │ └── login
│ │ │ │ │ │ └── components
│ │ │ │ │ │ └── Login
│ │ │ │ │ │ ├── LoginContext.jsx
│ │ │ │ │ │ └── LoginSubmit.jsx
│ │ │ │ ├── Welcome.less
│ │ │ │ └── 404.jsx
│ │ │ ├── locales
│ │ │ │ ├── zh-CN
│ │ │ │ │ ├── component.js
│ │ │ │ │ └── pwa.js
│ │ │ │ ├── zh-TW
│ │ │ │ │ ├── component.js
│ │ │ │ │ └── pwa.js
│ │ │ │ ├── en-US
│ │ │ │ │ ├── component.js
│ │ │ │ │ └── pwa.js
│ │ │ │ ├── pt-BR
│ │ │ │ │ ├── component.js
│ │ │ │ │ └── pwa.js
│ │ │ │ ├── zh-TW.js
│ │ │ │ ├── pt-BR.js
│ │ │ │ └── zh-CN.js
│ │ │ ├── services
│ │ │ │ ├── user.js
│ │ │ │ └── login.js
│ │ │ ├── components
│ │ │ │ ├── Authorized
│ │ │ │ │ ├── index.jsx
│ │ │ │ │ ├── Authorized.jsx
│ │ │ │ │ └── AuthorizedRoute.jsx
│ │ │ │ ├── HeaderDropdown
│ │ │ │ │ ├── index.jsx
│ │ │ │ │ └── index.less
│ │ │ │ ├── PageLoading
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── SelectLang
│ │ │ │ │ └── index.less
│ │ │ │ └── NoticeIcon
│ │ │ │ │ └── index.less
│ │ │ ├── manifest.json
│ │ │ └── utils
│ │ │ │ ├── authority.test.js
│ │ │ │ └── Authorized.js
│ │ ├── .prettierrc.js
│ │ ├── .stylelintrc.js
│ │ ├── public
│ │ │ ├── favicon.png
│ │ │ └── icons
│ │ │ │ ├── icon-128x128.png
│ │ │ │ ├── icon-192x192.png
│ │ │ │ └── icon-512x512.png
│ │ ├── mock
│ │ │ └── route.js
│ │ ├── .eslintrc.js
│ │ ├── jsconfig.json
│ │ ├── jest.config.js
│ │ ├── .prettierignore
│ │ ├── jest-puppeteer.config.js
│ │ ├── .editorconfig
│ │ ├── config
│ │ │ └── defaultSettings.js
│ │ ├── tests
│ │ │ └── setupTests.js
│ │ └── .gitignore
│ │ └── react-router-code_split
│ │ ├── src
│ │ ├── index.css
│ │ ├── components
│ │ │ ├── Error.js
│ │ │ ├── Profile.js
│ │ │ ├── Home.js
│ │ │ └── About.js
│ │ ├── index.js
│ │ ├── App.test.js
│ │ └── App.css
│ │ ├── public
│ │ ├── favicon.ico
│ │ └── manifest.json
│ │ ├── README.md
│ │ ├── .gitignore
│ │ └── package.json
├── 8.React 企业级实战项目-宜居
│ └── code
│ │ ├── react-goodlive-stage2-city
│ │ ├── src
│ │ │ ├── utils
│ │ │ │ ├── config.js
│ │ │ │ └── http.js
│ │ │ ├── api
│ │ │ │ ├── index.js
│ │ │ │ └── homehot.js
│ │ │ ├── components
│ │ │ │ └── Swiper
│ │ │ │ │ └── style.less
│ │ │ ├── static
│ │ │ │ ├── fonts
│ │ │ │ │ └── icomoon.ttf
│ │ │ │ ├── images
│ │ │ │ │ └── banner6.png
│ │ │ │ └── fonticon
│ │ │ │ │ └── iconfont.ttf
│ │ │ ├── setupProxy.js
│ │ │ ├── pages
│ │ │ │ ├── City
│ │ │ │ │ └── CurrentCity
│ │ │ │ │ │ └── style.less
│ │ │ │ ├── NotFound
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Life
│ │ │ │ │ └── index.jsx
│ │ │ │ └── Mine
│ │ │ │ │ └── index.jsx
│ │ │ └── index.js
│ │ ├── mock
│ │ │ ├── config.js
│ │ │ └── index.js
│ │ ├── public
│ │ │ ├── favicon.ico
│ │ │ └── manifest.json
│ │ └── config
│ │ │ └── jest
│ │ │ └── cssTransform.js
│ │ ├── react-goodlive-stage6-shopcar
│ │ ├── src
│ │ │ ├── utils
│ │ │ │ ├── config.js
│ │ │ │ └── http.js
│ │ │ ├── components
│ │ │ │ ├── LoadMore
│ │ │ │ │ └── style.less
│ │ │ │ ├── Swiper
│ │ │ │ │ └── style.less
│ │ │ │ ├── Star
│ │ │ │ │ ├── style.less
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Header
│ │ │ │ │ └── style.less
│ │ │ │ └── FootNav
│ │ │ │ │ └── style.less
│ │ │ ├── pages
│ │ │ │ ├── ShopCar
│ │ │ │ │ ├── OrderView
│ │ │ │ │ │ └── style.less
│ │ │ │ │ └── UserView
│ │ │ │ │ │ └── style.less
│ │ │ │ ├── Details
│ │ │ │ │ └── DetailsData
│ │ │ │ │ │ └── CommentView
│ │ │ │ │ │ ├── style.less
│ │ │ │ │ │ └── Item
│ │ │ │ │ │ └── style(1).less
│ │ │ │ ├── NotFound
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Life
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Mine
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Shop
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Search
│ │ │ │ │ ├── SearchHeader
│ │ │ │ │ │ └── style.less
│ │ │ │ │ └── SearchList
│ │ │ │ │ │ └── SeachListView
│ │ │ │ │ │ └── index(1).jsx
│ │ │ │ └── City
│ │ │ │ │ └── HotCity
│ │ │ │ │ └── style.less
│ │ │ ├── constants
│ │ │ │ ├── collect.js
│ │ │ │ ├── city.js
│ │ │ │ └── userinfo.js
│ │ │ ├── static
│ │ │ │ ├── fonts
│ │ │ │ │ └── icomoon.eot
│ │ │ │ ├── images
│ │ │ │ │ └── banner6.png
│ │ │ │ └── fonticon
│ │ │ │ │ ├── iconfont.ttf
│ │ │ │ │ └── iconfont.woff
│ │ │ ├── api
│ │ │ │ ├── comment.js
│ │ │ │ ├── ordercomment.js
│ │ │ │ ├── search.js
│ │ │ │ └── homehot.js
│ │ │ ├── reducers
│ │ │ │ └── index.js
│ │ │ ├── store
│ │ │ │ └── index.js
│ │ │ ├── actions
│ │ │ │ ├── collect.js
│ │ │ │ └── userinfo.js
│ │ │ └── index.js
│ │ ├── README.md
│ │ └── public
│ │ │ └── manifest.json
│ │ ├── react-goodlive-stage5-login
│ │ ├── src
│ │ │ ├── components
│ │ │ │ ├── LoadMore
│ │ │ │ │ └── style.less
│ │ │ │ ├── Swiper
│ │ │ │ │ └── style.less
│ │ │ │ ├── Star
│ │ │ │ │ └── style.less
│ │ │ │ └── FootNav
│ │ │ │ │ └── style.less
│ │ │ ├── constants
│ │ │ │ ├── city.js
│ │ │ │ └── userinfo.js
│ │ │ ├── pages
│ │ │ │ ├── Details
│ │ │ │ │ └── DetailsData
│ │ │ │ │ │ ├── CommentView
│ │ │ │ │ │ ├── style.less
│ │ │ │ │ │ └── index.jsx
│ │ │ │ │ │ └── StoreBuy
│ │ │ │ │ │ └── StoreBuyView
│ │ │ │ │ │ └── style.less
│ │ │ │ ├── City
│ │ │ │ │ ├── CurrentCity
│ │ │ │ │ │ └── style.less
│ │ │ │ │ └── HotCity
│ │ │ │ │ │ └── style.less
│ │ │ │ ├── Mine
│ │ │ │ │ └── index.jsx
│ │ │ │ └── Search
│ │ │ │ │ └── SearchList
│ │ │ │ │ └── SeachListView
│ │ │ │ │ └── index(1).jsx
│ │ │ ├── static
│ │ │ │ ├── fonts
│ │ │ │ │ └── icomoon.ttf
│ │ │ │ ├── images
│ │ │ │ │ ├── banner2.png
│ │ │ │ │ ├── banner3.png
│ │ │ │ │ └── banner6.png
│ │ │ │ └── fonticon
│ │ │ │ │ └── iconfont.woff
│ │ │ ├── api
│ │ │ │ ├── base.js
│ │ │ │ └── details.js
│ │ │ ├── reducers
│ │ │ │ ├── index.js
│ │ │ │ └── colllect.js
│ │ │ ├── store
│ │ │ │ └── index.js
│ │ │ ├── actions
│ │ │ │ └── userinfo.js
│ │ │ └── index.js
│ │ ├── mock
│ │ │ ├── config.js
│ │ │ └── index.js
│ │ └── public
│ │ │ └── manifest.json
│ │ ├── react-goodlive-stage3-search
│ │ ├── src
│ │ │ ├── components
│ │ │ │ ├── LoadMore
│ │ │ │ │ └── style.less
│ │ │ │ └── SearchInput
│ │ │ │ │ └── style.less
│ │ │ ├── pages
│ │ │ │ ├── Search
│ │ │ │ │ ├── SearchList
│ │ │ │ │ │ └── SeachListView
│ │ │ │ │ │ │ ├── style.less
│ │ │ │ │ │ │ └── index.jsx
│ │ │ │ │ └── SearchHeader
│ │ │ │ │ │ └── style.less
│ │ │ │ ├── NotFound
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Life
│ │ │ │ │ └── index.jsx
│ │ │ │ └── City
│ │ │ │ │ └── CurrentCity
│ │ │ │ │ └── index.jsx
│ │ │ ├── static
│ │ │ │ ├── fonts
│ │ │ │ │ ├── icomoon.eot
│ │ │ │ │ ├── icomoon.ttf
│ │ │ │ │ └── icomoon.woff
│ │ │ │ ├── images
│ │ │ │ │ ├── banner4.png
│ │ │ │ │ ├── banner5.png
│ │ │ │ │ └── banner6.png
│ │ │ │ └── fonticon
│ │ │ │ │ └── iconfont.ttf
│ │ │ ├── reducers
│ │ │ │ ├── index.js
│ │ │ │ └── city.js
│ │ │ └── api
│ │ │ │ └── homehot.js
│ │ ├── mock
│ │ │ └── config.js
│ │ ├── README.md
│ │ ├── public
│ │ │ └── favicon.ico
│ │ └── config
│ │ │ └── jest
│ │ │ └── cssTransform.js
│ │ ├── react-goodlive-stage4-details
│ │ ├── src
│ │ │ ├── components
│ │ │ │ ├── LoadMore
│ │ │ │ │ └── style.less
│ │ │ │ ├── Swiper
│ │ │ │ │ ├── style.less
│ │ │ │ │ └── Pagination
│ │ │ │ │ │ └── style.less
│ │ │ │ ├── SearchInput
│ │ │ │ │ └── style.less
│ │ │ │ └── Star
│ │ │ │ │ └── style.less
│ │ │ ├── constants
│ │ │ │ └── city.js
│ │ │ ├── static
│ │ │ │ ├── fonts
│ │ │ │ │ └── icomoon.eot
│ │ │ │ ├── images
│ │ │ │ │ ├── banner1.png
│ │ │ │ │ ├── banner5.png
│ │ │ │ │ └── banner6.png
│ │ │ │ └── fonticon
│ │ │ │ │ ├── iconfont.eot
│ │ │ │ │ ├── iconfont.ttf
│ │ │ │ │ └── iconfont.woff
│ │ │ ├── reducers
│ │ │ │ ├── index.js
│ │ │ │ └── city.js
│ │ │ ├── api
│ │ │ │ └── index.js
│ │ │ ├── pages
│ │ │ │ ├── NotFound
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Life
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Search
│ │ │ │ │ └── SearchHeader
│ │ │ │ │ │ └── style.less
│ │ │ │ └── City
│ │ │ │ │ └── HotCity
│ │ │ │ │ └── style.less
│ │ │ ├── store
│ │ │ │ └── index.js
│ │ │ ├── actions
│ │ │ │ └── city.js
│ │ │ └── utils
│ │ │ │ └── http.js
│ │ ├── mock
│ │ │ └── config.js
│ │ ├── config
│ │ │ └── jest
│ │ │ │ └── cssTransform.js
│ │ └── .gitignore
│ │ └── react-goodlive-stage1-home
│ │ ├── public
│ │ └── favicon.ico
│ │ ├── src
│ │ ├── components
│ │ │ └── Swiper
│ │ │ │ └── style.less
│ │ ├── static
│ │ │ ├── fonts
│ │ │ │ └── icomoon.ttf
│ │ │ ├── images
│ │ │ │ ├── banner1.png
│ │ │ │ ├── banner2.png
│ │ │ │ ├── banner3.png
│ │ │ │ └── banner4.png
│ │ │ └── fonticon
│ │ │ │ └── iconfont.woff
│ │ ├── pages
│ │ │ └── NotFound
│ │ │ │ └── index.jsx
│ │ ├── index.js
│ │ ├── api
│ │ │ └── homehot.js
│ │ └── utils
│ │ │ └── http.js
│ │ ├── config
│ │ └── jest
│ │ │ └── cssTransform.js
│ │ └── .gitignore
├── 11.React TypeScript
│ └── react-ts-stage1
│ │ ├── tsconfig.prod.json
│ │ ├── src
│ │ ├── types
│ │ │ └── index.tsx
│ │ ├── index.css
│ │ ├── constants
│ │ │ └── index.tsx
│ │ ├── store
│ │ │ └── index.tsx
│ │ ├── router
│ │ │ └── AppRouter.tsx
│ │ ├── index.tsx
│ │ ├── components
│ │ │ └── ListView.tsx
│ │ ├── reducers
│ │ │ └── index.tsx
│ │ └── actions
│ │ │ └── index.tsx
│ │ ├── tsconfig.test.json
│ │ ├── TS-React.xmind
│ │ ├── public
│ │ ├── favicon.ico
│ │ └── manifest.json
│ │ ├── images.d.ts
│ │ ├── .gitignore
│ │ └── tslint.json
├── 1.React基础知识
│ └── code
│ │ └── React-Demo
│ │ └── react-demo
│ │ ├── public
│ │ ├── robots.txt
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ └── logo512.png
│ │ └── src
│ │ ├── compose.jsx
│ │ ├── PropsTypeDemo.jsx
│ │ └── RefsAndDOM.jsx
├── 6.React 进阶
│ └── code
│ │ └── react-advance-demo
│ │ ├── public
│ │ ├── robots.txt
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ └── manifest.json
│ │ ├── src
│ │ └── components
│ │ │ ├── Demo5
│ │ │ └── New
│ │ │ │ ├── NewBanner.jsx
│ │ │ │ └── NewChengpin.jsx
│ │ │ ├── Demo1
│ │ │ └── child1.jsx
│ │ │ └── Demo2
│ │ │ └── index.jsx
│ │ └── .gitignore
├── 4.React-Router路由配置
│ └── code
│ │ └── React-Router-Demo
│ │ └── react-router-demo
│ │ ├── src
│ │ ├── components
│ │ │ └── Nav
│ │ │ │ └── style.css
│ │ ├── index.js
│ │ └── pages
│ │ │ ├── Home.jsx
│ │ │ ├── NotFound.jsx
│ │ │ ├── Demo.jsx
│ │ │ ├── UCenter.jsx
│ │ │ └── MineDemo.jsx
│ │ ├── public
│ │ ├── robots.txt
│ │ ├── logo192.png
│ │ └── logo512.png
│ │ └── README.md
├── 3.Fetch 网络请求
│ └── code
│ │ └── React-Fetch-Demo
│ │ └── react-fetch-demo
│ │ ├── public
│ │ ├── robots.txt
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ └── manifest.json
│ │ ├── mock
│ │ └── index.js
│ │ ├── src
│ │ ├── api
│ │ │ └── base.js
│ │ └── utils
│ │ │ └── http.js
│ │ └── setupProxy.js
├── 5.React-Redux基础知识
│ └── code
│ │ └── React-Redux-Demo
│ │ └── react-redux-demo
│ │ ├── public
│ │ ├── robots.txt
│ │ └── manifest.json
│ │ ├── static
│ │ └── images
│ │ │ └── ReactRedux图解.jpg
│ │ ├── .gitignore
│ │ └── src
│ │ └── components
│ │ └── coms
│ │ └── Child.jsx
├── 7.React&Redux实战-登录注册认证
│ └── code
│ │ ├── react-redux-login-stage1-evn
│ │ ├── public
│ │ │ ├── robots.txt
│ │ │ ├── favicon.ico
│ │ │ ├── logo192.png
│ │ │ └── logo512.png
│ │ └── src
│ │ │ ├── reducers
│ │ │ └── auth.js
│ │ │ └── index.js
│ │ ├── react-redux-login-stage13-jwt
│ │ ├── public
│ │ │ └── robots.txt
│ │ ├── server
│ │ │ ├── config.js
│ │ │ ├── package.json
│ │ │ ├── index.js
│ │ │ └── mysql
│ │ │ │ └── index.js
│ │ ├── README.md
│ │ └── src
│ │ │ ├── constants
│ │ │ └── index.js
│ │ │ ├── actions
│ │ │ └── login.js
│ │ │ ├── reducers
│ │ │ └── index.js
│ │ │ └── setupProxy.js
│ │ ├── react-redux-login-stage11-validator
│ │ ├── public
│ │ │ ├── robots.txt
│ │ │ ├── favicon.ico
│ │ │ └── logo512.png
│ │ ├── src
│ │ │ ├── constants
│ │ │ │ └── index.js
│ │ │ ├── reducers
│ │ │ │ └── index.js
│ │ │ ├── setupProxy.js
│ │ │ ├── actions
│ │ │ │ ├── flashMessages.js
│ │ │ │ └── signupActions.js
│ │ │ └── routes.js
│ │ └── server
│ │ │ └── index.js
│ │ ├── react-redux-login-stage12-login
│ │ ├── public
│ │ │ ├── robots.txt
│ │ │ ├── favicon.ico
│ │ │ └── logo192.png
│ │ ├── README.md
│ │ ├── src
│ │ │ ├── constants
│ │ │ │ └── index.js
│ │ │ ├── setupProxy.js
│ │ │ ├── utils
│ │ │ │ └── validations
│ │ │ │ │ └── login.js
│ │ │ └── components
│ │ │ │ └── login
│ │ │ │ └── LoginPage.jsx
│ │ └── server
│ │ │ └── package.json
│ │ ├── react-redux-login-stage3-router
│ │ ├── public
│ │ │ ├── robots.txt
│ │ │ ├── favicon.ico
│ │ │ ├── logo512.png
│ │ │ └── manifest.json
│ │ ├── src
│ │ │ ├── reducers
│ │ │ │ └── auth.js
│ │ │ ├── components
│ │ │ │ └── signup
│ │ │ │ │ └── SignupPage.jsx
│ │ │ └── routes.js
│ │ └── server
│ │ │ ├── routes
│ │ │ └── users.js
│ │ │ └── index.js
│ │ ├── react-redux-login-stage7-client
│ │ ├── public
│ │ │ ├── robots.txt
│ │ │ ├── logo512.png
│ │ │ └── manifest.json
│ │ ├── README.md
│ │ ├── src
│ │ │ ├── reducers
│ │ │ │ └── auth.js
│ │ │ ├── actions
│ │ │ │ └── signupActions.js
│ │ │ └── components
│ │ │ │ └── App.js
│ │ └── server
│ │ │ ├── package.json
│ │ │ └── index.js
│ │ ├── react-redux-login-stage9-validator
│ │ ├── public
│ │ │ ├── robots.txt
│ │ │ ├── logo512.png
│ │ │ └── manifest.json
│ │ ├── README.md
│ │ ├── src
│ │ │ ├── reducers
│ │ │ │ └── auth.js
│ │ │ └── actions
│ │ │ │ ├── signupActions.js
│ │ │ │ └── flashMessages.js
│ │ └── server
│ │ │ ├── package.json
│ │ │ ├── index.js
│ │ │ └── nodemon.json
│ │ ├── react-redux-login-stage14-locastorage
│ │ ├── public
│ │ │ ├── robots.txt
│ │ │ ├── favicon.ico
│ │ │ ├── logo512.png
│ │ │ └── manifest.json
│ │ ├── server
│ │ │ ├── config.js
│ │ │ ├── nodemon.json
│ │ │ └── mysql
│ │ │ │ └── index.js
│ │ ├── README.md
│ │ └── src
│ │ │ ├── constants
│ │ │ └── index.js
│ │ │ ├── reducers
│ │ │ └── auth.js
│ │ │ ├── actions
│ │ │ ├── flashMessages.js
│ │ │ ├── signupActions.js
│ │ │ └── login.js
│ │ │ ├── routes.js
│ │ │ └── components
│ │ │ └── login
│ │ │ └── LoginPage.jsx
│ │ ├── react-redux-login-stage16-login&logout
│ │ ├── public
│ │ │ ├── robots.txt
│ │ │ ├── favicon.ico
│ │ │ ├── logo192.png
│ │ │ └── manifest.json
│ │ ├── README.md
│ │ ├── src
│ │ │ ├── constants
│ │ │ │ └── index.js
│ │ │ ├── reducers
│ │ │ │ ├── index.js
│ │ │ │ └── auth.js
│ │ │ ├── setupProxy.js
│ │ │ ├── utils
│ │ │ │ ├── setAuthorizationToken.js
│ │ │ │ └── validations
│ │ │ │ │ └── login.js
│ │ │ ├── actions
│ │ │ │ └── signupActions.js
│ │ │ └── components
│ │ │ │ └── login
│ │ │ │ └── LoginPage.jsx
│ │ └── server
│ │ │ └── package.json
│ │ ├── react-redux-login-stage17-router
│ │ ├── server
│ │ │ ├── config.js
│ │ │ ├── nodemon.json
│ │ │ └── package.json
│ │ └── src
│ │ │ ├── reducers
│ │ │ └── index.js
│ │ │ ├── setupProxy.js
│ │ │ ├── components
│ │ │ ├── shop
│ │ │ │ └── ShopPage.js
│ │ │ └── App.js
│ │ │ ├── actions
│ │ │ └── flashMessages.js
│ │ │ ├── utils
│ │ │ └── validations
│ │ │ │ └── login.js
│ │ │ └── routes.js
│ │ ├── react-redux-login-stage10-signup
│ │ ├── README.md
│ │ ├── public
│ │ │ ├── logo192.png
│ │ │ └── logo512.png
│ │ ├── src
│ │ │ ├── reducers
│ │ │ │ ├── auth.js
│ │ │ │ └── index.js
│ │ │ ├── setupProxy.js
│ │ │ └── components
│ │ │ │ └── App.js
│ │ └── server
│ │ │ ├── nodemon.json
│ │ │ └── mysql
│ │ │ └── index.js
│ │ ├── react-redux-login-stage15-redux
│ │ ├── README.md
│ │ ├── public
│ │ │ ├── logo192.png
│ │ │ └── logo512.png
│ │ ├── src
│ │ │ ├── constants
│ │ │ │ └── index.js
│ │ │ ├── reducers
│ │ │ │ └── index.js
│ │ │ ├── components
│ │ │ │ └── App.js
│ │ │ └── actions
│ │ │ │ └── signupActions.js
│ │ └── server
│ │ │ ├── package.json
│ │ │ ├── index.js
│ │ │ └── mysql
│ │ │ └── index.js
│ │ ├── react-redux-login-stage4-signup
│ │ ├── README.md
│ │ ├── public
│ │ │ ├── favicon.ico
│ │ │ └── logo512.png
│ │ ├── src
│ │ │ ├── reducers
│ │ │ │ ├── auth.js
│ │ │ │ └── index.js
│ │ │ ├── components
│ │ │ │ └── App.js
│ │ │ └── routes.js
│ │ └── server
│ │ │ ├── routes
│ │ │ └── users.js
│ │ │ ├── index.js
│ │ │ └── nodemon.json
│ │ ├── react-redux-login-stage5-axios
│ │ ├── README.md
│ │ ├── public
│ │ │ └── logo192.png
│ │ ├── src
│ │ │ ├── reducers
│ │ │ │ └── auth.js
│ │ │ └── components
│ │ │ │ └── App.js
│ │ └── server
│ │ │ ├── routes
│ │ │ └── users.js
│ │ │ └── index.js
│ │ ├── react-redux-login-stage6-server
│ │ ├── public
│ │ │ ├── logo512.png
│ │ │ └── manifest.json
│ │ └── src
│ │ │ ├── reducers
│ │ │ └── auth.js
│ │ │ ├── actions
│ │ │ └── signupActions.js
│ │ │ └── routes.js
│ │ ├── react-redux-login-stage8-router
│ │ ├── public
│ │ │ └── logo192.png
│ │ └── src
│ │ │ ├── reducers
│ │ │ └── index.js
│ │ │ ├── setupProxy.js
│ │ │ └── components
│ │ │ └── App.js
│ │ └── react-redux-login-stage2-server
│ │ ├── src
│ │ ├── reducers
│ │ │ └── index.js
│ │ └── App.js
│ │ ├── server
│ │ ├── package.json
│ │ └── nodemon.json
│ │ └── public
│ │ └── manifest.json
├── 2.Antd UI框架
│ └── code
│ │ └── React-Antd-Demo
│ │ └── react-antd-demo
│ │ ├── public
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ └── logo512.png
│ │ ├── README.md
│ │ ├── src
│ │ └── index.js
│ │ ├── config
│ │ └── jest
│ │ │ └── cssTransform.js
│ │ └── .gitignore
└── 12.TypeScript+Node
│ └── code
│ ├── out
│ └── Repo.js
│ └── src
│ └── User.ts
├── Logo.xd
└── react_icon.png
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .idea
3 |
--------------------------------------------------------------------------------
/React从入门到实战/9.React Hook新特性/code/react-hook-demo/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/mock/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-hello-demo/pages/.umi/umiExports.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Logo.xd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/Logo.xd
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/.env:
--------------------------------------------------------------------------------
1 | BROWSER=none
2 | ESLINT=1
3 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/utils/config.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/utils/config.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/react_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/react_icon.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/components/LoadMore/style.less:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/components/LoadMore/style.less:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/components/LoadMore/style.less:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/components/LoadMore/style.less:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/tsconfig.prod.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json"
3 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "eslint-config-umi"
3 | }
4 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/pages/ShopCar/OrderView/style.less:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/.eslintignore:
--------------------------------------------------------------------------------
1 | /lambda/
2 | /scripts
3 | /config
4 | .history
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-hello-demo/pages/index.css:
--------------------------------------------------------------------------------
1 |
2 | .normal {
3 | background: #DA79F2;
4 | }
5 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/e2e/__mocks__/antd-pro-merge-less.js:
--------------------------------------------------------------------------------
1 | export default undefined;
2 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-hello-demo/pages/user/index.css:
--------------------------------------------------------------------------------
1 |
2 | .normal {
3 | background: #AA79F2;
4 | }
5 |
--------------------------------------------------------------------------------
/React从入门到实战/1.React基础知识/code/React-Demo/react-demo/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/6.React 进阶/code/react-advance-demo/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/9.React Hook新特性/code/react-hook-demo/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/src/components/Nav/style.css:
--------------------------------------------------------------------------------
1 | .selected{
2 | color:red;
3 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-hello-demo/pages/.umi/polyfills.js:
--------------------------------------------------------------------------------
1 | import 'core-js';
2 | import 'regenerator-runtime/runtime';
3 |
4 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/locales/zh-CN.js:
--------------------------------------------------------------------------------
1 | export default {
2 | WELCOME_TO_UMI_WORLD: '{name},欢迎光临umi的世界',
3 | };
--------------------------------------------------------------------------------
/React从入门到实战/3.Fetch 网络请求/code/React-Fetch-Demo/react-fetch-demo/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/global.css:
--------------------------------------------------------------------------------
1 | html, body, #root {
2 | height: 100%;
3 | }
4 |
5 | body {
6 | margin: 0;
7 | }
8 |
--------------------------------------------------------------------------------
/React从入门到实战/5.React-Redux基础知识/code/React-Redux-Demo/react-redux-demo/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage1-evn/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage13-jwt/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/locales/en-US.js:
--------------------------------------------------------------------------------
1 | export default {
2 | WELCOME_TO_UMI_WORLD: "{name}, welcome to umi's world",
3 | };
--------------------------------------------------------------------------------
/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage12-login/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage3-router/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage7-client/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage9-validator/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/.prettierignore:
--------------------------------------------------------------------------------
1 | **/*.md
2 | **/*.svg
3 | **/*.ejs
4 | **/*.html
5 | package.json
6 | .umi
7 | .umi-production
8 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage13-jwt/server/config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | jwtSecret:"somesecrtekeyforjsonwebtoken"
3 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage17-router/server/config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | jwtSecret:"somesecrtekeyforjsonwebtoken"
3 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/mock/config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | homehot1:'/homehot1',
3 | homehot2:'/homehot2'
4 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/api/index.js:
--------------------------------------------------------------------------------
1 | import homehot from "./homehot"
2 |
3 | export default{
4 | homehot
5 | }
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/src/types/index.tsx:
--------------------------------------------------------------------------------
1 | export interface IStoreState {
2 | languageName: string;
3 | enthusiasmLevel: number;
4 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/server/config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | jwtSecret:"somesecrtekeyforjsonwebtoken"
3 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/mock/config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | homehot1:'/homehot1',
3 | homehot2:'/homehot2'
4 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/mock/config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | homehot1:'/homehot1',
3 | homehot2:'/homehot2'
4 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/mock/config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | homehot1:'/homehot1',
3 | homehot2:'/homehot2'
4 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/constants/city.js:
--------------------------------------------------------------------------------
1 | export const INIT_CITY = "INIT_CITY"
2 | export const UPDATE_CITY = "UPDATE_CITY"
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/pages/Details/DetailsData/CommentView/style.less:
--------------------------------------------------------------------------------
1 | .comment-list {
2 | padding: 10px;
3 | }
4 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/constants/collect.js:
--------------------------------------------------------------------------------
1 | export const COLLECT = "COLLECT"
2 | export const UNCOLLECT = "UNCOLLECT"
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/tsconfig.test.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/.prettierrc.js:
--------------------------------------------------------------------------------
1 | const fabric = require('@umijs/fabric');
2 |
3 | module.exports = {
4 | ...fabric.prettier,
5 | };
6 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/.stylelintrc.js:
--------------------------------------------------------------------------------
1 | const fabric = require('@umijs/fabric');
2 |
3 | module.exports = {
4 | ...fabric.stylelint,
5 | };
6 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/constants/city.js:
--------------------------------------------------------------------------------
1 | export const INIT_CITY = "INIT_CITY"
2 | export const UPDATE_CITY = "UPDATE_CITY"
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/constants/city.js:
--------------------------------------------------------------------------------
1 | export const INIT_CITY = "INIT_CITY"
2 | export const UPDATE_CITY = "UPDATE_CITY"
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/pages/Details/DetailsData/CommentView/style.less:
--------------------------------------------------------------------------------
1 | .comment-list {
2 | padding: 10px;
3 | }
4 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage10-signup/README.md:
--------------------------------------------------------------------------------
1 | 依赖:
2 | redux react-redux
3 | redux-logger redux-devtools-extension
4 | redux-thunk
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage12-login/README.md:
--------------------------------------------------------------------------------
1 | 依赖:
2 | redux react-redux
3 | redux-logger redux-devtools-extension
4 | redux-thunk
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage13-jwt/README.md:
--------------------------------------------------------------------------------
1 | 依赖:
2 | redux react-redux
3 | redux-logger redux-devtools-extension
4 | redux-thunk
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/README.md:
--------------------------------------------------------------------------------
1 | 依赖:
2 | redux react-redux
3 | redux-logger redux-devtools-extension
4 | redux-thunk
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/README.md:
--------------------------------------------------------------------------------
1 | 依赖:
2 | redux react-redux
3 | redux-logger redux-devtools-extension
4 | redux-thunk
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage5-axios/README.md:
--------------------------------------------------------------------------------
1 | 依赖:
2 | redux react-redux
3 | redux-logger redux-devtools-extension
4 | redux-thunk
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage7-client/README.md:
--------------------------------------------------------------------------------
1 | 依赖:
2 | redux react-redux
3 | redux-logger redux-devtools-extension
4 | redux-thunk
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/pages/Search/SearchList/SeachListView/style.less:
--------------------------------------------------------------------------------
1 | .list-container{
2 | margin-bottom: 50px;
3 | }
4 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/README.md:
--------------------------------------------------------------------------------
1 | 依赖:
2 | redux react-redux
3 | redux-logger redux-devtools-extension
4 | redux-thunk
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/README.md:
--------------------------------------------------------------------------------
1 | 依赖:
2 | redux react-redux
3 | redux-logger redux-devtools-extension
4 | redux-thunk
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage9-validator/README.md:
--------------------------------------------------------------------------------
1 | 依赖:
2 | redux react-redux
3 | redux-logger redux-devtools-extension
4 | redux-thunk
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/constants/userinfo.js:
--------------------------------------------------------------------------------
1 | export const LOGIN_USERINFO = "LOGIN_USERINFO"
2 | export const LOGIN_UPDATE = "LOGIN_UPDATE"
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/TS-React.xmind:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/11.React TypeScript/react-ts-stage1/TS-React.xmind
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/README.md:
--------------------------------------------------------------------------------
1 | 1.支持less的配置
2 | 2.支持REM
3 | 3.路由
4 | 4.icon引入
5 | 5.底部导航
6 | 6.homeheader
7 | 7.轮播图
8 | 8.mock数据处理
9 | 9.网络请求(api)
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/constants/userinfo.js:
--------------------------------------------------------------------------------
1 | export const LOGIN_USERINFO = "LOGIN_USERINFO"
2 | export const LOGIN_UPDATE = "LOGIN_UPDATE"
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/11.React TypeScript/react-ts-stage1/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/6.React 进阶/code/react-advance-demo/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/6.React 进阶/code/react-advance-demo/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/6.React 进阶/code/react-advance-demo/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/6.React 进阶/code/react-advance-demo/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/README.md:
--------------------------------------------------------------------------------
1 | 1.支持less的配置
2 | 2.支持REM
3 | 3.路由
4 | 4.icon引入
5 | 5.底部导航
6 | 6.homeheader
7 | 7.轮播图
8 | 8.mock数据处理
9 | 9.网络请求(api)
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/assets/yay.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/assets/yay.jpg
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/public/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/public/favicon.png
--------------------------------------------------------------------------------
/React从入门到实战/1.React基础知识/code/React-Demo/react-demo/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/1.React基础知识/code/React-Demo/react-demo/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/1.React基础知识/code/React-Demo/react-demo/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/1.React基础知识/code/React-Demo/react-demo/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/1.React基础知识/code/React-Demo/react-demo/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/1.React基础知识/code/React-Demo/react-demo/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/layouts/BlankLayout.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const Layout = ({ children }) => <>{children}>;
4 |
5 | export default Layout;
6 |
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/src/index.css:
--------------------------------------------------------------------------------
1 | @import '~antd/dist/antd.css';
2 | /* @:src ~:根目录 */
3 |
4 | body {
5 | margin: 0;
6 | padding: 0;
7 | font-family: sans-serif;
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage13-jwt/src/constants/index.js:
--------------------------------------------------------------------------------
1 | export const ADD_FLASH_MESSAGE = "ADD_FLASH_MESSAGE"
2 | export const DELETE_FLASH_MESSAGE = 'DELETE_FLASH_MESSAGE'
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/mock/route.js:
--------------------------------------------------------------------------------
1 | export default {
2 | '/api/auth_routes': {
3 | '/form/advanced-form': {
4 | authority: ['admin', 'user'],
5 | },
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/src/constants/index.js:
--------------------------------------------------------------------------------
1 | export const ADD_FLASH_MESSAGE = "ADD_FLASH_MESSAGE"
2 | export const DELETE_FLASH_MESSAGE = 'DELETE_FLASH_MESSAGE'
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage12-login/src/constants/index.js:
--------------------------------------------------------------------------------
1 | export const ADD_FLASH_MESSAGE = "ADD_FLASH_MESSAGE"
2 | export const DELETE_FLASH_MESSAGE = 'DELETE_FLASH_MESSAGE'
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/src/constants/index.js:
--------------------------------------------------------------------------------
1 | export const ADD_FLASH_MESSAGE = "ADD_FLASH_MESSAGE"
2 | export const DELETE_FLASH_MESSAGE = 'DELETE_FLASH_MESSAGE'
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/public/icons/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/public/icons/icon-128x128.png
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/public/icons/icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/public/icons/icon-192x192.png
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/public/icons/icon-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/public/icons/icon-512x512.png
--------------------------------------------------------------------------------
/React从入门到实战/2.Antd UI框架/code/React-Antd-Demo/react-antd-demo/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/2.Antd UI框架/code/React-Antd-Demo/react-antd-demo/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/2.Antd UI框架/code/React-Antd-Demo/react-antd-demo/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/2.Antd UI框架/code/React-Antd-Demo/react-antd-demo/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/2.Antd UI框架/code/React-Antd-Demo/react-antd-demo/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/2.Antd UI框架/code/React-Antd-Demo/react-antd-demo/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/components/Swiper/style.less:
--------------------------------------------------------------------------------
1 | .swiper{
2 | position: relative;
3 | }
4 | .swiper-view{
5 | img{
6 | width: 100%;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/components/Swiper/style.less:
--------------------------------------------------------------------------------
1 | .swiper{
2 | position: relative;
3 | }
4 | .swiper-view{
5 | img{
6 | width: 100%;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/components/Swiper/style.less:
--------------------------------------------------------------------------------
1 | .swiper{
2 | position: relative;
3 | }
4 | .swiper-view{
5 | img{
6 | width: 100%;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/README.md:
--------------------------------------------------------------------------------
1 | project
2 | main.js main.css 400KB
3 | common.js common.css 200KB home.js home.css 30KB
4 | common.js common.css 200KB about.js about.css 15KB
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/pages/user/login/components/Login/LoginContext.jsx:
--------------------------------------------------------------------------------
1 | import { createContext } from 'react';
2 | const LoginContext = createContext({});
3 | export default LoginContext;
4 |
--------------------------------------------------------------------------------
/React从入门到实战/3.Fetch 网络请求/code/React-Fetch-Demo/react-fetch-demo/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/3.Fetch 网络请求/code/React-Fetch-Demo/react-fetch-demo/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/3.Fetch 网络请求/code/React-Fetch-Demo/react-fetch-demo/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/3.Fetch 网络请求/code/React-Fetch-Demo/react-fetch-demo/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/components/Swiper/style.less:
--------------------------------------------------------------------------------
1 | .swiper{
2 | position: relative;
3 | }
4 | .swiper-view{
5 | img{
6 | width: 100%;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/components/Swiper/style.less:
--------------------------------------------------------------------------------
1 | .swiper{
2 | position: relative;
3 | }
4 | .swiper-view{
5 | img{
6 | width: 100%;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/locales/zh-CN/component.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': '展开',
3 | 'component.tagSelect.collapse': '收起',
4 | 'component.tagSelect.all': '全部',
5 | };
6 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/locales/zh-TW/component.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': '展開',
3 | 'component.tagSelect.collapse': '收起',
4 | 'component.tagSelect.all': '全部',
5 | };
6 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage1-evn/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage1-evn/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage1-evn/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage1-evn/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage1-evn/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage1-evn/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/src/components/Error.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const Error = () => {
4 | return (
5 |
404 Page
6 | )
7 | }
8 |
9 | export default Error
10 |
--------------------------------------------------------------------------------
/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage10-signup/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage10-signup/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage10-signup/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage10-signup/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage12-login/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage12-login/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage12-login/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage12-login/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage3-router/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage3-router/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage3-router/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage3-router/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage5-axios/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage5-axios/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage6-server/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage6-server/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage7-client/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage7-client/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage8-router/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage8-router/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/static/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/static/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/src/components/Profile.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const Profile = () => {
4 | return (
5 | Profile
6 | )
7 | }
8 |
9 | export default Profile;
10 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/locales/en-US/component.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': 'Expand',
3 | 'component.tagSelect.collapse': 'Collapse',
4 | 'component.tagSelect.all': 'All',
5 | };
6 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/locales/pt-BR/component.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'component.tagSelect.expand': 'Expandir',
3 | 'component.tagSelect.collapse': 'Diminuir',
4 | 'component.tagSelect.all': 'Todas',
5 | };
6 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage13-jwt/src/actions/login.js:
--------------------------------------------------------------------------------
1 | import axios from "axios"
2 |
3 | export const login = (data) =>{
4 | return dispatch =>{
5 | return axios.post("/api/auth",data)
6 | }
7 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage9-validator/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage9-validator/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/images/banner1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/images/banner1.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/images/banner2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/images/banner2.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/images/banner3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/images/banner3.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/images/banner4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/images/banner4.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/static/images/banner6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/static/images/banner6.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/fonts/icomoon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/fonts/icomoon.eot
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/static/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/static/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/static/images/banner2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/static/images/banner2.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/static/images/banner3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/static/images/banner3.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/static/images/banner6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/static/images/banner6.png
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/images.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.svg'
2 | declare module '*.png'
3 | declare module '*.jpg'
4 | declare module '*.jpeg'
5 | declare module '*.gif'
6 | declare module '*.bmp'
7 | declare module '*.tiff'
8 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage1-evn/src/reducers/auth.js:
--------------------------------------------------------------------------------
1 | const auth = (state = {},action) =>{
2 | switch(action.type){
3 | default:
4 | return state;
5 | }
6 | }
7 |
8 | export default auth;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/public/logo512.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage5-axios/src/reducers/auth.js:
--------------------------------------------------------------------------------
1 | const auth = (state = {},action) =>{
2 | switch(action.type){
3 | default:
4 | return state;
5 | }
6 | }
7 |
8 | export default auth;
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/fonticon/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/static/fonticon/iconfont.woff
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const proxy = require('http-proxy-middleware');
2 |
3 | module.exports = function (app) {
4 | app.use(proxy('/api', { target: 'http://localhost:3002/' }));
5 | };
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/static/fonticon/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/static/fonticon/iconfont.ttf
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/fonts/icomoon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/fonts/icomoon.woff
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/images/banner4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/images/banner4.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/images/banner5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/images/banner5.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/images/banner6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/images/banner6.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/fonts/icomoon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/fonts/icomoon.eot
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/images/banner1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/images/banner1.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/images/banner5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/images/banner5.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/images/banner6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/images/banner6.png
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/static/fonts/icomoon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/static/fonts/icomoon.eot
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/static/images/banner6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/static/images/banner6.png
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/pages/Welcome.less:
--------------------------------------------------------------------------------
1 | @import '~antd/lib/style/themes/default.less';
2 |
3 | .pre {
4 | margin: 12px 0;
5 | padding: 12px 20px;
6 | background: @input-bg;
7 | box-shadow: @card-shadow;
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-hello-demo/pages/.umi/history.js:
--------------------------------------------------------------------------------
1 | // create history
2 | const history = require('umi/lib/createHistory').default({
3 | basename: window.routerBase,
4 | });
5 | window.g_history = history;
6 | export default history;
7 |
--------------------------------------------------------------------------------
/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(, document.getElementById('root'));
6 |
7 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage10-signup/src/reducers/auth.js:
--------------------------------------------------------------------------------
1 | const auth = (state = {},action) =>{
2 | switch(action.type){
3 | default:
4 | return state;
5 | }
6 | }
7 |
8 | export default auth;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/public/favicon.ico
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/public/logo192.png
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage3-router/src/reducers/auth.js:
--------------------------------------------------------------------------------
1 | const auth = (state = {},action) =>{
2 | switch(action.type){
3 | default:
4 | return state;
5 | }
6 | }
7 |
8 | export default auth;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/src/reducers/auth.js:
--------------------------------------------------------------------------------
1 | const auth = (state = {},action) =>{
2 | switch(action.type){
3 | default:
4 | return state;
5 | }
6 | }
7 |
8 | export default auth;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage6-server/src/reducers/auth.js:
--------------------------------------------------------------------------------
1 | const auth = (state = {},action) =>{
2 | switch(action.type){
3 | default:
4 | return state;
5 | }
6 | }
7 |
8 | export default auth;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage7-client/src/reducers/auth.js:
--------------------------------------------------------------------------------
1 | const auth = (state = {},action) =>{
2 | switch(action.type){
3 | default:
4 | return state;
5 | }
6 | }
7 |
8 | export default auth;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage9-validator/src/reducers/auth.js:
--------------------------------------------------------------------------------
1 | const auth = (state = {},action) =>{
2 | switch(action.type){
3 | default:
4 | return state;
5 | }
6 | }
7 |
8 | export default auth;
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/fonticon/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/static/fonticon/iconfont.ttf
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/fonticon/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/fonticon/iconfont.eot
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/fonticon/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/fonticon/iconfont.ttf
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/static/fonticon/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/static/fonticon/iconfont.woff
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/static/fonticon/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/static/fonticon/iconfont.ttf
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 |
6 | ReactDOM.render(, document.getElementById('root'));
7 |
--------------------------------------------------------------------------------
/React从入门到实战/5.React-Redux基础知识/code/React-Redux-Demo/react-redux-demo/static/images/ReactRedux图解.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/5.React-Redux基础知识/code/React-Redux-Demo/react-redux-demo/static/images/ReactRedux图解.jpg
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/src/reducers/auth.js:
--------------------------------------------------------------------------------
1 | const auth = (state = {},action) =>{
2 | switch(action.type){
3 | default:
4 | return state;
5 | }
6 | }
7 |
8 | export default auth;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage2-server/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import auth from "./auth"
3 |
4 | const rootReducer = combineReducers({
5 | auth
6 | })
7 | export default rootReducer
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import auth from "./auth"
3 |
4 | const rootReducer = combineReducers({
5 | auth
6 | })
7 | export default rootReducer
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage8-router/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import auth from "./auth"
3 |
4 | const rootReducer = combineReducers({
5 | auth
6 | })
7 | export default rootReducer
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/fonticon/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/static/fonticon/iconfont.woff
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/static/fonticon/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plter/ReactCourse20191031/HEAD/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/static/fonticon/iconfont.woff
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: [require.resolve('@umijs/fabric/dist/eslint')],
3 | globals: {
4 | ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
5 | page: true,
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/src/constants/index.js:
--------------------------------------------------------------------------------
1 | export const ADD_FLASH_MESSAGE = "ADD_FLASH_MESSAGE"
2 | export const DELETE_FLASH_MESSAGE = 'DELETE_FLASH_MESSAGE'
3 | export const SET_CURRENT_USER = "SET_CURRENT_USER"
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import city from "./city"
3 |
4 | const rootReducers = combineReducers({
5 | city
6 | })
7 |
8 | export default rootReducers
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import city from "./city"
3 |
4 | const rootReducers = combineReducers({
5 | city
6 | })
7 |
8 | export default rootReducers
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-hello-demo/pages/index.js:
--------------------------------------------------------------------------------
1 |
2 | import styles from './index.css';
3 |
4 | export default function() {
5 | return (
6 |
7 |
Page index
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-hello-demo/pages/user/index.js:
--------------------------------------------------------------------------------
1 |
2 | import styles from './index.css';
3 |
4 | export default function() {
5 | return (
6 |
7 |
Page user
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/src/constants/index.js:
--------------------------------------------------------------------------------
1 | export const ADD_FLASH_MESSAGE = "ADD_FLASH_MESSAGE"
2 | export const DELETE_FLASH_MESSAGE = 'DELETE_FLASH_MESSAGE'
3 | export const SET_CURRENT_USER = "SET_CURRENT_USER"
--------------------------------------------------------------------------------
/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/src/pages/Home.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class Home extends React.Component {
4 | render() {
5 | return (
6 | Home
7 | )
8 | }
9 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "emitDecoratorMetadata": true,
4 | "experimentalDecorators": true,
5 | "baseUrl": ".",
6 | "paths": {
7 | "@/*": ["./src/*"]
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/src/pages/NotFound.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | const NotFound = () =>{
4 | return(
5 |
6 | 404页面
7 |
8 | )
9 | }
10 |
11 | export default NotFound
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/mock/index.js:
--------------------------------------------------------------------------------
1 | var express = require("express");
2 | var app = express();
3 | var router = require("./router.js");
4 |
5 | app.use("/api",router);
6 |
7 | app.listen(3002,function(){
8 | console.log(3002);
9 | })
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/mock/index.js:
--------------------------------------------------------------------------------
1 | var express = require("express");
2 | var app = express();
3 | var router = require("./router.js");
4 |
5 | app.use("/api",router);
6 |
7 | app.listen(3002,function(){
8 | console.log(3002);
9 | })
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "trailingComma": "all",
4 | "printWidth": 100,
5 | "overrides": [
6 | {
7 | "files": ".prettierrc",
8 | "options": { "parser": "json" }
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/React从入门到实战/2.Antd UI框架/code/React-Antd-Demo/react-antd-demo/README.md:
--------------------------------------------------------------------------------
1 | ## Antd UI组件库的使用
2 | ## 按需加载
3 | 1.手动按需加载
4 | 2.使用babel-plugin-import完成按需加载
5 |
6 | ### webpack的课程,如果配置es6的转码,需要一个 .babelrc文件
7 | 有效的利用搜索引擎
8 | 1.npm run eject:拉去react的配置文件
9 | 2.遇到的问题:关于文件被修改了,无法运行npm run eject命令
--------------------------------------------------------------------------------
/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/src/pages/Demo.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | const Demo = ({ name }) =>{
4 | return(
5 |
6 | Demo:{ name }
7 |
8 | )
9 | }
10 |
11 | export default Demo
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/pages/ShopCar/UserView/style.less:
--------------------------------------------------------------------------------
1 | .userinfo-container {
2 | background-color: #fff;
3 | padding: 10px;
4 |
5 | p {
6 | line-height: 1.5;
7 | color: #666;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/src/components/Home.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | class Home extends React.Component {
3 | render() {
4 | return (
5 |
6 | Home
7 |
8 | )
9 | }
10 | }
11 |
12 | export default Home
13 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/locales/zh-CN/pwa.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': '当前处于离线状态',
3 | 'app.pwa.serviceworker.updated': '有新内容',
4 | 'app.pwa.serviceworker.updated.hint': '请点击“刷新”按钮或者手动刷新页面',
5 | 'app.pwa.serviceworker.updated.ok': '刷新',
6 | };
7 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/locales/zh-TW/pwa.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': '當前處於離線狀態',
3 | 'app.pwa.serviceworker.updated': '有新內容',
4 | 'app.pwa.serviceworker.updated.hint': '請點擊“刷新”按鈕或者手動刷新頁面',
5 | 'app.pwa.serviceworker.updated.ok': '刷新',
6 | };
7 |
--------------------------------------------------------------------------------
/React从入门到实战/3.Fetch 网络请求/code/React-Fetch-Demo/react-fetch-demo/mock/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express")
2 | const app = express();
3 | const router = require("./router");
4 |
5 | app.use("/",router);
6 |
7 | app.listen(3100,function(){
8 | console.log("serve running at port 3000");
9 | })
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage6-server/src/actions/signupActions.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | export const userSignupRequest = (userData) =>{
4 | // thunk
5 | return dispatch =>{
6 | return axios.post("/api/users",userData)
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage7-client/src/actions/signupActions.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | export const userSignupRequest = (userData) =>{
4 | // thunk
5 | return dispatch =>{
6 | return axios.post("/api/users",userData)
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/2.Antd UI框架/code/React-Antd-Demo/react-antd-demo/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 | // import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
5 |
6 | ReactDOM.render(, document.getElementById('root'));
7 |
8 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage5-axios/server/routes/users.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const router = express.Router();
3 |
4 | router.get("/",(req,res) =>{
5 | res.send({
6 | msg:"Hello"
7 | })
8 | })
9 |
10 | module.exports = router;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage9-validator/src/actions/signupActions.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | export const userSignupRequest = (userData) =>{
4 | // thunk
5 | return dispatch =>{
6 | return axios.post("/api/users",userData)
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/components/SearchInput/style.less:
--------------------------------------------------------------------------------
1 | input.search-input {
2 | font-size: 14px !important;
3 | font-weight: normal;
4 | border: 0;
5 | width: 80%;
6 | color: #333 !important;
7 | padding-left: 5px;
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/components/SearchInput/style.less:
--------------------------------------------------------------------------------
1 | input.search-input {
2 | font-size: 14px !important;
3 | font-weight: normal;
4 | border: 0;
5 | width: 80%;
6 | color: #333 !important;
7 | padding-left: 5px;
8 | }
9 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/app.js:
--------------------------------------------------------------------------------
1 | export const dva = {
2 | config: {
3 | onError(e) {
4 | e.preventDefault();
5 | console.error(e.message);
6 | },
7 | },
8 | plugins: [
9 | require('dva-logger')(),
10 | ],
11 | };
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/components/loading.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class extends React.Component{
4 | render(){
5 | return(
6 |
7 | loading...
8 |
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage3-router/server/routes/users.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const router = express.Router();
3 |
4 | router.get("/",(req,res) =>{
5 | res.send({
6 | msg:"Hello"
7 | })
8 | })
9 |
10 | module.exports = router;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/server/routes/users.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const router = express.Router();
3 |
4 | router.get("/",(req,res) =>{
5 | res.send({
6 | msg:"Hello"
7 | })
8 | })
9 |
10 | module.exports = router;
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/src/components/About.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | class About extends React.Component {
4 |
5 | render() {
6 | return (
7 |
8 | About
9 |
10 | )
11 | }
12 | }
13 |
14 | export default About
15 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage2-server/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | function App() {
4 | return (
5 |
6 |
Hi React Redux Login
7 |
8 | );
9 | }
10 |
11 | export default App;
12 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/pages/City/CurrentCity/style.less:
--------------------------------------------------------------------------------
1 | .current-city {
2 | background-color: #fff;
3 | text-align: center;
4 | padding: 30px 0;
5 | border-bottom: 1px solid #f1f1f1;
6 | h2{
7 | font-size: 20px;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/pages/City/CurrentCity/style.less:
--------------------------------------------------------------------------------
1 | .current-city {
2 | background-color: #fff;
3 | text-align: center;
4 | padding: 30px 0;
5 | border-bottom: 1px solid #f1f1f1;
6 | h2{
7 | font-size: 20px;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/React从入门到实战/1.React基础知识/code/React-Demo/react-demo/src/compose.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class Compose extends React.Component{
4 | render(){
5 | return(
6 |
7 | 哈哈哈:{ this.props.children }
8 |
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/components/Star/style.less:
--------------------------------------------------------------------------------
1 | .star-container {
2 | display: inline-block;
3 |
4 | i {
5 | color: #999;
6 | margin: 0 1.5px;
7 | }
8 |
9 | .light {
10 | color: rgb(233, 32, 61);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage10-signup/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import auth from "./auth"
3 | import flashMessages from "./flashMessages"
4 |
5 | const rootReducer = combineReducers({
6 | auth,
7 | flashMessages
8 | })
9 | export default rootReducer
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage13-jwt/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import auth from "./auth"
3 | import flashMessages from "./flashMessages"
4 |
5 | const rootReducer = combineReducers({
6 | auth,
7 | flashMessages
8 | })
9 | export default rootReducer
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import auth from "./auth"
3 | import flashMessages from "./flashMessages"
4 |
5 | const rootReducer = combineReducers({
6 | auth,
7 | flashMessages
8 | })
9 | export default rootReducer
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage17-router/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import auth from "./auth"
3 | import flashMessages from "./flashMessages"
4 |
5 | const rootReducer = combineReducers({
6 | auth,
7 | flashMessages
8 | })
9 | export default rootReducer
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/components/Star/style.less:
--------------------------------------------------------------------------------
1 | .star-container {
2 | display: inline-block;
3 |
4 | i {
5 | color: #999;
6 | margin: 0 1.5px;
7 | }
8 |
9 | .light {
10 | color: rgb(233, 32, 61);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/components/Star/style.less:
--------------------------------------------------------------------------------
1 | .star-container {
2 | display: inline-block;
3 |
4 | i {
5 | color: #999;
6 | margin: 0 1.5px;
7 | }
8 |
9 | .light {
10 | color: rgb(233, 32, 61);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/React从入门到实战/3.Fetch 网络请求/code/React-Fetch-Demo/react-fetch-demo/src/api/base.js:
--------------------------------------------------------------------------------
1 | const base = {
2 | // http://iwenwiki.com/api/blueberrypai/getChengpinInfo.php
3 | ownUrl:"http://iwenwiki.com",
4 | chengpin:"/api/blueberrypai/getChengpinInfo.php",
5 | login:"/api/blueberrypai/login.php"
6 | }
7 |
8 | export default base
--------------------------------------------------------------------------------
/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/README.md:
--------------------------------------------------------------------------------
1 | ### React-Router
2 | 参考地址:https://reacttraining.com/react-router/web/guides/quick-start
3 |
4 | // 5的版本主要是针对React Hook做更好的支持
5 |
6 | 1.安装
7 | npm install react-router-dom --save
8 |
9 | 2.路由的作用:
10 | 单页面应用(SPA),路由跳转:切换显示视图
11 |
12 | 3.
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import auth from "./auth"
3 | import flashMessages from "./flashMessages"
4 |
5 | const rootReducer = combineReducers({
6 | auth,
7 | flashMessages
8 | })
9 | export default rootReducer
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/api/index.js:
--------------------------------------------------------------------------------
1 | import homehot from "./homehot"
2 | import search from "./search"
3 | import details from "./details"
4 | import comment from "./comment"
5 |
6 | export default{
7 | homehot,
8 | search,
9 | details,
10 | comment
11 | }
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/src/constants/index.tsx:
--------------------------------------------------------------------------------
1 | export const INCREMENT_ENTHUSIASM = 'INCREMENT_ENTHUSIASM';
2 | export type INCREMENT_ENTHUSIASM = typeof INCREMENT_ENTHUSIASM;
3 |
4 |
5 | export const DECREMENT_ENTHUSIASM = 'DECREMENT_ENTHUSIASM';
6 | export type DECREMENT_ENTHUSIASM = typeof DECREMENT_ENTHUSIASM;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import auth from "./auth"
3 | import flashMessages from "./flashMessages"
4 |
5 | const rootReducer = combineReducers({
6 | auth,
7 | flashMessages
8 | })
9 | export default rootReducer
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | testURL: 'http://localhost:8000',
3 | preset: 'jest-puppeteer',
4 | extraSetupFiles: ['./tests/setupTests.js'],
5 | globals: {
6 | ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: false,
7 | localStorage: null,
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/pages/NotFound/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class NotFound extends React.Component{
4 | render(){
5 | return(
6 |
7 | 404...页面飞走了
8 |
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/pages/NotFound/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class NotFound extends React.Component{
4 | render(){
5 | return(
6 |
7 | 404...页面飞走了
8 |
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/pages/NotFound/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class NotFound extends React.Component{
4 | render(){
5 | return(
6 |
7 | 404...页面飞走了
8 |
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/pages/NotFound/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class NotFound extends React.Component{
4 | render(){
5 | return(
6 |
7 | 404...页面飞走了
8 |
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/pages/NotFound/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class NotFound extends React.Component{
4 | render(){
5 | return(
6 |
7 | 404...页面飞走了
8 |
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage3-router/src/components/signup/SignupPage.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class SignupPage extends React.Component{
4 | render(){
5 | return(
6 |
7 | singup page
8 |
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage13-jwt/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const proxy = require('http-proxy-middleware');
2 |
3 | module.exports = function (app) {
4 | app.use(
5 | '/api',
6 | proxy({
7 | target: 'http://localhost:3030',
8 | changeOrigin: true,
9 | })
10 | );
11 | };
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/api/base.js:
--------------------------------------------------------------------------------
1 | const base = {
2 | baseUrl:"http://localhost:3002",
3 | homehot1:"/api/homehot1", //
4 | homehot2:"/api/homehot2",
5 | search:"/api/search",
6 | details:"/api/details",
7 | comment:"/api/comment" // 评论
8 | }
9 |
10 | export default base
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render(, div);
8 | ReactDOM.unmountComponentAtNode(div);
9 | });
10 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage10-signup/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const proxy = require('http-proxy-middleware');
2 |
3 | module.exports = function (app) {
4 | app.use(
5 | '/api',
6 | proxy({
7 | target: 'http://localhost:3030',
8 | changeOrigin: true,
9 | })
10 | );
11 | };
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage12-login/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const proxy = require('http-proxy-middleware');
2 |
3 | module.exports = function (app) {
4 | app.use(
5 | '/api',
6 | proxy({
7 | target: 'http://localhost:3030',
8 | changeOrigin: true,
9 | })
10 | );
11 | };
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage17-router/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const proxy = require('http-proxy-middleware');
2 |
3 | module.exports = function (app) {
4 | app.use(
5 | '/api',
6 | proxy({
7 | target: 'http://localhost:3030',
8 | changeOrigin: true,
9 | })
10 | );
11 | };
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage8-router/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const proxy = require('http-proxy-middleware');
2 |
3 | module.exports = function (app) {
4 | app.use(
5 | '/api',
6 | proxy({
7 | target: 'http://localhost:3030',
8 | changeOrigin: true,
9 | })
10 | );
11 | };
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/api/details.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 详情接口
3 | */
4 |
5 | import base from "./base"
6 | import { getData } from "../utils/http"
7 |
8 | const details = {
9 | detailsData(id){
10 | return getData(base.details+"?id="+id);
11 | }
12 | }
13 |
14 | export default details;
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/api/comment.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 评论接口
3 | */
4 |
5 | import base from "./base"
6 | import { getData } from "../utils/http"
7 |
8 | const comment = {
9 | commentData(id){
10 | return getData(base.comment+"?id="+id);
11 | }
12 | }
13 |
14 | export default comment;
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/layouts/index.js:
--------------------------------------------------------------------------------
1 | import styles from './index.css';
2 |
3 | function BasicLayout(props) {
4 | return (
5 |
6 |
Yay! Welcome to umi!
7 | {props.children}
8 |
9 | );
10 | }
11 |
12 | export default BasicLayout;
13 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/.prettierignore:
--------------------------------------------------------------------------------
1 | **/*.svg
2 | package.json
3 | .umi
4 | .umi-production
5 | /dist
6 | .dockerignore
7 | .DS_Store
8 | .eslintignore
9 | *.png
10 | *.toml
11 | docker
12 | .editorconfig
13 | Dockerfile*
14 | .gitignore
15 | .prettierignore
16 | LICENSE
17 | .eslintcache
18 | *.lock
19 | yarn-error.log
20 | .history
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const proxy = require('http-proxy-middleware');
2 |
3 | module.exports = function (app) {
4 | app.use(
5 | '/api',
6 | proxy({
7 | target: 'http://localhost:3030',
8 | changeOrigin: true,
9 | })
10 | );
11 | };
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const proxy = require('http-proxy-middleware');
2 |
3 | module.exports = function (app) {
4 | app.use(
5 | '/api',
6 | proxy({
7 | target: 'http://localhost:3030',
8 | changeOrigin: true,
9 | })
10 | );
11 | };
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage3-router/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const app = express();
3 | const users = require("./routes/users")
4 | const debug = require("debug")("my-application");
5 |
6 | app.use("/api/users",users);
7 |
8 | app.listen(3030,(req,res) =>{
9 | debug("服务器运行在3030端口上");
10 | })
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const app = express();
3 | const users = require("./routes/users")
4 | const debug = require("debug")("my-application");
5 |
6 | app.use("/api/users",users);
7 |
8 | app.listen(3030,(req,res) =>{
9 | debug("服务器运行在3030端口上");
10 | })
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage5-axios/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const app = express();
3 | const users = require("./routes/users")
4 | const debug = require("debug")("my-application");
5 |
6 | app.use("/api/users",users);
7 |
8 | app.listen(3030,(req,res) =>{
9 | debug("服务器运行在3030端口上");
10 | })
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import AppRouter from "./router/AppRouter"
4 | import "./static/css/common.less"
5 | import "./static/css/font.css"
6 | import "./static/css/iconfont.css"
7 |
8 | ReactDOM.render(, document.getElementById('root'));
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/layouts/index.css:
--------------------------------------------------------------------------------
1 |
2 | .normal {
3 | font-family: Georgia, sans-serif;
4 | text-align: center;
5 | }
6 |
7 | .title {
8 | font-size: 2.5rem;
9 | font-weight: normal;
10 | letter-spacing: -1px;
11 | background: darkslateblue;
12 | padding: .6em 0;
13 | color: white;
14 | margin: 0;
15 | }
16 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/webpack.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 不是真实的 webpack 配置,仅为兼容 webstorm 和 intellij idea 代码跳转
3 | * ref: https://github.com/umijs/umi/issues/1109#issuecomment-423380125
4 | */
5 |
6 | module.exports = {
7 | resolve: {
8 | alias: {
9 | '@': require('path').resolve(__dirname, 'src'),
10 | },
11 | },
12 | };
13 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/jest-puppeteer.config.js:
--------------------------------------------------------------------------------
1 | // ps https://github.com/GoogleChrome/puppeteer/issues/3120
2 | module.exports = {
3 | launch: {
4 | args: [
5 | '--disable-gpu',
6 | '--disable-dev-shm-usage',
7 | '--no-first-run',
8 | '--no-zygote',
9 | '--no-sandbox',
10 | ],
11 | },
12 | };
13 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/locales/en-US/pwa.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': 'You are offline now',
3 | 'app.pwa.serviceworker.updated': 'New content is available',
4 | 'app.pwa.serviceworker.updated.hint': 'Please press the "Refresh" button to reload current page',
5 | 'app.pwa.serviceworker.updated.ok': 'Refresh',
6 | };
7 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage17-router/src/components/shop/ShopPage.js:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class ShopPage extends React.Component{
4 | render(){
5 | return(
6 |
7 |
HI Shop
8 |
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/services/user.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request';
2 | export async function query() {
3 | return request('/api/users');
4 | }
5 | export async function queryCurrent() {
6 | return request('/api/currentUser');
7 | }
8 | export async function queryNotices() {
9 | return request('/api/notices');
10 | }
11 |
--------------------------------------------------------------------------------
/React从入门到实战/3.Fetch 网络请求/code/React-Fetch-Demo/react-fetch-demo/setupProxy.js:
--------------------------------------------------------------------------------
1 | // const proxy = require('http-proxy-middleware');
2 |
3 | // module.exports = function (app) {
4 | // app.use(
5 | // '/api',
6 | // proxy({
7 | // target: 'http://localhost:3100',
8 | // changeOrigin: true,
9 | // })
10 | // );
11 | // };
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
15 | [Makefile]
16 | indent_style = tab
17 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/pages/news/$news.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class News extends React.Component{
4 |
5 | componentDidMount(){
6 | }
7 |
8 | render(){
9 | return(
10 |
11 | News:{ this.props.match.params.news }
12 |
13 | )
14 | }
15 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
15 | [Makefile]
16 | indent_style = tab
17 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage2-server/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start":"nodemon ./index.js"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "express": "^4.17.1"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import city from "./city"
3 | import userinfo from "./userinfo"
4 | import collect from "./colllect"
5 |
6 | const rootReducers = combineReducers({
7 | city,
8 | userinfo,
9 | collect
10 | })
11 |
12 | export default rootReducers
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/api/ordercomment.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 购物车评价接口
3 | */
4 |
5 | import base from "./base"
6 | import { postData } from "../utils/http"
7 |
8 | const orderComment = {
9 | orderCommentData(info){
10 | return postData(base.ordercomment,info);
11 | }
12 | }
13 |
14 | export default orderComment;
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /npm-debug.log*
6 | /yarn-error.log
7 | /yarn.lock
8 | /package-lock.json
9 |
10 | # production
11 | /dist
12 |
13 | # misc
14 | .DS_Store
15 |
16 | # umi
17 | .umi
18 | .umi-production
19 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage5-axios/src/components/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | class App extends React.Component {
4 | render() {
5 | return (
6 |
7 |
Hi React Redux Login
8 |
9 | )
10 | }
11 | }
12 |
13 | export default App;
14 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from "redux"
2 | import city from "./city"
3 | import userinfo from "./userinfo"
4 | import collect from "./colllect"
5 |
6 | const rootReducers = combineReducers({
7 | city,
8 | userinfo,
9 | collect
10 | })
11 |
12 | export default rootReducers
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/src/store/index.tsx:
--------------------------------------------------------------------------------
1 | import { createStore } from 'redux';
2 | import { enthusiasm } from '../reducers/index';
3 | import { composeWithDevTools } from "redux-devtools-extension"
4 |
5 | const store = createStore(enthusiasm, {
6 | enthusiasmLevel: 1,
7 | languageName: 'TypeScript',
8 | },composeWithDevTools());
9 |
10 | export default store
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/services/login.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request';
2 | export async function fakeAccountLogin(params) {
3 | return request('/api/login/account', {
4 | method: 'POST',
5 | data: params,
6 | });
7 | }
8 | export async function getFakeCaptcha(mobile) {
9 | return request(`/api/login/captcha?mobile=${mobile}`);
10 | }
11 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage10-signup/src/components/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | class App extends React.Component {
4 | render() {
5 | return (
6 |
7 |
Hi React Redux Login
8 |
9 | )
10 | }
11 | }
12 |
13 | export default App;
14 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/src/components/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | class App extends React.Component {
4 | render() {
5 | return (
6 |
7 |
Hi React Redux Login
8 |
9 | )
10 | }
11 | }
12 |
13 | export default App;
14 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage17-router/src/components/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | class App extends React.Component {
4 | render() {
5 | return (
6 |
7 |
Hi React Redux Login
8 |
9 | )
10 | }
11 | }
12 |
13 | export default App;
14 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/src/components/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | class App extends React.Component {
4 | render() {
5 | return (
6 |
7 |
Hi React Redux Login
8 |
9 | )
10 | }
11 | }
12 |
13 | export default App;
14 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage7-client/src/components/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | class App extends React.Component {
4 | render() {
5 | return (
6 |
7 |
Hi React Redux Login
8 |
9 | )
10 | }
11 | }
12 |
13 | export default App;
14 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage8-router/src/components/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | class App extends React.Component {
4 | render() {
5 | return (
6 |
7 |
Hi React Redux Login
8 |
9 | )
10 | }
11 | }
12 |
13 | export default App;
14 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/locales/pt-BR/pwa.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'app.pwa.offline': 'Você está offline agora',
3 | 'app.pwa.serviceworker.updated': 'Novo conteúdo está disponível',
4 | 'app.pwa.serviceworker.updated.hint':
5 | 'Por favor, pressione o botão "Atualizar" para recarregar a página atual',
6 | 'app.pwa.serviceworker.updated.ok': 'Atualizar',
7 | };
8 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/store/index.js:
--------------------------------------------------------------------------------
1 | import { createStore } from "redux"
2 | import rootReducers from "../reducers"
3 |
4 | export default function configureStore(){
5 | const store = createStore(rootReducers,
6 | window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() :undefined
7 | );
8 | return store;
9 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/store/index.js:
--------------------------------------------------------------------------------
1 | import { createStore } from "redux"
2 | import rootReducers from "../reducers"
3 |
4 | export default function configureStore(){
5 | const store = createStore(rootReducers,
6 | window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() :undefined
7 | );
8 | return store;
9 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/store/index.js:
--------------------------------------------------------------------------------
1 | import { createStore } from "redux"
2 | import rootReducers from "../reducers"
3 |
4 | export default function configureStore(){
5 | const store = createStore(rootReducers,
6 | window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() :undefined
7 | );
8 | return store;
9 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/pages/Life/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import FootNav from "../../components/FootNav"
3 |
4 | export default class Life extends React.Component{
5 | render(){
6 | return(
7 |
8 | Life
9 |
10 |
11 | )
12 | }
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/pages/Mine/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import FootNav from "../../components/FootNav"
3 |
4 | export default class Mine extends React.Component{
5 | render(){
6 | return(
7 |
8 | Mine
9 |
10 |
11 | )
12 | }
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/api/search.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 搜索接口
3 | */
4 |
5 | import base from "./base"
6 | import { getData } from "../utils/http"
7 |
8 | const search = {
9 | searchData(city,content,page){
10 | return getData(base.search+"?city="+city+"&content="+content+"&page="+page);
11 | }
12 | }
13 |
14 | export default search;
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/components/Authorized/index.jsx:
--------------------------------------------------------------------------------
1 | import Authorized from './Authorized';
2 | import Secured from './Secured';
3 | import check from './CheckPermissions';
4 | import renderAuthorize from './renderAuthorize';
5 | Authorized.Secured = Secured;
6 | Authorized.check = check;
7 | const RenderAuthorize = renderAuthorize(Authorized);
8 | export default RenderAuthorize;
9 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/pages/Life/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import FootNav from "../../components/FootNav"
3 |
4 | export default class Life extends React.Component{
5 | render(){
6 | return(
7 |
8 | Life
9 |
10 |
11 | )
12 | }
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/pages/Life/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import FootNav from "../../components/FootNav"
3 |
4 | export default class Life extends React.Component{
5 | render(){
6 | return(
7 |
8 | Life
9 |
10 |
11 | )
12 | }
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/pages/Mine/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import FootNav from "../../components/FootNav"
3 |
4 | export default class Mine extends React.Component{
5 | render(){
6 | return(
7 |
8 | Mine
9 |
10 |
11 | )
12 | }
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/pages/Life/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import FootNav from "../../components/FootNav"
3 |
4 | export default class Life extends React.Component{
5 | render(){
6 | return(
7 |
8 | Life
9 |
10 |
11 | )
12 | }
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/pages/Mine/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import FootNav from "../../components/FootNav"
3 |
4 | export default class Mine extends React.Component{
5 | render(){
6 | return(
7 |
8 | Mine
9 |
10 |
11 | )
12 | }
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/pages/Shop/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import FootNav from "../../components/FootNav"
3 |
4 | export default class Shop extends React.Component{
5 | render(){
6 | return(
7 |
8 | Shop
9 |
10 |
11 | )
12 | }
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/pages/ucenter/index.jsx:
--------------------------------------------------------------------------------
1 | import dynamic from 'umi/dynamic';
2 |
3 | const delay = (timeout) => new Promise(resolve => setTimeout(resolve, timeout));
4 | const UCenter = dynamic({
5 | loader: async function () {
6 | await delay(/* 1s */3000);
7 | return () => I will render after 1s
;
8 | },
9 | });
10 |
11 | export default UCenter
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/actions/city.js:
--------------------------------------------------------------------------------
1 | import * as cityActions from "../constants/city"
2 |
3 | export function initCity(data){
4 | return{
5 | type:cityActions.INIT_CITY,
6 | data
7 | }
8 | }
9 |
10 | export function updateCity(data){
11 | return{
12 | type:cityActions.UPDATE_CITY,
13 | data
14 | }
15 | }
--------------------------------------------------------------------------------
/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/src/pages/UCenter.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | const UCenter = (props) =>{
4 | // http://localhost:3000/#/mine/ucenter/1001
5 | console.log(props);
6 | return(
7 |
8 | Hello UCenter:{ props.match.params.id } - { props.match.params.name }
9 |
10 | )
11 | }
12 |
13 | export default UCenter
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/pages/City/CurrentCity/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import "./style.less"
3 |
4 | export default class CurrentCity extends React.Component{
5 | render(){
6 | return(
7 |
8 |
当前城市:{ this.props.city }
9 |
10 | )
11 | }
12 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/src/utils/setAuthorizationToken.js:
--------------------------------------------------------------------------------
1 | import axios from "axios"
2 |
3 | const setAuthorizationToken = (token) =>{
4 | if(token){
5 | axios.defaults.headers.common['Authorization'] = `Iwen ${token}`;
6 | }else{
7 | delete axios.defaults.headers.common["Authorization"]
8 | }
9 | }
10 |
11 | export default setAuthorizationToken
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/api/homehot.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 首页热门和推荐接口
3 | */
4 |
5 | import base from "./base"
6 | import { getData } from "../utils/http"
7 |
8 | const homehot = {
9 | homehot1Data(){
10 | return getData(base.homehot1);
11 | },
12 | homehot2Data(){
13 | return getData(base.homehot2);
14 | }
15 | }
16 |
17 | export default homehot;
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/actions/userinfo.js:
--------------------------------------------------------------------------------
1 | import * as userActions from "../constants/userinfo"
2 |
3 | export function loginUser(data){
4 | return{
5 | type:userActions.LOGIN_USERINFO,
6 | data
7 | }
8 | }
9 |
10 | export function updateUser(data){
11 | return{
12 | type:userActions.LOGIN_UPDATE,
13 | data
14 | }
15 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/actions/collect.js:
--------------------------------------------------------------------------------
1 | import * as collectActinos from "../constants/collect"
2 |
3 | export function setCollect(data){
4 | return{
5 | type:collectActinos.COLLECT,
6 | data
7 | }
8 | }
9 |
10 | export function cancelCollect(data){
11 | return{
12 | type:collectActinos.UNCOLLECT,
13 | data
14 | }
15 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/actions/userinfo.js:
--------------------------------------------------------------------------------
1 | import * as userActions from "../constants/userinfo"
2 |
3 | export function loginUser(data){
4 | return{
5 | type:userActions.LOGIN_USERINFO,
6 | data
7 | }
8 | }
9 |
10 | export function updateUser(data){
11 | return{
12 | type:userActions.LOGIN_UPDATE,
13 | data
14 | }
15 | }
--------------------------------------------------------------------------------
/React从入门到实战/12.TypeScript+Node/code/out/Repo.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var Repo = /** @class */ (function () {
4 | function Repo(repo) {
5 | this.name = repo.name;
6 | this.size = repo.size;
7 | this.language = repo.language;
8 | this.description = repo.description;
9 | }
10 | return Repo;
11 | }());
12 | exports.Repo = Repo;
13 |
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier"],
3 | "rules":{
4 | "no-console":false,
5 | "ordered-imports":false,
6 | "max-line-length":false
7 | },
8 | "linterOptions": {
9 | "exclude": [
10 | "config/**/*.js",
11 | "node_modules/**/*.ts",
12 | "coverage/lcov-report/*.js"
13 | ]
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/src/router/AppRouter.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 | import { Route,HashRouter } from "react-router-dom"
3 | import App from "../App"
4 |
5 | export default class AppRouter extends React.Component{
6 | public render(){
7 | return(
8 |
9 |
10 |
11 | )
12 | }
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage7-client/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "nodemon ./index.js"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "express": "^4.17.1",
13 | "lodash": "^4.17.15",
14 | "validator": "^11.1.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage9-validator/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "nodemon ./index.js"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "express": "^4.17.1",
13 | "lodash": "^4.17.15",
14 | "validator": "^11.1.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/src/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import * as ReactDOM from 'react-dom';
3 | import AppRouter from './router/AppRouter';
4 | import './index.css';
5 |
6 | import { Provider } from "react-redux"
7 | import store from "./store"
8 |
9 | ReactDOM.render(
10 |
11 |
12 | ,
13 | document.getElementById('root') as HTMLElement
14 | );
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/components/HeaderDropdown/index.jsx:
--------------------------------------------------------------------------------
1 | import { Dropdown } from 'antd';
2 | import React from 'react';
3 | import classNames from 'classnames';
4 | import styles from './index.less';
5 |
6 | const HeaderDropdown = ({ overlayClassName: cls, ...restProps }) => (
7 |
8 | );
9 |
10 | export default HeaderDropdown;
11 |
--------------------------------------------------------------------------------
/React从入门到实战/6.React 进阶/code/react-advance-demo/src/components/Demo5/New/NewBanner.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import withFetch from "../withFetch"
3 |
4 | const Banner = withFetch("http://iwenwiki.com/api/blueberrypai/getIndexBanner.php")(props =>{
5 | return(
6 |
7 |
8 | { props.data.banner[0].title }
9 |
10 |
11 | )
12 | })
13 |
14 | export default Banner;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const app = express();
3 | const users = require("./routes/users")
4 | const debug = require("debug")("my-application");
5 | const bodyParser = require("body-parser")
6 |
7 |
8 | app.use(bodyParser.json());
9 | app.use("/api/users",users);
10 |
11 | app.listen(3030,(req,res) =>{
12 | debug("服务器运行在3030端口上");
13 | })
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage7-client/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const app = express();
3 | const users = require("./routes/users")
4 | const debug = require("debug")("my-application");
5 | const bodyParser = require("body-parser")
6 |
7 |
8 | app.use(bodyParser.json());
9 | app.use("/api/users",users);
10 |
11 | app.listen(3030,(req,res) =>{
12 | debug("服务器运行在3030端口上");
13 | })
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage9-validator/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const app = express();
3 | const users = require("./routes/users")
4 | const debug = require("debug")("my-application");
5 | const bodyParser = require("body-parser")
6 |
7 |
8 | app.use(bodyParser.json());
9 | app.use("/api/users",users);
10 |
11 | app.listen(3030,(req,res) =>{
12 | debug("服务器运行在3030端口上");
13 | })
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/config/defaultSettings.js:
--------------------------------------------------------------------------------
1 | export default {
2 | navTheme: 'dark',
3 | // 拂晓蓝
4 | primaryColor: 'daybreak',
5 | layout: 'sidemenu',
6 | contentWidth: 'Fluid',
7 | fixedHeader: false,
8 | autoHideHeader: false,
9 | fixSiderbar: false,
10 | colorWeak: false,
11 | menu: {
12 | locale: true,
13 | },
14 | title: 'Ant Design Pro',
15 | pwa: false,
16 | iconfontUrl: '',
17 | };
18 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/src/actions/flashMessages.js:
--------------------------------------------------------------------------------
1 | import { ADD_FLASH_MESSAGE,DELETE_FLASH_MESSAGE } from "../constants"
2 |
3 | export const addFlashMessage = (message) =>{
4 | return{
5 | type:ADD_FLASH_MESSAGE,
6 | message
7 | }
8 | }
9 |
10 | export const deleteFlashMessage = (id) =>{
11 | return{
12 | type:DELETE_FLASH_MESSAGE,
13 | id
14 | }
15 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage17-router/src/actions/flashMessages.js:
--------------------------------------------------------------------------------
1 | import { ADD_FLASH_MESSAGE,DELETE_FLASH_MESSAGE } from "../constants"
2 |
3 | export const addFlashMessage = (message) =>{
4 | return{
5 | type:ADD_FLASH_MESSAGE,
6 | message
7 | }
8 | }
9 |
10 | export const deleteFlashMessage = (id) =>{
11 | return{
12 | type:DELETE_FLASH_MESSAGE,
13 | id
14 | }
15 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage9-validator/src/actions/flashMessages.js:
--------------------------------------------------------------------------------
1 | import { ADD_FLASH_MESSAGE,DELETE_FLASH_MESSAGE } from "../constants"
2 |
3 | export const addFlashMessage = (message) =>{
4 | return{
5 | type:ADD_FLASH_MESSAGE,
6 | message
7 | }
8 | }
9 |
10 | export const deleteFlashMessage = (id) =>{
11 | return{
12 | type:DELETE_FLASH_MESSAGE,
13 | id
14 | }
15 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": ".",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": ".",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": ".",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/pages/Details/DetailsData/CommentView/Item/style(1).less:
--------------------------------------------------------------------------------
1 | .comment-item {
2 | border-bottom: 1px solid #f1f1f1;
3 | padding-bottom: 10px;
4 | margin-bottom: 10px;
5 | h3 {
6 | font-size: 18px;
7 | line-height: 1.5;
8 | color: #666;
9 | }
10 | p {
11 | color: #999;
12 | line-height: 1.5;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/components/HeaderDropdown/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/es/style/themes/default.less';
2 |
3 | .container > * {
4 | background-color: @popover-bg;
5 | border-radius: 4px;
6 | box-shadow: @shadow-1-down;
7 | }
8 |
9 | @media screen and (max-width: @screen-xs) {
10 | .container {
11 | width: 100% !important;
12 | }
13 | .container > * {
14 | border-radius: 0 !important;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/React从入门到实战/2.Antd UI框架/code/React-Antd-Demo/react-antd-demo/config/jest/cssTransform.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // This is a custom Jest transformer turning style imports into empty objects.
4 | // http://facebook.github.io/jest/docs/en/webpack.html
5 |
6 | module.exports = {
7 | process() {
8 | return 'module.exports = {};';
9 | },
10 | getCacheKey() {
11 | // The output is always the same.
12 | return 'cssTransform';
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/src/actions/flashMessages.js:
--------------------------------------------------------------------------------
1 | import { ADD_FLASH_MESSAGE,DELETE_FLASH_MESSAGE } from "../constants"
2 |
3 | export const addFlashMessage = (message) =>{
4 | return{
5 | type:ADD_FLASH_MESSAGE,
6 | message
7 | }
8 | }
9 |
10 | export const deleteFlashMessage = (id) =>{
11 | return{
12 | type:DELETE_FLASH_MESSAGE,
13 | id
14 | }
15 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/src/actions/signupActions.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | export const userSignupRequest = (userData) =>{
4 | // thunk
5 | return dispatch =>{
6 | return axios.post("/api/users",userData)
7 | }
8 | }
9 |
10 | export const isUserExists = (username) =>{
11 | return dispatch =>{
12 | return axios.get(`/api/users/${username}`,username)
13 | }
14 | }
--------------------------------------------------------------------------------
/React从入门到实战/12.TypeScript+Node/code/src/User.ts:
--------------------------------------------------------------------------------
1 | import { Repo } from './Repo';
2 | export class User{
3 | login:string;
4 | bio:string;
5 | name:string;
6 | avatar_url:string;
7 | repos:Repo[] = [];
8 |
9 | constructor(responseUser:any){
10 | this.login = responseUser.login;
11 | this.bio = responseUser.bio;
12 | this.name = responseUser.name;
13 | this.avatar_url = responseUser.avatar_url
14 | }
15 | }
--------------------------------------------------------------------------------
/React从入门到实战/6.React 进阶/code/react-advance-demo/src/components/Demo5/New/NewChengpin.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import withFetch from "../withFetch"
3 |
4 | const Chengpin = withFetch("http://iwenwiki.com/api/blueberrypai/getChengpinInfo.php")(props =>{
5 | return(
6 |
7 |
8 | { props.data.chengpinInfo[0].title }
9 |
10 |
11 | )
12 | })
13 |
14 | export default Chengpin;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/src/actions/signupActions.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | export const userSignupRequest = (userData) =>{
4 | // thunk
5 | return dispatch =>{
6 | return axios.post("/api/users",userData)
7 | }
8 | }
9 |
10 | export const isUserExists = (username) =>{
11 | return dispatch =>{
12 | return axios.get(`/api/users/${username}`,username)
13 | }
14 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/src/actions/signupActions.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | export const userSignupRequest = (userData) =>{
4 | // thunk
5 | return dispatch =>{
6 | return axios.post("/api/users",userData)
7 | }
8 | }
9 |
10 | export const isUserExists = (username) =>{
11 | return dispatch =>{
12 | return axios.get(`/api/users/${username}`,username)
13 | }
14 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/src/actions/signupActions.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | export const userSignupRequest = (userData) =>{
4 | // thunk
5 | return dispatch =>{
6 | return axios.post("/api/users",userData)
7 | }
8 | }
9 |
10 | export const isUserExists = (username) =>{
11 | return dispatch =>{
12 | return axios.get(`/api/users/${username}`,username)
13 | }
14 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage3-router/src/routes.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Route } from "react-router-dom"
3 | import App from "./components/App"
4 | import SignupPage from "./components/signup/SignupPage"
5 |
6 | export default(
7 |
8 |
9 |
10 |
11 | )
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/src/routes.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Route } from "react-router-dom"
3 | import App from "./components/App"
4 | import SignupPage from "./components/signup/SignupPage"
5 |
6 | export default(
7 |
8 |
9 |
10 |
11 | )
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage6-server/src/routes.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Route } from "react-router-dom"
3 | import App from "./components/App"
4 | import SignupPage from "./components/signup/SignupPage"
5 |
6 | export default(
7 |
8 |
9 |
10 |
11 | )
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/config/jest/cssTransform.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // This is a custom Jest transformer turning style imports into empty objects.
4 | // http://facebook.github.io/jest/docs/en/webpack.html
5 |
6 | module.exports = {
7 | process() {
8 | return 'module.exports = {};';
9 | },
10 | getCacheKey() {
11 | // The output is always the same.
12 | return 'cssTransform';
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/config/jest/cssTransform.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // This is a custom Jest transformer turning style imports into empty objects.
4 | // http://facebook.github.io/jest/docs/en/webpack.html
5 |
6 | module.exports = {
7 | process() {
8 | return 'module.exports = {};';
9 | },
10 | getCacheKey() {
11 | // The output is always the same.
12 | return 'cssTransform';
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/api/homehot.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 首页热门和推荐接口
3 | */
4 |
5 | import base from "./base"
6 | import { getData } from "../utils/http"
7 |
8 | const homehot = {
9 | homehot1Data(city){
10 | return getData(base.homehot1+"?city="+city);
11 | },
12 | homehot2Data(city){
13 | return getData(base.homehot2+"?city="+city);
14 | }
15 | }
16 |
17 | export default homehot;
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/config/jest/cssTransform.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // This is a custom Jest transformer turning style imports into empty objects.
4 | // http://facebook.github.io/jest/docs/en/webpack.html
5 |
6 | module.exports = {
7 | process() {
8 | return 'module.exports = {};';
9 | },
10 | getCacheKey() {
11 | // The output is always the same.
12 | return 'cssTransform';
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/config/jest/cssTransform.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // This is a custom Jest transformer turning style imports into empty objects.
4 | // http://facebook.github.io/jest/docs/en/webpack.html
5 |
6 | module.exports = {
7 | process() {
8 | return 'module.exports = {};';
9 | },
10 | getCacheKey() {
11 | // The output is always the same.
12 | return 'cssTransform';
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/React从入门到实战/6.React 进阶/code/react-advance-demo/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage10-signup/server/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "restartable": "rs",
3 | "ignore": [
4 | ".git",
5 | ".svn",
6 | "node_modules/**/node_modules"
7 | ],
8 | "verbose": true,
9 | "execMap": {
10 | "js": "node --harmony"
11 | },
12 | "watch": [
13 |
14 | ],
15 | "env": {
16 | "NODE_ENV": "development"
17 | },
18 | "ext": "js json"
19 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage11-validator/src/routes.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Route } from "react-router-dom"
3 | import App from "./components/App"
4 | import SignupPage from "./components/signup/SignupPage"
5 |
6 | export default(
7 |
8 |
9 |
10 |
11 | )
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage12-login/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "nodemon ./index.js"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "express": "^4.17.1",
13 | "lodash": "^4.17.15",
14 | "mysql": "^2.17.1",
15 | "validator": "^11.1.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage17-router/server/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "restartable": "rs",
3 | "ignore": [
4 | ".git",
5 | ".svn",
6 | "node_modules/**/node_modules"
7 | ],
8 | "verbose": true,
9 | "execMap": {
10 | "js": "node --harmony"
11 | },
12 | "watch": [
13 |
14 | ],
15 | "env": {
16 | "NODE_ENV": "development"
17 | },
18 | "ext": "js json"
19 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage2-server/server/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "restartable": "rs",
3 | "ignore": [
4 | ".git",
5 | ".svn",
6 | "node_modules/**/node_modules"
7 | ],
8 | "verbose": true,
9 | "execMap": {
10 | "js": "node --harmony"
11 | },
12 | "watch": [
13 |
14 | ],
15 | "env": {
16 | "NODE_ENV": "development"
17 | },
18 | "ext": "js json"
19 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage4-signup/server/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "restartable": "rs",
3 | "ignore": [
4 | ".git",
5 | ".svn",
6 | "node_modules/**/node_modules"
7 | ],
8 | "verbose": true,
9 | "execMap": {
10 | "js": "node --harmony"
11 | },
12 | "watch": [
13 |
14 | ],
15 | "env": {
16 | "NODE_ENV": "development"
17 | },
18 | "ext": "js json"
19 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage9-validator/server/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "restartable": "rs",
3 | "ignore": [
4 | ".git",
5 | ".svn",
6 | "node_modules/**/node_modules"
7 | ],
8 | "verbose": true,
9 | "execMap": {
10 | "js": "node --harmony"
11 | },
12 | "watch": [
13 |
14 | ],
15 | "env": {
16 | "NODE_ENV": "development"
17 | },
18 | "ext": "js json"
19 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/api/homehot.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 首页热门和推荐接口
3 | */
4 |
5 | import base from "./base"
6 | import { getData } from "../utils/http"
7 |
8 | const homehot = {
9 | homehot1Data(city){
10 | return getData(base.homehot1+"?city="+city);
11 | },
12 | homehot2Data(city){
13 | return getData(base.homehot2+"?city="+city);
14 | }
15 | }
16 |
17 | export default homehot;
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/api/homehot.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 首页热门和推荐接口
3 | */
4 |
5 | import base from "./base"
6 | import { getData } from "../utils/http"
7 |
8 | const homehot = {
9 | homehot1Data(city){
10 | return getData(base.homehot1+"?city="+city);
11 | },
12 | homehot2Data(city){
13 | return getData(base.homehot2+"?city="+city);
14 | }
15 | }
16 |
17 | export default homehot;
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/server/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "restartable": "rs",
3 | "ignore": [
4 | ".git",
5 | ".svn",
6 | "node_modules/**/node_modules"
7 | ],
8 | "verbose": true,
9 | "execMap": {
10 | "js": "node --harmony"
11 | },
12 | "watch": [
13 |
14 | ],
15 | "env": {
16 | "NODE_ENV": "development"
17 | },
18 | "ext": "js json"
19 | }
--------------------------------------------------------------------------------
/React从入门到实战/9.React Hook新特性/code/react-hook-demo/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/React从入门到实战/2.Antd UI框架/code/React-Antd-Demo/react-antd-demo/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/components/PageLoading/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Spin } from 'antd'; // loading components from code split
3 | // https://umijs.org/plugin/umi-plugin-react.html#dynamicimport
4 |
5 | const PageLoading = () => (
6 |
12 |
13 |
14 | );
15 |
16 | export default PageLoading;
17 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/React从入门到实战/5.React-Redux基础知识/code/React-Redux-Demo/react-redux-demo/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/React从入门到实战/6.React 进阶/code/react-advance-demo/src/components/Demo1/child1.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 |
4 | /**
5 | * Component:不会对数据进行比较
6 | * PureComponent:对数据进行浅比较 props
7 | *
8 | */
9 | export default class Child1 extends React.PureComponent {
10 |
11 | render() {
12 | console.log("child1 -> render");
13 | return (
14 |
15 | Child1:{ this.props.num }
16 |
17 | );
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/src/actions/login.js:
--------------------------------------------------------------------------------
1 | import axios from "axios"
2 | import setAuthorizationToken from "../utils/setAuthorizationToken"
3 |
4 | export const login = (data) =>{
5 | return dispatch =>{
6 | return axios.post("/api/auth",data).then(res =>{
7 | const token = res.data;
8 | localStorage.setItem('jwtToken',token);
9 | setAuthorizationToken(token)
10 | })
11 | }
12 | }
--------------------------------------------------------------------------------
/React从入门到实战/9.React Hook新特性/code/react-hook-demo/src/components/Demo13/MainPage.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import ChildPage from "./ChildPage"
3 |
4 | // props 路由 自定义事件
5 | export const MyContext = React.createContext();
6 | function MainPage(){
7 | return(
8 |
9 |
10 |
11 |
12 |
13 | )
14 | }
15 |
16 | export default MainPage
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage13-jwt/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "nodemon ./index.js"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "express": "^4.17.1",
13 | "jsonwebtoken": "^8.5.1",
14 | "lodash": "^4.17.15",
15 | "mysql": "^2.17.1",
16 | "validator": "^11.1.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "nodemon ./index.js"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "express": "^4.17.1",
13 | "jsonwebtoken": "^8.5.1",
14 | "lodash": "^4.17.15",
15 | "mysql": "^2.17.1",
16 | "validator": "^11.1.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/reducers/city.js:
--------------------------------------------------------------------------------
1 | import * as cityActions from "../constants/city"
2 |
3 | const initState = {};
4 | export default function city(state = initState,action){
5 | switch(action.type){
6 | case cityActions.INIT_CITY:
7 | return state = action.data;
8 | case cityActions.UPDATE_CITY:
9 | return state = action.data;
10 | default:
11 | return state;
12 | }
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/reducers/city.js:
--------------------------------------------------------------------------------
1 | import * as cityActions from "../constants/city"
2 |
3 | const initState = {};
4 | export default function city(state = initState,action){
5 | switch(action.type){
6 | case cityActions.INIT_CITY:
7 | return state = action.data;
8 | case cityActions.UPDATE_CITY:
9 | return state = action.data;
10 | default:
11 | return state;
12 | }
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage17-router/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "nodemon ./index.js"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "express": "^4.17.1",
13 | "jsonwebtoken": "^8.5.1",
14 | "lodash": "^4.17.15",
15 | "mysql": "^2.17.1",
16 | "validator": "^11.1.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/pages/index.css:
--------------------------------------------------------------------------------
1 |
2 | .normal {
3 | font-family: Georgia, sans-serif;
4 | margin-top: 4em;
5 | text-align: center;
6 | }
7 |
8 | .welcome {
9 | height: 512px;
10 | background: url(../assets/yay.jpg) no-repeat center 0;
11 | background-size: 512px 512px;
12 | }
13 |
14 | .list {
15 | font-size: 1.2em;
16 | margin: 1.8em 0 0;
17 | list-style: none;
18 | line-height: 1.5em;
19 | }
20 |
21 | .list code {
22 | background: #f7f7f7;
23 | }
24 |
--------------------------------------------------------------------------------
/React从入门到实战/5.React-Redux基础知识/code/React-Redux-Demo/react-redux-demo/src/components/coms/Child.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class Child extends React.Component{
4 |
5 | clickHandle = (e) =>{
6 | this.props.onMyEvent("父标题");
7 | }
8 |
9 | render(){
10 | return(
11 |
12 | Child:{ this.props.title }
13 |
14 |
15 | )
16 | }
17 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "nodemon ./index.js"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "express": "^4.17.1",
13 | "jsonwebtoken": "^8.5.1",
14 | "lodash": "^4.17.15",
15 | "mysql": "^2.17.1",
16 | "validator": "^11.1.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage13-jwt/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const app = express();
3 | const users = require("./routes/users")
4 | const debug = require("debug")("my-application");
5 | const bodyParser = require("body-parser")
6 | const auth = require("./routes/auth")
7 |
8 |
9 | app.use(bodyParser.json());
10 | app.use("/api/users",users);
11 | app.use("/api/auth",auth);
12 |
13 | app.listen(3030,(req,res) =>{
14 | debug("服务器运行在3030端口上");
15 | })
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const app = express();
3 | const users = require("./routes/users")
4 | const debug = require("debug")("my-application");
5 | const bodyParser = require("body-parser")
6 | const auth = require("./routes/auth")
7 |
8 |
9 | app.use(bodyParser.json());
10 | app.use("/api/users",users);
11 | app.use("/api/auth",auth);
12 |
13 | app.listen(3030,(req,res) =>{
14 | debug("服务器运行在3030端口上");
15 | })
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/pages/__tests__/index.test.js:
--------------------------------------------------------------------------------
1 | import Index from '..';
2 | import renderer from 'react-test-renderer';
3 |
4 |
5 | describe('Page: index', () => {
6 | it('Render correctly', () => {
7 | const wrapper = renderer.create();
8 | expect(wrapper.root.children.length).toBe(1);
9 | const outerLayer = wrapper.root.children[0];
10 | expect(outerLayer.type).toBe('div');
11 | expect(outerLayer.children.length).toBe(2);
12 |
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/tests/setupTests.js:
--------------------------------------------------------------------------------
1 | import 'jsdom-global/register';
2 |
3 | // browserMocks.js
4 | const localStorageMock = (() => {
5 | let store = {};
6 |
7 | return {
8 | getItem(key) {
9 | return store[key] || null;
10 | },
11 | setItem(key, value) {
12 | store[key] = value.toString();
13 | },
14 | clear() {
15 | store = {};
16 | },
17 | };
18 | })();
19 |
20 | Object.defineProperty(window, 'localStorage', {
21 | value: localStorageMock,
22 | });
23 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hello-react-router",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "query-string": "^6.1.0",
7 | "react": "^16.5.2",
8 | "react-dom": "^16.5.2",
9 | "react-router-dom": "^4.3.1",
10 | "react-scripts": "1.1.5"
11 | },
12 | "scripts": {
13 | "start": "react-scripts start",
14 | "build": "react-scripts build",
15 | "test": "react-scripts test --env=jsdom",
16 | "eject": "react-scripts eject"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage12-login/src/utils/validations/login.js:
--------------------------------------------------------------------------------
1 | import validator from "validator"
2 | import isEmpty from "lodash/isEmpty"
3 |
4 | const validateInput = (data) =>{
5 | let errors = {};
6 | if(validator.isEmpty(data.username)){
7 | errors.username = "请输入用户名"
8 | }
9 | if(validator.isEmpty(data.password)){
10 | errors.password = "请输入密码"
11 | }
12 |
13 | return{
14 | errors,
15 | isValid:isEmpty(errors)
16 | }
17 | }
18 |
19 | export default validateInput
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage13-jwt/server/mysql/index.js:
--------------------------------------------------------------------------------
1 | const mysql = require("mysql");
2 |
3 | var client = mysql.createConnection({
4 | host:"localhost",
5 | user:"root", // 默认的
6 | password:"",
7 | database:"iwenuser"
8 | })
9 |
10 | function sqlFn(sql,arr,callback){
11 | client.query(sql,arr,function(error,result){
12 | if(error){
13 | console.log(new Error(error));
14 | return;
15 | }
16 | callback(result)
17 | })
18 | }
19 |
20 | module.exports = sqlFn
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage15-redux/server/mysql/index.js:
--------------------------------------------------------------------------------
1 | const mysql = require("mysql");
2 |
3 | var client = mysql.createConnection({
4 | host:"localhost",
5 | user:"root", // 默认的
6 | password:"",
7 | database:"iwenuser"
8 | })
9 |
10 | function sqlFn(sql,arr,callback){
11 | client.query(sql,arr,function(error,result){
12 | if(error){
13 | console.log(new Error(error));
14 | return;
15 | }
16 | callback(result)
17 | })
18 | }
19 |
20 | module.exports = sqlFn
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage17-router/src/utils/validations/login.js:
--------------------------------------------------------------------------------
1 | import validator from "validator"
2 | import isEmpty from "lodash/isEmpty"
3 |
4 | const validateInput = (data) =>{
5 | let errors = {};
6 | if(validator.isEmpty(data.username)){
7 | errors.username = "请输入用户名"
8 | }
9 | if(validator.isEmpty(data.password)){
10 | errors.password = "请输入密码"
11 | }
12 |
13 | return{
14 | errors,
15 | isValid:isEmpty(errors)
16 | }
17 | }
18 |
19 | export default validateInput
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/react-router-code_split/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 80px;
8 | }
9 |
10 | .App-header {
11 | background-color: #222;
12 | height: 150px;
13 | padding: 20px;
14 | color: white;
15 | }
16 |
17 | .App-title {
18 | font-size: 1.5em;
19 | }
20 |
21 | .App-intro {
22 | font-size: large;
23 | }
24 |
25 | @keyframes App-logo-spin {
26 | from { transform: rotate(0deg); }
27 | to { transform: rotate(360deg); }
28 | }
29 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage10-signup/server/mysql/index.js:
--------------------------------------------------------------------------------
1 | const mysql = require("mysql");
2 |
3 | var client = mysql.createConnection({
4 | host:"localhost",
5 | user:"root", // 默认的
6 | password:"",
7 | database:"iwenuser"
8 | })
9 |
10 | function sqlFn(sql,arr,callback){
11 | client.query(sql,arr,function(error,result){
12 | if(error){
13 | console.log(new Error(error));
14 | return;
15 | }
16 | callback(result)
17 | })
18 | }
19 |
20 | module.exports = sqlFn
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/components/Header/style.less:
--------------------------------------------------------------------------------
1 | #common-header {
2 | background-color: #ff5555;
3 | color: #fff;
4 | padding: 16px 10px;
5 | text-align: center;
6 | position: relative;
7 |
8 | h1 {
9 | display: inline;
10 | font-size: 16px;
11 | line-height: 1;
12 | }
13 |
14 | .back-icon {
15 | width: 16px;
16 | height: 16px;
17 | position: absolute;
18 | left: 10px;
19 | top:19px;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/server/mysql/index.js:
--------------------------------------------------------------------------------
1 | const mysql = require("mysql");
2 |
3 | var client = mysql.createConnection({
4 | host:"localhost",
5 | user:"root", // 默认的
6 | password:"",
7 | database:"iwenuser"
8 | })
9 |
10 | function sqlFn(sql,arr,callback){
11 | client.query(sql,arr,function(error,result){
12 | if(error){
13 | console.log(new Error(error));
14 | return;
15 | }
16 | callback(result)
17 | })
18 | }
19 |
20 | module.exports = sqlFn
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/src/utils/validations/login.js:
--------------------------------------------------------------------------------
1 | import validator from "validator"
2 | import isEmpty from "lodash/isEmpty"
3 |
4 | const validateInput = (data) =>{
5 | let errors = {};
6 | if(validator.isEmpty(data.username)){
7 | errors.username = "请输入用户名"
8 | }
9 | if(validator.isEmpty(data.password)){
10 | errors.password = "请输入密码"
11 | }
12 |
13 | return{
14 | errors,
15 | isValid:isEmpty(errors)
16 | }
17 | }
18 |
19 | export default validateInput
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import AppRouter from "./router/AppRouter"
4 | import { Provider } from "react-redux"
5 | import configtureStore from "./store"
6 | import "./static/css/common.less"
7 | import "./static/css/font.css"
8 | import "./static/css/iconfont.css"
9 |
10 | const store = configtureStore();
11 |
12 | ReactDOM.render(
13 |
14 |
15 | ,
16 | document.getElementById('root'));
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import AppRouter from "./router/AppRouter"
4 | import { Provider } from "react-redux"
5 | import configtureStore from "./store"
6 | import "./static/css/common.less"
7 | import "./static/css/font.css"
8 | import "./static/css/iconfont.css"
9 |
10 | const store = configtureStore();
11 |
12 | ReactDOM.render(
13 |
14 |
15 | ,
16 | document.getElementById('root'));
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import AppRouter from "./router/AppRouter"
4 | import { Provider } from "react-redux"
5 | import configtureStore from "./store"
6 | import "./static/css/common.less"
7 | import "./static/css/font.css"
8 | import "./static/css/iconfont.css"
9 |
10 | const store = configtureStore();
11 |
12 | ReactDOM.render(
13 |
14 |
15 | ,
16 | document.getElementById('root'));
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/pages/404.jsx:
--------------------------------------------------------------------------------
1 | import { Button, Result } from 'antd';
2 | import React from 'react';
3 | import router from 'umi/router'; // 这里应该使用 antd 的 404 result 组件,
4 | // 但是还没发布,先来个简单的。
5 |
6 | const NoFoundPage = () => (
7 | router.push('/')}>
13 | Back Home
14 |
15 | }
16 | >
17 | );
18 |
19 | export default NoFoundPage;
20 |
--------------------------------------------------------------------------------
/React从入门到实战/6.React 进阶/code/react-advance-demo/src/components/Demo2/index.jsx:
--------------------------------------------------------------------------------
1 | import React,{ Fragment } from "react"
2 |
3 | class Item extends React.Component {
4 | render() {
5 | return (
6 |
7 | Demo2 Item1
8 | Demo2 Item1
9 |
10 | )
11 | }
12 | }
13 |
14 |
15 | export default class Demo2 extends React.Component {
16 | render() {
17 | return (
18 |
21 | )
22 | }
23 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage1-home/src/utils/http.js:
--------------------------------------------------------------------------------
1 | import qs from "querystring"
2 |
3 | export function getData(url) {
4 | const result = fetch(url);
5 | return result;
6 | }
7 |
8 | export function postData(url,data) {
9 | const result = fetch(url, {
10 | method: "post",
11 | headers: {
12 | 'Accept': 'application/json, text/plain, */*',
13 | 'Content-Type': 'application/x-www-form-urlencoded'
14 | },
15 | body:qs.stringify(data)
16 | })
17 | return result;
18 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage2-city/src/utils/http.js:
--------------------------------------------------------------------------------
1 | import qs from "querystring"
2 |
3 | export function getData(url) {
4 | const result = fetch(url);
5 | return result;
6 | }
7 |
8 | export function postData(url,data) {
9 | const result = fetch(url, {
10 | method: "post",
11 | headers: {
12 | 'Accept': 'application/json, text/plain, */*',
13 | 'Content-Type': 'application/x-www-form-urlencoded'
14 | },
15 | body:qs.stringify(data)
16 | })
17 | return result;
18 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/components/SelectLang/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/es/style/themes/default.less';
2 |
3 | .menu {
4 | :global(.anticon) {
5 | margin-right: 8px;
6 | }
7 | :global(.ant-dropdown-menu-item) {
8 | min-width: 160px;
9 | }
10 | }
11 |
12 | .dropDown {
13 | line-height: @layout-header-height;
14 | vertical-align: top;
15 | cursor: pointer;
16 | > i {
17 | font-size: 16px !important;
18 | transform: none !important;
19 | svg {
20 | position: relative;
21 | top: -1px;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/src/routes.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Route } from "react-router-dom"
3 | import App from "./components/App"
4 | import SignupPage from "./components/signup/SignupPage"
5 | import LoginPage from "./components/login/LoginPage"
6 |
7 | export default(
8 |
9 |
10 |
11 |
12 |
13 | )
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/utils/http.js:
--------------------------------------------------------------------------------
1 | import qs from "querystring"
2 |
3 | export function getData(url) {
4 | const result = fetch(url);
5 | return result;
6 | }
7 |
8 | export function postData(url,data) {
9 | const result = fetch(url, {
10 | method: "post",
11 | headers: {
12 | 'Accept': 'application/json, text/plain, */*',
13 | 'Content-Type': 'application/x-www-form-urlencoded'
14 | },
15 | body:qs.stringify(data)
16 | })
17 | return result;
18 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/utils/http.js:
--------------------------------------------------------------------------------
1 | import qs from "querystring"
2 |
3 | export function getData(url) {
4 | const result = fetch(url);
5 | return result;
6 | }
7 |
8 | export function postData(url,data) {
9 | const result = fetch(url, {
10 | method: "post",
11 | headers: {
12 | 'Accept': 'application/json, text/plain, */*',
13 | 'Content-Type': 'application/x-www-form-urlencoded'
14 | },
15 | body:qs.stringify(data)
16 | })
17 | return result;
18 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Ant Design Pro",
3 | "short_name": "Ant Design Pro",
4 | "display": "standalone",
5 | "start_url": "./?utm_source=homescreen",
6 | "theme_color": "#002140",
7 | "background_color": "#001529",
8 | "icons": [
9 | {
10 | "src": "icons/icon-192x192.png",
11 | "sizes": "192x192"
12 | },
13 | {
14 | "src": "icons/icon-128x128.png",
15 | "sizes": "128x128"
16 | },
17 | {
18 | "src": "icons/icon-512x512.png",
19 | "sizes": "512x512"
20 | }
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage12-login/src/components/login/LoginPage.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import LoginForm from "./LoginForm"
3 |
4 | class LoginPage extends React.Component{
5 | render(){
6 | return(
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | )
15 | }
16 | }
17 |
18 | export default LoginPage
--------------------------------------------------------------------------------
/React从入门到实战/1.React基础知识/code/React-Demo/react-demo/src/PropsTypeDemo.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import PropTypes from 'prop-types';
3 |
4 | export default class PropsTypeDemo extends React.Component{
5 | render(){
6 | return(
7 |
8 | Hello:{ this.props.title }
9 |
10 | )
11 | }
12 | }
13 |
14 | // PropsTypeDemo.propTypes = {
15 | // title:PropTypes.number.isRequired
16 | // }
17 |
18 | PropsTypeDemo.propTypes = {
19 | title:PropTypes.string
20 | }
21 |
22 | PropsTypeDemo.defaultProps = {
23 | title:'默认值'
24 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/e2e/topMenu.e2e.js:
--------------------------------------------------------------------------------
1 | const BASE_URL = `http://localhost:${process.env.PORT || 8000}`;
2 |
3 | describe('Homepage', () => {
4 | it('topmenu should have footer', async () => {
5 | const params = '?navTheme=light&layout=topmenu';
6 | await page.goto(`${BASE_URL}${params}`);
7 | await page.waitForSelector('footer', {
8 | timeout: 2000,
9 | });
10 | const haveFooter = await page.evaluate(
11 | () => document.getElementsByTagName('footer').length > 0,
12 | );
13 | expect(haveFooter).toBeTruthy();
14 | });
15 | });
16 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/src/components/login/LoginPage.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import LoginForm from "./LoginForm"
3 |
4 | class LoginPage extends React.Component{
5 | render(){
6 | return(
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | )
15 | }
16 | }
17 |
18 | export default LoginPage
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/src/components/login/LoginPage.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import LoginForm from "./LoginForm"
3 |
4 | class LoginPage extends React.Component{
5 | render(){
6 | return(
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | )
15 | }
16 | }
17 |
18 | export default LoginPage
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/src/components/ListView.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | interface IProps {
4 | data:{
5 | title:string,
6 | content:string,
7 | img:string
8 | },
9 | }
10 |
11 | export default class ListView extends React.Component{
12 |
13 | public render(){
14 | return (
15 |
16 |
{ this.props.data.title }
17 |
{ this.props.data.content }
18 |
{ this.props.data.img }
19 |
20 | )
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/pages/user/login/components/Login/LoginSubmit.jsx:
--------------------------------------------------------------------------------
1 | import { Button, Form } from 'antd';
2 | import React from 'react';
3 | import classNames from 'classnames';
4 | import styles from './index.less';
5 | const FormItem = Form.Item;
6 |
7 | const LoginSubmit = ({ className, ...rest }) => {
8 | const clsString = classNames(styles.submit, className);
9 | return (
10 |
11 |
12 |
13 | );
14 | };
15 |
16 | export default LoginSubmit;
17 |
--------------------------------------------------------------------------------
/React从入门到实战/1.React基础知识/code/React-Demo/react-demo/src/RefsAndDOM.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | export default class RefsAndDOM extends React.Component{
4 |
5 | constructor(){
6 | super();
7 | this.HelloDiv = React.createRef();
8 | }
9 |
10 | componentDidMount(){
11 | this.HelloDiv.current.style.color = "red";
12 | }
13 |
14 | render(){
15 | return(
16 |
17 | Refs和DOM
18 |
19 | Hello
20 |
21 |
22 | )
23 | }
24 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/layouts/__tests__/index.test.js:
--------------------------------------------------------------------------------
1 | import BasicLayout from '..';
2 | import renderer from 'react-test-renderer';
3 |
4 | describe('Layout: BasicLayout', () => {
5 | it('Render correctly', () => {
6 | const wrapper = renderer.create();
7 | expect(wrapper.root.children.length).toBe(1);
8 | const outerLayer = wrapper.root.children[0];
9 | expect(outerLayer.type).toBe('div');
10 | const title = outerLayer.children[0];
11 | expect(title.type).toBe('h1');
12 | expect(title.children[0]).toBe('Yay! Welcome to umi!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/components/NoticeIcon/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/es/style/themes/default.less';
2 |
3 | .popover {
4 | position: relative;
5 | width: 336px;
6 | }
7 |
8 | .noticeButton {
9 | display: inline-block;
10 | cursor: pointer;
11 | transition: all 0.3s;
12 | }
13 | .icon {
14 | padding: 4px;
15 | vertical-align: middle;
16 | }
17 |
18 | .badge {
19 | font-size: 16px;
20 | }
21 |
22 | .tabs {
23 | :global {
24 | .ant-tabs-nav-scroll {
25 | text-align: center;
26 | }
27 | .ant-tabs-bar {
28 | margin-bottom: 0;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/src/reducers/auth.js:
--------------------------------------------------------------------------------
1 | import { SET_CURRENT_USER } from "../constants"
2 | import isEmpty from "lodash/isEmpty"
3 |
4 | const initialState = {
5 | isAuthenticated:false,
6 | user:{}
7 | }
8 |
9 | const auth = (state = initialState,action) =>{
10 | switch(action.type){
11 | case SET_CURRENT_USER:
12 | return{
13 | isAuthenticated:!isEmpty(action.user),
14 | user:action.user
15 | }
16 | default:
17 | return state;
18 | }
19 | }
20 |
21 | export default auth;
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/src/reducers/index.tsx:
--------------------------------------------------------------------------------
1 | import { EnthusiasmAction } from '../actions';
2 | import { IStoreState } from '../types/index';
3 | import { INCREMENT_ENTHUSIASM, DECREMENT_ENTHUSIASM } from '../constants/index';
4 |
5 | export function enthusiasm(state: IStoreState, action: EnthusiasmAction): IStoreState {
6 | switch (action.type) {
7 | case INCREMENT_ENTHUSIASM:
8 | return { ...state, enthusiasmLevel: state.enthusiasmLevel + 1 };
9 | case DECREMENT_ENTHUSIASM:
10 | return { ...state, enthusiasmLevel: Math.max(1, state.enthusiasmLevel - 1) };
11 | }
12 | return state;
13 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/utils/authority.test.js:
--------------------------------------------------------------------------------
1 | import { getAuthority } from './authority';
2 | describe('getAuthority should be strong', () => {
3 | it('string', () => {
4 | expect(getAuthority('admin')).toEqual(['admin']);
5 | });
6 | it('array with double quotes', () => {
7 | expect(getAuthority('"admin"')).toEqual(['admin']);
8 | });
9 | it('array with single item', () => {
10 | expect(getAuthority('["admin"]')).toEqual(['admin']);
11 | });
12 | it('array with multiple items', () => {
13 | expect(getAuthority('["admin", "guest"]')).toEqual(['admin', 'guest']);
14 | });
15 | });
16 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/pages/Details/DetailsData/CommentView/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Item from './Item'
3 | import './style.less'
4 |
5 | export default class CommentView extends React.Component {
6 |
7 | render() {
8 | // 获取数据
9 | const data = this.props.comments
10 |
11 | return (
12 |
13 | {data.map((item, index) => {
14 | return -
15 | })}
16 |
17 | )
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/components/Authorized/Authorized.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Result } from 'antd';
3 | import check from './CheckPermissions';
4 |
5 | const Authorized = ({
6 | children,
7 | authority,
8 | noMatch = (
9 |
14 | ),
15 | }) => {
16 | const childrenRender = typeof children === 'undefined' ? null : children;
17 | const dom = check(authority, childrenRender, noMatch);
18 | return <>{dom}>;
19 | };
20 |
21 | export default Authorized;
22 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/components/Swiper/Pagination/style.less:
--------------------------------------------------------------------------------
1 | .swiper-pagination{
2 | position: absolute;
3 | bottom: 10px;
4 | right: 10px;
5 | ul {
6 | width: 100%;
7 | height: auto;
8 | text-align: center;
9 | }
10 | li {
11 | list-style: none;
12 | display: inline-block;
13 | height: 10px;
14 | width: 10px;
15 | border-radius: 50%;
16 | background-color: #ccc;
17 | margin: 0 3px;
18 | }
19 | li.selected {
20 | background-color: rgb(233, 32, 61);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/components/FootNav/style.less:
--------------------------------------------------------------------------------
1 | // 低耦合,高内聚
2 | .nav-footer{
3 | background: #fff;
4 | position: fixed;
5 | left: 0;
6 | right: 0;
7 | bottom:0;
8 | box-shadow: 0px 0px 0px 1px #e1e1e1;
9 | ul{
10 | height: 50px;
11 | padding-top: 6.5px;
12 | li{
13 | float: left;
14 | text-align: center;
15 | width: 25%;
16 | i{
17 | display: block;
18 | font-size: 20px;
19 | }
20 | span{
21 | font-size: 12px;
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/components/FootNav/style.less:
--------------------------------------------------------------------------------
1 | // 低耦合,高内聚
2 | .nav-footer{
3 | background: #fff;
4 | position: fixed;
5 | left: 0;
6 | right: 0;
7 | bottom:0;
8 | box-shadow: 0px 0px 0px 1px #e1e1e1;
9 | ul{
10 | height: 50px;
11 | padding-top: 6.5px;
12 | li{
13 | float: left;
14 | text-align: center;
15 | width: 25%;
16 | i{
17 | display: block;
18 | font-size: 20px;
19 | }
20 | span{
21 | font-size: 12px;
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/pages/index.js:
--------------------------------------------------------------------------------
1 | import styles from './index.css';
2 | import Link from 'umi/link';
3 | import { FormattedMessage } from 'umi-plugin-locale';
4 | import { DatePicker } from 'antd';
5 | import axios from 'axios'
6 |
7 | export default function () {
8 |
9 | return (
10 |
11 |
go to /users
12 |
Hello
13 |
14 |
;
15 |
go to /new
16 |
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/utils/Authorized.js:
--------------------------------------------------------------------------------
1 | import RenderAuthorize from '@/components/Authorized';
2 | import { getAuthority } from './authority';
3 | /* eslint-disable eslint-comments/disable-enable-pair */
4 |
5 | /* eslint-disable import/no-mutable-exports */
6 |
7 | let Authorized = RenderAuthorize(getAuthority()); // Reload the rights component
8 |
9 | const reloadAuthorized = () => {
10 | Authorized = RenderAuthorize(getAuthority());
11 | };
12 | /**
13 | * hard code
14 | * block need it。
15 | */
16 |
17 | window.reloadAuthorized = reloadAuthorized;
18 | export { reloadAuthorized };
19 | export default Authorized;
20 |
--------------------------------------------------------------------------------
/React从入门到实战/4.React-Router路由配置/code/React-Router-Demo/react-router-demo/src/pages/MineDemo.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { withRouter } from "react-router-dom"
3 |
4 | class MineDemo extends React.Component{
5 |
6 | clickHandle(){
7 | console.log(this.props);
8 | this.props.history.push("/")
9 | }
10 |
11 | // 当前组件没有直接被路由管理,所以没有路由对象
12 | // withRouter
13 |
14 | render(){
15 | return(
16 |
17 |
18 |
19 | )
20 | }
21 | }
22 |
23 | // 高阶组件
24 | export default withRouter(MineDemo)
--------------------------------------------------------------------------------
/React从入门到实战/6.React 进阶/code/react-advance-demo/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/9.React Hook新特性/code/react-hook-demo/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/locales/zh-TW.js:
--------------------------------------------------------------------------------
1 | import component from './zh-TW/component';
2 | import globalHeader from './zh-TW/globalHeader';
3 | import menu from './zh-TW/menu';
4 | import pwa from './zh-TW/pwa';
5 | import settingDrawer from './zh-TW/settingDrawer';
6 | import settings from './zh-TW/settings';
7 | export default {
8 | 'navBar.lang': '語言',
9 | 'layout.user.link.help': '幫助',
10 | 'layout.user.link.privacy': '隱私',
11 | 'layout.user.link.terms': '條款',
12 | 'app.preview.down.block': '下載此頁面到本地項目',
13 | ...globalHeader,
14 | ...menu,
15 | ...settingDrawer,
16 | ...settings,
17 | ...pwa,
18 | ...component,
19 | };
20 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/pages/user/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import router from 'umi/router';
3 | import axios from "axios"
4 |
5 | export default class User extends React.Component{
6 |
7 | componentDidMount(){
8 | axios.get("/api/v1/restserver/ting?method=baidu.ting.billboard.billList&type=1&size=10&offset=0")
9 | .then(res => {
10 | console.log(res.data);
11 | })
12 | }
13 |
14 | render(){
15 | return(
16 |
17 | User
18 |
19 |
20 | )
21 | }
22 | }
--------------------------------------------------------------------------------
/React从入门到实战/3.Fetch 网络请求/code/React-Fetch-Demo/react-fetch-demo/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/5.React-Redux基础知识/code/React-Redux-Demo/react-redux-demo/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage2-server/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage3-router/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage6-server/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage7-client/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage9-validator/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage14-locastorage/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage16-login&logout/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/reducers/colllect.js:
--------------------------------------------------------------------------------
1 | import * as collectActions from "../constants/collect"
2 |
3 | const initState = [];
4 | export default function collect(state = initState, action) {
5 | switch (action.type) {
6 | case collectActions.COLLECT:
7 | state.push(action.data)
8 | return state;
9 | case collectActions.UNCOLLECT:
10 | return state.filter((element) => {
11 | if (element.id !== action.data.id) {
12 | return element;
13 | }
14 | })
15 | default:
16 | return state;
17 | }
18 | }
--------------------------------------------------------------------------------
/React从入门到实战/11.React TypeScript/react-ts-stage1/src/actions/index.tsx:
--------------------------------------------------------------------------------
1 | import * as constants from '../constants'
2 |
3 | export interface IIncrementEnthusiasm {
4 | type: constants.INCREMENT_ENTHUSIASM;
5 | }
6 |
7 | export interface IDecrementEnthusiasm {
8 | type: constants.DECREMENT_ENTHUSIASM;
9 | }
10 |
11 | export type EnthusiasmAction = IIncrementEnthusiasm | IDecrementEnthusiasm;
12 |
13 | export function incrementEnthusiasm(): IIncrementEnthusiasm {
14 | return {
15 | type: constants.INCREMENT_ENTHUSIASM
16 | }
17 | }
18 |
19 | export function decrementEnthusiasm(): IDecrementEnthusiasm {
20 | return {
21 | type: constants.DECREMENT_ENTHUSIASM
22 | }
23 | }
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | **/node_modules
5 | # roadhog-api-doc ignore
6 | /src/utils/request-temp.js
7 | _roadhog-api-doc
8 |
9 | # production
10 | /dist
11 | /.vscode
12 |
13 | # misc
14 | .DS_Store
15 | npm-debug.log*
16 | yarn-error.log
17 |
18 | /coverage
19 | .idea
20 | yarn.lock
21 | package-lock.json
22 | *bak
23 | .vscode
24 |
25 | # visual studio code
26 | .history
27 | *.log
28 | functions/*
29 | .temp/**
30 |
31 | # umi
32 | .umi
33 | .umi-production
34 |
35 | # screenshot
36 | screenshot
37 | .firebase
38 | .eslintcache
39 |
40 | build
41 |
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage1-evn/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | import logger from "redux-logger"
6 | import thunk from "redux-thunk"
7 | import { composeWithDevTools } from "redux-devtools-extension"
8 |
9 | import { createStore, applyMiddleware } from "redux"
10 | import { Provider } from "react-redux"
11 |
12 | import rootReducer from "./reducers"
13 |
14 |
15 | const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(logger, thunk)))
16 |
17 | ReactDOM.render(
18 |
19 |
20 |
21 | ,
22 | document.getElementById('root'));
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-app/src/models/user.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state:{
3 | count:{
4 | num:{
5 | value:1
6 | }
7 | }
8 | },
9 | subscriptions: {
10 | setup({ dispatch, history }) {
11 | dispatch({type:'update'})
12 | },
13 | },
14 | reducers: {
15 | /**
16 | * 不允许直接修改state
17 | * [...arr1,...arr2];
18 | * concat
19 | * 深度拷贝
20 | */
21 | update(state) {
22 | state.count.num.value += 1
23 | },
24 | },
25 | effects: {
26 | *fetch({ type, payload }, { put, call, select }) {
27 | },
28 | },
29 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/pages/Details/DetailsData/StoreBuy/StoreBuyView/style.less:
--------------------------------------------------------------------------------
1 | .buy-store-container {
2 | border-top: 1px solid #f1f1f1;
3 | background-color: #fff;
4 | display: flex;
5 | .item-container {
6 | flex: 1;
7 | text-align: center;
8 |
9 | button {
10 | width: 100%;
11 | font-size: 16px;
12 | background-color: #ff5555;
13 | color: #fff;
14 | padding: 10px 0;
15 | }
16 |
17 | button.o{
18 | background: #ff7f32;
19 | }
20 |
21 | button.selected {
22 | color: #fff;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/pages/Search/SearchHeader/style.less:
--------------------------------------------------------------------------------
1 | #search-header {
2 | background-color: #ff5555;
3 | color: #fff;
4 | padding: 10px;
5 | text-align: center;
6 | position: relative;
7 |
8 | .input-container {
9 | background-color: #fff;
10 | border-radius: 15px;
11 | overflow: hidden;
12 | padding: 5px;
13 | text-align: left;
14 | margin-left: 30px;
15 | margin-right: 10px;
16 |
17 | i {
18 | color: #ccc;
19 | }
20 | }
21 |
22 | .back-icon {
23 | width: 16px;
24 | height: 16px;
25 | margin-top: 6px;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/pages/Search/SearchHeader/style.less:
--------------------------------------------------------------------------------
1 | #search-header {
2 | background-color: #ff5555;
3 | color: #fff;
4 | padding: 10px;
5 | text-align: center;
6 | position: relative;
7 |
8 | .input-container {
9 | background-color: #fff;
10 | border-radius: 15px;
11 | overflow: hidden;
12 | padding: 5px;
13 | text-align: left;
14 | margin-left: 30px;
15 | margin-right: 10px;
16 |
17 | i {
18 | color: #ccc;
19 | }
20 | }
21 |
22 | .back-icon {
23 | width: 16px;
24 | height: 16px;
25 | margin-top: 6px;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/pages/Search/SearchHeader/style.less:
--------------------------------------------------------------------------------
1 | #search-header {
2 | background-color: #ff5555;
3 | color: #fff;
4 | padding: 10px;
5 | text-align: center;
6 | position: relative;
7 |
8 | .input-container {
9 | background-color: #fff;
10 | border-radius: 15px;
11 | overflow: hidden;
12 | padding: 5px;
13 | text-align: left;
14 | margin-left: 30px;
15 | margin-right: 10px;
16 |
17 | i {
18 | color: #ccc;
19 | }
20 | }
21 |
22 | .back-icon {
23 | width: 16px;
24 | height: 16px;
25 | margin-top: 6px;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/locales/pt-BR.js:
--------------------------------------------------------------------------------
1 | import component from './pt-BR/component';
2 | import globalHeader from './pt-BR/globalHeader';
3 | import menu from './pt-BR/menu';
4 | import pwa from './pt-BR/pwa';
5 | import settingDrawer from './pt-BR/settingDrawer';
6 | import settings from './pt-BR/settings';
7 | export default {
8 | 'navBar.lang': 'Idiomas',
9 | 'layout.user.link.help': 'ajuda',
10 | 'layout.user.link.privacy': 'política de privacidade',
11 | 'layout.user.link.terms': 'termos de serviços',
12 | 'app.preview.down.block': 'Download this page to your local project',
13 | ...globalHeader,
14 | ...menu,
15 | ...settingDrawer,
16 | ...settings,
17 | ...pwa,
18 | ...component,
19 | };
20 |
--------------------------------------------------------------------------------
/React从入门到实战/3.Fetch 网络请求/code/React-Fetch-Demo/react-fetch-demo/src/utils/http.js:
--------------------------------------------------------------------------------
1 | /**
2 | * get post
3 | */
4 | import qs from "querystring"
5 |
6 | export function httpGet(url){
7 | const result = fetch(url);
8 | return result;
9 | }
10 |
11 | export function httpPost(url,params){
12 | const result = fetch(url,{
13 | method:"POST",
14 | headers:{
15 | 'Content-Type': 'application/x-www-form-urlencoded',
16 | "Accept":"application/json,text/plain,*/*"
17 | },
18 | /**
19 | * {
20 | * name:"iwen"
21 | * }
22 | *
23 | * name=iwen
24 | */
25 | body:qs.stringify(params)
26 | })
27 |
28 | return result;
29 | }
--------------------------------------------------------------------------------
/React从入门到实战/7.React&Redux实战-登录注册认证/code/react-redux-login-stage17-router/src/routes.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Route } from "react-router-dom"
3 | import App from "./components/App"
4 | import SignupPage from "./components/signup/SignupPage"
5 | import LoginPage from "./components/login/LoginPage"
6 | import ShopPage from "./components/shop/ShopPage"
7 |
8 | import requireAuth from "./utils/requireAuth"
9 |
10 | export default(
11 |
12 |
13 |
14 |
15 |
16 |
17 | )
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage3-search/src/pages/Search/SearchList/SeachListView/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import Item from "./Item"
3 | import "./style.less"
4 |
5 | export default class SearchListView extends React.Component {
6 | /**
7 | * 数据会发生改变的情况下:
8 | * key:坚决杜绝使用index下标作为唯一索引
9 | *
10 | */
11 | render() {
12 | const data = this.props.data;
13 | return (
14 |
15 | {
16 | data.map((element,index) => {
17 | return -
18 | })
19 | }
20 |
21 | )
22 | }
23 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/pages/Search/SearchList/SeachListView/index(1).jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import Item from "./Item"
3 | import "./style.less"
4 |
5 | export default class SearchListView extends React.Component {
6 | /**
7 | * 数据会发生改变的情况下:
8 | * key:坚决杜绝使用index下标作为唯一索引
9 | *
10 | */
11 | render() {
12 | const data = this.props.data;
13 | return (
14 |
15 | {
16 | data.map((element,index) => {
17 | return -
18 | })
19 | }
20 |
21 | )
22 | }
23 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/pages/Search/SearchList/SeachListView/index(1).jsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import Item from "./Item"
3 | import "./style.less"
4 |
5 | export default class SearchListView extends React.Component {
6 | /**
7 | * 数据会发生改变的情况下:
8 | * key:坚决杜绝使用index下标作为唯一索引
9 | *
10 | */
11 | render() {
12 | const data = this.props.data;
13 | return (
14 |
15 | {
16 | data.map((element,index) => {
17 | return -
18 | })
19 | }
20 |
21 | )
22 | }
23 | }
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/components/Star/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './style.less'
3 |
4 | export default class Star extends React.Component {
5 |
6 | render() {
7 | let star = this.props.star;
8 | if(star >= 5){
9 | star = 5;
10 | }
11 | return (
12 |
13 | {[1, 2, 3, 4, 5].map((item, index) => {
14 | // star 是参数 = 3
15 | let lightClass = star >= item ? ' light' : ''
16 | return
17 | })}
18 |
19 | )
20 | }
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/locales/zh-CN.js:
--------------------------------------------------------------------------------
1 | import component from './zh-CN/component';
2 | import globalHeader from './zh-CN/globalHeader';
3 | import menu from './zh-CN/menu';
4 | import pwa from './zh-CN/pwa';
5 | import settingDrawer from './zh-CN/settingDrawer';
6 | import settings from './zh-CN/settings';
7 | export default {
8 | 'navBar.lang': '语言',
9 | 'layout.user.link.help': '帮助',
10 | 'layout.user.link.privacy': '隐私',
11 | 'layout.user.link.terms': '条款',
12 | 'app.preview.down.block': '下载此页面到本地项目',
13 | 'app.welcome.link.fetch-blocks': '获取全部区块',
14 | 'app.welcome.link.block-list': '基于 block 开发,快速构建标准页面',
15 | ...globalHeader,
16 | ...menu,
17 | ...settingDrawer,
18 | ...settings,
19 | ...pwa,
20 | ...component,
21 | };
22 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage5-login/src/pages/City/HotCity/style.less:
--------------------------------------------------------------------------------
1 | .city-list-container {
2 | background-color: #fff;
3 | padding: 10px 15px 20px 15px;
4 |
5 | h3 {
6 | font-size: 16px;
7 | }
8 |
9 | ul {
10 | display: block;
11 | width: 100%;
12 | }
13 |
14 | li {
15 | list-style: none;
16 | display: block;
17 | float: left;
18 | width: 33.3%;
19 | text-align: center;
20 |
21 | span {
22 | display: inline-block;
23 | border: 1px solid #ccc;
24 | font-size: 16px;
25 | line-height: 2;
26 | margin-top: 15px;
27 | width: 90%;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/React从入门到实战/13.React UmiJS框架/code/umi-create-demo/src/components/Authorized/AuthorizedRoute.jsx:
--------------------------------------------------------------------------------
1 | import { Redirect, Route } from 'umi';
2 | import React from 'react';
3 | import Authorized from './Authorized';
4 |
5 | const AuthorizedRoute = ({ component: Component, render, authority, redirectPath, ...rest }) => (
6 | (
12 |
17 | )}
18 | />
19 | }
20 | >
21 | (Component ? : render(props))} />
22 |
23 | );
24 |
25 | export default AuthorizedRoute;
26 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage4-details/src/pages/City/HotCity/style.less:
--------------------------------------------------------------------------------
1 | .city-list-container {
2 | background-color: #fff;
3 | padding: 10px 15px 20px 15px;
4 |
5 | h3 {
6 | font-size: 16px;
7 | }
8 |
9 | ul {
10 | display: block;
11 | width: 100%;
12 | }
13 |
14 | li {
15 | list-style: none;
16 | display: block;
17 | float: left;
18 | width: 33.3%;
19 | text-align: center;
20 |
21 | span {
22 | display: inline-block;
23 | border: 1px solid #ccc;
24 | font-size: 16px;
25 | line-height: 2;
26 | margin-top: 15px;
27 | width: 90%;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/React从入门到实战/8.React 企业级实战项目-宜居/code/react-goodlive-stage6-shopcar/src/pages/City/HotCity/style.less:
--------------------------------------------------------------------------------
1 | .city-list-container {
2 | background-color: #fff;
3 | padding: 10px 15px 20px 15px;
4 |
5 | h3 {
6 | font-size: 16px;
7 | }
8 |
9 | ul {
10 | display: block;
11 | width: 100%;
12 | }
13 |
14 | li {
15 | list-style: none;
16 | display: block;
17 | float: left;
18 | width: 33.3%;
19 | text-align: center;
20 |
21 | span {
22 | display: inline-block;
23 | border: 1px solid #ccc;
24 | font-size: 16px;
25 | line-height: 2;
26 | margin-top: 15px;
27 | width: 90%;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------