├── .gitignore
├── README.md
├── article
└── React 和 Vue 的20个区别[源码层面].md
├── bookmarks
└── index.html
├── code.segment.config
├── README.md
├── css.json
├── html.json
├── javaScript.json
└── vue.json
├── dva-umi-template
├── .gitignore
├── .umirc.js
├── README.md
├── assets
│ ├── analysis.json
│ ├── login-bg.svg
│ ├── logo.png
│ └── react-pc-template.png
├── common
│ └── menu.js
├── components
│ ├── GlobalFooter
│ │ ├── index.js
│ │ └── index.less
│ ├── GlobalHeader
│ │ ├── index.js
│ │ └── index.less
│ ├── HeaderSearch
│ │ ├── index.js
│ │ └── index.less
│ ├── NoticeIcon
│ │ ├── NoticeList.js
│ │ ├── NoticeList.less
│ │ ├── index.js
│ │ └── index.less
│ ├── SiderMenu
│ │ ├── SiderMenu.js
│ │ ├── SilderMenu.test.js
│ │ ├── index.js
│ │ └── index.less
│ └── _utils
│ │ ├── pathTools.js
│ │ └── pathTools.test.js
├── layouts
│ └── index.js
├── package.json
├── pages
│ ├── .umi
│ │ ├── DvaContainer.js
│ │ ├── initDva.js
│ │ ├── initHistory.js
│ │ ├── polyfills.js
│ │ ├── router.js
│ │ └── umi.js
│ ├── dashboard
│ │ ├── analysis.js
│ │ ├── models
│ │ │ └── analysis.js
│ │ ├── monitor.js
│ │ └── workplace.js
│ ├── index.js
│ └── login
│ │ ├── login.css
│ │ ├── login.js
│ │ └── models
│ │ └── login.js
├── service
│ ├── dashboard.js
│ └── login.js
└── utils
│ ├── config
│ └── index.js
│ ├── request.js
│ └── utils.js
├── ide.config.md
├── js
├── Promise,Generator,async,await
│ ├── 1.promise-use.js
│ ├── 10.promise-async-generator.js
│ ├── 2.promise-polyfill-1.js
│ ├── 3.promise-polyfill-2.js
│ ├── 4.promise-polyfill-3.js
│ ├── 5.generator-1.js
│ ├── 6.generator-2.js
│ ├── 7.generator-3.js
│ ├── 8.async-await-1.js
│ └── 9.async-await-2.js
├── class,function
│ ├── .gitignore
│ ├── 1.usage.js
│ ├── 2.class-polyfill.js
│ ├── 3.performance-class.js
│ ├── 4.performance-react.js
│ ├── README.md
│ └── package.json
└── skill
│ ├── array
│ ├── 1.数组交集.js
│ ├── 10.数组是否包含值.js
│ ├── 11.数组每一项都满足.js
│ ├── 12.数组有一项满足.js
│ ├── 13.版本号排序.js
│ ├── 14.对象转数组.js
│ ├── 15.数组转对象.js
│ ├── 16.数组结构.js
│ ├── 2.数组并集.js
│ ├── 3.数组差集.js
│ ├── 4.数组补集.js
│ ├── 5.数组去重.js
│ ├── 6.数组排序.js
│ ├── 7.数组最大值.js
│ ├── 8.数组求和.js
│ └── 9.数组合并.js
│ ├── boolean
│ ├── 38.判断数据类型.js
│ ├── 39.使用Boolean过滤数组假值.js
│ ├── 40.短路运算.js
│ └── 41.switch简写.js
│ ├── function
│ ├── 27.函数自执行.js
│ └── 28.函数异步执行.js
│ ├── number
│ ├── 33.数字千分位.js
│ ├── 34.字符串转数字.js
│ ├── 35.判断小数是否相等.js
│ ├── 36.双位运算符.js
│ └── 37.取整和奇偶性判断.js
│ ├── object
│ ├── 17.对象变量属性.js
│ ├── 18.对象多余属性删除.js
│ ├── 19.对象嵌套属性解构.js
│ ├── 20.解构对象属性别名.js
│ ├── 21.解构对象属性默认值.js
│ ├── 22.拦截对象.js
│ ├── 23.对象深度拷贝.js
│ ├── 24.对象是否相等.js
│ └── 25.对象转化为字符串.js
│ └── string
│ ├── 29.字符串翻转.js
│ ├── 30.url参数序列化.js
│ ├── 31.url参数反序列化.js
│ └── 32.转化为字符串.js
├── mini-program-demo
├── README.md
├── app.js
├── app.json
├── app.wxss
├── components
│ ├── auth
│ │ ├── auth.js
│ │ ├── auth.json
│ │ ├── auth.wxml
│ │ ├── auth.wxss
│ │ └── images
│ │ │ └── jurisdiction.png
│ ├── canvas
│ │ ├── index
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ └── poster
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxss
│ │ │ └── poster.js
│ ├── location
│ │ ├── location.js
│ │ ├── location.json
│ │ ├── location.wxml
│ │ └── location.wxss
│ ├── media
│ │ ├── audio
│ │ │ ├── audioOne
│ │ │ │ ├── audioOne.js
│ │ │ │ ├── audioOne.json
│ │ │ │ ├── audioOne.wxml
│ │ │ │ └── audioOne.wxss
│ │ │ ├── audioTwo
│ │ │ │ ├── audioTwo.js
│ │ │ │ ├── audioTwo.json
│ │ │ │ ├── audioTwo.wxml
│ │ │ │ └── audioTwo.wxss
│ │ │ ├── backAudio
│ │ │ │ ├── backAudio.js
│ │ │ │ ├── backAudio.json
│ │ │ │ ├── backAudio.wxml
│ │ │ │ └── backAudio.wxss
│ │ │ └── record
│ │ │ │ ├── record.js
│ │ │ │ ├── record.json
│ │ │ │ ├── record.wxml
│ │ │ │ └── record.wxss
│ │ ├── camera
│ │ │ ├── camera.js
│ │ │ ├── camera.json
│ │ │ ├── camera.wxml
│ │ │ └── camera.wxss
│ │ └── video
│ │ │ ├── video.js
│ │ │ ├── video.json
│ │ │ ├── video.wxml
│ │ │ └── video.wxss
│ └── navigation
│ │ ├── navigation.js
│ │ ├── navigation.json
│ │ ├── navigation.wxml
│ │ └── navigation.wxss
├── images
│ ├── base64.js
│ ├── canvas-sel.png
│ ├── canvas.png
│ ├── file-sel.png
│ ├── file.png
│ ├── icon3.png
│ ├── location-sel.png
│ ├── location.png
│ ├── map-sel.png
│ ├── map.png
│ ├── media-sel.png
│ ├── media.png
│ ├── s5.png
│ ├── s6.png
│ ├── vcode.jpg
│ └── weui-lan.jpg
├── pages
│ ├── canvas
│ │ ├── canvas.js
│ │ ├── canvas.json
│ │ ├── canvas.wxml
│ │ └── canvas.wxss
│ ├── file
│ │ ├── file.js
│ │ ├── file.json
│ │ ├── file.wxml
│ │ ├── file.wxss
│ │ └── images
│ │ │ └── pic_160.png
│ ├── location
│ │ ├── location.js
│ │ ├── location.json
│ │ ├── location.wxml
│ │ └── location.wxss
│ ├── map
│ │ ├── map.js
│ │ ├── map.json
│ │ ├── map.wxml
│ │ └── map.wxss
│ └── media
│ │ ├── media.js
│ │ ├── media.json
│ │ ├── media.wxml
│ │ └── media.wxss
├── project.config.json
├── sitemap.json
├── styles
│ ├── iconfont.wxss
│ └── weui.wxss
├── subs
│ ├── uploadImg
│ │ └── pages
│ │ │ └── uploadImg
│ │ │ ├── uploadImg.js
│ │ │ ├── uploadImg.json
│ │ │ ├── uploadImg.wxml
│ │ │ └── uploadImg.wxss
│ └── webviewDetail
│ │ ├── webviewDetail.js
│ │ ├── webviewDetail.json
│ │ ├── webviewDetail.wxml
│ │ └── webviewDetail.wxss
└── utils
│ ├── api.js
│ ├── common.js
│ ├── config
│ ├── env.config.js
│ └── index.js
│ ├── deviceUtil.js
│ ├── request.js
│ └── util.js
├── mini-program-template
├── README.md
├── app.js
├── app.json
├── app.wxss
├── components
│ ├── homeCom
│ │ ├── homeCom.js
│ │ ├── homeCom.json
│ │ ├── homeCom.wxml
│ │ └── homeCom.wxss
│ └── navigation
│ │ ├── navigation.js
│ │ ├── navigation.json
│ │ ├── navigation.wxml
│ │ └── navigation.wxss
├── images
│ ├── base64.js
│ ├── cart-shop-sel.png
│ ├── cart-shop.png
│ ├── classify-sel.png
│ ├── classify.png
│ ├── home-sel.png
│ ├── home.png
│ ├── icon3.png
│ ├── my-sel.png
│ ├── my.png
│ ├── product-sel.png
│ ├── product.png
│ ├── s5.png
│ ├── s6.png
│ ├── vcode.jpg
│ └── wx-image.jpg
├── pages
│ ├── cartShop
│ │ ├── cartShop.js
│ │ ├── cartShop.json
│ │ ├── cartShop.wxml
│ │ └── cartShop.wxss
│ ├── classify
│ │ ├── classify.js
│ │ ├── classify.json
│ │ ├── classify.wxml
│ │ └── classify.wxss
│ ├── home
│ │ ├── home.js
│ │ ├── home.json
│ │ ├── home.wxml
│ │ └── home.wxss
│ ├── my
│ │ ├── my.js
│ │ ├── my.json
│ │ ├── my.wxml
│ │ └── my.wxss
│ └── product
│ │ ├── product.js
│ │ ├── product.json
│ │ ├── product.wxml
│ │ └── product.wxss
├── project.config.json
├── styles
│ ├── iconfont.wxss
│ └── weui.wxss
├── subs
│ ├── auth
│ │ └── pages
│ │ │ └── auth
│ │ │ ├── auth.js
│ │ │ ├── auth.json
│ │ │ ├── auth.wxml
│ │ │ └── auth.wxss
│ ├── images
│ │ └── pic_article.png
│ ├── links
│ │ └── pages
│ │ │ └── download
│ │ │ ├── download.js
│ │ │ ├── download.json
│ │ │ ├── download.wxml
│ │ │ └── download.wxss
│ └── shopDetail
│ │ └── pages
│ │ └── detailOne
│ │ ├── detailOne.js
│ │ ├── detailOne.json
│ │ ├── detailOne.wxml
│ │ └── detailOne.wxss
└── utils
│ ├── api.js
│ ├── config
│ ├── env.config.js
│ └── index.js
│ ├── deviceUtil.js
│ ├── request.js
│ └── util.js
├── node
├── express-demo
│ ├── .gitignore
│ ├── my-express
│ │ ├── index.js
│ │ └── test.js
│ ├── package-lock.json
│ ├── package.json
│ └── test.js
└── koa-demo
│ ├── .gitignore
│ ├── my-koa
│ ├── index.js
│ └── test.js
│ ├── package-lock.json
│ ├── package.json
│ └── test.js
├── react-koa
├── README.md
├── img
│ ├── react-koa-detail.png
│ └── react-koa-login.png
├── koa-template
│ ├── .gitignore
│ ├── README.md
│ ├── app.js
│ ├── app
│ │ ├── controllers
│ │ │ ├── course_controller.js
│ │ │ └── user_controller.js
│ │ ├── middleware
│ │ │ └── resFormat.js
│ │ ├── models
│ │ │ ├── course.js
│ │ │ ├── password.js
│ │ │ └── user.js
│ │ └── utils
│ │ │ ├── formatDate.js
│ │ │ └── passport.js
│ ├── config.js
│ ├── db-template
│ │ └── courses.json
│ ├── package-lock.json
│ ├── package.json
│ └── routes
│ │ └── api
│ │ ├── course_router.js
│ │ └── user_router.js
└── react-template
│ ├── .gitignore
│ ├── .umirc.js
│ ├── README.md
│ ├── assets
│ ├── analysis.json
│ ├── login-bg.svg
│ └── logo.png
│ ├── common
│ └── menu.js
│ ├── components
│ ├── GlobalFooter
│ │ ├── index.js
│ │ └── index.less
│ ├── GlobalHeader
│ │ ├── index.js
│ │ └── index.less
│ ├── HeaderSearch
│ │ ├── index.js
│ │ └── index.less
│ ├── NoticeIcon
│ │ ├── NoticeList.js
│ │ ├── NoticeList.less
│ │ ├── index.js
│ │ └── index.less
│ ├── SiderMenu
│ │ ├── SiderMenu.js
│ │ ├── SilderMenu.test.js
│ │ ├── index.js
│ │ └── index.less
│ └── _utils
│ │ ├── pathTools.js
│ │ └── pathTools.test.js
│ ├── layouts
│ └── index.js
│ ├── package.json
│ ├── pages
│ ├── .umi
│ │ ├── DvaContainer.js
│ │ ├── TitleWrapper.jsx
│ │ ├── initDva.js
│ │ ├── initHistory.js
│ │ ├── polyfills.js
│ │ ├── router.js
│ │ └── umi.js
│ ├── dashboard
│ │ ├── analysis.js
│ │ ├── models
│ │ │ └── analysis.js
│ │ ├── monitor.js
│ │ └── workplace.js
│ ├── index.js
│ └── login
│ │ ├── login.css
│ │ ├── login.js
│ │ └── models
│ │ └── login.js
│ ├── service
│ ├── analysis.js
│ └── login.js
│ └── utils
│ ├── config
│ └── index.js
│ ├── request.js
│ └── utils.js
├── react-mobile
├── .babelrc
├── .gitignore
├── .postcssrc.js
├── README.md
├── build
│ ├── build.js
│ ├── check-versions.js
│ ├── utils.js
│ ├── webpack.base.conf.js
│ ├── webpack.dev.conf.js
│ └── webpack.prod.conf.js
├── config
│ ├── dev.env.js
│ ├── index.js
│ └── prod.env.js
├── index.html
├── package.json
├── src
│ ├── App.js
│ ├── api
│ │ ├── index.js
│ │ └── url.js
│ ├── assets
│ │ ├── css
│ │ │ ├── common.css
│ │ │ ├── reset.css
│ │ │ ├── reset.min.css
│ │ │ ├── reset.scss
│ │ │ ├── variable.css
│ │ │ ├── variable.min.css
│ │ │ └── variable.scss
│ │ ├── fonts
│ │ │ ├── demo.css
│ │ │ ├── demo_fontclass.html
│ │ │ ├── demo_symbol.html
│ │ │ ├── demo_unicode.html
│ │ │ ├── iconfont.css
│ │ │ ├── iconfont.eot
│ │ │ ├── iconfont.js
│ │ │ ├── iconfont.svg
│ │ │ ├── iconfont.ttf
│ │ │ └── iconfont.woff
│ │ ├── icon-arrow-left.png
│ │ ├── icon-input-clear.png
│ │ ├── icon-menu-add.png
│ │ ├── icon-menu-list.png
│ │ ├── icon-record-close.png
│ │ ├── icon-record-recent.png
│ │ ├── icon-search-default.png
│ │ └── react-mobile.png
│ ├── components
│ │ ├── Header
│ │ │ ├── index.js
│ │ │ └── style.scss
│ │ ├── Loading
│ │ │ ├── index.jsx
│ │ │ └── style.scss
│ │ ├── Search
│ │ │ ├── index.js
│ │ │ └── style.scss
│ │ ├── Slider
│ │ │ ├── index.js
│ │ │ └── style.scss
│ │ └── Tab
│ │ │ ├── index.js
│ │ │ └── style.scss
│ ├── layouts
│ │ └── MainLayout
│ │ │ ├── index.tsx
│ │ │ └── style.scss
│ ├── main.js
│ ├── pages
│ │ ├── classify
│ │ │ └── index.tsx
│ │ ├── home
│ │ │ └── index.tsx
│ │ ├── my
│ │ │ └── index.tsx
│ │ ├── shop
│ │ │ └── index.tsx
│ │ ├── shopCart
│ │ │ └── index.tsx
│ │ └── shopType
│ │ │ └── index.tsx
│ ├── router
│ │ └── index.js
│ ├── store
│ │ ├── actionTypes.js
│ │ ├── actions.js
│ │ ├── index.js
│ │ └── reducer.js
│ └── utils
│ │ ├── http.js
│ │ └── index.js
├── static
│ └── index.js
├── theme.js
├── tsconfig.json
└── yarn.lock
├── react-pc-skill
├── .gitignore
├── README.md
├── assets
│ └── react-pc-template.jpg
├── config
│ ├── env.js
│ ├── jest
│ │ ├── cssTransform.js
│ │ └── fileTransform.js
│ ├── modules.js
│ ├── paths.js
│ ├── pnpTs.js
│ ├── webpack.config.js
│ ├── webpack.dll.conf.js
│ └── webpackDevServer.config.js
├── package.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ └── manifest.json
├── scripts
│ ├── build.js
│ ├── start.js
│ └── test.js
├── src
│ ├── App.js
│ ├── App.test.js
│ ├── common
│ │ ├── BaseForm
│ │ │ └── index.js
│ │ ├── Etable
│ │ │ └── index.js
│ │ ├── SecondLevelComponent.js
│ │ └── ThirdLevelComponent.js
│ ├── components
│ │ ├── OneTen
│ │ │ └── Eight.jsx
│ │ └── TwoTen
│ │ │ ├── EightteenChildFive.jsx
│ │ │ ├── EightteenChildFour.jsx
│ │ │ ├── EightteenChildOne.jsx
│ │ │ ├── EightteenChildThree.jsx
│ │ │ ├── EightteenChildTwo.jsx
│ │ │ ├── EightteenChildTwoChild.jsx
│ │ │ ├── NineteenChild.jsx
│ │ │ ├── Thirteen.jsx
│ │ │ └── TwentyChild.jsx
│ ├── config
│ │ └── menuConfig.js
│ ├── index.css
│ ├── index.js
│ ├── pages
│ │ ├── FourTen
│ │ │ ├── thirtyFour.jsx
│ │ │ ├── thirtyOne.jsx
│ │ │ ├── thirtyThree.jsx
│ │ │ └── thirtyTwo.jsx
│ │ ├── Home
│ │ │ ├── index.jsx
│ │ │ └── index.less
│ │ ├── Login
│ │ │ ├── index.js
│ │ │ ├── index.less
│ │ │ └── service.js
│ │ ├── NotFound
│ │ │ ├── index.js
│ │ │ └── index.less
│ │ ├── OneTen
│ │ │ ├── eight.jsx
│ │ │ ├── five.jsx
│ │ │ ├── four.jsx
│ │ │ ├── nine.jsx
│ │ │ ├── one.jsx
│ │ │ ├── seven.jsx
│ │ │ ├── six.jsx
│ │ │ ├── store
│ │ │ │ ├── action.js
│ │ │ │ ├── reducer.js
│ │ │ │ └── types.js
│ │ │ ├── ten.jsx
│ │ │ ├── three.jsx
│ │ │ └── two.jsx
│ │ ├── ThreeTen
│ │ │ ├── thirty.jsx
│ │ │ ├── twentyEight.jsx
│ │ │ ├── twentyFive.jsx
│ │ │ ├── twentyFour.jsx
│ │ │ ├── twentyNine.jsx
│ │ │ ├── twentyOne.jsx
│ │ │ ├── twentySeven.jsx
│ │ │ ├── twentySix.jsx
│ │ │ ├── twentyThree.jsx
│ │ │ └── twentyTwo.jsx
│ │ ├── TwoTen
│ │ │ ├── Eleven.jsx
│ │ │ ├── eighteen.jsx
│ │ │ ├── fifteen.jsx
│ │ │ ├── fourteen.jsx
│ │ │ ├── nineteen.jsx
│ │ │ ├── seventeen.jsx
│ │ │ ├── sixteen.jsx
│ │ │ ├── thirteen.jsx
│ │ │ ├── twelve.jsx
│ │ │ └── twenty.jsx
│ │ └── User
│ │ │ ├── index.js
│ │ │ └── index.less
│ ├── router.js
│ ├── serviceWorker.js
│ ├── setupProxy.js
│ ├── store
│ │ ├── actionCreator.js
│ │ ├── actionTypes.js
│ │ ├── index.js
│ │ └── reducer.js
│ ├── stylus
│ │ ├── common.less
│ │ ├── index.less
│ │ ├── loading.less
│ │ └── reset.less
│ └── utils
│ │ ├── asyncComponent.js
│ │ ├── baseUrl.js
│ │ ├── connect.js
│ │ ├── context.js
│ │ ├── decorators.js
│ │ ├── index.js
│ │ ├── loadable.js
│ │ ├── recursion-router.js
│ │ ├── renderRoutes.js
│ │ ├── request.js
│ │ └── useConnect.js
└── yarn.lock
├── react-pc-template
├── .gitignore
├── README.md
├── config
│ ├── env.js
│ ├── jest
│ │ ├── cssTransform.js
│ │ └── fileTransform.js
│ ├── modules.js
│ ├── paths.js
│ ├── pnpTs.js
│ ├── webpack.config.js
│ ├── webpack.dll.conf.js
│ └── webpackDevServer.config.js
├── package.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ └── manifest.json
├── scripts
│ ├── build.js
│ ├── start.js
│ └── test.js
├── src
│ ├── App.js
│ ├── App.test.js
│ ├── common
│ │ ├── BaseForm
│ │ │ └── index.js
│ │ ├── Etable
│ │ │ └── index.js
│ │ ├── SecondLevelComponent.js
│ │ └── ThirdLevelComponent.js
│ ├── config
│ │ └── menuConfig.js
│ ├── index.css
│ ├── index.js
│ ├── pages
│ │ ├── Home
│ │ │ ├── index.jsx
│ │ │ └── index.less
│ │ ├── Login
│ │ │ ├── index.js
│ │ │ ├── index.less
│ │ │ └── service.js
│ │ ├── NotFound
│ │ │ ├── index.js
│ │ │ └── index.less
│ │ ├── OneTen
│ │ │ └── one.jsx
│ │ ├── TwoTen
│ │ │ └── Eleven.jsx
│ │ └── User
│ │ │ ├── index.js
│ │ │ └── index.less
│ ├── router.js
│ ├── serviceWorker.js
│ ├── setupProxy.js
│ ├── store
│ │ ├── actionCreator.js
│ │ ├── actionTypes.js
│ │ ├── index.js
│ │ └── reducer.js
│ ├── stylus
│ │ ├── common.less
│ │ ├── index.less
│ │ ├── loading.less
│ │ └── reset.less
│ └── utils
│ │ ├── asyncComponent.js
│ │ ├── baseUrl.js
│ │ ├── connect.js
│ │ ├── index.js
│ │ ├── loadable.js
│ │ ├── recursion-router.js
│ │ ├── renderRoutes.js
│ │ ├── request.js
│ │ └── useConnect.js
└── yarn.lock
├── utils-lan
├── README.md
├── index.js
├── lib
│ ├── arr.js
│ ├── check.js
│ ├── client.js
│ ├── file.js
│ ├── obj.js
│ ├── storage.js
│ ├── str.js
│ ├── thrDeb.js
│ ├── time.js
│ └── url.js
└── package.json
├── vue-demo
├── .babelrc
├── .editorconfig
├── .gitignore
├── .postcssrc.js
├── README.md
├── build
│ ├── build.js
│ ├── check-versions.js
│ ├── logo.png
│ ├── utils.js
│ ├── vue-loader.conf.js
│ ├── webpack.base.conf.js
│ ├── webpack.dev.conf.js
│ └── webpack.prod.conf.js
├── config
│ ├── dev.env.js
│ ├── index.js
│ ├── prod.env.js
│ └── test.env.js
├── images
│ └── vue-demo.png
├── index.html
├── package-lock.json
├── package.json
├── scripts
│ ├── backup.js
│ ├── build.js
│ ├── buildHooks.js
│ ├── buildModule.js
│ ├── deploy.js
│ ├── server.js
│ ├── template
│ │ ├── add.template.vue
│ │ ├── api.template.js
│ │ ├── index.js
│ │ ├── index.template.vue
│ │ ├── info.template.vue
│ │ └── route.template.js
│ ├── util.js
│ └── zip.js
├── src
│ ├── App.vue
│ ├── assets
│ │ ├── avactor.png
│ │ ├── fonts
│ │ │ ├── demo.css
│ │ │ ├── demo_index.html
│ │ │ ├── iconfont.css
│ │ │ ├── iconfont.eot
│ │ │ ├── iconfont.js
│ │ │ ├── iconfont.svg
│ │ │ ├── iconfont.ttf
│ │ │ ├── iconfont.woff
│ │ │ └── iconfont.woff2
│ │ ├── login.jpg
│ │ ├── login_pass.png
│ │ ├── login_user.png
│ │ ├── right-arrow-sel.png
│ │ └── right-arrow.png
│ ├── components
│ │ ├── addTable.vue
│ │ ├── crop.vue
│ │ ├── multiCheckCom.vue
│ │ ├── selectBox.vue
│ │ └── tabs.vue
│ ├── main.js
│ ├── page
│ │ ├── Home.vue
│ │ ├── Login.vue
│ │ ├── dataVisual
│ │ │ ├── ComEcharts.vue
│ │ │ ├── Map.vue
│ │ │ └── SpeEcharts.vue
│ │ ├── fileImg
│ │ │ ├── FileCloud.vue
│ │ │ ├── UploadFile.vue
│ │ │ └── UploadImg.vue
│ │ ├── richText
│ │ │ ├── CustomEditor.vue
│ │ │ └── TextEditor.vue
│ │ └── tableClassify
│ │ │ ├── ComTable.vue
│ │ │ ├── Drag.vue
│ │ │ ├── MergeTable.vue
│ │ │ ├── MultiCheck.vue
│ │ │ └── SpeTable.vue
│ ├── router
│ │ └── index.js
│ ├── store
│ │ ├── index.js
│ │ └── modules
│ │ │ └── comTable.js
│ └── utils
│ │ ├── api.js
│ │ ├── check.js
│ │ ├── config
│ │ ├── cloud.js
│ │ └── index.js
│ │ ├── fileUpdate.js
│ │ ├── mixin
│ │ └── chart.js
│ │ └── request.js
├── static
│ ├── .gitkeep
│ ├── comTable.json
│ ├── css
│ │ └── common.css
│ └── favicon.png
└── test
│ └── unit
│ ├── .eslintrc
│ ├── jest.conf.js
│ ├── setup.js
│ └── specs
│ └── HelloWorld.spec.js
├── vue-mobile-template
├── .babelrc
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .postcssrc.js
├── README.md
├── build
│ ├── build.js
│ ├── check-versions.js
│ ├── logo.png
│ ├── utils.js
│ ├── vue-loader.conf.js
│ ├── webpack.base.conf.js
│ ├── webpack.dev.conf.js
│ └── webpack.prod.conf.js
├── config
│ ├── dev.env.js
│ ├── index.js
│ ├── prod.env.js
│ └── test.env.js
├── index.html
├── package.json
├── src
│ ├── App.vue
│ ├── assets
│ │ └── fonts
│ │ │ ├── demo.css
│ │ │ ├── demo_fontclass.html
│ │ │ ├── demo_symbol.html
│ │ │ ├── demo_unicode.html
│ │ │ ├── iconfont.css
│ │ │ ├── iconfont.eot
│ │ │ ├── iconfont.js
│ │ │ ├── iconfont.svg
│ │ │ ├── iconfont.ttf
│ │ │ └── iconfont.woff
│ ├── components
│ │ ├── headTop.vue
│ │ ├── pullRefresh.vue
│ │ └── tabbar.vue
│ ├── main.js
│ ├── pages
│ │ ├── classify
│ │ │ ├── classify.vue
│ │ │ └── img
│ │ │ │ └── classify1.jpg
│ │ ├── home
│ │ │ ├── home.vue
│ │ │ └── img
│ │ │ │ ├── bgc.jpg
│ │ │ │ └── bgc.png
│ │ ├── main
│ │ │ ├── img
│ │ │ │ ├── banner1.jpg
│ │ │ │ ├── banner2.jpg
│ │ │ │ ├── product1.jpg
│ │ │ │ ├── product2.jpg
│ │ │ │ ├── product3.jpg
│ │ │ │ └── product4.jpg
│ │ │ └── main.vue
│ │ ├── my
│ │ │ └── my.vue
│ │ ├── product
│ │ │ └── product.vue
│ │ ├── productDetail
│ │ │ ├── img
│ │ │ │ └── product-detail1.jpg
│ │ │ └── productDetail.vue
│ │ └── shopcart
│ │ │ └── shopcart.vue
│ ├── router
│ │ └── index.js
│ ├── store
│ │ ├── index.js
│ │ └── modules
│ │ │ └── tabIndex.js
│ └── utils
│ │ ├── api.js
│ │ ├── check.js
│ │ ├── config
│ │ └── index.js
│ │ └── request.js
├── static
│ ├── .gitkeep
│ ├── comTable.json
│ ├── favicon.png
│ └── lib
│ │ ├── css
│ │ ├── common.css
│ │ ├── function.scss
│ │ └── mixin.scss
│ │ └── js
│ │ └── initFontSize.min.js
└── test
│ └── unit
│ ├── .eslintrc
│ ├── jest.conf.js
│ ├── setup.js
│ └── specs
│ ├── HelloWorld.spec.js
│ └── List.spec.js
├── vue-mobile
├── .babelrc
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .postcssrc.js
├── README.md
├── build
│ ├── build.js
│ ├── check-versions.js
│ ├── logo.png
│ ├── utils.js
│ ├── vue-loader.conf.js
│ ├── webpack.base.conf.js
│ ├── webpack.dev.conf.js
│ └── webpack.prod.conf.js
├── config
│ ├── dev.env.js
│ ├── index.js
│ ├── prod.env.js
│ └── test.env.js
├── index.html
├── package.json
├── src
│ ├── App.vue
│ ├── api
│ │ └── pay.js
│ ├── assets
│ │ ├── activityDetail
│ │ │ └── more-sel.png
│ │ ├── css
│ │ │ └── activityTheme.scss
│ │ ├── fonts
│ │ │ ├── demo.css
│ │ │ ├── demo_fontclass.html
│ │ │ ├── demo_symbol.html
│ │ │ ├── demo_unicode.html
│ │ │ ├── iconfont.css
│ │ │ ├── iconfont.eot
│ │ │ ├── iconfont.js
│ │ │ ├── iconfont.svg
│ │ │ ├── iconfont.ttf
│ │ │ └── iconfont.woff
│ │ └── img
│ │ │ ├── overview_dia_close.png
│ │ │ └── project.jpg
│ ├── components
│ │ ├── activityDetail
│ │ │ ├── AddressSel.vue
│ │ │ ├── DateRange.vue
│ │ │ ├── DropBox.vue
│ │ │ ├── MultipleSel.vue
│ │ │ ├── MultipleText.vue
│ │ │ ├── PlaceOperat.vue
│ │ │ ├── PreviewImg.vue
│ │ │ ├── SingleSel.vue
│ │ │ ├── SingleText.vue
│ │ │ ├── StaticMap.vue
│ │ │ ├── TextInstruct.vue
│ │ │ ├── TimePoint.vue
│ │ │ ├── TitleText.vue
│ │ │ └── UploadImg.vue
│ │ ├── calendar
│ │ │ ├── calendar.js
│ │ │ ├── calendarWeek.vue
│ │ │ └── images
│ │ │ │ ├── calendar-left.png
│ │ │ │ └── calendar-right.png
│ │ ├── confirm
│ │ │ ├── index.js
│ │ │ └── index.vue
│ │ ├── headTop.vue
│ │ ├── messageBox
│ │ │ ├── index.js
│ │ │ └── index.vue
│ │ ├── pullRefresh.vue
│ │ └── tabbar.vue
│ ├── main.js
│ ├── pages
│ │ ├── activityDetail
│ │ │ └── activityDetail.vue
│ │ ├── classify
│ │ │ ├── classify.vue
│ │ │ └── img
│ │ │ │ └── classify1.jpg
│ │ ├── home
│ │ │ ├── home.vue
│ │ │ └── img
│ │ │ │ ├── bgc.jpg
│ │ │ │ └── bgc.png
│ │ ├── main
│ │ │ ├── echarts.js
│ │ │ ├── img
│ │ │ │ ├── banner1.jpg
│ │ │ │ ├── banner2.jpg
│ │ │ │ ├── product1.jpg
│ │ │ │ ├── product2.jpg
│ │ │ │ ├── product3.jpg
│ │ │ │ └── product4.jpg
│ │ │ └── main.vue
│ │ ├── my
│ │ │ └── my.vue
│ │ ├── pay
│ │ │ ├── img
│ │ │ │ ├── wx-pay-icon.jpg
│ │ │ │ └── wx-qrcode.png
│ │ │ ├── pay.vue
│ │ │ └── paySuccess.vue
│ │ ├── product
│ │ │ └── product.vue
│ │ ├── productDetail
│ │ │ ├── img
│ │ │ │ └── product-detail1.jpg
│ │ │ └── productDetail.vue
│ │ └── shopcart
│ │ │ └── shopcart.vue
│ ├── router
│ │ └── index.js
│ ├── store
│ │ ├── index.js
│ │ └── modules
│ │ │ └── tabIndex.js
│ └── utils
│ │ ├── agent.js
│ │ ├── arr.js
│ │ ├── check.js
│ │ ├── config
│ │ └── index.js
│ │ ├── file.js
│ │ ├── obj.js
│ │ ├── request.js
│ │ ├── storage.js
│ │ ├── str.js
│ │ ├── thrDeb.js
│ │ ├── time.js
│ │ └── url.js
├── static
│ ├── .gitkeep
│ └── lib
│ │ ├── css
│ │ ├── common.css
│ │ ├── function.scss
│ │ └── mixin.scss
│ │ └── js
│ │ └── initFontSize.min.js
└── test
│ └── unit
│ ├── .eslintrc
│ ├── jest.conf.js
│ ├── setup.js
│ └── specs
│ ├── HelloWorld.spec.js
│ └── List.spec.js
├── vue-multi-template
├── .browserslistrc
├── .eslintrc.js
├── .gitignore
├── README.md
├── babel.config.js
├── package-lock.json
├── package.json
├── postcss.config.js
├── public
│ └── favicon.ico
├── src
│ ├── assets
│ │ └── logo.png
│ ├── components
│ │ ├── HelloWorld.vue
│ │ └── Test.vue
│ └── pages
│ │ ├── index
│ │ ├── App.vue
│ │ ├── index.html
│ │ ├── index.js
│ │ ├── router.js
│ │ └── views
│ │ │ └── index.vue
│ │ ├── page1
│ │ ├── App.vue
│ │ ├── index.html
│ │ ├── index.js
│ │ ├── router.js
│ │ └── views
│ │ │ ├── page1-1.vue
│ │ │ └── page1-2.vue
│ │ └── page2
│ │ ├── App.vue
│ │ ├── index.html
│ │ ├── index.js
│ │ ├── router.js
│ │ └── views
│ │ ├── page2-1.vue
│ │ └── page2-2.vue
└── vue.config.js
├── vue-pc-template
├── .babelrc
├── .editorconfig
├── .gitignore
├── .postcssrc.js
├── README.md
├── build
│ ├── build.js
│ ├── check-versions.js
│ ├── logo.png
│ ├── utils.js
│ ├── vue-loader.conf.js
│ ├── webpack.base.conf.js
│ ├── webpack.dev.conf.js
│ └── webpack.prod.conf.js
├── config
│ ├── dev.env.js
│ ├── index.js
│ ├── prod.env.js
│ └── test.env.js
├── images
│ └── vue-pc-template.png
├── index.html
├── package-lock.json
├── package.json
├── src
│ ├── App.vue
│ ├── assets
│ │ ├── avactor.png
│ │ ├── fonts
│ │ │ ├── demo.css
│ │ │ ├── demo_fontclass.html
│ │ │ ├── demo_symbol.html
│ │ │ ├── demo_unicode.html
│ │ │ ├── iconfont.css
│ │ │ ├── iconfont.eot
│ │ │ ├── iconfont.js
│ │ │ ├── iconfont.svg
│ │ │ ├── iconfont.ttf
│ │ │ └── iconfont.woff
│ │ ├── login.jpg
│ │ ├── login_pass.png
│ │ └── login_user.png
│ ├── components
│ │ ├── addTable.vue
│ │ └── tabs.vue
│ ├── main.js
│ ├── page
│ │ ├── AjaxCompare.vue
│ │ ├── ComEcharts.vue
│ │ ├── Home.vue
│ │ └── Login.vue
│ ├── router
│ │ └── index.js
│ ├── store
│ │ ├── index.js
│ │ └── modules
│ │ │ └── comTable.js
│ └── utils
│ │ ├── ajax.js
│ │ ├── api.js
│ │ ├── check.js
│ │ ├── config
│ │ └── index.js
│ │ └── request.js
├── static
│ ├── .gitkeep
│ ├── comTable.json
│ └── favicon.png
└── test
│ └── unit
│ ├── .eslintrc
│ ├── jest.conf.js
│ ├── setup.js
│ └── specs
│ └── HelloWorld.spec.js
└── vue-ts-template
├── .gitignore
├── README.md
├── babel.config.js
├── package-lock.json
├── package.json
├── public
├── favicon.ico
└── index.html
├── src
├── App.vue
├── assets
│ ├── avactor.png
│ ├── fonts
│ │ ├── demo.css
│ │ ├── demo_fontclass.html
│ │ ├── demo_symbol.html
│ │ ├── demo_unicode.html
│ │ ├── iconfont.css
│ │ ├── iconfont.eot
│ │ ├── iconfont.js
│ │ ├── iconfont.svg
│ │ ├── iconfont.ttf
│ │ └── iconfont.woff
│ ├── login.jpg
│ ├── login_pass.png
│ ├── login_user.png
│ └── logo.png
├── components
│ └── tabs.vue
├── main.ts
├── pages
│ ├── ComEcharts.vue
│ └── Home.vue
├── router.ts
├── shims-tsx.d.ts
├── shims-vue.d.ts
├── store.ts
└── utils
│ ├── api.ts
│ ├── check.ts
│ ├── config
│ └── index.ts
│ └── request.ts
├── static
└── vue-ts-template.png
├── tsconfig.json
└── vue.config.js
/.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 |
--------------------------------------------------------------------------------
/code.segment.config/README.md:
--------------------------------------------------------------------------------
1 | ## 代码段项目类型
2 | ```
3 | vue,小程序,weex
4 | ```
5 | ## 使用
6 | ```
7 | vscode 编辑器,设置---用户代码片段---分别按类型导入
8 | ```
9 | ## vue和 weex
10 | ```
11 | template 对应 vue.json
12 | style 对应 css.json
13 | script 对应 javascript.json
14 | ```
15 | ## 小程序
16 | ```
17 | wxml 对应 html.json
18 | wxss 对应 css.json
19 | js 对应 javascript.json
20 | ```
--------------------------------------------------------------------------------
/code.segment.config/vue.json:
--------------------------------------------------------------------------------
1 | {
2 | "Print to template": {
3 | "prefix": "template",
4 | "body": [
5 | "",
6 | "\t",
7 | "\t
",
8 | "",
9 | "",
10 | "",
20 | "",
21 | ""
23 | ],
24 | "description": "template output to template"
25 | }
26 | }
--------------------------------------------------------------------------------
/dva-umi-template/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 | package-lock.json
4 | func-test/www
5 | *.sw*
6 | *.un~
7 | config.local.js
8 | yarn.lock
9 |
10 |
--------------------------------------------------------------------------------
/dva-umi-template/.umirc.js:
--------------------------------------------------------------------------------
1 | export default {
2 | history: 'hash',
3 | plugins: [
4 | ['umi-plugin-react', {
5 | antd: true,
6 | dva: true,
7 | title: 'react-pc-template',
8 | routes: {
9 | exclude: [
10 | /model\.(j|t)sx?$/,
11 | /service\.(j|t)sx?$/,
12 | /models\//,
13 | /components\//,
14 | /services\//,
15 | ],
16 | },
17 | }],
18 | ],
19 | };
20 |
--------------------------------------------------------------------------------
/dva-umi-template/README.md:
--------------------------------------------------------------------------------
1 | # dva-umi-tempalte
2 | > A react.js tempalte
3 |
4 | ## Build Setup
5 |
6 | 
7 |
8 | ``` bash
9 | # install dependencies
10 | npm install
11 |
12 | # serve with hot reload at localhost:8080
13 | npm start
14 |
15 | # build for production with minification
16 | npm run build
17 |
18 |
19 |
--------------------------------------------------------------------------------
/dva-umi-template/assets/analysis.json:
--------------------------------------------------------------------------------
1 | {tabData:[
2 | {
3 | date:'2017-05-02',
4 | name:'王小虎',
5 | address:'上海市普陀区金沙江路1518弄'
6 | },
7 | {
8 | date:'2016-06-04',
9 | name:'王小虎',
10 | address: '上海市普陀区金沙江路 1517 弄'
11 | },
12 | {
13 | date:'2016-05-01',
14 | name:'王小虎',
15 | address:'上海市普陀区金沙江路 1519 弄'
16 | },
17 | {
18 | date: '2018-05-03',
19 | name: '王小虎',
20 | address: '上海市普陀区金沙江路 1516 弄'
21 | }
22 | ]}
--------------------------------------------------------------------------------
/dva-umi-template/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/dva-umi-template/assets/logo.png
--------------------------------------------------------------------------------
/dva-umi-template/assets/react-pc-template.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/dva-umi-template/assets/react-pc-template.png
--------------------------------------------------------------------------------
/dva-umi-template/components/GlobalFooter/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/lib/style/themes/default.less';
2 |
3 | .globalFooter {
4 | padding: 0 16px;
5 | margin: 48px 0 24px 0;
6 | text-align: center;
7 |
8 | .links {
9 | margin-bottom: 8px;
10 |
11 | a {
12 | color: @text-color-secondary;
13 | transition: all 0.3s;
14 |
15 | &:not(:last-child) {
16 | margin-right: 40px;
17 | }
18 |
19 | &:hover {
20 | color: @text-color;
21 | }
22 | }
23 | }
24 |
25 | .copyright {
26 | color: @text-color-secondary;
27 | font-size: @font-size-base;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/dva-umi-template/components/NoticeIcon/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/lib/style/themes/default.less';
2 |
3 | .popover {
4 | width: 336px;
5 | :global(.ant-popover-inner-content) {
6 | padding: 0;
7 | }
8 | }
9 |
10 | .noticeButton {
11 | cursor: pointer;
12 | display: inline-block;
13 | transition: all 0.3s;
14 | }
15 |
16 | .icon {
17 | font-size: 16px;
18 | padding: 4px;
19 | }
20 |
21 | .tabs {
22 | :global {
23 | .ant-tabs-nav-scroll {
24 | text-align: center;
25 | }
26 | .ant-tabs-bar {
27 | margin-bottom: 4px;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/dva-umi-template/components/_utils/pathTools.js:
--------------------------------------------------------------------------------
1 | // /userinfo/2144/id => ['/userinfo','/useinfo/2144,'/userindo/2144/id']
2 | export function urlToList(url) {
3 | const urllist = url.split('/').filter(i => i);
4 | return urllist.map((urlItem, index) => {
5 | return `/${urllist.slice(0, index + 1).join('/')}`;
6 | });
7 | }
8 |
--------------------------------------------------------------------------------
/dva-umi-template/components/_utils/pathTools.test.js:
--------------------------------------------------------------------------------
1 | import { urlToList } from './pathTools';
2 |
3 | describe('test urlToList', () => {
4 | it('A path', () => {
5 | expect(urlToList('/userinfo')).toEqual(['/userinfo']);
6 | });
7 | it('Secondary path', () => {
8 | expect(urlToList('/userinfo/2144')).toEqual(['/userinfo', '/userinfo/2144']);
9 | });
10 | it('Three paths', () => {
11 | expect(urlToList('/userinfo/2144/addr')).toEqual([
12 | '/userinfo',
13 | '/userinfo/2144',
14 | '/userinfo/2144/addr',
15 | ]);
16 | });
17 | });
18 |
--------------------------------------------------------------------------------
/dva-umi-template/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "start": "umi dev",
4 | "build": "umi build"
5 | },
6 | "dependencies": {
7 | "ant-design-pro": "^1.3.0",
8 | "axios": "^0.18.0",
9 | "dva": "^2.4.1",
10 | "lodash": "^4.17.10",
11 | "lodash-decorators": "^5.0.0",
12 | "moment": "^2.22.1",
13 | "path-to-regexp": "^1.7.0",
14 | "rc-drawer-menu": "^0.5.7",
15 | "umi": "^2.1.1",
16 | "umi-plugin-react": "^1.0.0-beta.17"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/dva-umi-template/pages/.umi/DvaContainer.js:
--------------------------------------------------------------------------------
1 | import { Component } from 'react';
2 |
3 | class DvaContainer extends Component {
4 | render() {
5 | window.g_app.router(() => this.props.children);
6 | return window.g_app.start()();
7 | }
8 | }
9 |
10 | export default DvaContainer;
11 |
--------------------------------------------------------------------------------
/dva-umi-template/pages/.umi/initDva.js:
--------------------------------------------------------------------------------
1 | import dva from 'dva';
2 | import createLoading from 'dva-loading';
3 |
4 | const runtimeDva = window.g_plugins.mergeConfig('dva');
5 | let app = dva({
6 | history: window.g_history,
7 |
8 | ...(runtimeDva.config || {}),
9 | });
10 |
11 | window.g_app = app;
12 | app.use(createLoading());
13 | (runtimeDva.plugins || []).forEach(plugin => {
14 | app.use(plugin);
15 | });
16 |
17 | app.model({ namespace: 'analysis', ...(require('E:/my-react/react-pc-template/pages/dashboard/models/analysis.js').default) });
18 | app.model({ namespace: 'login', ...(require('E:/my-react/react-pc-template/pages/login/models/login.js').default) });
19 |
--------------------------------------------------------------------------------
/dva-umi-template/pages/.umi/initHistory.js:
--------------------------------------------------------------------------------
1 | // create history
2 | window.g_history = require('history/createHashHistory').default();
3 |
--------------------------------------------------------------------------------
/dva-umi-template/pages/.umi/polyfills.js:
--------------------------------------------------------------------------------
1 | import '@babel/polyfill';
2 |
3 |
--------------------------------------------------------------------------------
/dva-umi-template/pages/dashboard/models/analysis.js:
--------------------------------------------------------------------------------
1 | import {queryWeather} from '@/service/dashboard';
2 |
3 | export default {
4 | namespace: 'analysis',
5 |
6 | state: {
7 | weatherData: [],
8 | },
9 |
10 | effects: {
11 | *fetchWeather(action, { call, put }) {
12 | const response = yield call(queryWeather);
13 | yield put({
14 | type: 'changeWeather',
15 | weather: response.result||"返回值为空的默认值是weather",
16 | });
17 | },
18 | },
19 |
20 | reducers: {
21 | changeWeather(state, action) {
22 | return {
23 | ...state,
24 | queryWeather: action.weather,
25 | };
26 | },
27 | },
28 | };
--------------------------------------------------------------------------------
/dva-umi-template/pages/dashboard/monitor.js:
--------------------------------------------------------------------------------
1 | import router from 'umi/router';
2 | import { Button } from 'antd';
3 |
4 | export default () =>
5 | <>
6 |
监控页
7 |
10 | >
11 |
12 |
--------------------------------------------------------------------------------
/dva-umi-template/pages/dashboard/workplace.js:
--------------------------------------------------------------------------------
1 | import router from 'umi/router';
2 | import { Button } from 'antd';
3 |
4 | export default () =>
5 | <>
6 | 工作台
7 |
10 | >
11 |
12 |
--------------------------------------------------------------------------------
/dva-umi-template/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'umi/link';
2 |
3 | export default () =>
4 | <>
5 | Index Page
6 | Pages
7 |
8 | - /dashboard/analysis
9 |
10 | >
11 |
--------------------------------------------------------------------------------
/dva-umi-template/pages/login/login.css:
--------------------------------------------------------------------------------
1 | .loginBox{
2 | position: fixed;
3 | top:0;
4 | right: 0;
5 | bottom: 0;
6 | left: 0;
7 | display:flex;
8 | justify-content: center;
9 | align-items:center;
10 | background-image: url(../../assets/login-bg.svg);
11 | background-repeat: no-repeat;
12 | background-position: center 110px;
13 | background-size: 100%;
14 | }
15 | .loginForm {
16 | width: 300px;
17 | }
18 | .loginForgot {
19 | float: right;
20 | }
21 | .loginButton {
22 | width: 100%;
23 | }
--------------------------------------------------------------------------------
/dva-umi-template/pages/login/models/login.js:
--------------------------------------------------------------------------------
1 | import {login} from '@/service/login';
2 |
3 | export default {
4 | namespace: 'login',
5 |
6 | state: {
7 | queryLogin: [],
8 | },
9 |
10 | effects: {
11 | *fetchLogin(action, { call, put }) {
12 | const response = yield call(login);
13 | yield put({
14 | type: 'changeLogin',
15 | loginData: response.result||"默认值是登陆成功",
16 | });
17 | },
18 | },
19 |
20 | reducers: {
21 | changeLogin(state, action) {
22 | return {
23 | ...state,
24 | queryLogin: action.loginData,
25 | };
26 | },
27 | },
28 | };
--------------------------------------------------------------------------------
/dva-umi-template/service/dashboard.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request';
2 |
3 | export async function queryWeather() {
4 | return request({
5 | url:'/static/analysis.json',
6 | method:'get',
7 | // data:{key:'1467eb89604820aceeaaf84bfc193d22'}
8 | });
9 | }
--------------------------------------------------------------------------------
/dva-umi-template/service/login.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request';
2 |
3 | export async function login() {
4 | return request({
5 | url:'/static/analysis.json',
6 | method:'get',
7 | // data:{key:'1467eb89604820aceeaaf84bfc193d22'}
8 | });
9 | }
--------------------------------------------------------------------------------
/dva-umi-template/utils/config/index.js:
--------------------------------------------------------------------------------
1 | let API_ROOT='';
2 | if(location.hostname.indexOf('dev-')!=-1
3 | ||location.hostname.indexOf('test-')!=-1
4 | ||location.hostname.indexOf('prod-')!=-1){
5 | API_ROOT=`https://${location.hostname}`;
6 | }else{
7 | API_ROOT=`${location.origin}`
8 | }
9 |
10 | export default API_ROOT
--------------------------------------------------------------------------------
/dva-umi-template/utils/utils.js:
--------------------------------------------------------------------------------
1 | export function isAntdPro() {
2 | return window.location.hostname === 'preview.pro.ant.design';
3 | }
--------------------------------------------------------------------------------
/js/Promise,Generator,async,await/5.generator-1.js:
--------------------------------------------------------------------------------
1 | // 声明
2 | function* gen(x){
3 | const y = yield x + 6;
4 | return y;
5 | }
6 |
7 | // 执行
8 | const g = gen(1);
9 | console.log(g.next()) //{ value: 7, done: false }
10 | // console.log(g.next()) //{ value: undefined, done: true }
11 | console.log(g.next(2)) // { value: 2, done: true }
--------------------------------------------------------------------------------
/js/Promise,Generator,async,await/6.generator-2.js:
--------------------------------------------------------------------------------
1 | // 嵌套
2 |
3 | function* gen(x){
4 | const y = yield x + 6;
5 | return y;
6 | }
7 |
8 | function* genOne(x){
9 | const y = `这是第一个 yield 执行:${yield x + 1}`;
10 | return y;
11 | }
12 |
13 | function* genTwo(x){
14 | yield* gen(1)
15 | yield* genOne(1)
16 | const y = `这是第 二个 yield 执行:${yield x + 2}`;
17 | return y;
18 | }
19 | const iterator=genTwo(1)
20 | // 因为 Generator 函数运行时生成的是一个 Iterator 对象,所以可以直接使用 for...of 循环遍历
21 | for(let value of iterator) {
22 | console.log(value) // 7 2 3
23 | }
--------------------------------------------------------------------------------
/js/class,function/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # dependencies
3 | /node_modules
4 | /.pnp
5 | .pnp.js
6 |
7 | # testing
8 | /coverage
9 |
10 | # production
11 | /build
12 |
13 | # misc
14 | .DS_Store
15 | .env.local
16 | .env.development.local
17 | .env.test.local
18 | .env.production.local
19 |
20 | npm-debug.log*
21 | yarn-debug.log*
22 | yarn-error.log*
23 |
--------------------------------------------------------------------------------
/js/class,function/README.md:
--------------------------------------------------------------------------------
1 | ## 前言
2 | 原创整理不易,欢迎 star,你的star是我更新的动力^_^
3 | ## 步骤
4 | ```
5 | git clone
6 |
7 | npm i
8 |
9 | node 1.usage
10 | ```
--------------------------------------------------------------------------------
/js/class,function/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "3.performance",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "1.usage.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "benchmark": "^2.1.4",
13 | "react": "^16.12.0",
14 | "react-dom": "^16.12.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/js/skill/array/10.数组是否包含值.js:
--------------------------------------------------------------------------------
1 | // 普通数组
2 | console.log([1, 2, 3].includes(4)) //false
3 | console.log([1, 2, 3].indexOf(4)) //-1 如果存在换回索引
4 | console.log([1, 2, 3].find((item) => item === 3)) //3 如果数组中无值返回undefined
5 | console.log([1, 2, 3].findIndex((item) => item === 3)) //2 如果数组中无值返回-1
6 |
7 | // 数组对象
8 | const flag = [{age:1},{age:2}].some(v=>JSON.stringify(v)===JSON.stringify({age:2}))
9 | console.log(flag)
--------------------------------------------------------------------------------
/js/skill/array/11.数组每一项都满足.js:
--------------------------------------------------------------------------------
1 | // 普通数组
2 | [1, 2, 3].every(item => { return item > 2 })
3 |
4 | // 数组对象
5 | const arr = [{ age: 3 }, { age: 4 }, { age: 5 }]
6 | arr.every(item => { return item.age > 2 })
--------------------------------------------------------------------------------
/js/skill/array/12.数组有一项满足.js:
--------------------------------------------------------------------------------
1 | // 普通数组
2 | [1, 2, 3].some(item => { return item > 2 })
3 |
4 | // 数组对象
5 | const arr = [{ age: 3 }, { age: 4 }, { age: 5 }]
6 | arr.some(item => { return item.age < 4 })
--------------------------------------------------------------------------------
/js/skill/array/14.对象转数组.js:
--------------------------------------------------------------------------------
1 | Object.keys({ name: '张三', age: 14 }) //['name','age']
2 | Object.values({ name: '张三', age: 14 }) //['张三',14]
3 | Object.entries({ name: '张三', age: 14 }) //[[name,'张三'],[age,14]]
4 | Object.fromEntries([name, '张三'], [age, 14]) //ES10的api,Chrome不支持 , firebox输出{name:'张三',age:14}
--------------------------------------------------------------------------------
/js/skill/array/15.数组转对象.js:
--------------------------------------------------------------------------------
1 | const arrName = ['张三', '李四', '王五']
2 | const arrAge=['20','30','40']
3 | const arrDec = ['描述1', '描述2', '描述3']
4 | const obj = arrName.map((item,index)=>{
5 | return { name: item, age: arrAge[index],dec:arrDec[index]}
6 | })
7 |
8 | console.log(obj) // [{ name: '张三', age: '20', dec: '描述1' },{ name: '李四', age: '30', dec: '描述2' },{ name: '王五', age: '40', dec: '描述3' }]
--------------------------------------------------------------------------------
/js/skill/array/16.数组结构.js:
--------------------------------------------------------------------------------
1 | const arr = [1, 2]; //后面一定要加分号,因为不加解释器会认为在读数组
2 | [arr[1], arr[0]] = [arr[0], arr[1]]; // [2,1]
--------------------------------------------------------------------------------
/js/skill/array/3.数组差集.js:
--------------------------------------------------------------------------------
1 | // 普通数组
2 | // const arr1 = [1, 2, 3, 4, 5, 8, 9]
3 | // const arr2 = [5, 6, 7, 8, 9];
4 | // const diff = arr1.filter(item => !new Set(arr2).has(item))
5 | // console.log(diff)
6 |
7 | // 对象数组
8 | let arr1 = [{ name: 'name1', id: 1 }, { name: 'name2', id: 2 }, { name: 'name3', id: 3 }];
9 | let arr2 = [{ name: 'name1', id: 1 }, { name: 'name4', id: 4 }, { name: 'name5', id: 5 }];
10 | let result = arr1.filter(function (v) {
11 | return arr2.every(n => JSON.stringify(n) !== JSON.stringify(v))
12 | })
13 | console.log(result); // [ { name: 'name2', id: 2 }, { name: 'name3', id: 3 } ]
--------------------------------------------------------------------------------
/js/skill/array/5.数组去重.js:
--------------------------------------------------------------------------------
1 | // 普通数组
2 | console.log(Array.from(new Set([1, 2, 3, 3, 4, 4]))) //[1,2,3,4]
3 | console.log([...new Set([1, 2, 3, 3, 4, 4])]) //[1,2,3,4]
4 |
5 | // 对象数组
6 | const arr = [{ name: 'name1', id: 1 }, { name: 'name2', id: 2 }, { name: 'name3', id: 3 }, { name: 'name1', id: 1 }, { name: 'name4', id: 4 }, { name: 'name5', id: 5 }];
7 | const obj = [];
8 | const result = arr.reduce(function (prev, cur, index, arr) {
9 | obj[cur.id] ? '' : obj[cur.id] = true && prev.push(cur);
10 | return prev;
11 | }, []);
12 | console.log(result) //[{ name: 'name1', id: 1 },{ name: 'name2', id: 2 },{ name: 'name3', id: 3 },{ name: 'name4', id: 4 },{ name: 'name5', id: 5 }]
--------------------------------------------------------------------------------
/js/skill/array/6.数组排序.js:
--------------------------------------------------------------------------------
1 | // 普通数组
2 | console.log([1, 2, 3, 4].sort((a, b) => a - b)); // [1, 2,3,4],默认是升序
3 | console.log([1, 2, 3, 4].sort((a, b) => b - a)); // [4,3,2,1],默认是升序
4 |
5 | // 对象数组
6 | const arr1 = [{ name: "Rom", age: 12 }, { name: "Bob", age: 22 }].sort((a, b) => { return a.age - b.age })//升序
7 | const arr2 = [{ name: "Rom", age: 12 }, { name: "Bob", age: 22 }].sort((a, b) => { return -a.age + b.age })//降序
8 | console.log(arr2) // [{ name: 'Bob', age: 22 }, { name: 'Rom', age: 12 }]
9 | console.log(arr1) // [ { name: 'Rom', age: 12 }, { name: 'Bob', age: 22 } ]
10 |
--------------------------------------------------------------------------------
/js/skill/array/7.数组最大值.js:
--------------------------------------------------------------------------------
1 | // 普通数组
2 |
3 | Math.max(...[1, 2, 3, 4]) //4
4 | Math.max.apply(this, [1, 2, 3, 4]) //4
5 | // [1, 2, 3, 4].reduce((prev, cur, curIndex, arr) => {
6 | // return Math.max(prev, cur);
7 | // }, 0) //4 node运行会报错
8 |
9 | // 取对象数组id的最大值
10 | const arr = [{ id: 1, name: 'jack' },{ id: 2, name: 'may' },{ id: 3, name: 'shawn' },{ id: 4, name: 'tony' }]
11 | const arr1 = Math.max.apply(Math, arr.map(item => { return item.id }))
12 | const arr2 = arr.sort((a, b) => { return b.id - a.id })[0].id
13 | console.log(arr1)
14 | console.log(arr2)
15 |
--------------------------------------------------------------------------------
/js/skill/array/8.数组求和.js:
--------------------------------------------------------------------------------
1 | // 普通数组
2 | [1, 2, 3, 4].reduce(function (prev, cur) {
3 | return prev + cur;
4 | }, 0) //10
5 |
6 | // 对象数组,age求和
7 | const sum = [{age:1},{age:2}].reduce(function (prev, cur) {
8 | return prev + cur.age;
9 | }, 0) //3
10 | console.log(sum)
--------------------------------------------------------------------------------
/js/skill/array/9.数组合并.js:
--------------------------------------------------------------------------------
1 | // 普通数组
2 | const arr1 =[1, 2, 3, 4].concat([5, 6]) //[1,2,3,4,5,6]
3 | const arr2 =[...[1, 2, 3, 4],...[4, 5]] //[1,2,3,4,5,6]
4 | const arrA = [1, 2], arrB = [3, 4]
5 | const arr3 = [].concat.apply(arrA, arrB)//arrA值为[1,2,3,4]
6 |
7 | // 对象数组合并
8 | const arr4 = [{ age: 1 }].concat([{ age: 2 }])
9 | const arr5 = [...[{ age: 1 }],...[{ age: 2 }]]
10 | console.log(arr4)
11 | console.log(arr5)
12 |
--------------------------------------------------------------------------------
/js/skill/boolean/38.判断数据类型.js:
--------------------------------------------------------------------------------
1 | function dataTypeJudge(val, type) {
2 | const dataType = Object.prototype.toString.call(val).replace(/\[object (\w+)\]/, "$1").toLowerCase();
3 | return type ? dataType === type : dataType;
4 | }
5 | console.log(dataTypeJudge("young")); // "string"
6 | console.log(dataTypeJudge(20190214)); // "number"
7 | console.log(dataTypeJudge(true)); // "boolean"
8 | console.log(dataTypeJudge([], "array")); // true
9 | console.log(dataTypeJudge({}, "array")); // false
--------------------------------------------------------------------------------
/js/skill/boolean/39.使用Boolean过滤数组假值.js:
--------------------------------------------------------------------------------
1 | const compact = arr => arr.filter(Boolean)
2 | compact([0, 1, false, 2, '', 3, 'a', 'e' * 23, NaN, 's', 34]) //[ 1, 2, 3, 'a', 's', 34 ]
--------------------------------------------------------------------------------
/js/skill/boolean/40.短路运算.js:
--------------------------------------------------------------------------------
1 | const flag = false || true //true
2 | // 某个值为假时可以给默认值
3 | const arr = false || []
4 |
5 | const flag1 = false && true //false
6 | const flag2 = true && true //true
--------------------------------------------------------------------------------
/js/skill/boolean/41.switch简写.js:
--------------------------------------------------------------------------------
1 | switch (a) {
2 | case '张三':
3 | return 'age是12'
4 | case '李四':
5 | return 'age是120'
6 | }
7 |
8 | // 使用对象替换后
9 | const obj = {
10 | '张三': 'age12',
11 | '李四': 'age120',
12 | }
13 | console.log(obj['张三'])
--------------------------------------------------------------------------------
/js/skill/function/27.函数自执行.js:
--------------------------------------------------------------------------------
1 | const Func = function () { }(); // 常用
2 |
3 | (function () { })(); // 常用
4 | (function () { }()); // 常用
5 | [function () { }()];
6 |
7 | new function () { };
8 | new function () { }();
9 | void function () { }();
10 | typeof function () { }();
11 | delete function () { }();
12 |
13 | + function () { }();
14 | - function () { }();
15 | ~ function () { }();
16 | ! function () { }();
--------------------------------------------------------------------------------
/js/skill/number/34.字符串转数字.js:
--------------------------------------------------------------------------------
1 | '32' * 1 // 32
2 | 'ds' * 1 // NaN
3 | null * 1 // 0
4 | undefined * 1 // NaN
5 | 1 * { valueOf: () => '3' } // 3
6 |
7 | + '123' // 123
8 | + 'ds' // NaN
9 | + '' // 0
10 | + null // 0
11 | + undefined // NaN
12 | + { valueOf: () => '3' } // 3
--------------------------------------------------------------------------------
/js/skill/number/35.判断小数是否相等.js:
--------------------------------------------------------------------------------
1 | Number.EPSILON = (function () { //解决兼容性问题
2 | return Number.EPSILON ? Number.EPSILON : Math.pow(2, -52);
3 | })();
4 | //上面是一个自调用函数,当JS文件刚加载到内存中,就会去判断并返回一个结果
5 | function numbersequal(a, b) {
6 | return Math.abs(a - b) < Number.EPSILON;
7 | }
8 | //接下来再判断
9 | const a = 0.1 + 0.2, b = 0.3;
10 | console.log(numbersequal(a, b)); //这里就为true了
--------------------------------------------------------------------------------
/js/skill/number/36.双位运算符.js:
--------------------------------------------------------------------------------
1 | ~~7.5 // 7
2 | Math.ceil(7.5) // 8
3 | Math.floor(7.5) // 7
4 |
5 |
6 | ~~-7.5 // -7
7 | Math.floor(-7.5) // -8
8 | Math.ceil(-7.5) // -7
--------------------------------------------------------------------------------
/js/skill/number/37.取整和奇偶性判断.js:
--------------------------------------------------------------------------------
1 | 3.3 | 0 // 3
2 | - 3.9 | 0 // -3
3 |
4 | parseInt(3.3) // 3
5 | parseInt(-3.3) // -3
6 |
7 | // 四舍五入取整
8 | Math.round(3.3) // 3
9 | Math.round(-3.3) // 3
10 |
11 | // 向上取整
12 | Math.ceil(3.3) // 4
13 | Math.ceil(-3.3) // -3
14 |
15 | // 向下取整
16 | Math.floor(3.3) // 3
17 | Math.floor(-3.3) // -4
--------------------------------------------------------------------------------
/js/skill/object/17.对象变量属性.js:
--------------------------------------------------------------------------------
1 | const flag = true;
2 | const obj = {
3 | a: 0,
4 | [flag ? "c" : "d"]: 2
5 | };
6 | // obj => { a: 0, c: 2 }
--------------------------------------------------------------------------------
/js/skill/object/18.对象多余属性删除.js:
--------------------------------------------------------------------------------
1 | const { name, age, ...obj } = { name: '张三', age: 13, dec: '描述1', info: '信息' }
2 | console.log(name) // 张三
3 | console.log(age) // 13
4 | console.log(obj) // {dec: '描述1', info: '信息' }
--------------------------------------------------------------------------------
/js/skill/object/19.对象嵌套属性解构.js:
--------------------------------------------------------------------------------
1 | const { info: { dec } } = { name: '张三', age: 13, info: { dec: '描述1', info: '信息' } }
2 | console.log(dec) // 描述1
--------------------------------------------------------------------------------
/js/skill/object/20.解构对象属性别名.js:
--------------------------------------------------------------------------------
1 | const { name: newName } = { name: '张三', age: 13 }
2 | console.log(newName) // 张三
--------------------------------------------------------------------------------
/js/skill/object/21.解构对象属性默认值.js:
--------------------------------------------------------------------------------
1 | const { dec = '这是默认dec值' } = { name: '张三', age: 13 }
2 | console.log(dec) //这是默认dec值
--------------------------------------------------------------------------------
/js/skill/object/25.对象转化为字符串.js:
--------------------------------------------------------------------------------
1 | 'the Math object:' + Math.ceil(3.4) // "the Math object:4"
2 | 'the JSON object:' + { name: '曹操' } // "the JSON object:[object Object]"
3 |
4 | 2 * { valueOf: () => '4' } // 8
5 | 'J' + { toString: () => 'ava' } // "Java"
6 |
7 | '' + { toString: () => 'S', valueOf: () => 'J' } //J
--------------------------------------------------------------------------------
/js/skill/string/29.字符串翻转.js:
--------------------------------------------------------------------------------
1 | function reverseStr(str = "") {
2 | return str.split("").reduceRight((t, v) => t + v);
3 | }
4 |
5 | const str = "reduce123";
6 | console.log(reverseStr(str)); // "123recuder"
--------------------------------------------------------------------------------
/js/skill/string/30.url参数序列化.js:
--------------------------------------------------------------------------------
1 | function stringifyUrl(search = {}) {
2 | return Object.entries(search).reduce(
3 | (t, v) => `${t}${v[0]}=${encodeURIComponent(v[1])}&`,
4 | Object.keys(search).length ? "?" : ""
5 | ).replace(/&$/, "");
6 | }
7 |
8 | console.log(stringifyUrl({ age: 27, name: "YZW" })); // "?age=27&name=YZW"
--------------------------------------------------------------------------------
/js/skill/string/31.url参数反序列化.js:
--------------------------------------------------------------------------------
1 | function parseUrlSearch() {
2 | const search = '?age=25&name=TYJ'
3 | return search.replace(/(^\?)|(&$)/g, "").split("&").reduce((t, v) => {
4 | const [key, val] = v.split("=");
5 | t[key] = decodeURIComponent(val);
6 | return t;
7 | }, {});
8 | }
9 |
10 | console.log(parseUrlSearch()); // { age: "25", name: "TYJ" }
--------------------------------------------------------------------------------
/js/skill/string/32.转化为字符串.js:
--------------------------------------------------------------------------------
1 | const val = 1 + ""; // 通过+ ''空字符串转化
2 | console.log(val); // "1"
3 | console.log(typeof val); // "string"
4 |
5 | const val1 = String(1);
6 | console.log(val1); // "1"
7 | console.log(typeof val1); // "string"
--------------------------------------------------------------------------------
/mini-program-demo/README.md:
--------------------------------------------------------------------------------
1 | > A weui-lan project
2 |
3 | 
4 |
5 | ## instructions
6 |
7 | - 里面五个类型组件:
8 | - 1.音频:
9 | - 常见音频,背景音频,录音
10 | - 2.文件:
11 | - 依赖weui的上传图片组件
12 | - 3.位置
13 | - 获取所在的经纬度
14 | - 4.地图
15 | - 小程序自带地图
16 | - 5.画布
17 | - 里面使用wxa-plugin-canvas插件生成海报
18 |
19 | ## 使用方法
20 | - git-clone
21 | - 在微信开发者工具打开,找到对应功能的组件复制即可
22 |
--------------------------------------------------------------------------------
/mini-program-demo/components/auth/auth.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/auth/auth.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mini-program-demo/components/auth/images/jurisdiction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/components/auth/images/jurisdiction.png
--------------------------------------------------------------------------------
/mini-program-demo/components/canvas/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/canvas/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/mini-program-demo/components/canvas/index/index.wxss:
--------------------------------------------------------------------------------
1 | .canvas {
2 | width: 750rpx;
3 | height: 750rpx;
4 | }
5 | .canvas.pro {
6 | position: absolute;
7 | bottom: 0;
8 | left: 0;
9 | transform: translate3d(-999rpx, 0, 0);
10 | }
11 | .canvas.debug {
12 | position: absolute;
13 | bottom: 0;
14 | left: 0;
15 | border: 1rpx solid #ccc;
16 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/canvas/poster/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "we-canvas": "../index/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/canvas/poster/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/mini-program-demo/components/canvas/poster/index.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/components/canvas/poster/index.wxss
--------------------------------------------------------------------------------
/mini-program-demo/components/location/location.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/location/location.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | latitude值为{{latitude}}
5 | longitude值为{{longitude}}
6 | speed值为{{speed}}
7 | accuracy值为{{accuracy}}
8 |
9 |
10 | 点击图标获取
11 |
12 |
--------------------------------------------------------------------------------
/mini-program-demo/components/location/location.wxss:
--------------------------------------------------------------------------------
1 | /* 引入iconfont */
2 | @import "../../styles/iconfont.wxss";
3 |
4 | .longitude{
5 | font-size:60rpx;
6 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/media/audio/audioOne/audioOne.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/media/audio/audioTwo/audioTwo.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/media/audio/audioTwo/audioTwo.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/components/media/audio/audioTwo/audioTwo.wxss
--------------------------------------------------------------------------------
/mini-program-demo/components/media/audio/backAudio/backAudio.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/media/audio/backAudio/backAudio.wxml:
--------------------------------------------------------------------------------
1 |
2 | 背景音乐和普通音乐的区别是可以在后台播放
3 | 播放:
4 | 暂停:
5 |
--------------------------------------------------------------------------------
/mini-program-demo/components/media/audio/backAudio/backAudio.wxss:
--------------------------------------------------------------------------------
1 | @import "../../../../styles/iconfont.wxss";
2 | .back-audio{
3 | display: flex;
4 | flex-direction: column;
5 | }
6 |
7 | .back-begin,.back-middle,.back-end{
8 | font-size:60rpx;
9 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/media/audio/record/record.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/media/audio/record/record.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/mini-program-demo/components/media/audio/record/record.wxss:
--------------------------------------------------------------------------------
1 | @import "../../../../styles/iconfont.wxss";
2 | .record-btn{
3 | font-size:60rpx;
4 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/media/camera/camera.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/media/camera/camera.wxss:
--------------------------------------------------------------------------------
1 | .preview-tips {
2 | margin: 20rpx 0;
3 | }
4 |
5 | .video {
6 | margin: 50px auto;
7 | width: 100%;
8 | height: 300px;
9 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/media/video/video.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/mini-program-demo/components/media/video/video.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/mini-program-demo/components/media/video/video.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/components/media/video/video.wxss
--------------------------------------------------------------------------------
/mini-program-demo/components/navigation/navigation.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/mini-program-demo/images/canvas-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/canvas-sel.png
--------------------------------------------------------------------------------
/mini-program-demo/images/canvas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/canvas.png
--------------------------------------------------------------------------------
/mini-program-demo/images/file-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/file-sel.png
--------------------------------------------------------------------------------
/mini-program-demo/images/file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/file.png
--------------------------------------------------------------------------------
/mini-program-demo/images/icon3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/icon3.png
--------------------------------------------------------------------------------
/mini-program-demo/images/location-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/location-sel.png
--------------------------------------------------------------------------------
/mini-program-demo/images/location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/location.png
--------------------------------------------------------------------------------
/mini-program-demo/images/map-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/map-sel.png
--------------------------------------------------------------------------------
/mini-program-demo/images/map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/map.png
--------------------------------------------------------------------------------
/mini-program-demo/images/media-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/media-sel.png
--------------------------------------------------------------------------------
/mini-program-demo/images/media.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/media.png
--------------------------------------------------------------------------------
/mini-program-demo/images/s5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/s5.png
--------------------------------------------------------------------------------
/mini-program-demo/images/s6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/s6.png
--------------------------------------------------------------------------------
/mini-program-demo/images/vcode.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/vcode.jpg
--------------------------------------------------------------------------------
/mini-program-demo/images/weui-lan.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/images/weui-lan.jpg
--------------------------------------------------------------------------------
/mini-program-demo/pages/canvas/canvas.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation",
4 | "poster": "/components/canvas/poster/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/mini-program-demo/pages/canvas/canvas.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/mini-program-demo/pages/canvas/canvas.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/pages/canvas/canvas.wxss
--------------------------------------------------------------------------------
/mini-program-demo/pages/file/file.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation"
4 | }
5 | }
--------------------------------------------------------------------------------
/mini-program-demo/pages/file/file.wxss:
--------------------------------------------------------------------------------
1 | .page,
2 | .page__bd{
3 | height: 100%;
4 | }
5 | .page__bd{
6 | padding-bottom: 0;
7 | }
8 | .weui-tab__content{
9 | padding-top: 60px;
10 | text-align: center;
11 | }
--------------------------------------------------------------------------------
/mini-program-demo/pages/file/images/pic_160.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/pages/file/images/pic_160.png
--------------------------------------------------------------------------------
/mini-program-demo/pages/location/location.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation",
4 | "location": "/components/location/location"
5 | }
6 | }
--------------------------------------------------------------------------------
/mini-program-demo/pages/location/location.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/mini-program-demo/pages/location/location.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/pages/location/location.wxss
--------------------------------------------------------------------------------
/mini-program-demo/pages/map/map.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation"
4 | }
5 | }
--------------------------------------------------------------------------------
/mini-program-demo/pages/map/map.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/mini-program-demo/pages/map/map.wxss:
--------------------------------------------------------------------------------
1 | .map map{
2 | width:750rpx;
3 | }
--------------------------------------------------------------------------------
/mini-program-demo/pages/media/media.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation",
4 | "audioOne":"/components/media/audio/audioOne/audioOne",
5 | "audioTwo":"/components/media/audio/audioTwo/audioTwo",
6 | "record":"/components/media/audio/record/record",
7 | "backAudio":"/components/media/audio/backAudio/backAudio",
8 | "camera":"/components/media/camera/camera",
9 | "video":"/components/media/video/video",
10 | "auth":"/components/auth/auth"
11 | }
12 | }
--------------------------------------------------------------------------------
/mini-program-demo/pages/media/media.wxss:
--------------------------------------------------------------------------------
1 | .placeholder{
2 | margin: 5px;
3 | padding: 0 10px;
4 | text-align: center;
5 | background-color: #EBEBEB;
6 | height: 2.3em;
7 | line-height: 2.3em;
8 | color: #cfcfcf;
9 | }
10 |
11 | video{
12 | width:750rpx;
13 | }
--------------------------------------------------------------------------------
/mini-program-demo/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/mini-program-demo/subs/uploadImg/pages/uploadImg/uploadImg.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation"
4 | }
5 | }
--------------------------------------------------------------------------------
/mini-program-demo/subs/uploadImg/pages/uploadImg/uploadImg.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/mini-program-demo/subs/uploadImg/pages/uploadImg/uploadImg.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/subs/uploadImg/pages/uploadImg/uploadImg.wxss
--------------------------------------------------------------------------------
/mini-program-demo/subs/webviewDetail/webviewDetail.json:
--------------------------------------------------------------------------------
1 | {
2 | }
--------------------------------------------------------------------------------
/mini-program-demo/subs/webviewDetail/webviewDetail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/mini-program-demo/subs/webviewDetail/webviewDetail.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-demo/subs/webviewDetail/webviewDetail.wxss
--------------------------------------------------------------------------------
/mini-program-demo/utils/api.js:
--------------------------------------------------------------------------------
1 | //配置请求baseUrl
2 | import { envConfig } from './config/index'
3 | const HOST = `https://${envConfig.host}`
4 |
5 | const API = {
6 | login: `${HOST}/teaching/applet/login`, // 登录
7 | pageData: `${HOST}/teaching/applet/pageData`, // 首页数据
8 | }
9 |
10 | export default API
--------------------------------------------------------------------------------
/mini-program-demo/utils/common.js:
--------------------------------------------------------------------------------
1 | import { Storage, showToast } from './util'
2 |
3 | // 获取用户信息
4 | function getUserInfo({ detail }) {
5 | return new Promise(resolve => {
6 | console.log('detail值为',detail);
7 | if (detail.errMsg === 'getUserInfo:ok') {
8 | const { userInfo} = detail
9 | const authorUserInfo = Storage.getSync('userInfo')
10 |
11 | //判断是否授权,授权userInfo就存在
12 | if (!authorUserInfo) {
13 | // 授权后存储并更新用户信息
14 | Storage.setSync('userInfo', userInfo)
15 | resolve(userInfo)
16 | } else {
17 | resolve(userInfo)
18 | }
19 | }
20 | })
21 | }
22 |
23 | export{
24 | getUserInfo
25 | }
--------------------------------------------------------------------------------
/mini-program-demo/utils/config/env.config.js:
--------------------------------------------------------------------------------
1 | let config = {
2 | prod: {
3 | host: 'prod.com',
4 | WALLET_HOST: 'https://prod.com/#/index'
5 | },
6 | test: {
7 | host: 'test.com',
8 | WALLET_HOST: 'https://test.com/#/index'
9 | },
10 | dev: {
11 | host: 'dev.com',
12 | WALLET_HOST: 'https://dev.com/#/index'
13 | }
14 | }
15 |
16 | export default config
17 |
18 | // appId: wx8a54f7236226b724 人人聚智
19 | // appId: wxa24ed0253f4bb67b 人人聚智测试
20 | // appId: wx5c2b3c75690e0389 名师IP
--------------------------------------------------------------------------------
/mini-program-demo/utils/config/index.js:
--------------------------------------------------------------------------------
1 | import config from './env.config'
2 |
3 | let env = 'dev'
4 | let envConfig = config[env]
5 | const version = 'v1.0.0'
6 |
7 | export {
8 | envConfig,
9 | version
10 | }
--------------------------------------------------------------------------------
/mini-program-template/README.md:
--------------------------------------------------------------------------------
1 | > A min-program project
2 |
3 | 
4 |
5 | #instructions
6 |
7 | 后台接口:可当做template来使用,也阔以作为入门的教程;
8 |
9 | 技术栈:weui+tabbar+分包+iconfont使用+自定义顶部导航+组件传值+wx.request封装;
--------------------------------------------------------------------------------
/mini-program-template/components/homeCom/homeCom.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/mini-program-template/components/homeCom/homeCom.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{content}}
4 |
--------------------------------------------------------------------------------
/mini-program-template/components/homeCom/homeCom.wxss:
--------------------------------------------------------------------------------
1 | .home-btn{
2 | background: red;
3 | }
--------------------------------------------------------------------------------
/mini-program-template/components/navigation/navigation.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/mini-program-template/components/navigation/navigation.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{title}}
13 |
--------------------------------------------------------------------------------
/mini-program-template/images/cart-shop-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/cart-shop-sel.png
--------------------------------------------------------------------------------
/mini-program-template/images/cart-shop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/cart-shop.png
--------------------------------------------------------------------------------
/mini-program-template/images/classify-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/classify-sel.png
--------------------------------------------------------------------------------
/mini-program-template/images/classify.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/classify.png
--------------------------------------------------------------------------------
/mini-program-template/images/home-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/home-sel.png
--------------------------------------------------------------------------------
/mini-program-template/images/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/home.png
--------------------------------------------------------------------------------
/mini-program-template/images/icon3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/icon3.png
--------------------------------------------------------------------------------
/mini-program-template/images/my-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/my-sel.png
--------------------------------------------------------------------------------
/mini-program-template/images/my.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/my.png
--------------------------------------------------------------------------------
/mini-program-template/images/product-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/product-sel.png
--------------------------------------------------------------------------------
/mini-program-template/images/product.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/product.png
--------------------------------------------------------------------------------
/mini-program-template/images/s5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/s5.png
--------------------------------------------------------------------------------
/mini-program-template/images/s6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/s6.png
--------------------------------------------------------------------------------
/mini-program-template/images/vcode.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/vcode.jpg
--------------------------------------------------------------------------------
/mini-program-template/images/wx-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/images/wx-image.jpg
--------------------------------------------------------------------------------
/mini-program-template/pages/cartShop/cartShop.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation"
4 | }
5 | }
--------------------------------------------------------------------------------
/mini-program-template/pages/classify/classify.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation"
4 | }
5 | }
--------------------------------------------------------------------------------
/mini-program-template/pages/classify/classify.wxss:
--------------------------------------------------------------------------------
1 | .page,
2 | .page__bd{
3 | height: 100%;
4 | }
5 | .page__bd{
6 | padding-bottom: 0;
7 | }
8 | .weui-tab__content{
9 | padding-top: 60px;
10 | text-align: center;
11 | }
--------------------------------------------------------------------------------
/mini-program-template/pages/home/home.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation",
4 | "homeCom":"/components/homeCom/homeCom"
5 | }
6 | }
--------------------------------------------------------------------------------
/mini-program-template/pages/home/home.wxss:
--------------------------------------------------------------------------------
1 | .placeholder{
2 | margin: 5px;
3 | padding: 0 10px;
4 | text-align: center;
5 | background-color: #EBEBEB;
6 | height: 2.3em;
7 | line-height: 2.3em;
8 | color: #cfcfcf;
9 | }
--------------------------------------------------------------------------------
/mini-program-template/pages/my/my.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation"
4 | }
5 | }
--------------------------------------------------------------------------------
/mini-program-template/pages/my/my.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/pages/my/my.wxss
--------------------------------------------------------------------------------
/mini-program-template/pages/product/product.js:
--------------------------------------------------------------------------------
1 | // pages/product/product.js
2 | var base64 = require("../../images/base64");
3 | Page({
4 |
5 | //页面初始数据
6 | data: {
7 |
8 | },
9 |
10 | //生命周期函数--监听页面加载
11 |
12 | onLoad: function (options) {
13 | this.setData({
14 | icon20: base64.icon20,
15 | icon60: base64.icon60
16 | });
17 | },
18 |
19 | //跳转详情
20 | toDetailOne(){
21 | wx.navigateTo({
22 | url:'/subs/shopDetail/pages/detailOne/detailOne'
23 | })
24 | }
25 | })
--------------------------------------------------------------------------------
/mini-program-template/pages/product/product.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation"
4 | }
5 | }
--------------------------------------------------------------------------------
/mini-program-template/pages/product/product.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/pages/product/product.wxss
--------------------------------------------------------------------------------
/mini-program-template/subs/auth/pages/auth/auth.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation"
4 | }
5 | }
--------------------------------------------------------------------------------
/mini-program-template/subs/auth/pages/auth/auth.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{userInfo.nickName}}
9 |
10 |
11 |
12 | {{motto}}
13 |
14 |
15 |
--------------------------------------------------------------------------------
/mini-program-template/subs/auth/pages/auth/auth.wxss:
--------------------------------------------------------------------------------
1 | /**index.wxss**/
2 | .userinfo {
3 | display: flex;
4 | flex-direction: column;
5 | align-items: center;
6 | }
7 |
8 | .userinfo-avatar {
9 | width: 128rpx;
10 | height: 128rpx;
11 | margin: 20rpx;
12 | border-radius: 50%;
13 | }
14 |
15 | .userinfo-nickname {
16 | color: #aaa;
17 | }
18 |
19 | .usermotto {
20 | text-align:center;
21 | margin-top: 200rpx;
22 | }
--------------------------------------------------------------------------------
/mini-program-template/subs/images/pic_article.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/subs/images/pic_article.png
--------------------------------------------------------------------------------
/mini-program-template/subs/links/pages/download/download.js:
--------------------------------------------------------------------------------
1 | import { jt_getSystem } from '../../../../utils/jt_c_utils'
2 |
3 | Page({
4 | data: {
5 | url:''
6 | },
7 |
8 | onLoad(options) {
9 | let url;
10 | if (jt_getSystem().isIOS) { //ios
11 | // url='https://itunes.apple.com/cn/app/id1425709969?mt=8';
12 | url='https://www.pgyer.com/VTGH';
13 | } else { //安卓
14 | url='https://superip.aiplussales.cn/download/superip.apk';
15 | }
16 | console.log('url值为',url);
17 | this.setData({
18 | url:url
19 | })
20 | }
21 | })
--------------------------------------------------------------------------------
/mini-program-template/subs/links/pages/download/download.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | }
4 | }
--------------------------------------------------------------------------------
/mini-program-template/subs/links/pages/download/download.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/mini-program-template/subs/links/pages/download/download.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/subs/links/pages/download/download.wxss
--------------------------------------------------------------------------------
/mini-program-template/subs/shopDetail/pages/detailOne/detailOne.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "navigation": "/components/navigation/navigation"
4 | }
5 | }
--------------------------------------------------------------------------------
/mini-program-template/subs/shopDetail/pages/detailOne/detailOne.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/mini-program-template/subs/shopDetail/pages/detailOne/detailOne.wxss
--------------------------------------------------------------------------------
/mini-program-template/utils/api.js:
--------------------------------------------------------------------------------
1 | import { envConfig } from './config/index'
2 | //配置请求baseUrl
3 | const HOST = `https://${envConfig.host}`
4 |
5 | const API={
6 | login: `${HOST}/teaching/applet/login`, // 登录
7 | }
8 |
9 | export default API
--------------------------------------------------------------------------------
/mini-program-template/utils/config/env.config.js:
--------------------------------------------------------------------------------
1 | let config = {
2 | prod: {
3 | host: 'prod.com',
4 | IMKey: '',//IM聊天的key
5 | WALLET_HOST: 'https://prod/h5/#/index'
6 | },
7 | test: {
8 | host: 'test.com',
9 | IMKey: '',//IM聊天的key
10 | WALLET_HOST: 'https://test/h5/#/index'
11 | },
12 | dev: {
13 | host: 'dev.com',
14 | IMKey: '',//IM聊天的key
15 | WALLET_HOST: 'https://dev/h5/#/index'
16 | }
17 | }
18 |
19 | export default config
20 |
21 | // appId: wx8a54f7236226b724 人人聚智
22 | // appId: wxa24ed0253f4bb67b 人人聚智测试
23 | // appId: wx5c2b3c75690e0389 商城分销正式专用
--------------------------------------------------------------------------------
/mini-program-template/utils/config/index.js:
--------------------------------------------------------------------------------
1 | import config from './env.config'
2 |
3 | let env = 'dev'
4 | let envConfig = config[env]
5 | const version = 'v1.0.0'
6 |
7 | export {
8 | envConfig,
9 | version
10 | }
--------------------------------------------------------------------------------
/mini-program-template/utils/util.js:
--------------------------------------------------------------------------------
1 | const formatTime = date => {
2 | const year = date.getFullYear()
3 | const month = date.getMonth() + 1
4 | const day = date.getDate()
5 | const hour = date.getHours()
6 | const minute = date.getMinutes()
7 | const second = date.getSeconds()
8 |
9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
10 | }
11 |
12 | const formatNumber = n => {
13 | n = n.toString()
14 | return n[1] ? n : '0' + n
15 | }
16 |
17 | module.exports = {
18 | formatTime: formatTime
19 | }
20 |
--------------------------------------------------------------------------------
/node/express-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 |
--------------------------------------------------------------------------------
/node/express-demo/my-express/test.js:
--------------------------------------------------------------------------------
1 | const express = require('./index');
2 | const app = express();
3 |
4 | // use 方法第一个参数不写默认就是 /
5 | app.use('/', (req, res, next) => {
6 | res.setHeader('Content-Type', 'text/html;charset=UTF-8;');
7 | next();
8 | })
9 |
10 | app.get('/name', (req, res) => {
11 | // 设置响应头格式
12 | // res.setHeader('Content-Type', 'text/html;charset=UTF-8;');
13 | res.end('这是我的express,张三')
14 | })
15 |
16 | app.get('/age', (req, res) => {
17 | // 设置响应头格式
18 | // res.setHeader('Content-Type', 'text/html;charset=UTF-8;');
19 | res.end('这是我的express,24岁')
20 | })
21 |
22 | app.listen(8000, () => {
23 | console.log('Server at port 8000')
24 | })
--------------------------------------------------------------------------------
/node/express-demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "express-demo",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "express": "^4.17.1",
13 | "http": "0.0.1-security"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/node/express-demo/test.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const app = express();
3 |
4 | // use 方法第一个参数不写默认就是 /
5 | app.use('/', (req, res, next) => {
6 | res.setHeader('Content-Type', 'text/html;charset=UTF-8;');
7 | next();
8 | })
9 |
10 | app.get('/name', (req, res) => {
11 | // 设置响应头格式
12 | // res.setHeader('Content-Type', 'text/html;charset=UTF-8;');
13 | res.end('张三')
14 | })
15 |
16 | app.get('/age', (req, res) => {
17 | // 设置响应头格式
18 | // res.setHeader('Content-Type', 'text/html;charset=UTF-8;');
19 | res.end('24岁')
20 | })
21 |
22 | app.listen(8000, () => {
23 | console.log('Server at port 8000')
24 | })
--------------------------------------------------------------------------------
/node/koa-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 |
--------------------------------------------------------------------------------
/node/koa-demo/my-koa/test.js:
--------------------------------------------------------------------------------
1 | const Koa = require("./index")
2 | //引入路由
3 | const Router = require("koa-router")
4 | const app = new Koa()
5 | const router = new Router()
6 |
7 | //启动路由;
8 | app.use(router.routes())
9 | //作用: 可以看到router,allowedMethods()用在了路由匹配router.routeres()之后,所以在但所有路由中间最后调用,此时根据ctx,status,设置,response 相应头
10 | app.use(router.allowedMethods())
11 |
12 | router.get('/name', (cty, next) => {
13 | cty.body = '这是myKoa,前端'
14 | })
15 |
16 | app.listen(3000, (err) => {
17 | if (!err) {
18 | console.log("Server at port 3000! ")
19 | }
20 | })
--------------------------------------------------------------------------------
/node/koa-demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "koa-demo",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "http": "0.0.1-security",
13 | "koa": "^2.12.0",
14 | "koa-router": "^9.0.1"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/node/koa-demo/test.js:
--------------------------------------------------------------------------------
1 | const Koa = require("koa")
2 | //引入路由
3 | const Router = require("koa-router")
4 | const app = new Koa()
5 | const router = new Router()
6 |
7 | //启动路由;
8 | app.use(router.routes())
9 | //作用: 可以看到router,allowedMethods()用在了路由匹配router.routeres()之后,所以在但所有路由中间最后调用,此时根据ctx,status,设置,response 相应头
10 | app.use(router.allowedMethods())
11 |
12 | router.get('/name', (cty, next) => {
13 | cty.body = '前端'
14 | })
15 |
16 | app.listen(3000, (err) => {
17 | if (!err) {
18 | console.log("Server at port 3000! ")
19 | }
20 | })
--------------------------------------------------------------------------------
/react-koa/img/react-koa-detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-koa/img/react-koa-detail.png
--------------------------------------------------------------------------------
/react-koa/img/react-koa-login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-koa/img/react-koa-login.png
--------------------------------------------------------------------------------
/react-koa/koa-template/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | .vscode
--------------------------------------------------------------------------------
/react-koa/koa-template/app/models/course.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 |
3 | const Schema = mongoose.Schema;
4 | const CourseSchema = new Schema({
5 | id: {
6 | type: String,
7 | unique: true,
8 | required: true
9 | },
10 | name:{
11 | type:String,
12 | required:true
13 | },
14 | price:{
15 | type:String
16 | },
17 | number:{
18 | type:Number
19 | },
20 | }, { collection: 'course', versionKey: false});
21 |
22 | module.exports = mongoose.model('course', CourseSchema);
23 |
--------------------------------------------------------------------------------
/react-koa/koa-template/app/models/password.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 |
3 | const Schema = mongoose.Schema;
4 | const PasswordSchema = new Schema({
5 | userId: {
6 | type: String,
7 | unique: true,
8 | required: true
9 | },
10 | hash: {
11 | type: String,
12 | required: true
13 | }
14 | }, { collection: 'password', versionKey: false});
15 |
16 | module.exports = mongoose.model('password', PasswordSchema);
17 |
--------------------------------------------------------------------------------
/react-koa/koa-template/app/models/user.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 |
3 | const Schema = mongoose.Schema;
4 | const UserSchema = new Schema({
5 | userId: {
6 | type: String,
7 | unique: true,
8 | require: true
9 | },
10 | account: {
11 | type: String
12 | },
13 | }, { collection: 'user', versionKey: false});
14 |
15 | module.exports = mongoose.model('user', UserSchema);
16 |
--------------------------------------------------------------------------------
/react-koa/koa-template/app/utils/formatDate.js:
--------------------------------------------------------------------------------
1 | const formatDate = date => {
2 | var y = date.getFullYear();
3 | var m = date.getMonth() + 1;
4 | m = m < 10 ? "0" + m : m;
5 | var d = date.getDate();
6 | d = d < 10 ? "0" + d : d;
7 | var h = date.getHours();
8 | h = h < 10 ? "0" + h : h;
9 | var minute = date.getMinutes();
10 | minute = minute < 10 ? "0" + minute : minute;
11 | var second = date.getSeconds();
12 | second = second < 10 ? "0" + second : second;
13 | return y + "-" + m + "-" + d + " " + h + ":" + minute + ":" + second;
14 | }
15 |
16 | module.exports = formatDate;
--------------------------------------------------------------------------------
/react-koa/koa-template/app/utils/passport.js:
--------------------------------------------------------------------------------
1 | // https://www.npmjs.com/package/bcrypt
2 | const bcrypt = require('bcrypt');
3 |
4 | const encrypt = async (password, saltTimes) => {
5 | const hash = await bcrypt.hash(password, saltTimes);
6 | return hash;
7 | };
8 |
9 | const validate = async (password, hash) => {
10 | const match = await bcrypt.compare(password, hash);
11 | return match;
12 | };
13 |
14 | module.exports = {
15 | encrypt,
16 | validate
17 | }
18 |
--------------------------------------------------------------------------------
/react-koa/koa-template/config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | port: 3000, // 项目启动的端口
3 | db: 'mongodb://localhost:27017/koa-template', // 数据库
4 | saltTimes: 3 // 加盐的次数(用户密码加密)
5 | }
--------------------------------------------------------------------------------
/react-koa/koa-template/db-template/courses.json:
--------------------------------------------------------------------------------
1 | {
2 | "_id" : ObjectId("5cbfc0f7125ebf55e7bd1d0c"),
3 | "id" : "3b99e3e0-7598-11e8-90be-95472fb3echj",
4 | "name" : "大学物理2",
5 | "price" : "20元",
6 | "number" : 60
7 | }
8 | {
9 | "_id" : ObjectId("5cbfc0f7125ebf55e7bd1d0e"),
10 | "id" : "3b99e3e0-7598-11e8-90be-95472fb3echy",
11 | "name" : "软件工程",
12 | "price" : "20元",
13 | "number" : 60
14 | }
15 | {
16 | "_id" : ObjectId("5cbfcee268de78299ccb5b26"),
17 | "name" : "大学计算机",
18 | "price" : "35元",
19 | "number" : 25,
20 | "id" : "ad1a8210-663b-11e9-b31a-873fd7865de9"
21 | }
22 |
--------------------------------------------------------------------------------
/react-koa/koa-template/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "node-template",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "nodemon app.js",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "author": "lanzhsh",
11 | "license": "ISC",
12 | "dependencies": {
13 | "bcrypt": "^3.0.0",
14 | "koa": "^2.5.2",
15 | "koa-bodyparser": "^4.2.1",
16 | "koa-router": "^7.4.0",
17 | "koa-webpack-middleware": "^1.0.7",
18 | "koa2-cors": "^2.0.6",
19 | "mongoose": "^5.2.7",
20 | "nodemon": "^1.18.11",
21 | "uuid": "^3.3.2"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/react-koa/koa-template/routes/api/course_router.js:
--------------------------------------------------------------------------------
1 | const Router = require('koa-router');
2 | const router = new Router();
3 | const course_controller = require('./../../app/controllers/course_controller');
4 |
5 | router.post('/course', course_controller.getCourse);
6 | router.post('/publish', course_controller.publishCourse);
7 | router.post('/update', course_controller.updateCourse);
8 | router.post('/delete', course_controller.deleteCourse);
9 |
10 | module.exports = router;
--------------------------------------------------------------------------------
/react-koa/koa-template/routes/api/user_router.js:
--------------------------------------------------------------------------------
1 | const Router = require('koa-router');
2 | const router = new Router();
3 | const user_controller = require('./../../app/controllers/user_controller');
4 |
5 | router.post('/register', user_controller.register);
6 |
7 | module.exports = router;
--------------------------------------------------------------------------------
/react-koa/react-template/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 | package-lock.json
4 | func-test/www
5 | *.sw*
6 | *.un~
7 | config.local.js
8 | yarn.lock
9 |
10 |
--------------------------------------------------------------------------------
/react-koa/react-template/.umirc.js:
--------------------------------------------------------------------------------
1 | export default {
2 | history: 'hash',
3 | plugins: [
4 | ['umi-plugin-react', {
5 | antd: true,
6 | dva: true,
7 | title: 'react-pc-template',
8 | routes: {
9 | exclude: [
10 | /model\.(j|t)sx?$/,
11 | /service\.(j|t)sx?$/,
12 | /models\//,
13 | /components\//,
14 | /services\//,
15 | ],
16 | },
17 | }],
18 | ],
19 | };
20 |
--------------------------------------------------------------------------------
/react-koa/react-template/README.md:
--------------------------------------------------------------------------------
1 | # reac-pc-tempalte
2 | > A react.js tempalte
3 |
4 | ## Build Setup
5 |
6 | 
7 |
8 | ``` bash
9 | # install dependencies
10 | npm install
11 |
12 | # serve with hot reload at localhost:8080
13 | npm start
14 |
15 | # build for production with minification
16 | npm run build
17 |
18 |
19 |
--------------------------------------------------------------------------------
/react-koa/react-template/assets/analysis.json:
--------------------------------------------------------------------------------
1 | {tabData:[
2 | {
3 | date:'2017-05-02',
4 | name:'王小虎',
5 | address:'上海市普陀区金沙江路1518弄'
6 | },
7 | {
8 | date:'2016-06-04',
9 | name:'王小虎',
10 | address: '上海市普陀区金沙江路 1517 弄'
11 | },
12 | {
13 | date:'2016-05-01',
14 | name:'王小虎',
15 | address:'上海市普陀区金沙江路 1519 弄'
16 | },
17 | {
18 | date: '2018-05-03',
19 | name: '王小虎',
20 | address: '上海市普陀区金沙江路 1516 弄'
21 | }
22 | ]}
--------------------------------------------------------------------------------
/react-koa/react-template/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-koa/react-template/assets/logo.png
--------------------------------------------------------------------------------
/react-koa/react-template/components/GlobalFooter/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/lib/style/themes/default.less';
2 |
3 | .globalFooter {
4 | padding: 0 16px;
5 | margin: 48px 0 24px 0;
6 | text-align: center;
7 |
8 | .links {
9 | margin-bottom: 8px;
10 |
11 | a {
12 | color: @text-color-secondary;
13 | transition: all 0.3s;
14 |
15 | &:not(:last-child) {
16 | margin-right: 40px;
17 | }
18 |
19 | &:hover {
20 | color: @text-color;
21 | }
22 | }
23 | }
24 |
25 | .copyright {
26 | color: @text-color-secondary;
27 | font-size: @font-size-base;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/react-koa/react-template/components/NoticeIcon/index.less:
--------------------------------------------------------------------------------
1 | @import '~antd/lib/style/themes/default.less';
2 |
3 | .popover {
4 | width: 336px;
5 | :global(.ant-popover-inner-content) {
6 | padding: 0;
7 | }
8 | }
9 |
10 | .noticeButton {
11 | cursor: pointer;
12 | display: inline-block;
13 | transition: all 0.3s;
14 | }
15 |
16 | .icon {
17 | font-size: 16px;
18 | padding: 4px;
19 | }
20 |
21 | .tabs {
22 | :global {
23 | .ant-tabs-nav-scroll {
24 | text-align: center;
25 | }
26 | .ant-tabs-bar {
27 | margin-bottom: 4px;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/react-koa/react-template/components/_utils/pathTools.js:
--------------------------------------------------------------------------------
1 | // /userinfo/2144/id => ['/userinfo','/useinfo/2144,'/userindo/2144/id']
2 | export function urlToList(url) {
3 | const urllist = url.split('/').filter(i => i);
4 | return urllist.map((urlItem, index) => {
5 | return `/${urllist.slice(0, index + 1).join('/')}`;
6 | });
7 | }
8 |
--------------------------------------------------------------------------------
/react-koa/react-template/components/_utils/pathTools.test.js:
--------------------------------------------------------------------------------
1 | import { urlToList } from './pathTools';
2 |
3 | describe('test urlToList', () => {
4 | it('A path', () => {
5 | expect(urlToList('/userinfo')).toEqual(['/userinfo']);
6 | });
7 | it('Secondary path', () => {
8 | expect(urlToList('/userinfo/2144')).toEqual(['/userinfo', '/userinfo/2144']);
9 | });
10 | it('Three paths', () => {
11 | expect(urlToList('/userinfo/2144/addr')).toEqual([
12 | '/userinfo',
13 | '/userinfo/2144',
14 | '/userinfo/2144/addr',
15 | ]);
16 | });
17 | });
18 |
--------------------------------------------------------------------------------
/react-koa/react-template/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "start": "umi dev",
4 | "build": "umi build"
5 | },
6 | "dependencies": {
7 | "ant-design-pro": "^1.3.0",
8 | "axios": "^0.18.0",
9 | "dva": "^2.4.1",
10 | "lodash": "^4.17.10",
11 | "lodash-decorators": "^5.0.0",
12 | "moment": "^2.22.1",
13 | "path-to-regexp": "^1.7.0",
14 | "rc-drawer-menu": "^0.5.7",
15 | "umi": "^2.1.1",
16 | "umi-plugin-react": "^1.0.0-beta.17"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/react-koa/react-template/pages/.umi/DvaContainer.js:
--------------------------------------------------------------------------------
1 | import { Component } from 'react';
2 |
3 | class DvaContainer extends Component {
4 | render() {
5 | window.g_app.router(() => this.props.children);
6 | return window.g_app.start()();
7 | }
8 | }
9 |
10 | export default DvaContainer;
11 |
--------------------------------------------------------------------------------
/react-koa/react-template/pages/.umi/initHistory.js:
--------------------------------------------------------------------------------
1 | // create history
2 | window.g_history = require('history/createHashHistory').default({});
3 |
--------------------------------------------------------------------------------
/react-koa/react-template/pages/.umi/polyfills.js:
--------------------------------------------------------------------------------
1 | import '@babel/polyfill';
2 |
3 |
--------------------------------------------------------------------------------
/react-koa/react-template/pages/dashboard/monitor.js:
--------------------------------------------------------------------------------
1 | import router from 'umi/router';
2 | import { Button } from 'antd';
3 |
4 | export default () =>
5 | <>
6 | 监控页
7 |
10 | >
11 |
12 |
--------------------------------------------------------------------------------
/react-koa/react-template/pages/dashboard/workplace.js:
--------------------------------------------------------------------------------
1 | import router from 'umi/router';
2 | import { Button } from 'antd';
3 |
4 | export default () =>
5 | <>
6 | 工作台
7 |
10 | >
11 |
12 |
--------------------------------------------------------------------------------
/react-koa/react-template/pages/index.js:
--------------------------------------------------------------------------------
1 | import Link from 'umi/link';
2 |
3 | export default () =>
4 | <>
5 | Index Page
6 | Pages
7 |
10 | >
11 |
--------------------------------------------------------------------------------
/react-koa/react-template/pages/login/login.css:
--------------------------------------------------------------------------------
1 | .loginBox{
2 | position: fixed;
3 | top:0;
4 | right: 0;
5 | bottom: 0;
6 | left: 0;
7 | display:flex;
8 | justify-content: center;
9 | align-items:center;
10 | background-image: url(../../assets/login-bg.svg);
11 | background-repeat: no-repeat;
12 | background-position: center 110px;
13 | background-size: 100%;
14 | }
15 | .loginForm {
16 | width: 300px;
17 | }
18 | .loginForgot {
19 | float: right;
20 | }
21 | .loginButton {
22 | width: 100%;
23 | }
--------------------------------------------------------------------------------
/react-koa/react-template/pages/login/models/login.js:
--------------------------------------------------------------------------------
1 | import {login} from '@/service/login';
2 |
3 | export default {
4 | namespace: 'login',
5 |
6 | state: {
7 | },
8 |
9 | effects: {
10 | *fetchLogin({payload,callback}, { call, put }) {
11 | const response = yield call(login,{ ...payload });
12 | if (callback&& typeof callback === 'function') callback(response);
13 | },
14 | },
15 |
16 | reducers: {
17 | },
18 | };
--------------------------------------------------------------------------------
/react-koa/react-template/service/login.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request';
2 |
3 | export async function login(data) {
4 | return request({
5 | url:'/register',
6 | method:'post',
7 | data
8 | });
9 | }
--------------------------------------------------------------------------------
/react-koa/react-template/utils/config/index.js:
--------------------------------------------------------------------------------
1 | let API_ROOT='';
2 | if(location.hostname.indexOf('dev-')!=-1
3 | ||location.hostname.indexOf('test-')!=-1
4 | ||location.hostname.indexOf('prod-')!=-1){
5 | API_ROOT=`https://${location.hostname}`;
6 | }else{
7 | API_ROOT=`http://localhost:3000`
8 | }
9 |
10 | export default API_ROOT
--------------------------------------------------------------------------------
/react-koa/react-template/utils/utils.js:
--------------------------------------------------------------------------------
1 | export function isAntdPro() {
2 | return window.location.hostname === 'preview.pro.ant.design';
3 | }
--------------------------------------------------------------------------------
/react-mobile/.gitignore:
--------------------------------------------------------------------------------
1 | dist
2 | node_modules
3 | .idea
--------------------------------------------------------------------------------
/react-mobile/.postcssrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "plugins": {
3 | "postcss-import": {},
4 | "postcss-url": {},
5 | // to edit target browsers: use "browserslist" field in package.json
6 | "autoprefixer": {}
7 | }
8 | }
--------------------------------------------------------------------------------
/react-mobile/README.md:
--------------------------------------------------------------------------------
1 | ## react-mobile
2 |
3 | > A react.js project
4 |
5 | 
6 |
7 | ## star
8 | 是一个初学者上手项目的不错demo 持续更新中
9 |
10 | ^^欢迎star,你的star是我更新的动力^^
11 |
12 | ## 技术栈
13 |
14 | ```
15 | 1. react
16 | 2. react-router-v4
17 | 3. redux
18 | 4. es6
19 | 5. axios
20 | 6. iconfont
21 | ```
22 |
23 | ## Build Setup
24 |
25 | ``` bash
26 | # install dependencies
27 | npm install
28 |
29 | # serve with hot reload at localhost:8080
30 | npm run dev
31 |
32 | # build for production with minification
33 | npm run build
34 | ```
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/react-mobile/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/react-mobile/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/react-mobile/src/api/url.js:
--------------------------------------------------------------------------------
1 |
2 | import Qs from 'qs'
3 | export default {
4 | //获取音乐播放链接
5 | getMusicUrl:{
6 | method:'get',
7 | url:'https://api.mlwei.com/music/api/?key=523077333&cache=0&type=song'
8 | },
9 | //获取音乐歌词
10 | getMusicLyric:{
11 | method:'get',
12 | url:'https://api.mlwei.com/music/api/?key=523077333&cache=0&type=lrc'
13 | },
14 | //查询音乐
15 | queryMusic:{
16 | method:'get',
17 | url:'https://api.mlwei.com/music/api/?key=523077333&cache=0&type=so'
18 | }
19 | }
--------------------------------------------------------------------------------
/react-mobile/src/assets/css/common.css:
--------------------------------------------------------------------------------
1 | .fr{
2 | float:right;
3 | }
4 |
5 | .fl{
6 | float:left;
7 | }
8 |
9 | .clearfix:after{
10 | display: block;
11 | clear: both;
12 | content: "";
13 | visibility: hidden;
14 | height: 0;
15 | }
16 |
17 | .pos-a{
18 | position:absolute;
19 | }
20 |
21 | .pos-r{
22 | position:relative;
23 | }
24 |
25 | .pos-f{
26 | position:fixed;
27 | }
--------------------------------------------------------------------------------
/react-mobile/src/assets/css/reset.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | ul, ol {
3 | list-style: none;
4 | }
5 |
6 | table {
7 | border-collapse: collapse;
8 | border-spacing: 0;
9 | }
10 |
11 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote,
12 | dl, dt, dd, ul, ol, li,
13 | pre,
14 | fieldset, lengend, button, input, textarea,
15 | th, td {
16 | /* table elements 表格元素 */
17 | margin: 0;
18 | padding: 0;
19 | }
20 | a{
21 | color:gray;
22 | }
23 |
--------------------------------------------------------------------------------
/react-mobile/src/assets/css/reset.min.css:
--------------------------------------------------------------------------------
1 | ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,fieldset,lengend,button,input,textarea,th,td{margin:0;padding:0}
2 |
--------------------------------------------------------------------------------
/react-mobile/src/assets/css/reset.scss:
--------------------------------------------------------------------------------
1 | ul, ol { list-style: none; }
2 | table {
3 | border-collapse: collapse;
4 | border-spacing: 0;
5 | }
6 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
7 | dl, dt, dd, ul, ol, li, /* list elements 列表元素 */
8 | pre, /* text formatting elements 文本格式元素 */
9 | fieldset, lengend, button, input, textarea, /* form elements 表单元素 */
10 | th, td { /* table elements 表格元素 */
11 | margin: 0;
12 | padding: 0;
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/react-mobile/src/assets/css/variable.css:
--------------------------------------------------------------------------------
1 | null
--------------------------------------------------------------------------------
/react-mobile/src/assets/css/variable.min.css:
--------------------------------------------------------------------------------
1 | null
--------------------------------------------------------------------------------
/react-mobile/src/assets/css/variable.scss:
--------------------------------------------------------------------------------
1 | $primary-color:rgba(16, 247, 16, 0.822);
2 | $text-color-secondary:rgba(0,0,0,.45);
3 | $headerFontColor:#dbf3e8;
4 | $headerMainBackgroundColor:#31c37c;
5 | $headerSearchBackgroundColor:#2AAA73;
6 | $screen-xl: 1200px;
7 | $screen-sm: 576px;
8 | $screen-xs: 480px;
--------------------------------------------------------------------------------
/react-mobile/src/assets/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-mobile/src/assets/fonts/iconfont.eot
--------------------------------------------------------------------------------
/react-mobile/src/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-mobile/src/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/react-mobile/src/assets/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-mobile/src/assets/fonts/iconfont.woff
--------------------------------------------------------------------------------
/react-mobile/src/assets/icon-arrow-left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-mobile/src/assets/icon-arrow-left.png
--------------------------------------------------------------------------------
/react-mobile/src/assets/icon-input-clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-mobile/src/assets/icon-input-clear.png
--------------------------------------------------------------------------------
/react-mobile/src/assets/icon-menu-add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-mobile/src/assets/icon-menu-add.png
--------------------------------------------------------------------------------
/react-mobile/src/assets/icon-menu-list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-mobile/src/assets/icon-menu-list.png
--------------------------------------------------------------------------------
/react-mobile/src/assets/icon-record-close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-mobile/src/assets/icon-record-close.png
--------------------------------------------------------------------------------
/react-mobile/src/assets/icon-record-recent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-mobile/src/assets/icon-record-recent.png
--------------------------------------------------------------------------------
/react-mobile/src/assets/icon-search-default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-mobile/src/assets/icon-search-default.png
--------------------------------------------------------------------------------
/react-mobile/src/assets/react-mobile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-mobile/src/assets/react-mobile.png
--------------------------------------------------------------------------------
/react-mobile/src/components/Loading/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './style.scss';
3 |
4 | export default function loading() {
5 | return (
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | )
14 | }
15 |
--------------------------------------------------------------------------------
/react-mobile/src/components/Tab/style.scss:
--------------------------------------------------------------------------------
1 |
2 | @import '@/assets/css/variable.scss';
3 | .tabbar {
4 | background:#ffffff;
5 | bottom: 0;
6 | border-top: 1px solid rgba(69, 90, 100, 0.6);
7 | }
8 | .tabbar-list {
9 | li {
10 | float: left;
11 | width: 1.3rem;
12 | padding: .1rem;
13 | }
14 |
15 | li.active {
16 | color: $primary-color;
17 | }
18 |
19 | p,
20 | span {
21 | float: left;
22 | width: 100%;
23 | text-align: center;
24 | }
25 |
26 | p {
27 | font-size: .4rem;
28 | }
29 |
30 | span {
31 | padding-bottom: .1rem;
32 | font-size: .5rem;
33 | }
34 | }
35 | a{
36 | color:gray;
37 | }
--------------------------------------------------------------------------------
/react-mobile/src/layouts/MainLayout/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import Header from '@/components/Header';
3 | import Tab from '@/components/Tab';
4 | import './style.scss';
5 | class MainLayout extends React.Component {
6 | render() {
7 | const {children} = this.props;
8 | return (
9 |
10 |
11 | {children}
12 |
13 |
14 | );
15 | }
16 | }
17 | export default MainLayout;
--------------------------------------------------------------------------------
/react-mobile/src/layouts/MainLayout/style.scss:
--------------------------------------------------------------------------------
1 | .qqmusic-home{
2 | display: flex;
3 | flex-direction: column;
4 | height: 100%;
5 | }
6 | .qqmusic-home-body{
7 | flex: 1;
8 | overflow: scroll;
9 | }
--------------------------------------------------------------------------------
/react-mobile/src/main.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by wuming on 2017/7/11.
3 | */
4 | // import '@/utils/antm-viewport.min';
5 | import '@/assets/fonts/iconfont.css'
6 | import '@/assets/css/reset.scss'
7 | import '@/assets/css/common.css'
8 | import React from 'react';
9 | import { render } from 'react-dom';
10 | import { Provider } from 'react-redux';
11 | import App from './App';
12 | import configureStore from '@/store';
13 | // import '@babel/polyfill';
14 | const store = configureStore();
15 | render(
16 |
17 |
18 | ,
19 | document.getElementById("app")
20 | );
--------------------------------------------------------------------------------
/react-mobile/src/pages/classify/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | class Classify extends React.Component {
3 | render() {
4 | return (
5 | 这是classify页面
6 | )
7 | }
8 | }
9 |
10 | export default Classify;
11 |
--------------------------------------------------------------------------------
/react-mobile/src/pages/my/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | class My extends React.Component {
3 | render() {
4 | return (
5 | 这是my页面
6 | )
7 | }
8 | }
9 |
10 | export default My;
11 |
--------------------------------------------------------------------------------
/react-mobile/src/pages/shop/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | class Shop extends React.Component {
3 | render() {
4 | return (
5 | 这是shop页面
6 | )
7 | }
8 | }
9 |
10 | export default Shop;
11 |
--------------------------------------------------------------------------------
/react-mobile/src/pages/shopCart/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | class ShopCart extends React.Component {
3 | render() {
4 | return (
5 | 这是shopCart
6 | )
7 | }
8 | }
9 |
10 | export default ShopCart;
11 |
--------------------------------------------------------------------------------
/react-mobile/src/pages/shopType/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | export interface IRouteParams {
3 | type: string;
4 | }
5 | class ShopCart extends React.Component{
6 | // constructor(props:any) {
7 | // super(props);
8 |
9 | // this.state = {
10 | // type:props.match.params.type,
11 | // }
12 | // }
13 | render() {
14 | const {type}=this.props
15 | return (
16 | 这是{type}
17 | )
18 | }
19 | }
20 |
21 | export default ShopCart;
22 |
--------------------------------------------------------------------------------
/react-mobile/src/store/index.js:
--------------------------------------------------------------------------------
1 | import { createStore,combineReducers, applyMiddleware, compose } from 'redux';
2 | import thunk from 'redux-thunk';
3 | import {API} from '@/api';
4 | import global from './reducer';
5 | const rootReducer = combineReducers({
6 | global
7 | })
8 | export default function configureStore(initialState) {
9 | const store = createStore(
10 | rootReducer,
11 | initialState,
12 | compose(
13 | applyMiddleware(thunk.withExtraArgument({API})),
14 | window.devToolsExtension ? window.devToolsExtension() : f => f
15 | )
16 | );
17 | return store;
18 | };
--------------------------------------------------------------------------------
/react-mobile/static/index.js:
--------------------------------------------------------------------------------
1 | //这是存放静态资源页
--------------------------------------------------------------------------------
/react-mobile/theme.js:
--------------------------------------------------------------------------------
1 | module.exports={
2 | "brand-primary":"#31c37c"
3 | }
--------------------------------------------------------------------------------
/react-pc-skill/.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 |
--------------------------------------------------------------------------------
/react-pc-skill/assets/react-pc-template.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-pc-skill/assets/react-pc-template.jpg
--------------------------------------------------------------------------------
/react-pc-skill/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-pc-skill/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-pc-skill/public/favicon.ico
--------------------------------------------------------------------------------
/react-pc-skill/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-pc-skill/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-pc-skill/src/components/OneTen/Eight.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const Child=React.forwardRef((props,ref)=>(
4 |
5 | ));
6 |
7 | export default Child
--------------------------------------------------------------------------------
/react-pc-skill/src/components/TwoTen/EightteenChildFive.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Button } from "antd";
3 |
4 | export default class EightteenChildFive extends React.Component {
5 | state={
6 | name:'这是组件EightteenChildFive的name 值'
7 | }
8 |
9 | click = () => {
10 | this.setState({name:'这是组件click 方法改变EightteenChildFive改变的name 值'})
11 | };
12 |
13 | render() {
14 | return (
15 |
16 |
{this.state.name}
17 |
20 |
21 | );
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/react-pc-skill/src/components/TwoTen/EightteenChildOne.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import PropTypes from "prop-types";
3 | import { Button } from "antd";
4 |
5 | export default class EightteenChildOne extends React.Component {
6 | static propTypes = { //
7 | name: PropTypes.string
8 | };
9 |
10 | click = () => {
11 | this.props.eightteenChildOneToFather("这是 props 改变父元素的值");
12 | };
13 |
14 | render() {
15 | return (
16 |
17 |
这是通过 props 传入的值{this.props.name}
18 |
21 |
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/react-pc-skill/src/components/TwoTen/EightteenChildTwoChild.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Consumer } from "../../utils/context"
3 | function Grandson(props) {
4 | return (
5 | //Consumer容器,可以拿到上文传递下来的name属性,并可以展示对应的值
6 |
7 | {(name ) =>
8 |
9 |
孙组件。获取传递下来的值:{name}
10 |
11 | }
12 |
13 | );
14 | }
15 | export default Grandson;
--------------------------------------------------------------------------------
/react-pc-skill/src/components/TwoTen/Thirteen.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default class ThirteenChild extends React.Component{
4 |
5 | render(){
6 | return (
7 | 这是ThirteenChild,通过异步加载方法导入的
8 | )
9 | }
10 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/components/TwoTen/TwentyChild.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | function areEqual(prevProps, nextProps) {
4 | /*
5 | 如果把 nextProps 传入 render 方法的返回结果与
6 | 将 prevProps 传入 render 方法的返回结果一致则返回 true,
7 | 否则返回 false
8 | */
9 | if (prevProps.val === nextProps.val) {
10 | return true;
11 | } else {
12 | return false;
13 | }
14 | }
15 |
16 | export default React.memo(function twentyChild(props) {
17 | console.log("MemoSon rendered : " + Date.now());
18 | return {props.val}
;
19 | }, areEqual);
--------------------------------------------------------------------------------
/react-pc-skill/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
12 | monospace;
13 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/FourTen/thirtyFour.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default class ThirtyFour extends React.Component{
4 |
5 | render(){
6 | const flag=true
7 | return (
8 | 这是技巧 34
9 | )
10 | }
11 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/FourTen/thirtyOne.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Button } from 'antd'
3 |
4 | export default class Three extends React.Component {
5 | state = {
6 | flag: true,
7 | flagOne: 1
8 | };
9 | click(data1,data2){
10 | console.log('data1 值为',data1)
11 | console.log('data2 值为',data2)
12 | }
13 | render() {
14 | return (
15 |
16 |
17 |
18 | );
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/FourTen/thirtyTwo.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default class ThirtyTwo extends React.Component{
4 |
5 | render(){
6 | return (
7 | 这是技巧32,详情使用见 App.js
8 | )
9 | }
10 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/Home/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Redirect } from 'react-router-dom'
3 |
4 | export default class Home extends React.Component {
5 | render(){
6 | return (
7 |
8 | )
9 | }
10 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/Home/index.less:
--------------------------------------------------------------------------------
1 | .logo {
2 | height: 32px;
3 | background: rgba(255, 255, 255, 0.2);
4 | margin: 16px;
5 | }
6 | .ant-breadcrumb > span:last-child a{
7 | color:#000;
8 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/Login/service.js:
--------------------------------------------------------------------------------
1 | import request from '../../utils/request'
2 | // 登陆
3 | export function login( data) {
4 | return request({
5 | url: '/user/login',
6 | method: 'post',
7 | data,
8 | })
9 | }
10 | // 2.获取商户支持的支付方式
11 | export function queryByOwenerIdAndOwnerType( params) {
12 | return request({
13 | url: '/api/productSubscribe/queryByOwenerIdAndOwnerType',
14 | method: 'get',
15 | params,
16 | })
17 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/NotFound/index.less:
--------------------------------------------------------------------------------
1 | .loading {
2 | display: flex;
3 | justify-content: center;
4 | /*x轴对齐方式*/
5 | align-items: center;
6 | /*y轴对滴方式*/
7 | height: calc(100vh - 250px);
8 | font-size:40px;
9 | /**屏幕高度百分百*/
10 |
11 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/OneTen/four.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default class Four extends React.Component {
4 | state = {
5 | count: 1
6 | };
7 | render() {
8 | let info
9 | if(this.state.count===0){
10 | info=(
11 | 这是数量为 0 显示
12 | )
13 | } else if(this.state.count===1){
14 | info=(
15 | 这是数量为 1 显示
16 | )
17 | }
18 | return (
19 |
20 | {info}
21 |
22 | );
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/OneTen/nine.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default class Nine extends React.Component {
4 | static update(data) {
5 | console.log('静态方法调用执行啦')
6 | }
7 | render() {
8 | return (
9 |
10 | 这是 static 关键字技能
11 |
12 | );
13 | }
14 | }
15 |
16 | Nine.update('2')
17 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/OneTen/store/action.js:
--------------------------------------------------------------------------------
1 | import * as Types from './types';
2 |
3 | export const onChangeCount = count => ({
4 | type: Types.EXAMPLE_TEST,
5 | count: count + 1
6 | })
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/OneTen/store/reducer.js:
--------------------------------------------------------------------------------
1 | import * as Types from "./types";
2 |
3 | export const defaultState = {
4 | count: 0
5 | };
6 |
7 | export default (state, action) => {
8 | switch (action.type) {
9 | case Types.EXAMPLE_TEST:
10 | return {
11 | ...state,
12 | count: action.count
13 | };
14 | default: {
15 | return state;
16 | }
17 | }
18 | };
19 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/OneTen/store/types.js:
--------------------------------------------------------------------------------
1 | export const EXAMPLE_TEST = 'EXAMPLE_TEST';
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/OneTen/ten.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default class Ten extends React.Component {
4 | constructor() { // class 的主函数
5 | super() // React.Component.prototype.constructor.call(this),其实就是拿到父类的属性和方法
6 | this.state = {
7 | arr:[]
8 | }
9 | }
10 | render() {
11 | return (
12 |
13 | 这是技巧constructor和super的说明
14 |
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/OneTen/three.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Test from '../../utils/decorators'
3 |
4 | @Test
5 |
6 | class TwentyNine extends React.Component{
7 | componentDidMount(){
8 | console.log(this,'decorator.js') // 这里的this是类的一个实例
9 | console.log(this.testable)
10 | }
11 | render(){
12 | return (
13 | 这是技巧2,装饰器的使用
14 | )
15 | }
16 | }
17 |
18 | export default TwentyNine
19 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/OneTen/two.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default class ThirtyOne extends React.Component{
4 |
5 | render(){
6 | return (
7 | 这是技巧2,require.context的使用详见 router.js
8 | )
9 | }
10 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/ThreeTen/thirty.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default class Thirty extends React.Component {
4 | click = e => {
5 | console.log(e.target.getAttribute("data-row"));
6 | };
7 |
8 | render() {
9 | return (
10 |
11 |
12 | 点击获取属性
13 |
14 |
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/ThreeTen/twentyFive.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default class TwentyFive extends React.Component {
4 | render() {
5 | return (
6 | 这是渲染的 HTML 内容" }}>
7 | );
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/ThreeTen/twentyNine.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Button } from 'antd'
3 |
4 | export default class Three extends React.Component {
5 | state = {
6 | flag: true,
7 | flagOne: 1
8 | };
9 | click(data1,data2){
10 | console.log('data1 值为',data1)
11 | console.log('data2 值为',data2)
12 | }
13 | render() {
14 | return (
15 |
16 |
17 |
18 | );
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/ThreeTen/twentyOne.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | class TwentyOneChild extends React.PureComponent{
4 | render() {
5 | return {this.props.name}
6 | }
7 | }
8 |
9 | export default class TwentyOne extends React.Component{
10 |
11 | render(){
12 | return (
13 |
14 |
15 |
16 | )
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/ThreeTen/twentySix.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default class TwentySix extends React.Component {
4 | render() {
5 | return (
6 |
7 | {React.createElement(
8 | "div",
9 | { id: "one", className: "two" },
10 | React.createElement("span", { id: "spanOne" }, "这是第一个 span 标签"),
11 | React.createElement("br"),
12 | React.createElement("span", { id: "spanTwo" }, "这是第二个 span 标签")
13 | )}
14 |
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/ThreeTen/twentyThree.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default class TwentyThree extends React.Component{
4 | state={myVariable:null}
5 | render(){
6 | return (
7 | {String(this.state.myVariable)}
8 | )
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/ThreeTen/twentyTwo.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default class TwentyTwo extends React.Component{
4 |
5 | render(){
6 | return (
7 | 这是技巧22
8 | )
9 | }
10 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/TwoTen/eighteen.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default class One extends React.Component {
4 | state = {
5 | flag: true,
6 | flagOne: 1
7 | };
8 | render() {
9 | return (
10 |
11 | {this.state.flag ?
显示内容
: ""}
12 | {this.state.flagOne ?
显示内容1
: ""}
13 |
14 | );
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/TwoTen/thirteen.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Loadable from "react-loadable";
3 | //通用的过场组件
4 | const Loading = () => {
5 | return loading
;
6 | };
7 |
8 | const LoadableComponent = Loadable({
9 | loader: () => import("../../components/TwoTen/Thirteen"),
10 | loading: Loading
11 | });
12 |
13 | export default class Thirteen extends React.Component {
14 | render() {
15 | return ;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/TwoTen/twenty.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import TwentyChild from "../../components/TwoTen/TwentyChild";
3 |
4 | export default class Twenty extends React.Component {
5 | state = {
6 | val: "这是初始的 val"
7 | };
8 | render() {
9 | return (
10 |
11 |
12 |
13 | );
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/react-pc-skill/src/pages/User/index.less:
--------------------------------------------------------------------------------
1 | .logo {
2 | height: 32px;
3 | background: rgba(255, 255, 255, 0.2);
4 | margin: 16px;
5 | }
6 | .ant-breadcrumb > span:last-child a{
7 | color:#000;
8 | }
9 | .logoutIcon{
10 | float: right;
11 | margin-right: 20px;
12 | font-size: 24px;
13 | color: #bbb;
14 | cursor: pointer;
15 | }
16 | .loginUser{
17 | float: right;
18 | margin-right: 10px;
19 | font-size: 16px;
20 | color: #1890ff;
21 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const proxy = require('http-proxy-middleware')
2 | module.exports = function (app) {
3 | // ...You can now register proxies as you wish!
4 | app.use(proxy('/randy', {
5 | target: 'http://47.105.71.81:3306',
6 | secure: false,
7 | changeOrigin: true,
8 | pathRewrite: {
9 | "^/randy": ""
10 | },
11 | }));
12 | app.use(proxy('/peter', {
13 | target: 'http://172.19.5.34:9531',
14 | secure: false,
15 | changeOrigin: true,
16 | pathRewrite: {
17 | "^/peter": ""
18 | },
19 | }));
20 | };
--------------------------------------------------------------------------------
/react-pc-skill/src/store/actionTypes.js:
--------------------------------------------------------------------------------
1 | export const AUTH_CHANGE = 'auth_change';
2 | export const PERMISSION_CHANGE = 'permission_change';
3 | export const CURRENT_CHANGE = 'current_change';
--------------------------------------------------------------------------------
/react-pc-skill/src/store/index.js:
--------------------------------------------------------------------------------
1 | import { createStore,applyMiddleware ,compose} from 'redux';
2 | import thunk from 'redux-thunk';
3 | import reducer from './reducer';
4 |
5 | const composeEnhancers =window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose;
6 | const enhancer = composeEnhancers(
7 | applyMiddleware(thunk)
8 | );
9 |
10 | const store = createStore(reducer, enhancer);
11 | export default store;
--------------------------------------------------------------------------------
/react-pc-skill/src/stylus/common.less:
--------------------------------------------------------------------------------
1 | .display_flex{
2 | display:flex;
3 | }
4 | .flex_one{
5 | flex:1;
6 | }
7 | .flex_center{
8 | display:flex;
9 | justify-content: center;
10 | align-items: center;
11 | }
12 |
--------------------------------------------------------------------------------
/react-pc-skill/src/stylus/index.less:
--------------------------------------------------------------------------------
1 | //重置样式
2 | @import './reset.less';
3 | //公用样式
4 | @import './common.less';
5 | //loading样式
6 | @import './loading.less';
--------------------------------------------------------------------------------
/react-pc-skill/src/utils/baseUrl.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const proxyTargetMap = {
4 | prod: '/',
5 | randy: '/randy',
6 | peter: '/peter'
7 | }
8 | const API_TYPE = process.env.API_TYPE?process.env.API_TYPE:'randy'
9 | const baseUrl = process.env.NODE_ENV === 'production' ? '/' : proxyTargetMap[API_TYPE]
10 | export default baseUrl
--------------------------------------------------------------------------------
/react-pc-skill/src/utils/connect.js:
--------------------------------------------------------------------------------
1 | // import actions from '../actions'
2 | import * as action from '../store/actionCreator'
3 | import { connect } from 'react-redux'
4 | // import { bindActionCreators } from 'redux'
5 | export default connect(
6 | // state => ({state}),
7 | state => ({
8 | state
9 | }),
10 |
11 |
12 |
13 | // dispatch => {
14 | // return bindActionCreators({
15 | // action,
16 | // dispatch
17 | // })
18 |
19 | // }
20 | dispatch =>{
21 | return {
22 | ...action,
23 | dispatch
24 | }
25 | }
26 |
27 | )
28 |
--------------------------------------------------------------------------------
/react-pc-skill/src/utils/context.js:
--------------------------------------------------------------------------------
1 | // context.js
2 | import React from 'react'
3 | let { Consumer, Provider } = React.createContext();
4 | export {
5 | Consumer,
6 | Provider
7 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/utils/decorators.js:
--------------------------------------------------------------------------------
1 | function testable(target) {
2 | console.log(target)
3 | target.isTestable = true;
4 | target.prototype.getDate = ()=>{
5 | console.log( new Date() )
6 | }
7 | }
8 |
9 | export default testable
--------------------------------------------------------------------------------
/react-pc-skill/src/utils/loadable.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Loadable from 'react-loadable';
3 |
4 | //通用的过场组件
5 | const loadingComponent =()=>{
6 | return (
7 | loading
8 | )
9 | }
10 |
11 | //过场组件默认采用通用的,若传入了loading,则采用传入的过场组件
12 | export default (loader,loading = loadingComponent)=>{
13 | return Loadable({
14 | loader,
15 | loading
16 | });
17 | }
--------------------------------------------------------------------------------
/react-pc-skill/src/utils/useConnect.js:
--------------------------------------------------------------------------------
1 | // import React from 'react'
2 | // import conncet from './connect'
3 |
4 | // export default @connect
--------------------------------------------------------------------------------
/react-pc-template/.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-pc-template/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-pc-template/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/react-pc-template/public/favicon.ico
--------------------------------------------------------------------------------
/react-pc-template/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-pc-template/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-pc-template/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
12 | monospace;
13 | }
--------------------------------------------------------------------------------
/react-pc-template/src/pages/Home/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Redirect } from 'react-router-dom'
3 |
4 | export default class Home extends React.Component {
5 | render(){
6 | return (
7 |
8 | )
9 | }
10 | }
--------------------------------------------------------------------------------
/react-pc-template/src/pages/Home/index.less:
--------------------------------------------------------------------------------
1 | .logo {
2 | height: 32px;
3 | background: rgba(255, 255, 255, 0.2);
4 | margin: 16px;
5 | }
6 | .ant-breadcrumb > span:last-child a{
7 | color:#000;
8 | }
--------------------------------------------------------------------------------
/react-pc-template/src/pages/Login/service.js:
--------------------------------------------------------------------------------
1 | import request from '../../utils/request'
2 | // 登陆
3 | export function login( data) {
4 | return request({
5 | url: '/user/login',
6 | method: 'post',
7 | data,
8 | })
9 | }
10 | // 2.获取商户支持的支付方式
11 | export function queryByOwenerIdAndOwnerType( params) {
12 | return request({
13 | url: '/api/productSubscribe/queryByOwenerIdAndOwnerType',
14 | method: 'get',
15 | params,
16 | })
17 | }
--------------------------------------------------------------------------------
/react-pc-template/src/pages/NotFound/index.less:
--------------------------------------------------------------------------------
1 | .loading {
2 | display: flex;
3 | justify-content: center;
4 | /*x轴对齐方式*/
5 | align-items: center;
6 | /*y轴对滴方式*/
7 | height: calc(100vh - 250px);
8 | font-size:40px;
9 | /**屏幕高度百分百*/
10 |
11 | }
--------------------------------------------------------------------------------
/react-pc-template/src/pages/OneTen/one.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default class One extends React.Component{
4 |
5 | render(){
6 | return (
7 | 这是技巧 1
8 | )
9 | }
10 | }
--------------------------------------------------------------------------------
/react-pc-template/src/pages/TwoTen/Eleven.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default class One extends React.Component{
4 |
5 | render(){
6 | return (
7 | 这是技巧 11
8 | )
9 | }
10 | }
--------------------------------------------------------------------------------
/react-pc-template/src/pages/User/index.less:
--------------------------------------------------------------------------------
1 | .logo {
2 | height: 32px;
3 | background: rgba(255, 255, 255, 0.2);
4 | margin: 16px;
5 | }
6 | .ant-breadcrumb > span:last-child a{
7 | color:#000;
8 | }
9 | .logoutIcon{
10 | float: right;
11 | margin-right: 20px;
12 | font-size: 24px;
13 | color: #bbb;
14 | cursor: pointer;
15 | }
16 | .loginUser{
17 | float: right;
18 | margin-right: 10px;
19 | font-size: 16px;
20 | color: #1890ff;
21 | }
--------------------------------------------------------------------------------
/react-pc-template/src/setupProxy.js:
--------------------------------------------------------------------------------
1 | const proxy = require('http-proxy-middleware')
2 | module.exports = function (app) {
3 | // ...You can now register proxies as you wish!
4 | app.use(proxy('/randy', {
5 | target: 'http://47.105.71.81:3306',
6 | secure: false,
7 | changeOrigin: true,
8 | pathRewrite: {
9 | "^/randy": ""
10 | },
11 | }));
12 | app.use(proxy('/peter', {
13 | target: 'http://172.19.5.34:9531',
14 | secure: false,
15 | changeOrigin: true,
16 | pathRewrite: {
17 | "^/peter": ""
18 | },
19 | }));
20 | };
--------------------------------------------------------------------------------
/react-pc-template/src/store/actionTypes.js:
--------------------------------------------------------------------------------
1 | export const AUTH_CHANGE = 'auth_change';
2 | export const PERMISSION_CHANGE = 'permission_change';
3 | export const CURRENT_CHANGE = 'current_change';
--------------------------------------------------------------------------------
/react-pc-template/src/store/index.js:
--------------------------------------------------------------------------------
1 | import { createStore,applyMiddleware ,compose} from 'redux';
2 | import thunk from 'redux-thunk';
3 | import reducer from './reducer';
4 |
5 | const composeEnhancers =window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose;
6 | const enhancer = composeEnhancers(
7 | applyMiddleware(thunk)
8 | );
9 |
10 | const store = createStore(reducer, enhancer);
11 | export default store;
--------------------------------------------------------------------------------
/react-pc-template/src/stylus/common.less:
--------------------------------------------------------------------------------
1 | .display_flex{
2 | display:flex;
3 | }
4 | .flex_one{
5 | flex:1;
6 | }
7 | .flex_center{
8 | display:flex;
9 | justify-content: center;
10 | align-items: center;
11 | }
12 |
--------------------------------------------------------------------------------
/react-pc-template/src/stylus/index.less:
--------------------------------------------------------------------------------
1 | //重置样式
2 | @import './reset.less';
3 | //公用样式
4 | @import './common.less';
5 | //loading样式
6 | @import './loading.less';
--------------------------------------------------------------------------------
/react-pc-template/src/utils/baseUrl.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const proxyTargetMap = {
4 | prod: '/',
5 | randy: '/randy',
6 | peter: '/peter'
7 | }
8 | const API_TYPE = process.env.API_TYPE?process.env.API_TYPE:'randy'
9 | const baseUrl = process.env.NODE_ENV === 'production' ? '/' : proxyTargetMap[API_TYPE]
10 | export default baseUrl
--------------------------------------------------------------------------------
/react-pc-template/src/utils/connect.js:
--------------------------------------------------------------------------------
1 | // import actions from '../actions'
2 | import * as action from '../store/actionCreator'
3 | import { connect } from 'react-redux'
4 | // import { bindActionCreators } from 'redux'
5 | export default connect(
6 | // state => ({state}),
7 | state => ({
8 | state
9 | }),
10 |
11 |
12 |
13 | // dispatch => {
14 | // return bindActionCreators({
15 | // action,
16 | // dispatch
17 | // })
18 |
19 | // }
20 | dispatch =>{
21 | return {
22 | ...action,
23 | dispatch
24 | }
25 | }
26 |
27 | )
28 |
--------------------------------------------------------------------------------
/react-pc-template/src/utils/loadable.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Loadable from 'react-loadable';
3 |
4 | //通用的过场组件
5 | const loadingComponent =()=>{
6 | return (
7 | loading
8 | )
9 | }
10 |
11 | //过场组件默认采用通用的,若传入了loading,则采用传入的过场组件
12 | export default (loader,loading = loadingComponent)=>{
13 | return Loadable({
14 | loader,
15 | loading
16 | });
17 | }
--------------------------------------------------------------------------------
/react-pc-template/src/utils/useConnect.js:
--------------------------------------------------------------------------------
1 | // import React from 'react'
2 | // import conncet from './connect'
3 |
4 | // export default @connect
--------------------------------------------------------------------------------
/utils-lan/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | ...require('./lib/client'),
3 | ...require('./lib/arr'),
4 | ...require('./lib/check'),
5 | ...require('./lib/file'),
6 | ...require('./lib/obj'),
7 | ...require('./lib/storage'),
8 | ...require('./lib/str'),
9 | ...require('./lib/thrDeb'),
10 | ...require('./lib/time'),
11 | ...require('./lib/url')
12 | }
--------------------------------------------------------------------------------
/utils-lan/lib/file.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 格式化文件单位
3 | * @param {String || Number} size 文件大小(kb)
4 | */
5 | export const fileFormatSize = size => {
6 | var i
7 | var unit = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']
8 | for (i = 0; i < unit.length && size >= 1024; i++) {
9 | size /= 1024
10 | }
11 | return (Math.round(size * 100) / 100 || 0) + unit[i]
12 | }
13 |
--------------------------------------------------------------------------------
/utils-lan/lib/url.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 获取 url 后面通过?传参的参数
3 | * @param {String} name
4 | */
5 | export function getQueryString(name) {
6 | const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
7 | const url = window.location.href
8 | const search = url.substring(url.lastIndexOf('?') + 1)
9 | const r = search.match(reg)
10 | if (r != null) return unescape(r[2])
11 | return null
12 | }
13 |
--------------------------------------------------------------------------------
/vue-demo/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-vue-jsx", "transform-runtime"],
12 | "env": {
13 | "test": {
14 | "presets": ["env", "stage-2"],
15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vue-demo/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/vue-demo/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | /dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | /test/unit/coverage/
8 |
9 | # Editor directories and files
10 | .idea
11 | .vscode
12 | *.suo
13 | *.ntvs*
14 | *.njsproj
15 | *.sln
16 |
--------------------------------------------------------------------------------
/vue-demo/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-import": {},
6 | "postcss-url": {},
7 | // to edit target browsers: use "browserslist" field in package.json
8 | "autoprefixer": {}
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/vue-demo/build/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/build/logo.png
--------------------------------------------------------------------------------
/vue-demo/build/vue-loader.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('./utils')
3 | const config = require('../config')
4 | const isProduction = process.env.NODE_ENV === 'production'
5 | const sourceMapEnabled = isProduction
6 | ? config.build.productionSourceMap
7 | : config.dev.cssSourceMap
8 |
9 | module.exports = {
10 | loaders: utils.cssLoaders({
11 | sourceMap: sourceMapEnabled,
12 | extract: isProduction
13 | }),
14 | cssSourceMap: sourceMapEnabled,
15 | cacheBusting: config.dev.cacheBusting,
16 | transformToRequire: {
17 | video: ['src', 'poster'],
18 | source: 'src',
19 | img: 'src',
20 | image: 'xlink:href'
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vue-demo/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/vue-demo/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/vue-demo/config/test.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const devEnv = require('./dev.env')
4 |
5 | module.exports = merge(devEnv, {
6 | NODE_ENV: '"testing"'
7 | })
8 |
--------------------------------------------------------------------------------
/vue-demo/images/vue-demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/images/vue-demo.png
--------------------------------------------------------------------------------
/vue-demo/scripts/template/add.template.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | _module_
4 |
5 |
6 |
7 |
23 |
24 |
--------------------------------------------------------------------------------
/vue-demo/scripts/template/api.template.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: _author_
3 | * @Email: _email_
4 | * @Date: _date_
5 | * @Description: _comment_
6 | */
7 | import http from '@/utils/http'
8 |
9 | export function demo(data) {
10 | return http({
11 | method: 'post',
12 | url: '/',
13 | data
14 | })
15 | }
16 |
--------------------------------------------------------------------------------
/vue-demo/scripts/template/info.template.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | _module_
4 |
5 |
6 |
7 |
23 |
24 |
--------------------------------------------------------------------------------
/vue-demo/scripts/template/route.template.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: _author_
3 | * @Email: _email_
4 | * @Date: _date_
5 | * @Description: _comment_
6 | */
7 | export default [
8 | {
9 | path: "/_mainPath",
10 | component: () => import("@/views/frame/Frame"),
11 | redirect: "/_filePath",
12 | name: "_mainPath",
13 | icon: "",
14 | noDropdown: false,
15 | children: [
16 | {
17 | path: "/_filePath",
18 | component: () => import("@/views/_filePath/index"),
19 | name: "_module",
20 | meta: {
21 | keepAlive: false
22 | }
23 | }
24 | ]
25 | }
26 | ]
--------------------------------------------------------------------------------
/vue-demo/scripts/zip.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: etongfu
3 | * @Email: 13583254085@163.com
4 | * @Date: 2019-08-21 19:55:03
5 | * @LastEditors: etongfu
6 | * @LastEditTime: 2019-08-21 20:05:45
7 | * @Description: 进行zip压缩 ❤暂时不要使用,只是一个雏形
8 | * @YouWant: add you want info here
9 | */
10 | const { FileUtil } = require('./util')
11 |
12 | FileUtil.zipDir()
--------------------------------------------------------------------------------
/vue-demo/src/assets/avactor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/src/assets/avactor.png
--------------------------------------------------------------------------------
/vue-demo/src/assets/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/src/assets/fonts/iconfont.eot
--------------------------------------------------------------------------------
/vue-demo/src/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/src/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/vue-demo/src/assets/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/src/assets/fonts/iconfont.woff
--------------------------------------------------------------------------------
/vue-demo/src/assets/fonts/iconfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/src/assets/fonts/iconfont.woff2
--------------------------------------------------------------------------------
/vue-demo/src/assets/login.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/src/assets/login.jpg
--------------------------------------------------------------------------------
/vue-demo/src/assets/login_pass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/src/assets/login_pass.png
--------------------------------------------------------------------------------
/vue-demo/src/assets/login_user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/src/assets/login_user.png
--------------------------------------------------------------------------------
/vue-demo/src/assets/right-arrow-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/src/assets/right-arrow-sel.png
--------------------------------------------------------------------------------
/vue-demo/src/assets/right-arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/src/assets/right-arrow.png
--------------------------------------------------------------------------------
/vue-demo/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import createPersistedState from 'vuex-persistedstate'
4 | import comTable from './modules/comTable'
5 | Vue.use(Vuex)
6 |
7 | export default new Vuex.Store({
8 | modules: {
9 | comTable
10 | },
11 | plugins: [createPersistedState({ storage: window.sessionStorage })]
12 | })
13 |
--------------------------------------------------------------------------------
/vue-demo/src/utils/api.js:
--------------------------------------------------------------------------------
1 | const API={
2 | login:"/api/loginOut",
3 | tableData:"/static/comTable.json",
4 | }
5 |
6 |
7 | export default API;
8 |
--------------------------------------------------------------------------------
/vue-demo/src/utils/config/cloud.js:
--------------------------------------------------------------------------------
1 | let TenBUCKET,TenUrl;
2 |
3 | if(location.hostname.indexOf('dev-')!=-1
4 | ||location.hostname.indexOf('test-')!=-1){
5 | TenBUCKET='resource-125578';//配置腾讯云的Bucket
6 | TenUrl='https://resource.com';//配置腾讯云的路径
7 | }else if(location.hostname=== "prod.com"){
8 | TenBUCKET='prod-1255821078';
9 | TenUrl='https://cos.com';
10 | }else{
11 | TenBUCKET='resource-125578';
12 | TenUrl='https://resource.com';
13 | }
14 |
15 | export{
16 | TenBUCKET,TenUrl
17 | }
--------------------------------------------------------------------------------
/vue-demo/src/utils/config/index.js:
--------------------------------------------------------------------------------
1 | let API_ROOT = '',host=location.host
2 | switch(host){
3 | case 'pre.my.com':
4 | API_ROOT='pre'
5 | break
6 | case 'test.my.com':
7 | API_ROOT='test'
8 | break
9 | case 'checkout.my.com':
10 | API_ROOT='checkout'
11 | break
12 | case 'business.my.com':
13 | API_ROOT='prod'
14 | break
15 | default:
16 | API_ROOT='http://localhost:5220'
17 | break
18 | }
19 | export {
20 | API_ROOT
21 | }
22 |
23 | export default API_ROOT
--------------------------------------------------------------------------------
/vue-demo/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/static/.gitkeep
--------------------------------------------------------------------------------
/vue-demo/static/comTable.json:
--------------------------------------------------------------------------------
1 | {tabData:[
2 | {
3 | date:'2017-05-02',
4 | name:'王小虎',
5 | address:'上海市普陀区金沙江路1518弄'
6 | },
7 | {
8 | date:'2016-06-04',
9 | name:'王小虎',
10 | address: '上海市普陀区金沙江路 1517 弄'
11 | },
12 | {
13 | date:'2016-05-01',
14 | name:'王小虎',
15 | address:'上海市普陀区金沙江路 1519 弄'
16 | },
17 | {
18 | date: '2018-05-03',
19 | name: '王小虎',
20 | address: '上海市普陀区金沙江路 1516 弄'
21 | }
22 | ]}
--------------------------------------------------------------------------------
/vue-demo/static/css/common.css:
--------------------------------------------------------------------------------
1 | ul,li{ padding:0;margin:0;list-style:none}
2 | p{margin:0}
--------------------------------------------------------------------------------
/vue-demo/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-demo/static/favicon.png
--------------------------------------------------------------------------------
/vue-demo/test/unit/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "jest": true
4 | },
5 | "globals": {
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/vue-demo/test/unit/setup.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 |
3 | Vue.config.productionTip = false
4 |
--------------------------------------------------------------------------------
/vue-demo/test/unit/specs/HelloWorld.spec.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import HelloWorld from '@/components/HelloWorld'
3 |
4 | describe('HelloWorld.vue', () => {
5 | it('should render correct contents', () => {
6 | const Constructor = Vue.extend(HelloWorld)
7 | const vm = new Constructor().$mount()
8 | expect(vm.$el.querySelector('.hello h1').textContent)
9 | .toEqual('Welcome to Your Vue.js App')
10 | })
11 | })
12 |
--------------------------------------------------------------------------------
/vue-mobile-template/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-vue-jsx", "transform-runtime"],
12 | "env": {
13 | "test": {
14 | "presets": ["env", "stage-2"],
15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vue-mobile-template/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/vue-mobile-template/.eslintignore:
--------------------------------------------------------------------------------
1 | /build/
2 | /config/
3 | /dist/
4 | /*.js
5 | /test/unit/coverage/
6 |
--------------------------------------------------------------------------------
/vue-mobile-template/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | /dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | /test/unit/coverage/
8 |
9 | # Editor directories and files
10 | .idea
11 | .vscode
12 | *.suo
13 | *.ntvs*
14 | *.njsproj
15 | *.sln
16 |
--------------------------------------------------------------------------------
/vue-mobile-template/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-import": {},
6 | "postcss-url": {},
7 | // to edit target browsers: use "browserslist" field in package.json
8 | "autoprefixer": {}
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/vue-mobile-template/build/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/build/logo.png
--------------------------------------------------------------------------------
/vue-mobile-template/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/vue-mobile-template/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/vue-mobile-template/config/test.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const devEnv = require('./dev.env')
4 |
5 | module.exports = merge(devEnv, {
6 | NODE_ENV: '"testing"'
7 | })
8 |
--------------------------------------------------------------------------------
/vue-mobile-template/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | vue-mobile-template
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/vue-mobile-template/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
20 |
--------------------------------------------------------------------------------
/vue-mobile-template/src/assets/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/assets/fonts/iconfont.eot
--------------------------------------------------------------------------------
/vue-mobile-template/src/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/vue-mobile-template/src/assets/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/assets/fonts/iconfont.woff
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/classify/classify.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 这是classify页面
4 |
5 |
6 |
7 |
31 |
32 |
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/classify/img/classify1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/pages/classify/img/classify1.jpg
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/home/img/bgc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/pages/home/img/bgc.jpg
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/home/img/bgc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/pages/home/img/bgc.png
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/main/img/banner1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/pages/main/img/banner1.jpg
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/main/img/banner2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/pages/main/img/banner2.jpg
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/main/img/product1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/pages/main/img/product1.jpg
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/main/img/product2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/pages/main/img/product2.jpg
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/main/img/product3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/pages/main/img/product3.jpg
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/main/img/product4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/pages/main/img/product4.jpg
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/my/my.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 这是my页面
4 |
5 |
6 |
7 |
24 |
25 |
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/product/product.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 这是product页面
4 |
5 |
6 |
7 |
23 |
24 |
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/productDetail/img/product-detail1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/src/pages/productDetail/img/product-detail1.jpg
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/productDetail/productDetail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 这是商品详情页
5 |
6 |
7 |
8 |
31 |
32 |
--------------------------------------------------------------------------------
/vue-mobile-template/src/pages/shopcart/shopcart.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 这是购物车页面
4 |
5 |
6 |
7 |
20 |
21 |
--------------------------------------------------------------------------------
/vue-mobile-template/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Vuex from 'vuex';
3 | import createPersistedState from 'vuex-persistedstate';
4 | import tabIndex from './modules/tabIndex';
5 | Vue.use(Vuex);
6 |
7 | export default new Vuex.Store({
8 | modules: {
9 | tabIndex
10 | },
11 | plugins: [createPersistedState({ storage: window.sessionStorage })]
12 | });
13 |
--------------------------------------------------------------------------------
/vue-mobile-template/src/store/modules/tabIndex.js:
--------------------------------------------------------------------------------
1 | // initial state
2 | const state = {
3 | tabIndex: 0,
4 | };
5 |
6 | // getters
7 | const getters = {
8 | allTabIndex: state => state.tabIndex,
9 | };
10 |
11 | // actions
12 | const actions = {
13 | getAllTabIndex({ commit }, index) {
14 | commit('setTabData', index);
15 | }
16 | };
17 |
18 | // mutations
19 | const mutations = {
20 | setTabData(state, index) {
21 | state.tabIndex = index;
22 | }
23 | };
24 |
25 | export default {
26 | state,
27 | getters,
28 | actions,
29 | mutations
30 | };
--------------------------------------------------------------------------------
/vue-mobile-template/src/utils/api.js:
--------------------------------------------------------------------------------
1 | const API = {
2 | login: "/api/loginOut",
3 | tableData: "/static/comTable.json",
4 | };
5 |
6 |
7 | export default API;
8 |
--------------------------------------------------------------------------------
/vue-mobile-template/src/utils/config/index.js:
--------------------------------------------------------------------------------
1 | let API_ROOT='';
2 | if(location.hostname.indexOf('dev-')!=-1
3 | ||location.hostname.indexOf('test-')!=-1
4 | ||location.hostname.indexOf('prod-')!=-1){
5 | API_ROOT=`https://${location.hostname}`;
6 | }else{
7 | API_ROOT=`http://localhost:5220`
8 | }
9 |
10 | export default API_ROOT
--------------------------------------------------------------------------------
/vue-mobile-template/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/static/.gitkeep
--------------------------------------------------------------------------------
/vue-mobile-template/static/comTable.json:
--------------------------------------------------------------------------------
1 | {tabData:[
2 | {
3 | date:'2017-05-02',
4 | name:'王小虎',
5 | address:'上海市普陀区金沙江路1518弄'
6 | },
7 | {
8 | date:'2016-06-04',
9 | name:'王小虎',
10 | address: '上海市普陀区金沙江路 1517 弄'
11 | },
12 | {
13 | date:'2016-05-01',
14 | name:'王小虎',
15 | address:'上海市普陀区金沙江路 1519 弄'
16 | },
17 | {
18 | date: '2018-05-03',
19 | name: '王小虎',
20 | address: '上海市普陀区金沙江路 1516 弄'
21 | }
22 | ]}
--------------------------------------------------------------------------------
/vue-mobile-template/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile-template/static/favicon.png
--------------------------------------------------------------------------------
/vue-mobile-template/static/lib/css/function.scss:
--------------------------------------------------------------------------------
1 | @function ptr($px) {
2 | @return $px/100 * 1rem;
3 | }
4 |
5 | @function ptro($px) {
6 | @return $px/100 * 1rem;
7 | }
--------------------------------------------------------------------------------
/vue-mobile-template/static/lib/js/initFontSize.min.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | function a() {
3 | var b = document.documentElement.clientWidth;
4 | b = b > 750 ? 750 : b;//这个值可以根据设计图尺寸变化
5 | var c = (b / 750) * 100;
6 | document.getElementsByTagName('html')[0].style.fontSize = c + 'px';
7 | }
8 | a();
9 | window.onresize = a;
10 | })();
11 |
--------------------------------------------------------------------------------
/vue-mobile-template/test/unit/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "jest": true
4 | },
5 | "globals": {
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/vue-mobile-template/test/unit/setup.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 |
3 | Vue.config.productionTip = false
4 |
--------------------------------------------------------------------------------
/vue-mobile-template/test/unit/specs/HelloWorld.spec.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import HelloWorld from '@/components/HelloWorld'
3 |
4 | describe('HelloWorld.vue', () => {
5 | it('should render correct contents', () => {
6 | const Constructor = Vue.extend(HelloWorld)
7 | const vm = new Constructor().$mount()
8 | expect(vm.$el.querySelector('.hello h1').textContent)
9 | .toEqual('Welcome to Your Vue.js App')
10 | })
11 | })
12 |
--------------------------------------------------------------------------------
/vue-mobile-template/test/unit/specs/List.spec.js:
--------------------------------------------------------------------------------
1 | // import List from '@/page/List';
2 | // import Vue from 'vue';
3 |
4 | // describe('List.vue', () => {
5 |
6 | // it('displays items from the list', () => {
7 | // // our test goes here,设置Vue组件
8 | // const Constructor = Vue.extend(List);
9 | // const ListComponent = new Constructor().$mount();
10 | // expect(ListComponent.$el.textContent).to.contain('play games');
11 | // })
12 | // })
--------------------------------------------------------------------------------
/vue-mobile/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-vue-jsx", "transform-runtime"],
12 | "env": {
13 | "test": {
14 | "presets": ["env", "stage-2"],
15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vue-mobile/.editorconfig:
--------------------------------------------------------------------------------
1 | # 是否是顶级配置
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | # 缩进方式
7 | indent_style = space
8 | # 缩进大小
9 | indent_size = 2
10 | # 换行符类型
11 | end_of_line = lf
12 | # 是否让文件以空行结束
13 | insert_final_newline = true
14 | # 是否删除行尾空格
15 | trim_trailing_whitespace = true
--------------------------------------------------------------------------------
/vue-mobile/.eslintignore:
--------------------------------------------------------------------------------
1 | /build/
2 | /config/
3 | /dist/
4 | /*.js
5 | /test/
6 | /src/assets/fonts/
7 |
--------------------------------------------------------------------------------
/vue-mobile/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | /dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | /test/unit/coverage/
8 |
9 | # Editor directories and files
10 | .idea
11 | .vscode
12 | *.suo
13 | *.ntvs*
14 | *.njsproj
15 | *.sln
16 |
--------------------------------------------------------------------------------
/vue-mobile/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-import": {},
6 | "postcss-url": {},
7 | // to edit target browsers: use "browserslist" field in package.json
8 | "autoprefixer": {}
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/vue-mobile/build/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/build/logo.png
--------------------------------------------------------------------------------
/vue-mobile/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/vue-mobile/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/vue-mobile/config/test.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const devEnv = require('./dev.env')
4 |
5 | module.exports = merge(devEnv, {
6 | NODE_ENV: '"testing"'
7 | })
8 |
--------------------------------------------------------------------------------
/vue-mobile/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | vue-mobile
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/vue-mobile/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
23 |
--------------------------------------------------------------------------------
/vue-mobile/src/api/pay.js:
--------------------------------------------------------------------------------
1 | import { post } from '@/utils/request'
2 |
3 | export function previewPrepay(data) {
4 | const url = '/jiajiao/order/h5/preview/prepay'
5 | return post(url, data)
6 | }
7 |
--------------------------------------------------------------------------------
/vue-mobile/src/assets/activityDetail/more-sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/assets/activityDetail/more-sel.png
--------------------------------------------------------------------------------
/vue-mobile/src/assets/css/activityTheme.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/assets/css/activityTheme.scss
--------------------------------------------------------------------------------
/vue-mobile/src/assets/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/assets/fonts/iconfont.eot
--------------------------------------------------------------------------------
/vue-mobile/src/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/vue-mobile/src/assets/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/assets/fonts/iconfont.woff
--------------------------------------------------------------------------------
/vue-mobile/src/assets/img/overview_dia_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/assets/img/overview_dia_close.png
--------------------------------------------------------------------------------
/vue-mobile/src/assets/img/project.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/assets/img/project.jpg
--------------------------------------------------------------------------------
/vue-mobile/src/components/activityDetail/DropBox.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
22 |
23 |
25 |
--------------------------------------------------------------------------------
/vue-mobile/src/components/activityDetail/PreviewImg.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
![]()
4 |
5 |
6 |
7 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/vue-mobile/src/components/activityDetail/TextInstruct.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
23 |
24 |
26 |
--------------------------------------------------------------------------------
/vue-mobile/src/components/activityDetail/TitleText.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{val.tip}}
4 |
5 |
6 |
7 |
25 |
26 |
37 |
--------------------------------------------------------------------------------
/vue-mobile/src/components/calendar/images/calendar-left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/components/calendar/images/calendar-left.png
--------------------------------------------------------------------------------
/vue-mobile/src/components/calendar/images/calendar-right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/components/calendar/images/calendar-right.png
--------------------------------------------------------------------------------
/vue-mobile/src/components/confirm/index.js:
--------------------------------------------------------------------------------
1 |
2 | import confirm from './index.vue'
3 | // import Vue from 'vue'
4 |
5 | export default {
6 | install: function(Vue) {
7 | const Profile = Vue.extend(confirm)
8 |
9 | const PortfolioMsg = (options) => {
10 | options.onCancel = (reject) => { reject() }
11 | const $ele = document.createElement('div')
12 | document.body.appendChild($ele)
13 | new Profile({
14 | data() {
15 | return options
16 | }
17 | }).$mount($ele)
18 | }
19 |
20 | Vue.prototype.$confirm = PortfolioMsg
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vue-mobile/src/pages/classify/img/classify1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/classify/img/classify1.jpg
--------------------------------------------------------------------------------
/vue-mobile/src/pages/home/img/bgc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/home/img/bgc.jpg
--------------------------------------------------------------------------------
/vue-mobile/src/pages/home/img/bgc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/home/img/bgc.png
--------------------------------------------------------------------------------
/vue-mobile/src/pages/main/img/banner1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/main/img/banner1.jpg
--------------------------------------------------------------------------------
/vue-mobile/src/pages/main/img/banner2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/main/img/banner2.jpg
--------------------------------------------------------------------------------
/vue-mobile/src/pages/main/img/product1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/main/img/product1.jpg
--------------------------------------------------------------------------------
/vue-mobile/src/pages/main/img/product2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/main/img/product2.jpg
--------------------------------------------------------------------------------
/vue-mobile/src/pages/main/img/product3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/main/img/product3.jpg
--------------------------------------------------------------------------------
/vue-mobile/src/pages/main/img/product4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/main/img/product4.jpg
--------------------------------------------------------------------------------
/vue-mobile/src/pages/pay/img/wx-pay-icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/pay/img/wx-pay-icon.jpg
--------------------------------------------------------------------------------
/vue-mobile/src/pages/pay/img/wx-qrcode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/pay/img/wx-qrcode.png
--------------------------------------------------------------------------------
/vue-mobile/src/pages/productDetail/img/product-detail1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/src/pages/productDetail/img/product-detail1.jpg
--------------------------------------------------------------------------------
/vue-mobile/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import createPersistedState from 'vuex-persistedstate'
4 | import tabIndex from './modules/tabIndex'
5 | Vue.use(Vuex)
6 |
7 | export default new Vuex.Store({
8 | modules: {
9 | tabIndex
10 | },
11 | plugins: [createPersistedState({ storage: window.sessionStorage })]
12 | })
13 |
--------------------------------------------------------------------------------
/vue-mobile/src/store/modules/tabIndex.js:
--------------------------------------------------------------------------------
1 | // initial state
2 | const state = {
3 | tabIndex: 0
4 | }
5 |
6 | // getters
7 | const getters = {
8 | allTabIndex: state => state.tabIndex
9 | }
10 |
11 | // actions
12 | const actions = {
13 | getAllTabIndex({ commit }, index) {
14 | commit('setTabData', index)
15 | }
16 | }
17 |
18 | // mutations
19 | const mutations = {
20 | setTabData(state, index) {
21 | state.tabIndex = index
22 | }
23 | }
24 |
25 | export default {
26 | state,
27 | getters,
28 | actions,
29 | mutations
30 | }
31 |
--------------------------------------------------------------------------------
/vue-mobile/src/utils/config/index.js:
--------------------------------------------------------------------------------
1 | let API_ROOT = ''
2 | if (
3 | location.hostname.indexOf('dev-') !== -1 ||
4 | location.hostname.indexOf('test-') !== -1 ||
5 | location.hostname === 'jiajiao.aijiatui.com'
6 | ) {
7 | API_ROOT = `https://${location.hostname}`
8 | } else {
9 | API_ROOT = `https://dev-jiajiao.aijiatui.com`
10 | }
11 |
12 | export default API_ROOT
13 |
--------------------------------------------------------------------------------
/vue-mobile/src/utils/file.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 转化文件 kb 为 MB
3 | * @param {String || Number} size 文件大小(kb)
4 | */
5 | export const formatFileSize = size => {
6 | var i
7 | var unit = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']
8 | for (i = 0; i < unit.length && size >= 1024; i++) {
9 | size /= 1024
10 | }
11 | return (Math.round(size * 100) / 100 || 0) + unit[i]
12 | }
13 |
--------------------------------------------------------------------------------
/vue-mobile/src/utils/url.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 获取 url 后面通过?传参的参数
3 | * @param {String} name
4 | */
5 | export function getQueryString(name) {
6 | const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
7 | const url = window.location.href
8 | const search = url.substring(url.lastIndexOf('?') + 1)
9 | const r = search.match(reg)
10 | if (r != null) return unescape(r[2])
11 | return null
12 | }
13 |
--------------------------------------------------------------------------------
/vue-mobile/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-mobile/static/.gitkeep
--------------------------------------------------------------------------------
/vue-mobile/static/lib/css/function.scss:
--------------------------------------------------------------------------------
1 | @function ptr($px) {
2 | @return $px/100 * 1rem;
3 | }
4 |
5 | @function ptro($px) {
6 | @return $px/100 * 1rem;
7 | }
--------------------------------------------------------------------------------
/vue-mobile/static/lib/js/initFontSize.min.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | function a() {
3 | var b = document.documentElement.clientWidth;
4 | b = b > 750 ? 750 : b;//这个值可以根据设计图尺寸变化
5 | var c = (b / 750) * 100;
6 | document.getElementsByTagName('html')[0].style.fontSize = c + 'px';
7 | }
8 | a();
9 | window.onresize = a;
10 | })();
11 |
--------------------------------------------------------------------------------
/vue-mobile/test/unit/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "jest": true
4 | },
5 | "globals": {
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/vue-mobile/test/unit/setup.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 |
3 | Vue.config.productionTip = false
4 |
--------------------------------------------------------------------------------
/vue-mobile/test/unit/specs/HelloWorld.spec.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import HelloWorld from '@/components/HelloWorld'
3 |
4 | describe('HelloWorld.vue', () => {
5 | it('should render correct contents', () => {
6 | const Constructor = Vue.extend(HelloWorld)
7 | const vm = new Constructor().$mount()
8 | expect(vm.$el.querySelector('.hello h1').textContent)
9 | .toEqual('Welcome to Your Vue.js App')
10 | })
11 | })
12 |
--------------------------------------------------------------------------------
/vue-mobile/test/unit/specs/List.spec.js:
--------------------------------------------------------------------------------
1 | // import List from '@/page/List';
2 | // import Vue from 'vue';
3 |
4 | // describe('List.vue', () => {
5 |
6 | // it('displays items from the list', () => {
7 | // // our test goes here,设置Vue组件
8 | // const Constructor = Vue.extend(List);
9 | // const ListComponent = new Constructor().$mount();
10 | // expect(ListComponent.$el.textContent).to.contain('play games');
11 | // })
12 | // })
13 |
--------------------------------------------------------------------------------
/vue-multi-template/.browserslistrc:
--------------------------------------------------------------------------------
1 | > 1%
2 | last 2 versions
3 |
--------------------------------------------------------------------------------
/vue-multi-template/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true
5 | },
6 | extends: ['plugin:vue/essential', '@vue/prettier'],
7 | rules: {
8 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
9 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
10 | 'prettier/prettier': [
11 | 'error',
12 | {
13 | semi: false,
14 | singleQuote: true
15 | }
16 | ]
17 | },
18 | parserOptions: {
19 | parser: 'babel-eslint'
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/vue-multi-template/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | /dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | /test/unit/coverage/
8 |
9 | # Editor directories and files
10 | .idea
11 | .vscode
12 | *.suo
13 | *.ntvs*
14 | *.njsproj
15 | *.sln
16 |
--------------------------------------------------------------------------------
/vue-multi-template/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ["@vue/app"]
3 | };
4 |
--------------------------------------------------------------------------------
/vue-multi-template/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | autoprefixer: {}
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/vue-multi-template/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-multi-template/public/favicon.ico
--------------------------------------------------------------------------------
/vue-multi-template/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-multi-template/src/assets/logo.png
--------------------------------------------------------------------------------
/vue-multi-template/src/components/Test.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
![]()
4 |
5 |
6 |
7 |
23 |
24 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/index/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/index/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import router from './router'
4 |
5 | Vue.config.productionTip = false
6 |
7 | new Vue({
8 | router,
9 | render: h => h(App)
10 | }).$mount('#app')
11 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/index/router.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 | import home from './views/index.vue'
4 |
5 | Vue.use(Router)
6 |
7 | export default new Router({
8 | routes: [
9 | {
10 | path: '/',
11 | name: 'home',
12 | component: home
13 | }
14 | ]
15 | })
16 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/index/views/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
17 |
18 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/page1/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 我是page1首页返回首页
5 |
6 |
7 |
8 |
9 |
10 |
13 |
14 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/page1/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import router from './router'
4 |
5 | Vue.config.productionTip = false
6 |
7 | new Vue({
8 | router,
9 | render: h => h(App)
10 | }).$mount('#app')
11 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/page1/router.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 | Vue.use(Router)
5 |
6 | export default new Router({
7 | routes: [
8 | {
9 | path: '/',
10 | name: 'home',
11 | component: () => import('./views/page1-1.vue')
12 | },
13 | {
14 | path: '/page1-2',
15 | // route level code-splitting
16 | // this generates a separate chunk (about.[hash].js) for this route
17 | // which is lazy-loaded when the route is visited.
18 | component: () =>
19 | import(/* webpackChunkName: "about" */ './views/page1-2.vue')
20 | }
21 | ]
22 | })
23 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/page1/views/page1-1.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
我是page1-1
4 |
跳转至page1-2
5 |
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/page1/views/page1-2.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
我是page1-2
4 |
跳转至page1-1
5 |
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/page2/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/page2/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import router from './router'
4 |
5 | Vue.config.productionTip = false
6 |
7 | new Vue({
8 | router,
9 | render: h => h(App)
10 | }).$mount('#app')
11 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/page2/router.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 | Vue.use(Router)
5 |
6 | export default new Router({
7 | routes: [
8 | {
9 | path: '/',
10 | name: 'home',
11 | component: () => import('./views/page2-1.vue')
12 | },
13 | {
14 | path: '/page2-2',
15 | // route level code-splitting
16 | // this generates a separate chunk (about.[hash].js) for this route
17 | // which is lazy-loaded when the route is visited.
18 | component: () =>
19 | import(/* webpackChunkName: "about" */ './views/page2-2.vue')
20 | }
21 | ]
22 | })
23 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/page2/views/page2-1.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
我是page2-1
4 |
page2-2
5 |
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/vue-multi-template/src/pages/page2/views/page2-2.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
我是page2-2
4 |
page2-1
5 |
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/vue-pc-template/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-vue-jsx", "transform-runtime"],
12 | "env": {
13 | "test": {
14 | "presets": ["env", "stage-2"],
15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vue-pc-template/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/vue-pc-template/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | /dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | /test/unit/coverage/
8 |
9 | # Editor directories and files
10 | .idea
11 | .vscode
12 | *.suo
13 | *.ntvs*
14 | *.njsproj
15 | *.sln
16 |
--------------------------------------------------------------------------------
/vue-pc-template/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-import": {},
6 | "postcss-url": {},
7 | // to edit target browsers: use "browserslist" field in package.json
8 | "autoprefixer": {}
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/vue-pc-template/build/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-pc-template/build/logo.png
--------------------------------------------------------------------------------
/vue-pc-template/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/vue-pc-template/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/vue-pc-template/config/test.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const devEnv = require('./dev.env')
4 |
5 | module.exports = merge(devEnv, {
6 | NODE_ENV: '"testing"'
7 | })
8 |
--------------------------------------------------------------------------------
/vue-pc-template/images/vue-pc-template.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-pc-template/images/vue-pc-template.png
--------------------------------------------------------------------------------
/vue-pc-template/src/assets/avactor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-pc-template/src/assets/avactor.png
--------------------------------------------------------------------------------
/vue-pc-template/src/assets/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-pc-template/src/assets/fonts/iconfont.eot
--------------------------------------------------------------------------------
/vue-pc-template/src/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-pc-template/src/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/vue-pc-template/src/assets/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-pc-template/src/assets/fonts/iconfont.woff
--------------------------------------------------------------------------------
/vue-pc-template/src/assets/login.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-pc-template/src/assets/login.jpg
--------------------------------------------------------------------------------
/vue-pc-template/src/assets/login_pass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-pc-template/src/assets/login_pass.png
--------------------------------------------------------------------------------
/vue-pc-template/src/assets/login_user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-pc-template/src/assets/login_user.png
--------------------------------------------------------------------------------
/vue-pc-template/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import createPersistedState from 'vuex-persistedstate'
4 | import comTable from './modules/comTable'
5 | Vue.use(Vuex)
6 |
7 | export default new Vuex.Store({
8 | modules: {
9 | comTable
10 | },
11 | plugins: [createPersistedState({ storage: window.sessionStorage })]
12 | })
13 |
--------------------------------------------------------------------------------
/vue-pc-template/src/utils/api.js:
--------------------------------------------------------------------------------
1 | const API={
2 | login:"/api/loginOut",
3 | tableData:"/static/comTable.json",
4 | }
5 |
6 |
7 | export default API;
8 |
--------------------------------------------------------------------------------
/vue-pc-template/src/utils/config/index.js:
--------------------------------------------------------------------------------
1 | let API_ROOT='';
2 | if(location.hostname.indexOf('dev-')!=-1
3 | ||location.hostname.indexOf('test-')!=-1
4 | ||location.hostname.indexOf('prod-')!=-1){
5 | API_ROOT=`https://${location.hostname}`;
6 | }else{
7 | API_ROOT=`https://dev-jiajiao.aijiatui.com`
8 | }
9 |
10 | export default API_ROOT
--------------------------------------------------------------------------------
/vue-pc-template/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-pc-template/static/.gitkeep
--------------------------------------------------------------------------------
/vue-pc-template/static/comTable.json:
--------------------------------------------------------------------------------
1 | {tabData:[
2 | {
3 | date:'2017-05-02',
4 | name:'王小虎',
5 | address:'上海市普陀区金沙江路1518弄'
6 | },
7 | {
8 | date:'2016-06-04',
9 | name:'王小虎',
10 | address: '上海市普陀区金沙江路 1517 弄'
11 | },
12 | {
13 | date:'2016-05-01',
14 | name:'王小虎',
15 | address:'上海市普陀区金沙江路 1519 弄'
16 | },
17 | {
18 | date: '2018-05-03',
19 | name: '王小虎',
20 | address: '上海市普陀区金沙江路 1516 弄'
21 | }
22 | ]}
--------------------------------------------------------------------------------
/vue-pc-template/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-pc-template/static/favicon.png
--------------------------------------------------------------------------------
/vue-pc-template/test/unit/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "jest": true
4 | },
5 | "globals": {
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/vue-pc-template/test/unit/setup.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 |
3 | Vue.config.productionTip = false
4 |
--------------------------------------------------------------------------------
/vue-pc-template/test/unit/specs/HelloWorld.spec.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import HelloWorld from '@/components/HelloWorld'
3 |
4 | describe('HelloWorld.vue', () => {
5 | it('should render correct contents', () => {
6 | const Constructor = Vue.extend(HelloWorld)
7 | const vm = new Constructor().$mount()
8 | expect(vm.$el.querySelector('.hello h1').textContent)
9 | .toEqual('Welcome to Your Vue.js App')
10 | })
11 | })
12 |
--------------------------------------------------------------------------------
/vue-ts-template/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw?
22 |
--------------------------------------------------------------------------------
/vue-ts-template/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/app'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/vue-ts-template/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-ts-template/public/favicon.ico
--------------------------------------------------------------------------------
/vue-ts-template/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | vue-ts-demo
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/vue-ts-template/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
26 |
--------------------------------------------------------------------------------
/vue-ts-template/src/assets/avactor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-ts-template/src/assets/avactor.png
--------------------------------------------------------------------------------
/vue-ts-template/src/assets/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-ts-template/src/assets/fonts/iconfont.eot
--------------------------------------------------------------------------------
/vue-ts-template/src/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-ts-template/src/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/vue-ts-template/src/assets/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-ts-template/src/assets/fonts/iconfont.woff
--------------------------------------------------------------------------------
/vue-ts-template/src/assets/login.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-ts-template/src/assets/login.jpg
--------------------------------------------------------------------------------
/vue-ts-template/src/assets/login_pass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-ts-template/src/assets/login_pass.png
--------------------------------------------------------------------------------
/vue-ts-template/src/assets/login_user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-ts-template/src/assets/login_user.png
--------------------------------------------------------------------------------
/vue-ts-template/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-ts-template/src/assets/logo.png
--------------------------------------------------------------------------------
/vue-ts-template/src/router.ts:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 | Vue.use(Router)
5 |
6 | export default new Router({
7 | routes: [
8 | {
9 | path: '/',
10 | name: 'home',
11 | component: ()=>import('@/pages/Home.vue'),
12 | children:[
13 | {path:'/ComEcharts',name:'ComEcharts',component:()=>import('@/pages/ComEcharts.vue')},
14 | ]
15 | },
16 | ]
17 | })
18 |
19 |
--------------------------------------------------------------------------------
/vue-ts-template/src/shims-tsx.d.ts:
--------------------------------------------------------------------------------
1 | import Vue, { VNode } from 'vue'
2 |
3 | declare global {
4 | namespace JSX {
5 | // tslint:disable no-empty-interface
6 | interface Element extends VNode {}
7 | // tslint:disable no-empty-interface
8 | interface ElementClass extends Vue {}
9 | interface IntrinsicElements {
10 | [elem: string]: any
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/vue-ts-template/src/shims-vue.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.vue' {
2 | import Vue from 'vue'
3 | export default Vue
4 | }
5 |
--------------------------------------------------------------------------------
/vue-ts-template/src/store.ts:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 |
4 | Vue.use(Vuex)
5 |
6 | export default new Vuex.Store({
7 | state: {
8 |
9 | },
10 | mutations: {
11 |
12 | },
13 | actions: {
14 |
15 | }
16 | })
17 |
--------------------------------------------------------------------------------
/vue-ts-template/src/utils/api.ts:
--------------------------------------------------------------------------------
1 | const API={
2 | login:"/api/loginOut",
3 | tableData:"/static/comTable.json",
4 | }
5 |
6 |
7 | export default API;
8 |
--------------------------------------------------------------------------------
/vue-ts-template/src/utils/config/index.ts:
--------------------------------------------------------------------------------
1 | let API_ROOT='';
2 | if(location.hostname.indexOf('dev-')!=-1
3 | ||location.hostname.indexOf('test-')!=-1
4 | ||location.hostname.indexOf('prod-')!=-1){
5 | API_ROOT=`https://${location.hostname}`;
6 | }else{
7 | API_ROOT=`https://dev-jiajiao.aijiatui.com`
8 | }
9 |
10 | export default API_ROOT
--------------------------------------------------------------------------------
/vue-ts-template/static/vue-ts-template.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lanzhsh/react-vue-koa/8f23d46b4af76b569f58765e1e69d191de0b0d4e/vue-ts-template/static/vue-ts-template.png
--------------------------------------------------------------------------------