From c187a304d190f402c8273cab61a51276a01b34c6 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Thu, 17 May 2018 11:37:06 +0800 Subject: [PATCH 01/87] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=91=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=B7=BB=E5=8A=A0poss-nextcss,?= =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=89=93=E5=8C=85=E5=90=8E=E7=9A=84map?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/webpack.config.dev.js | 40 ++-- config/webpack.config.prod.js | 50 ++-- package.json | 2 + src/components/Header/index.js | 6 +- src/components/Header/style.css | 13 +- src/models/Mine/index.js | 19 +- src/models/Mine/style.css | 14 ++ yarn.lock | 399 ++++++++++++++++++++++++++++++-- 8 files changed, 466 insertions(+), 77 deletions(-) create mode 100644 src/models/Mine/style.css diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 537da7a..f00e928 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -1,6 +1,6 @@ 'use strict'; -const autoprefixer = require('autoprefixer'); +// const autoprefixer = require('autoprefixer'); const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); @@ -186,16 +186,17 @@ module.exports = Merge(CommonConfig,{ // https://github.com/facebookincubator/create-react-app/issues/2677 ident: 'postcss', plugins: () => [ + require('postcss-cssnext'), require('postcss-flexbugs-fixes'), - autoprefixer({ - browsers: [ - '>1%', - 'last 4 versions', - 'Firefox ESR', - 'not ie < 9', // React doesn't support IE8 anyway - ], - flexbox: 'no-2009', - }), + // autoprefixer({ + // browsers: [ + // '>1%', + // 'last 4 versions', + // 'Firefox ESR', + // 'not ie < 9', // React doesn't support IE8 anyway + // ], + // flexbox: 'no-2009', + // }), // pxtorem({ rootValue: 50, propWhiteList: [] }) pxtorem({ rootValue: 100, @@ -226,16 +227,17 @@ module.exports = Merge(CommonConfig,{ // https://github.com/facebookincubator/create-react-app/issues/2677 ident: 'postcss', plugins: () => [ + require('postcss-cssnext'), require('postcss-flexbugs-fixes'), - autoprefixer({ - browsers: [ - '>1%', - 'last 4 versions', - 'Firefox ESR', - 'not ie < 9', // React doesn't support IE8 anyway - ], - flexbox: 'no-2009', - }), + // autoprefixer({ + // browsers: [ + // '>1%', + // 'last 4 versions', + // 'Firefox ESR', + // 'not ie < 9', // React doesn't support IE8 anyway + // ], + // flexbox: 'no-2009', + // }), ], }, }, diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 4d642d3..568b3a2 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -1,6 +1,6 @@ 'use strict'; -const autoprefixer = require('autoprefixer'); +// const autoprefixer = require('autoprefixer'); const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); @@ -22,8 +22,8 @@ const publicPath = paths.servedPath; // For these, "homepage" can be set to "." to enable relative asset paths. const shouldUseRelativeAssetPaths = publicPath === './'; // Source maps are resource heavy and can cause out of memory issue for large source files. -const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false'; -// `publicUrl` is just like `publicPath`, but we will provide it to our app +const shouldUseSourceMap = false; +// `publicUrl` is just like `publicPath`, but process.env.GENERATE_SOURCEMAP !== we will provide it to our app // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript. // Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz. const publicUrl = publicPath.slice(0, -1); @@ -92,7 +92,7 @@ module.exports = Merge(CommonConfig,{ // for React Native Web. extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'], alias: { - + // Support React Native Web // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/ 'react-native': 'react-native-web', @@ -123,7 +123,7 @@ module.exports = Merge(CommonConfig,{ options: { formatter: eslintFormatter, eslintPath: require.resolve('eslint'), - + }, loader: require.resolve('eslint-loader'), }, @@ -151,7 +151,7 @@ module.exports = Merge(CommonConfig,{ include: paths.appSrc, loader: require.resolve('babel-loader'), options: { - + compact: true, }, }, @@ -185,16 +185,17 @@ module.exports = Merge(CommonConfig,{ // https://github.com/facebookincubator/create-react-app/issues/2677 ident: 'postcss', plugins: () => [ + require('postcss-cssnext'), require('postcss-flexbugs-fixes'), - autoprefixer({ - browsers: [ - '>1%', - 'last 4 versions', - 'Firefox ESR', - 'not ie < 9', // React doesn't support IE8 anyway - ], - flexbox: 'no-2009', - }), + // autoprefixer({ + // browsers: [ + // '>1%', + // 'last 4 versions', + // 'Firefox ESR', + // 'not ie < 9', // React doesn't support IE8 anyway + // ], + // flexbox: 'no-2009', + // }), // pxtorem({ rootValue: 50, propWhiteList: [] }) pxtorem({ rootValue: 100, @@ -225,16 +226,17 @@ module.exports = Merge(CommonConfig,{ // https://github.com/facebookincubator/create-react-app/issues/2677 ident: 'postcss', plugins: () => [ + require('postcss-cssnext'), require('postcss-flexbugs-fixes'), - autoprefixer({ - browsers: [ - '>1%', - 'last 4 versions', - 'Firefox ESR', - 'not ie < 9', // React doesn't support IE8 anyway - ], - flexbox: 'no-2009', - }), + // autoprefixer({ + // browsers: [ + // '>1%', + // 'last 4 versions', + // 'Firefox ESR', + // 'not ie < 9', // React doesn't support IE8 anyway + // ], + // flexbox: 'no-2009', + // }), ], }, }, diff --git a/package.json b/package.json index 1356d7f..bcbbdae 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "html-webpack-plugin": "2.29.0", "jest": "20.0.4", "object-assign": "4.1.1", + "postcss-cssnext": "^3.1.0", "postcss-flexbugs-fixes": "3.2.0", "promise": "8.0.1", "raf": "3.4.0", @@ -38,6 +39,7 @@ "react-dom": "^16.3.0", "react-router-dom": "^4.2.2", "style-loader": "0.19.0", + "svg-sprite-loader": "^3.7.3", "sw-precache-webpack-plugin": "0.11.4", "url-loader": "0.6.2", "webpack": "3.8.1", diff --git a/src/components/Header/index.js b/src/components/Header/index.js index 598e8a8..5a63d3d 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -13,7 +13,7 @@ class Header extends Component { } render() { - console.log(isIphoneX) + console.log(style.leftIcon) const { title, titleClick, leftIcon, leftTitle1, leftClick1, leftClick2, leftTitle2, rightIcon, rightTitle, rightClick, searchTitle, onSearch, noLine } = this.props return
{isIphoneX ?
: null} @@ -21,8 +21,8 @@ class Header extends Component { mode='light' className={style.header} leftContent={[ - leftIcon && , leftTitle1 && {leftTitle1}, leftTitle2 && {leftTitle2}]} - rightContent={[rightIcon && , rightTitle && {rightTitle}]} + leftIcon && , leftTitle1 && {leftTitle1}, leftTitle2 && {leftTitle2}]} + rightContent={[rightIcon && , rightTitle && {rightTitle}]} >{searchTitle ? : {title} } { noLine ? null :
} diff --git a/src/components/Header/style.css b/src/components/Header/style.css index 988e4c0..b251d9f 100644 --- a/src/components/Header/style.css +++ b/src/components/Header/style.css @@ -12,12 +12,17 @@ } .usr-hdleft-title-first, .usr-hdleft-title-second, .usr-hdright-title { - font-size: 14px; + font-size: 12px; color: #0467E0; } - -.icon { - width: 14px; +。usr-hdright-title { + margin-left: 5px; +} +.usr-hdleft-title-first, .leftIcon { + margin-right: 5px; +} +.leftIcon, .rightIcon { + width: 16px; } .search { diff --git a/src/models/Mine/index.js b/src/models/Mine/index.js index be7029e..09f6948 100644 --- a/src/models/Mine/index.js +++ b/src/models/Mine/index.js @@ -5,26 +5,19 @@ * @Last Modified time: 2018-05-16 13:14:13 */ import React, { Component } from 'react' -import { Grid } from 'antd-mobile' +import {} from 'antd-mobile' import Header from 'Components/Header' +import style from './style.css' -const data = Array.from(new Array(9)).map((_val, i) => ({ - icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png', - text: `name${i}`, -})) class Mine extends Component { - test() { - console.log('test') - } - settings = () => { - console.log('设置') - } render() { return (
-
Always square grid item
- +
+
头像
+
+
) } diff --git a/src/models/Mine/style.css b/src/models/Mine/style.css new file mode 100644 index 0000000..a44f88f --- /dev/null +++ b/src/models/Mine/style.css @@ -0,0 +1,14 @@ +.header { + display: flex; + & .avatar { + flex: 1; + & >img { + width: 92px; + height: 92px; + border-radius: 50%; + } + } + & .describe { + flex: 2; + } +} diff --git a/yarn.lock b/yarn.lock index f87e218..eb053f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -405,6 +405,17 @@ autoprefixer@^6.3.1: postcss "^5.2.16" postcss-value-parser "^3.2.3" +autoprefixer@^7.1.1: + version "7.2.6" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.2.6.tgz#256672f86f7c735da849c4f07d008abb056067dc" + dependencies: + browserslist "^2.11.3" + caniuse-lite "^1.0.30000805" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^6.0.17" + postcss-value-parser "^3.2.3" + aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" @@ -1064,6 +1075,10 @@ babylon@^6.17.0, babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" +balanced-match@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.1.0.tgz#b504bd05869b39259dd0c5efc35d843176dccc4a" + balanced-match@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" @@ -1296,7 +1311,7 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: caniuse-db "^1.0.30000639" electron-to-chromium "^1.2.7" -browserslist@^2.1.2, browserslist@^2.5.1: +browserslist@^2.0.0, browserslist@^2.1.2, browserslist@^2.11.3, browserslist@^2.5.1: version "2.11.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" dependencies: @@ -1414,10 +1429,23 @@ caniuse-api@^1.5.2: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" +caniuse-api@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-2.0.0.tgz#b1ddb5a5966b16f48dc4998444d4bbc6c7d9d834" + dependencies: + browserslist "^2.0.0" + caniuse-lite "^1.0.0" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: version "1.0.30000821" resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000821.tgz#3fcdc67c446a94a9cdd848248a4e3e54b2da7419" +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000805: + version "1.0.30000841" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000841.tgz#200079f853ca2839cb80852348d09a551f92f70a" + caniuse-lite@^1.0.30000748, caniuse-lite@^1.0.30000792: version "1.0.30000821" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000821.tgz#0f3223f1e048ed96451c56ca6cf197058c42cb93" @@ -1463,6 +1491,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" @@ -1575,8 +1611,8 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" clone@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + version "2.1.1" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" co@^4.6.0: version "4.6.0" @@ -1599,7 +1635,7 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.3.0, color-convert@^1.9.0: +color-convert@^1.3.0, color-convert@^1.8.2, color-convert@^1.9.0, color-convert@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" dependencies: @@ -1615,6 +1651,13 @@ color-string@^0.3.0: dependencies: color-name "^1.0.0" +color-string@^1.4.0, color-string@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.2.tgz#26e45814bc3c9a7cbd6751648a41434514a773a9" + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + color@^0.11.0: version "0.11.4" resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" @@ -1623,6 +1666,20 @@ color@^0.11.0: color-convert "^1.3.0" color-string "^0.3.0" +color@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/color/-/color-1.0.3.tgz#e48e832d85f14ef694fb468811c2d5cfe729b55d" + dependencies: + color-convert "^1.8.2" + color-string "^1.4.0" + +color@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color/-/color-2.0.1.tgz#e4ed78a3c4603d0891eba5430b04b86314f4c839" + dependencies: + color-convert "^1.9.1" + color-string "^1.5.2" + colormin@^1.0.5: version "1.1.2" resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" @@ -1871,6 +1928,15 @@ css-animation@1.x, css-animation@^1.3.2: babel-runtime "6.x" component-classes "^1.2.5" +css-color-function@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/css-color-function/-/css-color-function-1.3.3.tgz#8ed24c2c0205073339fafa004bc8c141fccb282e" + dependencies: + balanced-match "0.1.0" + color "^0.11.0" + debug "^3.1.0" + rgb "~0.1.0" + css-color-names@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" @@ -1911,6 +1977,10 @@ css-selector-tokenizer@^0.7.0: fastparse "^1.1.1" regexpu-core "^1.0.0" +css-unit-converter@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.1.tgz#d9b9281adcfd8ced935bdbaba83786897f64e996" + css-what@2.1: version "2.1.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" @@ -2238,8 +2308,8 @@ domhandler@2.1: domelementtype "1" domhandler@^2.3.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259" + version "2.4.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" dependencies: domelementtype "1" @@ -3675,6 +3745,10 @@ is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" +is-arrayish@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.1.tgz#c2dfc386abaa0c3e33c48db3fe87059e69065efd" + is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -3938,6 +4012,10 @@ isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" +isnumeric@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/isnumeric/-/isnumeric-0.2.0.tgz#a2347ba360de19e33d0ffd590fddf7755cbf2e64" + isobject@^2.0.0, isobject@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" @@ -4522,7 +4600,7 @@ lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" -lodash.template@^4.4.0: +lodash.template@^4.2.4, lodash.template@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" dependencies: @@ -5073,6 +5151,10 @@ once@^1.3.0, once@^1.3.3, once@^1.4.0: dependencies: wrappy "1" +onecolor@^3.0.4: + version "3.0.5" + resolved "https://registry.yarnpkg.com/onecolor/-/onecolor-3.0.5.tgz#36eff32201379efdf1180fb445e51a8e2425f9f6" + onetime@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" @@ -5326,6 +5408,14 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" +pixrem@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pixrem/-/pixrem-4.0.1.tgz#2da4a1de6ec4423c5fc3794e930b81d4490ec686" + dependencies: + browserslist "^2.0.0" + postcss "^6.0.0" + reduce-css-calc "^1.2.7" + pkg-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" @@ -5338,6 +5428,13 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" +pleeease-filters@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pleeease-filters/-/pleeease-filters-4.0.0.tgz#6632b2fb05648d2758d865384fbced79e1ccaec7" + dependencies: + onecolor "^3.0.4" + postcss "^6.0.1" + pluralize@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" @@ -5354,6 +5451,21 @@ posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" +postcss-apply@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/postcss-apply/-/postcss-apply-0.8.0.tgz#14e544bbb5cb6f1c1e048857965d79ae066b1343" + dependencies: + babel-runtime "^6.23.0" + balanced-match "^0.4.2" + postcss "^6.0.0" + +postcss-attribute-case-insensitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-2.0.0.tgz#94dc422c8f90997f16bd33a3654bbbec084963b4" + dependencies: + postcss "^6.0.0" + postcss-selector-parser "^2.2.3" + postcss-calc@^5.2.0: version "5.3.1" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" @@ -5362,6 +5474,80 @@ postcss-calc@^5.2.0: postcss-message-helpers "^2.0.0" reduce-css-calc "^1.2.6" +postcss-calc@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-6.0.1.tgz#3d24171bbf6e7629d422a436ebfe6dd9511f4330" + dependencies: + css-unit-converter "^1.1.1" + postcss "^6.0.0" + postcss-selector-parser "^2.2.2" + reduce-css-calc "^2.0.0" + +postcss-color-function@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-color-function/-/postcss-color-function-4.0.1.tgz#402b3f2cebc3f6947e618fb6be3654fbecef6444" + dependencies: + css-color-function "~1.3.3" + postcss "^6.0.1" + postcss-message-helpers "^2.0.0" + postcss-value-parser "^3.3.0" + +postcss-color-gray@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/postcss-color-gray/-/postcss-color-gray-4.1.0.tgz#e5581ed57eaa826fb652ca11b1e2b7b136a9f9df" + dependencies: + color "^2.0.1" + postcss "^6.0.14" + postcss-message-helpers "^2.0.0" + reduce-function-call "^1.0.2" + +postcss-color-hex-alpha@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-color-hex-alpha/-/postcss-color-hex-alpha-3.0.0.tgz#1e53e6c8acb237955e8fd08b7ecdb1b8b8309f95" + dependencies: + color "^1.0.3" + postcss "^6.0.1" + postcss-message-helpers "^2.0.0" + +postcss-color-hsl@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-color-hsl/-/postcss-color-hsl-2.0.0.tgz#12703666fa310430e3f30a454dac1386317d5844" + dependencies: + postcss "^6.0.1" + postcss-value-parser "^3.3.0" + units-css "^0.4.0" + +postcss-color-hwb@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-color-hwb/-/postcss-color-hwb-3.0.0.tgz#3402b19ef4d8497540c1fb5072be9863ca95571e" + dependencies: + color "^1.0.3" + postcss "^6.0.1" + postcss-message-helpers "^2.0.0" + reduce-function-call "^1.0.2" + +postcss-color-rebeccapurple@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-3.1.0.tgz#ce1269ecc2d0d8bf92aab44bd884e633124c33ec" + dependencies: + postcss "^6.0.22" + postcss-values-parser "^1.5.0" + +postcss-color-rgb@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-color-rgb/-/postcss-color-rgb-2.0.0.tgz#14539c8a7131494b482e0dd1cc265ff6514b5263" + dependencies: + postcss "^6.0.1" + postcss-value-parser "^3.3.0" + +postcss-color-rgba-fallback@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-color-rgba-fallback/-/postcss-color-rgba-fallback-3.0.0.tgz#37d5c9353a07a09270912a82606bb42a0d702c04" + dependencies: + postcss "^6.0.6" + postcss-value-parser "^3.3.0" + rgb-hex "^2.1.0" + postcss-colormin@^2.1.8: version "2.2.2" resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" @@ -5377,6 +5563,62 @@ postcss-convert-values@^2.3.4: postcss "^5.0.11" postcss-value-parser "^3.1.2" +postcss-cssnext@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/postcss-cssnext/-/postcss-cssnext-3.1.0.tgz#927dc29341a938254cde38ea60a923b9dfedead9" + dependencies: + autoprefixer "^7.1.1" + caniuse-api "^2.0.0" + chalk "^2.0.1" + pixrem "^4.0.0" + pleeease-filters "^4.0.0" + postcss "^6.0.5" + postcss-apply "^0.8.0" + postcss-attribute-case-insensitive "^2.0.0" + postcss-calc "^6.0.0" + postcss-color-function "^4.0.0" + postcss-color-gray "^4.0.0" + postcss-color-hex-alpha "^3.0.0" + postcss-color-hsl "^2.0.0" + postcss-color-hwb "^3.0.0" + postcss-color-rebeccapurple "^3.0.0" + postcss-color-rgb "^2.0.0" + postcss-color-rgba-fallback "^3.0.0" + postcss-custom-media "^6.0.0" + postcss-custom-properties "^6.1.0" + postcss-custom-selectors "^4.0.1" + postcss-font-family-system-ui "^3.0.0" + postcss-font-variant "^3.0.0" + postcss-image-set-polyfill "^0.3.5" + postcss-initial "^2.0.0" + postcss-media-minmax "^3.0.0" + postcss-nesting "^4.0.1" + postcss-pseudo-class-any-link "^4.0.0" + postcss-pseudoelements "^5.0.0" + postcss-replace-overflow-wrap "^2.0.0" + postcss-selector-matches "^3.0.1" + postcss-selector-not "^3.0.1" + +postcss-custom-media@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-6.0.0.tgz#be532784110ecb295044fb5395a18006eb21a737" + dependencies: + postcss "^6.0.1" + +postcss-custom-properties@^6.1.0: + version "6.3.1" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-6.3.1.tgz#5c52abde313d7ec9368c4abf67d27a656cba8b39" + dependencies: + balanced-match "^1.0.0" + postcss "^6.0.18" + +postcss-custom-selectors@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-custom-selectors/-/postcss-custom-selectors-4.0.1.tgz#781382f94c52e727ef5ca4776ea2adf49a611382" + dependencies: + postcss "^6.0.1" + postcss-selector-matches "^3.0.0" + postcss-discard-comments@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" @@ -5421,6 +5663,32 @@ postcss-flexbugs-fixes@3.2.0: dependencies: postcss "^6.0.1" +postcss-font-family-system-ui@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-font-family-system-ui/-/postcss-font-family-system-ui-3.0.0.tgz#675fe7a9e029669f05f8dba2e44c2225ede80623" + dependencies: + postcss "^6.0" + +postcss-font-variant@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-font-variant/-/postcss-font-variant-3.0.0.tgz#08ccc88f6050ba82ed8ef2cc76c0c6a6b41f183e" + dependencies: + postcss "^6.0.1" + +postcss-image-set-polyfill@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/postcss-image-set-polyfill/-/postcss-image-set-polyfill-0.3.5.tgz#0f193413700cf1f82bd39066ef016d65a4a18181" + dependencies: + postcss "^6.0.1" + postcss-media-query-parser "^0.2.3" + +postcss-initial@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-initial/-/postcss-initial-2.0.0.tgz#72715f7336e0bb79351d99ee65c4a253a8441ba4" + dependencies: + lodash.template "^4.2.4" + postcss "^6.0.1" + postcss-load-config@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" @@ -5453,6 +5721,16 @@ postcss-loader@^2.0.8: postcss-load-config "^1.2.0" schema-utils "^0.4.0" +postcss-media-minmax@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-media-minmax/-/postcss-media-minmax-3.0.0.tgz#675256037a43ef40bc4f0760bfd06d4dc69d48d2" + dependencies: + postcss "^6.0.1" + +postcss-media-query-parser@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" + postcss-merge-idents@^2.1.5: version "2.1.7" resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" @@ -5541,6 +5819,12 @@ postcss-modules-values@^1.1.0: icss-replace-symbols "^1.1.0" postcss "^6.0.1" +postcss-nesting@^4.0.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-4.2.1.tgz#0483bce338b3f0828ced90ff530b29b98b00300d" + dependencies: + postcss "^6.0.11" + postcss-normalize-charset@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" @@ -5569,6 +5853,19 @@ postcss-prefix-selector@^1.6.0: dependencies: postcss "^5.0.8" +postcss-pseudo-class-any-link@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-4.0.0.tgz#9152a0613d3450720513e8892854bae42d0ee68e" + dependencies: + postcss "^6.0.1" + postcss-selector-parser "^2.2.3" + +postcss-pseudoelements@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-pseudoelements/-/postcss-pseudoelements-5.0.0.tgz#eef194e8d524645ca520a949e95e518e812402cb" + dependencies: + postcss "^6.0.0" + postcss-pxtorem@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-pxtorem/-/postcss-pxtorem-4.0.1.tgz#9c64d0efe4885473cc1cb0305c6ffc3ebb45b1cd" @@ -5597,7 +5894,27 @@ postcss-reduce-transforms@^1.0.3: postcss "^5.0.8" postcss-value-parser "^3.0.1" -postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: +postcss-replace-overflow-wrap@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-2.0.0.tgz#794db6faa54f8db100854392a93af45768b4e25b" + dependencies: + postcss "^6.0.1" + +postcss-selector-matches@^3.0.0, postcss-selector-matches@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/postcss-selector-matches/-/postcss-selector-matches-3.0.1.tgz#e5634011e13950881861bbdd58c2d0111ffc96ab" + dependencies: + balanced-match "^0.4.2" + postcss "^6.0.1" + +postcss-selector-not@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/postcss-selector-not/-/postcss-selector-not-3.0.1.tgz#2e4db2f0965336c01e7cec7db6c60dff767335d9" + dependencies: + balanced-match "^0.4.2" + postcss "^6.0.1" + +postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2, postcss-selector-parser@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" dependencies: @@ -5626,6 +5943,14 @@ postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^ version "3.3.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" +postcss-values-parser@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-1.5.0.tgz#5d9fa63e2bcb0179ce48f3235303765eb89f3047" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + postcss-zindex@^2.0.1: version "2.2.0" resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" @@ -5643,6 +5968,14 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0 source-map "^0.5.6" supports-color "^3.2.3" +postcss@^6.0, postcss@^6.0.11, postcss@^6.0.14, postcss@^6.0.17, postcss@^6.0.18, postcss@^6.0.22, postcss@^6.0.5, postcss@^6.0.6: + version "6.0.22" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.22.tgz#e23b78314905c3b90cbd61702121e7a78848f2a3" + dependencies: + chalk "^2.4.1" + source-map "^0.6.1" + supports-color "^5.4.0" + postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.13: version "6.0.21" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.21.tgz#8265662694eddf9e9a5960db6da33c39e4cd069d" @@ -5659,14 +5992,14 @@ posthtml-parser@^0.2.0, posthtml-parser@^0.2.1: isobject "^2.1.0" posthtml-rename-id@^1.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/posthtml-rename-id/-/posthtml-rename-id-1.0.5.tgz#09ede15775f0a9fa5dab13a6eee3eecbbe19aaa7" + version "1.0.7" + resolved "https://registry.yarnpkg.com/posthtml-rename-id/-/posthtml-rename-id-1.0.7.tgz#190e9f341a8bbbda31e47e932f1d9b71b9f73593" dependencies: escape-string-regexp "1.0.5" posthtml-render@^1.0.5, posthtml-render@^1.0.6: - version "1.1.3" - resolved "https://registry.yarnpkg.com/posthtml-render/-/posthtml-render-1.1.3.tgz#53e91c3debd0e7443704efa299329e1e10867f0e" + version "1.1.4" + resolved "https://registry.yarnpkg.com/posthtml-render/-/posthtml-render-1.1.4.tgz#95dac09892f4f183fad5ac823f08f42c0256551e" posthtml-svg-mode@^1.0: version "1.0.2" @@ -6198,7 +6531,7 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" -reduce-css-calc@^1.2.6: +reduce-css-calc@^1.2.6, reduce-css-calc@^1.2.7: version "1.3.0" resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" dependencies: @@ -6206,7 +6539,14 @@ reduce-css-calc@^1.2.6: math-expression-evaluator "^1.2.14" reduce-function-call "^1.0.1" -reduce-function-call@^1.0.1: +reduce-css-calc@^2.0.0: + version "2.1.4" + resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-2.1.4.tgz#c20e9cda8445ad73d4ff4bea960c6f8353791708" + dependencies: + css-unit-converter "^1.1.1" + postcss-value-parser "^3.3.0" + +reduce-function-call@^1.0.1, reduce-function-call@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" dependencies: @@ -6443,6 +6783,14 @@ ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" +rgb-hex@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/rgb-hex/-/rgb-hex-2.1.0.tgz#c773c5fe2268a25578d92539a82a7a5ce53beda6" + +rgb@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/rgb/-/rgb-0.1.0.tgz#be27b291e8feffeac1bd99729721bfa40fc037b5" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" @@ -6793,6 +7141,12 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + dependencies: + is-arrayish "^0.3.1" + slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -7115,6 +7469,12 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + dependencies: + has-flag "^3.0.0" + svg-baker-runtime@^1.3.3: version "1.3.5" resolved "https://registry.yarnpkg.com/svg-baker-runtime/-/svg-baker-runtime-1.3.5.tgz#f92d133d1fedfc8b8cfb9f9ab00c89253461dfb6" @@ -7456,6 +7816,13 @@ unique-string@^1.0.0: dependencies: crypto-random-string "^1.0.0" +units-css@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/units-css/-/units-css-0.4.0.tgz#d6228653a51983d7c16ff28f8b9dc3b1ffed3a07" + dependencies: + isnumeric "^0.2.0" + viewport-dimensions "^0.2.0" + universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" @@ -7616,6 +7983,10 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +viewport-dimensions@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/viewport-dimensions/-/viewport-dimensions-0.2.0.tgz#de740747db5387fd1725f5175e91bac76afdf36c" + vm-browserify@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" From 81bf6f63325e4726017c332dba422a355c147a01 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Thu, 17 May 2018 18:10:36 +0800 Subject: [PATCH 02/87] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=91=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2>=E6=88=91=E7=9A=84=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Router/index.js | 10 +++ src/components/Menus/index.js | 2 +- src/components/NewIcon/index.js | 3 +- src/components/NewIcon/style.css | 6 +- src/contants/urls.js | 3 + src/models/Mine/MyWorkList/index.js | 99 ++++++++++++++++++++++++++++ src/models/Mine/MyWorkList/style.css | 93 ++++++++++++++++++++++++++ src/models/Mine/index.js | 91 ++++++++++++++++++++++++- src/models/Mine/style.css | 67 +++++++++++++++++++ 9 files changed, 368 insertions(+), 6 deletions(-) create mode 100644 src/models/Mine/MyWorkList/index.js create mode 100644 src/models/Mine/MyWorkList/style.css diff --git a/src/Router/index.js b/src/Router/index.js index a036397..119f724 100644 --- a/src/Router/index.js +++ b/src/Router/index.js @@ -16,7 +16,10 @@ import Home from '../models/Home' import Message from '../models/Message' import PushOrder from '../models/PushOrder' import TobeDone from '../models/TobeDone' +// 我的 import Mine from '../models/Mine' +import MyWorkList from '../models/Mine/MyWorkList' // 我的工单 + import Login from '../models/Login/login' import Register from '../models/Login/register' import ForgetPwd from '../models/Login/forgetPwd' @@ -66,6 +69,13 @@ const routes = [ parent: null, showMenu: true, title: '我的' + }, { + path: urls.MYWORKLIST, + exact: true, + component: MyWorkList, + parent: true, + showMenu: true, + title: '我的工单' }, { path: urls.LOGIN, exact: true, diff --git a/src/components/Menus/index.js b/src/components/Menus/index.js index a70fee8..7faae12 100644 --- a/src/components/Menus/index.js +++ b/src/components/Menus/index.js @@ -79,7 +79,7 @@ class AppMenu extends Component { if (value.props.path === '/' && url === '/Home') { newAry.push(value) } - if (value.props.path === url) { + if (value.props.path.indexOf(url) !== -1) { newAry.push(value) } else if (value.props.parent === (url.substr(0, 1) === '/' ? url.substr(1) : null)) { newAry.push(value) diff --git a/src/components/NewIcon/index.js b/src/components/NewIcon/index.js index 91b039d..e9cdf89 100644 --- a/src/components/NewIcon/index.js +++ b/src/components/NewIcon/index.js @@ -1,10 +1,11 @@ import React, { Component } from 'react' import style from './style.css' +import classnames from 'classnames' class NewIcon extends Component { render() { console.log(style['default']) - return
+
{item.title}
+
+
工期:{item.date}
+
天数:{item.day} { + }}>待确认
+
施工地址:{item.address}去这里
+
+
+ {actives.map((item, index) =>
+ {item.icon && }{item.title}{index !== 2 && } +
)} +
+
) + } + + render() { + console.log(this.props) + return
+
{ + this.props.match.history.goBack() + }} + /> + }> +
+ {this._getLists()} +
+
+ {this._getLists()} +
+
+ {this._getLists()} +
+
+ {this._getLists()} +
+
+ {this._getLists()} +
+
+
+ } +} + +export default MyWorkList diff --git a/src/models/Mine/MyWorkList/style.css b/src/models/Mine/MyWorkList/style.css new file mode 100644 index 0000000..5e49de6 --- /dev/null +++ b/src/models/Mine/MyWorkList/style.css @@ -0,0 +1,93 @@ +.my-work-list { + font-family: PingFang-SC-Medium; + & :global(.am-tabs-default-bar-tab) { + width: 24px; + height: 42px; + line-height: 42px; + font-size: 12px; + text-align: center; + color: #666; + opacity: 0.5; + } + & :global(.am-tabs-default-bar-tab-active) { + color: #0467E0; + opacity: 1; + } + & .item { + background-color: rgba(250, 250, 250, 1); + & .title { + padding-left: 24px; + height: 36px; + line-height: 36px; + color: rgba(49, 63, 72, 1); + font-size: 12px; + background-color: #FFF; + } + & .desc { + padding: 7.5px 0 7.5px 24px; + height: 90px; + color: #313F48; + font-size: 12px; + border-left: 2px solid rgba(4, 103, 224, 1); + & .date { + height: 25px; + line-height: 25px; + } + & .day { + height: 25px; + line-height: 25px; + position: relative; + & .link { + color: #0467E0; + position: absolute; + top: 0; + right: 17px; + } + } + & .address { + height: 25px; + line-height: 25px; + & .link { + color: #0467E0; + padding-left: 19px; + padding-right: 9px; + } + & .icon { + width: 24px; + height: 24px; + vertical-align: top; + } + } + } + & .actives { + display: flex; + border-bottom: 10px solid rgba(250, 250, 250, 1); + & .active { + flex: 1; + position: relative; + padding: 10px 0; + text-align: center; + background-color: #fff; + & .title { + height: 17px; + line-height: 17px; + padding-left: 0; + color: rgba(4, 103, 224, 1); + font-size: 12px; + font-family: PingFang-SC-Medium; + } + & .icon { + margin-right: 15px; + } + & i { + position: absolute; + top: 7px; + right: 0; + width: 0.5px; + height: 24px; + border: 0.5px solid rgba(0, 0, 0, 0.1); + } + } + } + } +} diff --git a/src/models/Mine/index.js b/src/models/Mine/index.js index 09f6948..ee30231 100644 --- a/src/models/Mine/index.js +++ b/src/models/Mine/index.js @@ -5,19 +5,104 @@ * @Last Modified time: 2018-05-16 13:14:13 */ import React, { Component } from 'react' -import {} from 'antd-mobile' +import { Button, Icon, List } from 'antd-mobile' import Header from 'Components/Header' +import NewIcon from 'Components/NewIcon' +import * as urls from 'Contants/urls' import style from './style.css' +const Item = List.Item + class Mine extends Component { + constructor(props) { + super(props) + this.state = { + userData: {}, + linkData: [ + { + icon: 'icon-myJob', + title: '我的工单', + link: urls.MYWORKLIST + }, + { + icon: 'icon-qualification', + title: '资质认证', + link: '/Home' + }, + { + icon: 'icon-myAccount', + title: '我的帐户', + link: '/Home' + }, + { + icon: 'icon-applicationForInvoi', + title: '申请发票', + link: '/Home' + }, + { + icon: 'icon-attendanceManagement', + title: '考勤管理', + link: '/Home' + } + ] + } + } + + componentDidMount() { + this.setState({ + userData: { + avatar: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1526533438825&di=b42ed5edc4abc41b39a33311e674f0d1&imgtype=0&src=http%3A%2F%2Fmp2.qiyipic.com%2Fimage%2F20180509%2Fb4%2Fc5%2Fppu_266729910102_pp_601_300_300.jpg', + name: '宋雨琦', + address: '浙江杭州', + dataA: 100, + dataB: 3000, + dataC: 200 + } + }) + } + render() { + const { userData, linkData } = this.state return (
-
头像
-
+
头像
+
+
+ {userData.name} +
+
+ + {userData.address} +
+ +
+
+
+
+
{userData.dataA}
+
近30天工单数
+
+
+
{userData.dataB}
+
近30天收入
+
+
+
{userData.dataC}
+
我关注的
+
+ + {linkData.map((item, index) => { + this.props.match.history.push(item.link) + }}> + + {item.title} + + )} +
) } diff --git a/src/models/Mine/style.css b/src/models/Mine/style.css index a44f88f..0b3acae 100644 --- a/src/models/Mine/style.css +++ b/src/models/Mine/style.css @@ -1,7 +1,9 @@ .header { display: flex; + padding: 16px 0 21px 0; & .avatar { flex: 1; + text-align: center; & >img { width: 92px; height: 92px; @@ -10,5 +12,70 @@ } & .describe { flex: 2; + & .name { + font-size: 16px; + margin-left: 15px; + color: #1A173B; + margin-bottom: 8px; + } + & .address { + vertical-align: top; + margin-left: 15px; + margin-bottom: 12px; + & .title { + font-size: 12px; + color: #999; + padding-left: 5px; + } + } + & .btn { + width: 132px; + height: 32px; + line-height: 32px; + margin-left: 15px; + border-radius: 22.07px; + font-size: 12px; + background-color: rgba(4, 103, 224, 1); + } + } +} +.data { + display: flex; + padding-bottom: 25px; + & > div { + flex: 1; + & .num { + height: 33px; + line-height: 33px; + color: rgba(28, 40, 51, 1); + font-size: 24px; + text-align: center; + font-family: PingFangSC-Regular; + } + & .desc { + height: 16px; + line-height: 16px; + opacity: 0.7; + color: rgba(28, 40, 51, 1); + font-size: 12px; + text-align: center; + font-family: PingFangSC-Regular; + } } } +.link { + & .title { + height: 20px; + line-height: 20px; + padding-left: 15px; + color: rgba(28, 40, 51, 1); + font-size: 14px; + font-family: PingFangSC-Regular; + } + & .rightIcon { + position: absolute; + right: 20px; + top: 15px; + height: 16px; + } +} From 7584576634617e02a5bbd06d320e662561206b3c Mon Sep 17 00:00:00 2001 From: chengbs Date: Thu, 17 May 2018 18:20:01 +0800 Subject: [PATCH 03/87] =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=A7=A6=E6=91=B8=E5=8F=8D=E9=A6=88=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Header/style.css | 1 + src/components/Menus/index.js | 7 +- src/components/Menus/style.css | 18 ++++- src/components/Menus/touchFeedback.js | 100 ++++++++++++++++++++++++++ 4 files changed, 124 insertions(+), 2 deletions(-) create mode 100755 src/components/Menus/touchFeedback.js diff --git a/src/components/Header/style.css b/src/components/Header/style.css index b251d9f..cf845ed 100644 --- a/src/components/Header/style.css +++ b/src/components/Header/style.css @@ -41,3 +41,4 @@ font-size: 12px; color: #0467E0; } + diff --git a/src/components/Menus/index.js b/src/components/Menus/index.js index a70fee8..93416bd 100644 --- a/src/components/Menus/index.js +++ b/src/components/Menus/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:47 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-16 16:51:00 +* @Last Modified time: 2018-05-17 18:19:16 */ import React, { Component } from 'react' // import { Route } from 'react-router-dom' @@ -14,6 +14,7 @@ import './Container.css' // import './Container.css' import menuStyle from './style.css' import { isIphoneX } from 'Util/ua' +import TouchFeedback from './touchFeedback.js' const data = [ { @@ -72,6 +73,9 @@ class AppMenu extends Component { selectedTab: nextProps.path !== '' ? (nextProps.path).split('/')[1] : 'Home' }) } + componentDidMount() { + new TouchFeedback('.am-tabs-tab-bar-wrap') + } getComponentByUrl(url) { const childAry = this.props.children let newAry = [] @@ -120,6 +124,7 @@ class AppMenu extends Component { this.props.onTouch(item['title']) history.push(item['path'], { title: item['title'] }) }} + data-touchfeedback={true} > { componentAry.map((comp, i) => { diff --git a/src/components/Menus/style.css b/src/components/Menus/style.css index 6a0ff5e..03bca7e 100644 --- a/src/components/Menus/style.css +++ b/src/components/Menus/style.css @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:11 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-16 16:50:42 +* @Last Modified time: 2018-05-17 18:16:54 */ .menuBtn { width: 22px; @@ -55,3 +55,19 @@ display: none; } +.tabBody-fix-iphoneX :global(.tabBody .am-tab-bar-bar .am-tab-bar-tab), .tabBody :global(.tabBody .am-tab-bar-bar .am-tab-bar-tab) { + -webkit-transform: translateZ(0); + transform: translateZ(0); + -webkit-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; + -webkit-user-select:none; + user-select:none; + -webkit-touch-callout: none; + touch-callout: none; +} + +.tabBody-fix-iphoneX :global(.am-tab-bar-bar .am-tab-bar-tab.feedback),.tabBody :global(.am-tab-bar-bar .am-tab-bar-tab.feedback) { + -webkit-transform: scale(0.86); + transform: scale(0.86); +} + diff --git a/src/components/Menus/touchFeedback.js b/src/components/Menus/touchFeedback.js new file mode 100755 index 0000000..8a5ab35 --- /dev/null +++ b/src/components/Menus/touchFeedback.js @@ -0,0 +1,100 @@ +/* eslint-disable */ +!(function () { + var eventBind = function (_this) { + var eventData = {}, container = _this._container, vague = 5, + bindProp = _this._bindProp, feedbackClass = _this._feedbackClass; + + var classUtil = { + hasClass: function (elem, cls){ + cls = cls || ''; + if(cls.replace(/\s/g, '').length == 0) return false; + return new RegExp(' ' + cls + ' ').test(' ' + elem.className + ' '); + }, + addClass: function (elem, cls){ + if(!this.hasClass(elem, cls)){ + elem.className += ' ' + cls; + } + }, + removeClass: function (elem, cls){ + if(this.hasClass(elem, cls)){ + var newClass = ' ' + elem.className.replace(/[\t\r\n]/g, '') + ' '; + while(newClass.indexOf(' ' + cls + ' ') >= 0){ + newClass = newClass.replace(' ' + cls + ' ', ' '); + } + elem.className = newClass.replace(/^\s+|\s+$/g, ''); + } + }, + closest: function (elem, attribute) { + var cur, match; + for (cur = elem; cur; cur = cur.parentNode) { + if (cur.nodeType < 11 && cur.nodeType === 1 && cur.getAttribute(attribute) === 'true') { + break; + } + } + return cur; + } + }; + + _this.startFunc = function (e) { + var event = e.changedTouches ? e.changedTouches[0] : e, + identifier = eventData[event.identifier] = {}; + identifier.startY = event.pageY; + identifier.startX = event.pageX; + identifier.target = classUtil.closest(event.target, bindProp); + if (identifier.target) { + classUtil.addClass(identifier.target, feedbackClass); + } + }; + + container.addEventListener('touchstart', _this.startFunc); + + _this.moveFunc = function (e) { + var event = e.changedTouches ? e.changedTouches[0] : e, + identifier = eventData[event.identifier]; + if (event.target && Math.abs(identifier.startY - event.pageY) > vague) { + classUtil.removeClass(identifier.target, feedbackClass); + } + }; + + container.addEventListener('touchmove', _this.moveFunc); + + _this.cancelFunc = function (e) { + var event = e.changedTouches ? e.changedTouches[0] : e, + identifier = eventData[event.identifier]; + if (identifier.target) { + classUtil.removeClass(identifier.target, feedbackClass); + } + delete eventData[event.identifier]; + }; + + container.addEventListener('touchcancel', _this.cancelFunc); + + container.addEventListener('touchend', _this.cancelFunc); + }; + + var TouchFeedback = function (selector, option) { + this._container = document.querySelector(selector); + option = option || {}; + this._bindProp = option.bindProp || 'data-touchFeedback'; + this._feedbackClass = option.feedbackClass || 'feedback'; + eventBind(this); + }; + + TouchFeedback.prototype.destory = function () { + var _this = this; + _this._container.removeEventListener('touchstart', _this.startFunc); + _this._container.removeEventListener('touchmove', _this.moveFunc); + _this._container.removeEventListener('touchcancel', _this.cancelFunc); + _this._container.removeEventListener('touchend', _this.cancelFunc); + }; + + if (typeof define === 'function') { + define(function() { + return TouchFeedback; + }); + } else if (typeof exports !== 'undefined') { + module.exports = TouchFeedback; + } else { + this.TouchFeedback = TouchFeedback; + } +}()); \ No newline at end of file From 3b6d09e6981fd13f6ad9785af3f6adc84215efc7 Mon Sep 17 00:00:00 2001 From: chengbs Date: Thu, 17 May 2018 23:47:43 +0800 Subject: [PATCH 04/87] update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e15e224..05fdc08 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ async componentWillMount() { - Asserts: 对应'src/asserts/', - Contants: 对应'src/contants/' -### 文件资源说明 +### 资源文件说明 - Components/Menus/index.js: 菜单配置文件 - Contants/urls.js: 路由地址 - Contants/Router/index.js: 路由入口文件 From 9addf3515beb4ecbe02ffc865b17240d89d99ff7 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Fri, 18 May 2018 11:51:10 +0800 Subject: [PATCH 05/87] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=91=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2>=E6=88=91=E7=9A=84=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Header/index.js | 12 ++-------- src/components/NewIcon/index.js | 1 - src/models/Mine/MyWorkList/index.js | 35 ++++++++++++++++------------- src/models/layout.js | 1 - 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/src/components/Header/index.js b/src/components/Header/index.js index 5a63d3d..a8e9a66 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -5,15 +5,7 @@ import { isIphoneX } from 'Util/ua' import NewIcon from 'Components/NewIcon' class Header extends Component { - constructor(props) { - super(props) - console.log(props) - } - componentDidMount() { - } - render() { - console.log(style.leftIcon) const { title, titleClick, leftIcon, leftTitle1, leftClick1, leftClick2, leftTitle2, rightIcon, rightTitle, rightClick, searchTitle, onSearch, noLine } = this.props return
{isIphoneX ?
: null} @@ -21,8 +13,8 @@ class Header extends Component { mode='light' className={style.header} leftContent={[ - leftIcon && , leftTitle1 && {leftTitle1}, leftTitle2 && {leftTitle2}]} - rightContent={[rightIcon && , rightTitle && {rightTitle}]} + leftIcon && , leftTitle1 && {leftTitle1}, leftTitle2 && {leftTitle2}]} + rightContent={[rightIcon && , rightTitle && {rightTitle}]} >{searchTitle ? : {title} } { noLine ? null :
} diff --git a/src/components/NewIcon/index.js b/src/components/NewIcon/index.js index e9cdf89..43cb20a 100644 --- a/src/components/NewIcon/index.js +++ b/src/components/NewIcon/index.js @@ -4,7 +4,6 @@ import classnames from 'classnames' class NewIcon extends Component { render() { - console.log(style['default']) return diff --git a/src/models/Mine/MyWorkList/index.js b/src/models/Mine/MyWorkList/index.js index 61e9076..37d568a 100644 --- a/src/models/Mine/MyWorkList/index.js +++ b/src/models/Mine/MyWorkList/index.js @@ -21,20 +21,26 @@ class MyWorkList extends Component { { title: '电话', icon: 'icon-phone', callBack: this.handleCall }, { title: '聊天', icon: 'icon-message_pre', callBack: this.handleWeChat } ], - data: [] + data: [], } } componentDidMount() { - const data = Array.from(new Array(9)).map(() => ({ + this.handleChange('', 0) + } + handleChange = (tab, index) => { + const { data } = this.state + data[index] = Array.from(new Array(9)).map(() => ({ title: '杭州莫干山工程', date: '4月1日-4月6日', day: '杭州莫干山工程', address: '杭州莫干山工程', + status: index })) - this.setState({ data }) + setTimeout(() => { + this.setState({ data }) + }, 500) } - handleDetail = () => { this.props.match.history.push('/Home') } @@ -45,14 +51,14 @@ class MyWorkList extends Component { console.log('微信') } - _getLists() { + _getLists(key) { const { data, actives } = this.state - return data.map((item, index) =>
+ return data[key] && data[key].map((item, index) =>
{item.title}
工期:{item.date}
-
天数:{item.day} { - }}>待确认
+
天数:{item.day} { + }}>{tabs[item.status].title}
施工地址:{item.address}去这里
@@ -65,7 +71,6 @@ class MyWorkList extends Component { } render() { - console.log(this.props) return
- }> + }>
- {this._getLists()} + {this._getLists(0)}
- {this._getLists()} + {this._getLists(1)}
- {this._getLists()} + {this._getLists(2)}
- {this._getLists()} + {this._getLists(3)}
- {this._getLists()} + {this._getLists(4)}
diff --git a/src/models/layout.js b/src/models/layout.js index 2e09ab2..09c6c5d 100644 --- a/src/models/layout.js +++ b/src/models/layout.js @@ -36,7 +36,6 @@ class MainLayout extends Component { } showMenu() { const { routes } = this.props - console.log(this.state.isMenuPage, routes) if (this.state.isMenuPage) { return ( From d1897eaf467e8509654ac4cbe4098f24a793bd27 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Fri, 18 May 2018 14:29:04 +0800 Subject: [PATCH 06/87] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=91=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2>=E6=88=91=E7=9A=84=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 5 -- src/components/Content/index.js | 13 ++++ src/components/Content/style.css | 8 +++ src/components/Header/index.js | 3 +- src/components/Header/style.css | 6 ++ src/components/index.js | 7 +++ src/models/Mine/MyWorkList/index.js | 40 ++++++------ src/models/Mine/MyWorkList/style.css | 7 +++ src/models/Mine/index.js | 93 ++++++++++++++-------------- src/models/Mine/style.css | 5 ++ 10 files changed, 116 insertions(+), 71 deletions(-) create mode 100644 src/components/Content/index.js create mode 100644 src/components/Content/style.css create mode 100644 src/components/index.js diff --git a/public/index.html b/public/index.html index 1d2b41d..b2968df 100644 --- a/public/index.html +++ b/public/index.html @@ -29,11 +29,6 @@ if (!window.Promise) { document.writeln(' 亚雀 diff --git a/src/components/Content/index.js b/src/components/Content/index.js new file mode 100644 index 0000000..f5a1a0e --- /dev/null +++ b/src/components/Content/index.js @@ -0,0 +1,13 @@ +import React, { Component } from 'react' +import { isIphoneX } from 'Util/ua' +import style from './style.css' + +class Content extends Component { + render() { + return
+ {this.props.children} +
+ } +} + +export default Content diff --git a/src/components/Content/style.css b/src/components/Content/style.css new file mode 100644 index 0000000..a7c6f3f --- /dev/null +++ b/src/components/Content/style.css @@ -0,0 +1,8 @@ +.marginTop45 { + padding-top: 45px; + position: relative; +} +.marginTop83 { + padding-top: 83px; + position: relative; +} diff --git a/src/components/Header/index.js b/src/components/Header/index.js index a8e9a66..ec7b538 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -7,11 +7,10 @@ import NewIcon from 'Components/NewIcon' class Header extends Component { render() { const { title, titleClick, leftIcon, leftTitle1, leftClick1, leftClick2, leftTitle2, rightIcon, rightTitle, rightClick, searchTitle, onSearch, noLine } = this.props - return
+ return
{isIphoneX ?
: null} , leftTitle1 && {leftTitle1}, leftTitle2 && {leftTitle2}]} rightContent={[rightIcon && , rightTitle && {rightTitle}]} diff --git a/src/components/Header/style.css b/src/components/Header/style.css index cf845ed..c7f9ad6 100644 --- a/src/components/Header/style.css +++ b/src/components/Header/style.css @@ -4,6 +4,12 @@ } .header { background-color: rgba(249, 249, 249, 0.87); + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 1000; + height: 45px; } .title { font-size: 16px; diff --git a/src/components/index.js b/src/components/index.js new file mode 100644 index 0000000..6b6a868 --- /dev/null +++ b/src/components/index.js @@ -0,0 +1,7 @@ + +import Content from './Content' +import Header from './Header' +import Menus from './Menus' +import NewIcon from './NewIcon' + +export { Content, Header, Menus, NewIcon } diff --git a/src/models/Mine/MyWorkList/index.js b/src/models/Mine/MyWorkList/index.js index 37d568a..23937cb 100644 --- a/src/models/Mine/MyWorkList/index.js +++ b/src/models/Mine/MyWorkList/index.js @@ -1,7 +1,6 @@ import React, { Component } from 'react' import { Tabs } from 'antd-mobile' -import Header from 'Components/Header' -import NewIcon from 'Components/NewIcon' +import { Header, Content, NewIcon } from 'Components' import style from './style.css' const tabs = [ @@ -28,6 +27,7 @@ class MyWorkList extends Component { componentDidMount() { this.handleChange('', 0) } + handleChange = (tab, index) => { const { data } = this.state data[index] = Array.from(new Array(9)).map(() => ({ @@ -80,23 +80,25 @@ class MyWorkList extends Component { this.props.match.history.goBack() }} /> - }> -
- {this._getLists(0)} -
-
- {this._getLists(1)} -
-
- {this._getLists(2)} -
-
- {this._getLists(3)} -
-
- {this._getLists(4)} -
-
+ + +
+ {this._getLists(0)} +
+
+ {this._getLists(1)} +
+
+ {this._getLists(2)} +
+
+ {this._getLists(3)} +
+
+ {this._getLists(4)} +
+
+
} } diff --git a/src/models/Mine/MyWorkList/style.css b/src/models/Mine/MyWorkList/style.css index 5e49de6..e73adf6 100644 --- a/src/models/Mine/MyWorkList/style.css +++ b/src/models/Mine/MyWorkList/style.css @@ -13,6 +13,13 @@ color: #0467E0; opacity: 1; } + & :global(.am-tabs-default-bar.am-tabs-default-bar-animated.am-tabs-default-bar-top) { + position: fixed; + height: 42px; + } + & :global(.am-tabs-pane-wrap.am-tabs-pane-wrap-active) { + padding-top: 42px; + } & .item { background-color: rgba(250, 250, 250, 1); & .title { diff --git a/src/models/Mine/index.js b/src/models/Mine/index.js index ee30231..d833d37 100644 --- a/src/models/Mine/index.js +++ b/src/models/Mine/index.js @@ -6,8 +6,7 @@ */ import React, { Component } from 'react' import { Button, Icon, List } from 'antd-mobile' -import Header from 'Components/Header' -import NewIcon from 'Components/NewIcon' +import { Header, Content, NewIcon } from 'Components' import * as urls from 'Contants/urls' import style from './style.css' @@ -49,15 +48,17 @@ class Mine extends Component { } componentDidMount() { - this.setState({ - userData: { - avatar: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1526533438825&di=b42ed5edc4abc41b39a33311e674f0d1&imgtype=0&src=http%3A%2F%2Fmp2.qiyipic.com%2Fimage%2F20180509%2Fb4%2Fc5%2Fppu_266729910102_pp_601_300_300.jpg', - name: '宋雨琦', - address: '浙江杭州', - dataA: 100, - dataB: 3000, - dataC: 200 - } + setTimeout(() => { + this.setState({ + userData: { + avatar: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1526533438825&di=b42ed5edc4abc41b39a33311e674f0d1&imgtype=0&src=http%3A%2F%2Fmp2.qiyipic.com%2Fimage%2F20180509%2Fb4%2Fc5%2Fppu_266729910102_pp_601_300_300.jpg', + name: '宋雨琦', + address: '浙江杭州', + dataA: 100, + dataB: 3000, + dataC: 200 + } + }) }) } @@ -66,43 +67,45 @@ class Mine extends Component { return (
-
-
头像
-
-
- {userData.name} -
-
- - {userData.address} + +
+
头像
+
+
+ {userData.name} +
+
+ + {userData.address} +
+
- -
-
-
-
-
{userData.dataA}
-
近30天工单数
-
-
-
{userData.dataB}
-
近30天收入
-
-
{userData.dataC}
-
我关注的
+
+
+
{userData.dataA}
+
近30天工单数
+
+
+
{userData.dataB}
+
近30天收入
+
+
+
{userData.dataC}
+
我关注的
+
-
- - {linkData.map((item, index) => { - this.props.match.history.push(item.link) - }}> - - {item.title} - - )} - + + {linkData.map((item, index) => { + this.props.match.history.push(item.link) + }}> + + {item.title} + + )} + +
) } diff --git a/src/models/Mine/style.css b/src/models/Mine/style.css index 0b3acae..648fabd 100644 --- a/src/models/Mine/style.css +++ b/src/models/Mine/style.css @@ -13,12 +13,14 @@ & .describe { flex: 2; & .name { + height: 18px; font-size: 16px; margin-left: 15px; color: #1A173B; margin-bottom: 8px; } & .address { + height: 16px; vertical-align: top; margin-left: 15px; margin-bottom: 12px; @@ -79,3 +81,6 @@ height: 16px; } } +.content { + +} From 99ea7090a0d9daccb66eeb12364d191f623e5ca6 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Fri, 18 May 2018 16:13:11 +0800 Subject: [PATCH 07/87] =?UTF-8?q?NewIcon=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 1 + src/components/Header/index.js | 4 ++-- src/components/Header/style.css | 31 ++++++++++++++++++++----------- src/models/Mine/index.js | 4 ++-- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/public/index.html b/public/index.html index b2968df..d62cf4a 100644 --- a/public/index.html +++ b/public/index.html @@ -29,6 +29,7 @@ if (!window.Promise) { document.writeln(' 亚雀 diff --git a/src/components/Header/index.js b/src/components/Header/index.js index ec7b538..9ed95f4 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -12,8 +12,8 @@ class Header extends Component { , leftTitle1 && {leftTitle1}, leftTitle2 && {leftTitle2}]} - rightContent={[rightIcon && , rightTitle && {rightTitle}]} + leftIcon && , leftTitle1 && {leftTitle1}, leftTitle2 && {leftTitle2}]} + rightContent={[rightIcon && , rightTitle && {rightTitle}]} >{searchTitle ? : {title} } { noLine ? null :
} diff --git a/src/components/Header/style.css b/src/components/Header/style.css index c7f9ad6..b37ff3c 100644 --- a/src/components/Header/style.css +++ b/src/components/Header/style.css @@ -2,7 +2,11 @@ height: 38px; background-color: #FFF; } +.box { + padding: 10px; +} .header { + font-family: PingFang-SC-Medium; background-color: rgba(249, 249, 249, 0.87); position: fixed; top: 0; @@ -10,22 +14,35 @@ right: 0; z-index: 1000; height: 45px; + & :global(.am-navbar-right) { + margin-right: 0; + } + & :global(.am-navbar-left) { + padding-left: 0; + } + & :global(.am-search-input .am-search-synthetic-ph-placeholder) { + font-size: 12px; + } + & :global(.am-search-cancel) { + font-size: 12px; + color: #0467E0; + } } .title { font-size: 16px; color: #313F48; - font-family: PingFang-SC-Medium; } .usr-hdleft-title-first, .usr-hdleft-title-second, .usr-hdright-title { font-size: 12px; + padding: 10px 0; color: #0467E0; } 。usr-hdright-title { margin-left: 5px; } -.usr-hdleft-title-first, .leftIcon { - margin-right: 5px; +.usr-hdleft-title-first, .usr-hdright-title { + padding: 10px 10px 10px 0; } .leftIcon, .rightIcon { width: 16px; @@ -39,12 +56,4 @@ font-size: 12px; } -.header :global(.am-search-input .am-search-synthetic-ph-placeholder) { - font-size: 12px; -} - -.header :global(.am-search-cancel) { - font-size: 12px; - color: #0467E0; -} diff --git a/src/models/Mine/index.js b/src/models/Mine/index.js index d833d37..c545067 100644 --- a/src/models/Mine/index.js +++ b/src/models/Mine/index.js @@ -78,8 +78,8 @@ class Mine extends Component { {userData.address}
- +
From 99bf9dfe1ee6b931de180744192b71133590ebe6 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Fri, 18 May 2018 16:52:06 +0800 Subject: [PATCH 08/87] =?UTF-8?q?Header=E4=BC=98=E5=8C=96,=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=9B=BE=E7=89=87=E5=8A=A0=E8=BD=BDloading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Header/index.js | 4 ++-- src/components/Header/style.css | 13 ++++--------- src/models/Mine/MyWorkList/index.js | 2 +- src/models/Mine/index.js | 2 +- src/models/Mine/style.css | 10 +++++++++- src/models/layout.js | 2 +- 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/components/Header/index.js b/src/components/Header/index.js index 9ed95f4..2d63b86 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -12,8 +12,8 @@ class Header extends Component { , leftTitle1 && {leftTitle1}, leftTitle2 && {leftTitle2}]} - rightContent={[rightIcon && , rightTitle && {rightTitle}]} + leftIcon && , leftTitle1 && {leftTitle1}, leftTitle2 && {leftTitle2}]} + rightContent={[rightIcon && , rightTitle && {rightTitle}]} >{searchTitle ? : {title} } { noLine ? null :
} diff --git a/src/components/Header/style.css b/src/components/Header/style.css index b37ff3c..6a5dd1c 100644 --- a/src/components/Header/style.css +++ b/src/components/Header/style.css @@ -2,9 +2,6 @@ height: 38px; background-color: #FFF; } -.box { - padding: 10px; -} .header { font-family: PingFang-SC-Medium; background-color: rgba(249, 249, 249, 0.87); @@ -35,19 +32,17 @@ .usr-hdleft-title-first, .usr-hdleft-title-second, .usr-hdright-title { font-size: 12px; - padding: 10px 0; color: #0467E0; } -。usr-hdright-title { - margin-left: 5px; -} -.usr-hdleft-title-first, .usr-hdright-title { +.rightBox, .usr-hdright-title { padding: 10px 10px 10px 0; } .leftIcon, .rightIcon { width: 16px; } - +.leftBox, .usr-hdleft-title-first, .usr-hdleft-title-second { + padding: 10px 0 10px 10px; +} .search { width: 220px; height: 28px; diff --git a/src/models/Mine/MyWorkList/index.js b/src/models/Mine/MyWorkList/index.js index 23937cb..521952e 100644 --- a/src/models/Mine/MyWorkList/index.js +++ b/src/models/Mine/MyWorkList/index.js @@ -81,7 +81,7 @@ class MyWorkList extends Component { }} /> - +
{this._getLists(0)}
diff --git a/src/models/Mine/index.js b/src/models/Mine/index.js index c545067..ef668bf 100644 --- a/src/models/Mine/index.js +++ b/src/models/Mine/index.js @@ -69,7 +69,7 @@ class Mine extends Component {
-
头像
+
{userData.avatar ? 头像 : }
{userData.name} diff --git a/src/models/Mine/style.css b/src/models/Mine/style.css index 648fabd..b6fa688 100644 --- a/src/models/Mine/style.css +++ b/src/models/Mine/style.css @@ -4,10 +4,18 @@ & .avatar { flex: 1; text-align: center; - & >img { + & .loading { + display: inline-block; width: 92px; height: 92px; + line-height: 92px; border-radius: 50%; + & >img { + width: 100%; + height: 100%; + line-height: 92px; + border-radius: 50%; + } } } & .describe { diff --git a/src/models/layout.js b/src/models/layout.js index 09c6c5d..0cc8028 100644 --- a/src/models/layout.js +++ b/src/models/layout.js @@ -101,7 +101,7 @@ class MainLayout extends Component { } render() { return ( -
+
{this.showMenu()}
) From 67552a7fdc43a9f7d0c4007ddcc114fd1ed981ca Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Mon, 21 May 2018 09:56:45 +0800 Subject: [PATCH 09/87] =?UTF-8?q?Header=E4=BC=98=E5=8C=96,Content=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=85=A8=E5=B1=8F=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=B5=84?= =?UTF-8?q?=E6=A0=BC=E8=AE=A4=E8=AF=81=E9=A1=B5=E9=9D=A2UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Router/index.js | 10 ++- src/components/Content/style.css | 12 ++- src/components/Header/index.js | 9 ++- src/components/Header/style.css | 63 +++++++++------ src/components/Menus/Container.css | 3 + src/contants/urls.js | 1 + src/models/Home/style.css | 2 +- src/models/Mine/Authenticate/index.js | 105 +++++++++++++++++++++++++ src/models/Mine/Authenticate/style.css | 90 +++++++++++++++++++++ src/models/Mine/MyWorkList/index.js | 3 +- src/models/Mine/index.js | 2 +- src/models/TobeDone/index.js | 2 +- 12 files changed, 267 insertions(+), 35 deletions(-) create mode 100644 src/models/Mine/Authenticate/index.js create mode 100644 src/models/Mine/Authenticate/style.css diff --git a/src/Router/index.js b/src/Router/index.js index 119f724..a3f5f1b 100644 --- a/src/Router/index.js +++ b/src/Router/index.js @@ -19,6 +19,7 @@ import TobeDone from '../models/TobeDone' // 我的 import Mine from '../models/Mine' import MyWorkList from '../models/Mine/MyWorkList' // 我的工单 +import Authenticate from '../models/Mine/Authenticate' // 资格认证 import Login from '../models/Login/login' import Register from '../models/Login/register' @@ -74,8 +75,15 @@ const routes = [ exact: true, component: MyWorkList, parent: true, - showMenu: true, + showMenu: false, title: '我的工单' + }, { + path: urls.AUTHENTICATE, + exact: true, + component: Authenticate, + parent: true, + showMenu: false, + title: '资格认证' }, { path: urls.LOGIN, exact: true, diff --git a/src/components/Content/style.css b/src/components/Content/style.css index a7c6f3f..7c82776 100644 --- a/src/components/Content/style.css +++ b/src/components/Content/style.css @@ -1,8 +1,16 @@ .marginTop45 { padding-top: 45px; - position: relative; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; } .marginTop83 { padding-top: 83px; - position: relative; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; } diff --git a/src/components/Header/index.js b/src/components/Header/index.js index 2d63b86..89a98e4 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -3,18 +3,19 @@ import { NavBar, SearchBar } from 'antd-mobile' import style from './style.css' import { isIphoneX } from 'Util/ua' import NewIcon from 'Components/NewIcon' +import classnames from 'classnames' class Header extends Component { render() { const { title, titleClick, leftIcon, leftTitle1, leftClick1, leftClick2, leftTitle2, rightIcon, rightTitle, rightClick, searchTitle, onSearch, noLine } = this.props - return
+ return
{isIphoneX ?
: null} , leftTitle1 && {leftTitle1}, leftTitle2 && {leftTitle2}]} - rightContent={[rightIcon && , rightTitle && {rightTitle}]} - >{searchTitle ? : {title} + leftIcon && , leftTitle1 && {leftTitle1}, leftTitle2 && {leftTitle2}]} + rightContent={[rightIcon && , rightTitle && {rightTitle}]} + >{searchTitle ? : {title} } { noLine ? null :
}
diff --git a/src/components/Header/style.css b/src/components/Header/style.css index 6a5dd1c..e6c332a 100644 --- a/src/components/Header/style.css +++ b/src/components/Header/style.css @@ -2,6 +2,7 @@ height: 38px; background-color: #FFF; } + .header { font-family: PingFang-SC-Medium; background-color: rgba(249, 249, 249, 0.87); @@ -24,31 +25,45 @@ font-size: 12px; color: #0467E0; } -} -.title { - font-size: 16px; - color: #313F48; -} + & :global(.usr-hdleft-title-first), & :global(.usr-hdleft-title-second), & :global(.usr-hdright-title) { + font-size: 14px; + color: #0467E0; + } + & :global(.title) { + font-size: 16px; + color: #313F48; + } + & :global(.rightBox), & :global(.usr-hdright-title) { + padding: 10px 10px 10px 0; + } -.usr-hdleft-title-first, .usr-hdleft-title-second, .usr-hdright-title { - font-size: 12px; - color: #0467E0; -} -.rightBox, .usr-hdright-title { - padding: 10px 10px 10px 0; -} -.leftIcon, .rightIcon { - width: 16px; -} -.leftBox, .usr-hdleft-title-first, .usr-hdleft-title-second { - padding: 10px 0 10px 10px; -} -.search { - width: 220px; - height: 28px; - border-radius: 5px; - background-color: #fff; - font-size: 12px; + & :global(.leftIcon), & :global(.rightIcon) { + width: 16px; + } + + & :global(.leftBox) { + padding: 10px 0 10px 10px; + } + + & :global(.usr-hdleft-title-first) { + padding: 10px 0 10px 0; + } + + & :global(.usr-hdleft-title-second) { + padding: 10px 0 10px 10px; + } + + & :global(.search) { + width: 220px; + height: 28px; + border-radius: 5px; + background-color: #fff; + font-size: 12px; + } } + + + + diff --git a/src/components/Menus/Container.css b/src/components/Menus/Container.css index b143484..068bbb9 100644 --- a/src/components/Menus/Container.css +++ b/src/components/Menus/Container.css @@ -67,4 +67,7 @@ :global(.transitionWrapperY) { position: relative; } +:global(.am-tab-bar-item) { + position: relative; +} diff --git a/src/contants/urls.js b/src/contants/urls.js index ddb7cc5..4e6a068 100644 --- a/src/contants/urls.js +++ b/src/contants/urls.js @@ -14,6 +14,7 @@ export const TOBEDONE = `${BASE_URL}/TobeDone` // 我的 export const MINE = `${BASE_URL}/Mine` export const MYWORKLIST = `${BASE_URL}/Mine/MyWorkList` // 我的工单 +export const AUTHENTICATE = `${BASE_URL}/Mine/Authenticate` // 资格认证 export const LOGIN = `${BASE_URL}/Login/login` export const REGISTER = `${BASE_URL}/Login/register` diff --git a/src/models/Home/style.css b/src/models/Home/style.css index bf105a5..9241f85 100644 --- a/src/models/Home/style.css +++ b/src/models/Home/style.css @@ -6,4 +6,4 @@ */ .usr-home-content :global(.usr-hdleft-title-first), .usr-home-content :global(.usr-hdright-title) { font-size: 12px; -} \ No newline at end of file +} diff --git a/src/models/Mine/Authenticate/index.js b/src/models/Mine/Authenticate/index.js new file mode 100644 index 0000000..2a5ccd4 --- /dev/null +++ b/src/models/Mine/Authenticate/index.js @@ -0,0 +1,105 @@ +import React, { Component } from 'react' +import { ImagePicker, Button } from 'antd-mobile' +import { Header, Content, NewIcon } from 'Components' +import * as urls from 'Contants/urls' +import style from './style.css' + +class Authenticate extends Component { + constructor(props) { + super(props) + this.state = { + idUp: [], // 身份证正面 + idDown: [], // 身份证反面 + PCLL: [], // 专业证书 + submitParams: {} + } + } + + componentDidMount() { + } + + handleChange = (files, type) => { + const { submitParams } = this.state + submitParams[type] = files[0] && files[0].url + this.setState({ + [type]: files, + submitParams + }, () => { + console.log(submitParams) + }) + } + handleSubmit = () => { + const { submitParams } = this.state + console.log(submitParams) + } + + render() { + const { idUp, idDown, PCLL } = this.state + return
+
{ + this.props.match.history.push(urls.MINE) + }} + /> + +
+
+ 实名认证 + 查看示例图 +
+
+
+ + 身份证正面 + this.handleChange(files, 'idUp')} + onImageClick={(index, fs) => console.log(index, fs)} + selectable={idUp.length < 1} + /> +
+
+
+
+ + 身份证反面 + this.handleChange(files, 'idDown')} + onImageClick={(index, fs) => console.log(index, fs)} + selectable={idDown.length < 1} + /> +
+
+
+
+
+ 实名认证 + 查看示例图 +
+
+
+ + 专业技术资格证 + this.handleChange(files, 'PCLL')} + onImageClick={(index, fs) => console.log(index, fs)} + selectable={PCLL.length < 1} + /> +
+
+
+ +
+
+ } +} + +export default Authenticate diff --git a/src/models/Mine/Authenticate/style.css b/src/models/Mine/Authenticate/style.css new file mode 100644 index 0000000..8e8b8a4 --- /dev/null +++ b/src/models/Mine/Authenticate/style.css @@ -0,0 +1,90 @@ +.Authenticate { + & .item { + font-family: PingFang-SC-Medium; + padding: 28px 24px 24px; + border-bottom: 0.5px solid rgba(0, 0, 0, 0.1); + & .header { + & .title { + height: 20px; + line-height: 20px; + color: rgba(138, 150, 160, 1); + font-size: 14px; + } + & .example { + float: right; + height: 17px; + line-height: 17px; + color: rgba(4, 103, 224, 1); + font-size: 12px; + } + } + & .up-img { + display: inline-block; + & > div { + position: relative; + display: inline-block; + height: 79px; + width: 79px; + margin: 12px 24px 0 0; + & .img-picker { + position: absolute; + z-index: 0; + display: inline-block; + width: 79px; + height: 79px; + border-radius: 3px; + border: 0.5px dashed rgba(138, 150, 160, 0.5); + & :global(.am-image-picker-list) { + padding: 0; + margin: 0; + display: inline-block; + width: 79px; + height: 79px; + & :global(.am-flexbox-item:not(:first-child)) { + display: none; + } + & :global(.am-flexbox-item:first-child) { + margin: 0; + & :global(.am-image-picker-item.am-image-picker-upload-btn) { + opacity: 0; + } + & :global(.am-image-picker-item .am-image-picker-item-content) { + width: 78px; + height: 78px; + border-radius: 3px; + } + } + } + } + & .icon { + position: absolute; + left: 28px; + top: 18px; + width: 24px; + height: 19px; + z-index: -1; + } + & .title { + position: absolute; + left: 10px; + top: 48px; + width: 60px; + text-align: center; + color: rgba(138, 150, 160, 0.5); + font-size: 10px; + z-index: -1; + } + } + } + } + & .submit { + margin: 16px; + font-size: 18px; + position: absolute !important; + height: 47px; + left: 0; + right: 0; + bottom: 0; + font-family: PingFangSC-Regular; + } +} diff --git a/src/models/Mine/MyWorkList/index.js b/src/models/Mine/MyWorkList/index.js index 521952e..9cf439d 100644 --- a/src/models/Mine/MyWorkList/index.js +++ b/src/models/Mine/MyWorkList/index.js @@ -1,6 +1,7 @@ import React, { Component } from 'react' import { Tabs } from 'antd-mobile' import { Header, Content, NewIcon } from 'Components' +import * as urls from 'Contants/urls' import style from './style.css' const tabs = [ @@ -77,7 +78,7 @@ class MyWorkList extends Component { leftIcon='icon-back' leftTitle1='返回' leftClick1={() => { - this.props.match.history.goBack() + this.props.match.history.push(urls.MINE) }} /> diff --git a/src/models/Mine/index.js b/src/models/Mine/index.js index ef668bf..bdd7c58 100644 --- a/src/models/Mine/index.js +++ b/src/models/Mine/index.js @@ -26,7 +26,7 @@ class Mine extends Component { { icon: 'icon-qualification', title: '资质认证', - link: '/Home' + link: urls.AUTHENTICATE }, { icon: 'icon-myAccount', diff --git a/src/models/TobeDone/index.js b/src/models/TobeDone/index.js index 751ee58..57ccc28 100644 --- a/src/models/TobeDone/index.js +++ b/src/models/TobeDone/index.js @@ -20,7 +20,7 @@ class TobeDone extends Component { render() { const { date } = this.state return
-
+
} } From 45cee007488d0b6e8c25cde42227656c166ef28a Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Mon, 21 May 2018 14:04:02 +0800 Subject: [PATCH 10/87] =?UTF-8?q?iphonex=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Content/style.css | 6 ++---- src/components/Header/style.css | 8 +------- src/components/Menus/index.js | 4 ++-- src/components/Menus/style.css | 2 +- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/components/Content/style.css b/src/components/Content/style.css index 7c82776..9b1f0b0 100644 --- a/src/components/Content/style.css +++ b/src/components/Content/style.css @@ -1,15 +1,13 @@ .marginTop45 { - padding-top: 45px; position: absolute; - top: 0; + top: 45px; left: 0; right: 0; bottom: 0; } .marginTop83 { - padding-top: 83px; position: absolute; - top: 0; + top: 83px; left: 0; right: 0; bottom: 0; diff --git a/src/components/Header/style.css b/src/components/Header/style.css index e6c332a..f2fb687 100644 --- a/src/components/Header/style.css +++ b/src/components/Header/style.css @@ -6,7 +6,7 @@ .header { font-family: PingFang-SC-Medium; background-color: rgba(249, 249, 249, 0.87); - position: fixed; + position: absolute; top: 0; left: 0; right: 0; @@ -61,9 +61,3 @@ font-size: 12px; } } - - - - - - diff --git a/src/components/Menus/index.js b/src/components/Menus/index.js index b7fa56a..fd5dbf9 100644 --- a/src/components/Menus/index.js +++ b/src/components/Menus/index.js @@ -137,7 +137,7 @@ class AppMenu extends Component { className='transitionWrapperX' transitionEnterTimeout={300} transitionLeaveTimeout={300}> -
+
{ comp } @@ -154,7 +154,7 @@ class AppMenu extends Component { className='transitionWrapperY' transitionEnterTimeout={300} transitionLeaveTimeout={300}> -
+
{ comp } diff --git a/src/components/Menus/style.css b/src/components/Menus/style.css index 03bca7e..733752b 100644 --- a/src/components/Menus/style.css +++ b/src/components/Menus/style.css @@ -22,7 +22,7 @@ .tabBody-fix-iphoneX { width: 100%; position: absolute; - top: 83px; + top: 0; bottom: 0; left: 0; right: 0; From e0114e44ba19952418d44c72998ab1337aa71dca Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Mon, 21 May 2018 14:12:59 +0800 Subject: [PATCH 11/87] =?UTF-8?q?border=E5=AE=BD=E5=BA=A6=E5=86=99?= =?UTF-8?q?=E6=AD=BB=E4=B8=BApx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/Mine/Authenticate/style.css | 4 ++-- src/models/Mine/MyWorkList/style.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/models/Mine/Authenticate/style.css b/src/models/Mine/Authenticate/style.css index 8e8b8a4..2bfa0ce 100644 --- a/src/models/Mine/Authenticate/style.css +++ b/src/models/Mine/Authenticate/style.css @@ -2,7 +2,7 @@ & .item { font-family: PingFang-SC-Medium; padding: 28px 24px 24px; - border-bottom: 0.5px solid rgba(0, 0, 0, 0.1); + border-bottom: 0.5Px solid rgba(0, 0, 0, 0.1); & .header { & .title { height: 20px; @@ -33,7 +33,7 @@ width: 79px; height: 79px; border-radius: 3px; - border: 0.5px dashed rgba(138, 150, 160, 0.5); + border: 0.5Px dashed rgba(138, 150, 160, 0.5); & :global(.am-image-picker-list) { padding: 0; margin: 0; diff --git a/src/models/Mine/MyWorkList/style.css b/src/models/Mine/MyWorkList/style.css index e73adf6..f399060 100644 --- a/src/models/Mine/MyWorkList/style.css +++ b/src/models/Mine/MyWorkList/style.css @@ -90,9 +90,9 @@ position: absolute; top: 7px; right: 0; - width: 0.5px; + width: 0.5Px; height: 24px; - border: 0.5px solid rgba(0, 0, 0, 0.1); + border: 0.5Px solid rgba(0, 0, 0, 0.1); } } } From 4d2e8872a583b5e2d947e4d6305b6330636a2982 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Mon, 21 May 2018 14:17:41 +0800 Subject: [PATCH 12/87] =?UTF-8?q?border=E5=AE=BD=E5=BA=A6=E5=86=99?= =?UTF-8?q?=E6=AD=BB=E4=B8=BA1px?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/Mine/Authenticate/style.css | 4 ++-- src/models/Mine/MyWorkList/style.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/models/Mine/Authenticate/style.css b/src/models/Mine/Authenticate/style.css index 2bfa0ce..84ddd49 100644 --- a/src/models/Mine/Authenticate/style.css +++ b/src/models/Mine/Authenticate/style.css @@ -2,7 +2,7 @@ & .item { font-family: PingFang-SC-Medium; padding: 28px 24px 24px; - border-bottom: 0.5Px solid rgba(0, 0, 0, 0.1); + border-bottom: 1Px solid rgba(0, 0, 0, 0.1); & .header { & .title { height: 20px; @@ -33,7 +33,7 @@ width: 79px; height: 79px; border-radius: 3px; - border: 0.5Px dashed rgba(138, 150, 160, 0.5); + border: 1Px dashed rgba(138, 150, 160, 0.5); & :global(.am-image-picker-list) { padding: 0; margin: 0; diff --git a/src/models/Mine/MyWorkList/style.css b/src/models/Mine/MyWorkList/style.css index f399060..4bb1f88 100644 --- a/src/models/Mine/MyWorkList/style.css +++ b/src/models/Mine/MyWorkList/style.css @@ -90,9 +90,9 @@ position: absolute; top: 7px; right: 0; - width: 0.5Px; + width: 1Px; height: 24px; - border: 0.5Px solid rgba(0, 0, 0, 0.1); + border: 1Px solid rgba(0, 0, 0, 0.1); } } } From 281eecc3571b4b398aadec12e3d91666f9a2205b Mon Sep 17 00:00:00 2001 From: chengbs Date: Mon, 21 May 2018 16:51:24 +0800 Subject: [PATCH 13/87] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=BB=9A=E5=8A=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 - src/components/Menus/index.js | 6 +++--- src/components/Menus/style.css | 2 +- src/models/Mine/MyWorkList/style.css | 3 +++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 05fdc08..f6a2308 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,6 @@ async componentWillMount() { ## 脚本 ### 运行 ```javascript -git clone https://github.com/flyctrl/yaqueApp.git cd youmingApp yarn(或者npm install) npm start diff --git a/src/components/Menus/index.js b/src/components/Menus/index.js index b7fa56a..1b21cdc 100644 --- a/src/components/Menus/index.js +++ b/src/components/Menus/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:47 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-17 18:19:16 +* @Last Modified time: 2018-05-21 14:04:08 */ import React, { Component } from 'react' // import { Route } from 'react-router-dom' @@ -14,7 +14,7 @@ import './Container.css' // import './Container.css' import menuStyle from './style.css' import { isIphoneX } from 'Util/ua' -import TouchFeedback from './touchFeedback.js' +// import TouchFeedback from './touchFeedback.js' const data = [ { @@ -74,7 +74,7 @@ class AppMenu extends Component { }) } componentDidMount() { - new TouchFeedback('.am-tabs-tab-bar-wrap') + // new TouchFeedback('.am-tabs-tab-bar-wrap') } getComponentByUrl(url) { const childAry = this.props.children diff --git a/src/components/Menus/style.css b/src/components/Menus/style.css index 03bca7e..c1b011e 100644 --- a/src/components/Menus/style.css +++ b/src/components/Menus/style.css @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:11 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-17 18:16:54 +* @Last Modified time: 2018-05-21 14:04:00 */ .menuBtn { width: 22px; diff --git a/src/models/Mine/MyWorkList/style.css b/src/models/Mine/MyWorkList/style.css index e73adf6..ae6e529 100644 --- a/src/models/Mine/MyWorkList/style.css +++ b/src/models/Mine/MyWorkList/style.css @@ -98,3 +98,6 @@ } } } +:global(.am-tabs-pane-wrap) { + -webkit-overflow-scrolling : touch; +}; From d489337d8a98059a5466667740fb9c4b8511acbc Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Mon, 21 May 2018 18:33:28 +0800 Subject: [PATCH 14/87] =?UTF-8?q?=E6=88=91=E7=9A=84=E8=B4=A6=E6=88=B7?= =?UTF-8?q?=E3=80=8B=E4=BA=A4=E6=98=93=E8=AF=A6=E6=83=85=E5=92=8C=E5=85=85?= =?UTF-8?q?=E5=80=BC=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Router/index.js | 32 +++++++ src/contants/urls.js | 4 + src/models/Mine/account/detail/index.js | 81 +++++++++++++++++ src/models/Mine/account/detail/style.css | 62 +++++++++++++ src/models/Mine/account/index.js | 58 +++++++++++++ src/models/Mine/account/recharge/index.js | 86 +++++++++++++++++++ src/models/Mine/account/recharge/style.css | 56 ++++++++++++ src/models/Mine/account/style.css | 54 ++++++++++++ src/models/Mine/account/withdrawCash/index.js | 33 +++++++ .../Mine/account/withdrawCash/style.css | 0 src/models/Mine/index.js | 2 +- 11 files changed, 467 insertions(+), 1 deletion(-) create mode 100644 src/models/Mine/account/detail/index.js create mode 100644 src/models/Mine/account/detail/style.css create mode 100644 src/models/Mine/account/index.js create mode 100644 src/models/Mine/account/recharge/index.js create mode 100644 src/models/Mine/account/recharge/style.css create mode 100644 src/models/Mine/account/style.css create mode 100644 src/models/Mine/account/withdrawCash/index.js create mode 100644 src/models/Mine/account/withdrawCash/style.css diff --git a/src/Router/index.js b/src/Router/index.js index a3f5f1b..b281117 100644 --- a/src/Router/index.js +++ b/src/Router/index.js @@ -20,6 +20,10 @@ import TobeDone from '../models/TobeDone' import Mine from '../models/Mine' import MyWorkList from '../models/Mine/MyWorkList' // 我的工单 import Authenticate from '../models/Mine/Authenticate' // 资格认证 +import Account from '../models/Mine/Account' // 我的账户 +import AccountDetail from '../models/Mine/Account/detail' // 账户详情 +import AccountRecharge from '../models/Mine/Account/recharge' // 充值 +import AccountWithdrawCash from '../models/Mine/Account/withdrawCash' // 提现 import Login from '../models/Login/login' import Register from '../models/Login/register' @@ -84,6 +88,34 @@ const routes = [ parent: true, showMenu: false, title: '资格认证' + }, { + path: urls.ACCOUNT, + exact: true, + component: Account, + parent: true, + showMenu: false, + title: '我的账户' + }, { + path: urls.ACCOUNTDETAIL, + exact: true, + component: AccountDetail, + parent: true, + showMenu: false, + title: '账户详情' + }, { + path: urls.ACCOUNTRECHARGE, + exact: true, + component: AccountRecharge, + parent: true, + showMenu: false, + title: '充值' + }, { + path: urls.ACCOUNTWITHDRAWCASH, + exact: true, + component: AccountWithdrawCash, + parent: true, + showMenu: false, + title: '提现' }, { path: urls.LOGIN, exact: true, diff --git a/src/contants/urls.js b/src/contants/urls.js index 4e6a068..a20d372 100644 --- a/src/contants/urls.js +++ b/src/contants/urls.js @@ -15,6 +15,10 @@ export const TOBEDONE = `${BASE_URL}/TobeDone` export const MINE = `${BASE_URL}/Mine` export const MYWORKLIST = `${BASE_URL}/Mine/MyWorkList` // 我的工单 export const AUTHENTICATE = `${BASE_URL}/Mine/Authenticate` // 资格认证 +export const ACCOUNT = `${BASE_URL}/Mine/Account` // 我的账户 +export const ACCOUNTRECHARGE = `${BASE_URL}/Mine/Account/recharge` // 充值 +export const ACCOUNTWITHDRAWCASH = `${BASE_URL}/Mine/Account/withdrawCash` // 提现 +export const ACCOUNTDETAIL = `${BASE_URL}/Mine/Account/detail` // 账户详细 export const LOGIN = `${BASE_URL}/Login/login` export const REGISTER = `${BASE_URL}/Login/register` diff --git a/src/models/Mine/account/detail/index.js b/src/models/Mine/account/detail/index.js new file mode 100644 index 0000000..586fb06 --- /dev/null +++ b/src/models/Mine/account/detail/index.js @@ -0,0 +1,81 @@ +/** + * @Author: sunshiqiang + * @Date: 2018-05-21 15:16:51 + * @Title: 账户详情 + */ +import React, { Component } from 'react' +import { Tabs, List } from 'antd-mobile' +import * as urls from 'Contants/urls' +import { Header, Content } from 'Components' +import style from './style.css' + +const tabs = [ + { title: '全部' }, + { title: '收入' }, + { title: '提现' } +] +const Item = List.Item +const Brief = Item.Brief + +class Detail extends Component { + constructor(props) { + super(props) + this.state = { + data: [] + } + } + + componentDidMount() { + this.handleChange('', 0) + } + + handleChange = (tab, index) => { + const { data } = this.state + data[index] = Array.from(new Array(20)).map(() => ({ + title: '收入', + date: '2017-12-13 18:00:00', + address: '莫干山项目', + money: '+0.06', + allMoney: '1231', + status: index + })) + setTimeout(() => { + this.setState({ data }) + }, 500) + } + + _getLists(key) { + const { data } = this.state + return {data[key] && data[key].map((item, index) => {item.money}{item.allMoney}}>{tabs[item.status].title}{item.address}{item.date})} + } + + render() { + return
+
{ + this.props.match.history.push(urls.ACCOUNT) + }} + /> + + +
+ {this._getLists(0)} +
+
+ {this._getLists(1)} +
+
+ {this._getLists(2)} +
+
+
+
+ } +} + +export default Detail diff --git a/src/models/Mine/account/detail/style.css b/src/models/Mine/account/detail/style.css new file mode 100644 index 0000000..dd9b156 --- /dev/null +++ b/src/models/Mine/account/detail/style.css @@ -0,0 +1,62 @@ +.detail { + font-family: PingFang-SC-Medium; + & :global(.am-tabs-default-bar-tab) { + width: 24px; + height: 42px; + line-height: 42px; + font-size: 12px; + text-align: center; + color: #666; + opacity: 0.5; + } + & :global(.am-tabs-default-bar-tab-active) { + color: #0467E0; + opacity: 1; + } + & :global(.am-tabs-default-bar.am-tabs-default-bar-animated.am-tabs-default-bar-top) { + position: fixed; + height: 42px; + } + & :global(.am-tabs-pane-wrap.am-tabs-pane-wrap-active) { + padding-top: 42px; + } + & .status { + vertical-align: middle; + height: 20px; + line-height: 20px; + margin-right: 12px; + color: rgba(49, 63, 72, 1); + font-size: 14px; + font-family: PingFang-SC-Bold; + } + & .date { + height: 17px; + line-height: 17px; + color: rgba(138, 150, 160, 1); + font-size: 12px; + font-family: PingFangSC-Regular; + } + & .money { + height: 21px; + line-height: 21px; + color: rgba(4, 103, 224, 1); + font-size: 15px; + font-family: PingFang-SC-Bold; + } + & .all-money { + height: 17px; + line-height: 17px; + color: rgba(138, 150, 160, 1); + font-size: 12px; + font-family: PingFangSC-Regular; + } + & .address { + vertical-align: middle; + padding: 3px 5px; + color: rgba(255, 255, 255, 1); + font-size: 10px; + font-family: PingFangSC-Regular; + border-radius: 2px; + background-color: rgba(4, 103, 224, 1); + } +} diff --git a/src/models/Mine/account/index.js b/src/models/Mine/account/index.js new file mode 100644 index 0000000..fe1f077 --- /dev/null +++ b/src/models/Mine/account/index.js @@ -0,0 +1,58 @@ +/** + * @Author: sunshiqiang + * @Date: 2018-05-21 14:53:46 + * @Title: 我的账户 + */ +import React, { Component } from 'react' +import { Button } from 'antd-mobile' +import * as urls from 'Contants/urls' +import { Header, Content } from 'Components' +import style from './style.css' + +class Account extends Component { + constructor(props) { + super(props) + this.state = {} + } + + componentDidMount() { + setTimeout(() => { + this.setState({ + moneyA: '300,000', + moneyB: '200,000' + }) + }) + } + + render() { + const { moneyA, moneyB } = this.state + return
+
{ + this.props.match.history.push(urls.ACCOUNTDETAIL) + }} + leftClick1={() => { + this.props.match.history.push(urls.MINE) + }} + /> + +
+
账户余额(元)
+
{moneyA}
+
冻结金额 ¥{moneyB}元
+
+
+
+
+ } +} + +export default Account diff --git a/src/models/Mine/account/recharge/index.js b/src/models/Mine/account/recharge/index.js new file mode 100644 index 0000000..0b38cd4 --- /dev/null +++ b/src/models/Mine/account/recharge/index.js @@ -0,0 +1,86 @@ +/** + * @Author: sunshiqiang + * @Date: 2018-05-21 15:10:11 + * @Title: 充值 + */ +import React, { Component } from 'react' +import { List, InputItem, Toast, Button } from 'antd-mobile' +import * as urls from 'Contants/urls' +import { Header, Content } from 'Components' +import style from './style.css' + +const Item = List.Item +const Brief = Item.Brief + +class Rechange extends Component { + state = { + title: '招商银行', + img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1526905577349&di=a3da7639f5b20d172a5ceb18756d0ef5&imgtype=jpg&src=http%3A%2F%2Fimg3.imgtn.bdimg.com%2Fit%2Fu%3D2765035733%2C1282524408%26fm%3D214%26gp%3D0.jpg', + subtitle: '尾号8843', + maxMoney: 500000, + hasError: false, + value: '', + } + onErrorClick = () => { + if (this.state.hasError) { + Toast.info('超出最大金额') + } + } + onChange = (value) => { + if (value > this.state.maxMoney) { + this.setState({ + hasError: true, + }, () => { + Toast.info('超出最大金额') + }) + } else { + this.setState({ + hasError: false, + }) + } + this.setState({ + value, + }) + } + componentDidMount() { + } + + render() { + const { title, img, subtitle, maxMoney, hasError, value } = this.state + return
+
{ + this.props.match.history.push(urls.ACCOUNT) + }} + /> + +
+ {}} + > + {title}{subtitle} + +

该卡本次最多充值{maxMoney}元

+ 金额 + +
+
+
+ } +} + +export default Rechange diff --git a/src/models/Mine/account/recharge/style.css b/src/models/Mine/account/recharge/style.css new file mode 100644 index 0000000..96a1f9e --- /dev/null +++ b/src/models/Mine/account/recharge/style.css @@ -0,0 +1,56 @@ +/** +* @Author: sunshiqiang +* @Date: 2018-05-21 17:42:54 +* @Title: 充值 +*/ +.rechange { + background-color: #f6f7f8; + height: 100%; + & .title { + height: 22px; + line-height: 22px; + color: rgba(49, 63, 72, 1); + font-size: 16px; + font-family: PingFangSC-Regular; + } + & .subtitle { + height: 21px; + line-height: 21px; + color: rgba(138, 150, 160, 1); + font-size: 15px; + font-family: PingFangSC-Regular; + } + & :global(.am-list-thumb img) { + width: 35.74px; + height: 35.94px; + border-radius: 50%; + } + & .max-money { + padding-left: 15px; + width: 181px; + height: 17px; + line-height: 16.98px; + color: rgba(138, 150, 160, 1); + font-size: 14px; + font-family: PingFangSC-Regular; + } + & .disabled-btn { + height: 46.94px; + line-height: 46.94px; + margin: 15px; + border-radius: 4.99px; + background-color: rgba(138, 150, 160, 1); + &:before { + display: none; + } + } + & .primary-btn { + height: 46.94px; + line-height: 46.94px; + margin: 15px; + border-radius: 4.99px; + } + & :global(.am-list-line:after) { + display: none!important; + } +} diff --git a/src/models/Mine/account/style.css b/src/models/Mine/account/style.css new file mode 100644 index 0000000..2cf99c9 --- /dev/null +++ b/src/models/Mine/account/style.css @@ -0,0 +1,54 @@ +/** +* @Author: sunshiqiang +* @Date: 2018-05-21 14:54:01 +* @Title: 我的账户 +*/ +.account { + padding-top: 40px; + text-align: center; + font-family: PingFang-SC-Medium; + border-bottom: 1Px solid #F4F4F4; + & .title { + height: 17px; + line-height: 17px; + color: rgba(28, 40, 51, 1); + font-size: 12px; + margin-bottom: 12px; + } + & .money { + height: 67px; + line-height: 67px; + color: rgba(28, 40, 51, 1); + font-size: 48px; + margin-bottom: 4px; + } + & .tip { + padding-left: 66px; + height: 23px; + line-height: 23px; + color: rgba(4, 103, 224, 1); + font-size: 13px; + text-align: left; + } + & .btns { + margin: 12px 0 26px; + & .reChange-btn { + width: 150px; + height: 38px; + line-height: 38px; + border-radius: 8px; + background-color: rgba(4, 103, 224, 1); + margin-right: 13px; + font-size: 14px; + } + & .withdraw-cash-btn { + width: 100px; + height: 38px; + line-height: 38px; + border-radius: 8px; + background-color: rgba(138, 150, 160, 1); + color: #FFF; + font-size: 14px; + } + } +} diff --git a/src/models/Mine/account/withdrawCash/index.js b/src/models/Mine/account/withdrawCash/index.js new file mode 100644 index 0000000..f9e0461 --- /dev/null +++ b/src/models/Mine/account/withdrawCash/index.js @@ -0,0 +1,33 @@ +import React, { Component } from 'react' +import {} from 'antd-mobile' +import * as urls from 'Contants/urls' +import { Header, Content } from 'Components' +import style from './style.css' + +class WithdrawCash extends Component { + constructor(props) { + super(props) + this.state = {} + } + + componentDidMount() { + } + + render() { + return
+
{ + this.props.match.history.push(urls.ACCOUNT) + }} + /> + +
+
+
+ } +} + +export default WithdrawCash diff --git a/src/models/Mine/account/withdrawCash/style.css b/src/models/Mine/account/withdrawCash/style.css new file mode 100644 index 0000000..e69de29 diff --git a/src/models/Mine/index.js b/src/models/Mine/index.js index bdd7c58..688fe61 100644 --- a/src/models/Mine/index.js +++ b/src/models/Mine/index.js @@ -31,7 +31,7 @@ class Mine extends Component { { icon: 'icon-myAccount', title: '我的帐户', - link: '/Home' + link: urls.ACCOUNT }, { icon: 'icon-applicationForInvoi', From aaed5008bd05c832e6e46e6c59fc9a931884da00 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Mon, 21 May 2018 19:06:32 +0800 Subject: [PATCH 15/87] =?UTF-8?q?=E6=88=91=E7=9A=84=E8=B4=A6=E6=88=B7?= =?UTF-8?q?=E3=80=8B=E6=8F=90=E7=8E=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Router/index.js | 2 +- src/models/Mine/account/withdrawCash/index.js | 61 ++++++++++++-- .../Mine/account/withdrawCash/style.css | 81 +++++++++++++++++++ 3 files changed, 137 insertions(+), 7 deletions(-) diff --git a/src/Router/index.js b/src/Router/index.js index b281117..aee3cee 100644 --- a/src/Router/index.js +++ b/src/Router/index.js @@ -86,7 +86,7 @@ const routes = [ exact: true, component: Authenticate, parent: true, - showMenu: false, + showMenu: true, title: '资格认证' }, { path: urls.ACCOUNT, diff --git a/src/models/Mine/account/withdrawCash/index.js b/src/models/Mine/account/withdrawCash/index.js index f9e0461..d36f212 100644 --- a/src/models/Mine/account/withdrawCash/index.js +++ b/src/models/Mine/account/withdrawCash/index.js @@ -1,19 +1,47 @@ import React, { Component } from 'react' -import {} from 'antd-mobile' +import { List, InputItem, Toast, Button } from 'antd-mobile' import * as urls from 'Contants/urls' import { Header, Content } from 'Components' import style from './style.css' +const Item = List.Item +const Brief = Item.Brief + class WithdrawCash extends Component { - constructor(props) { - super(props) - this.state = {} + state = { + title: '招商银行', + img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1526905577349&di=a3da7639f5b20d172a5ceb18756d0ef5&imgtype=jpg&src=http%3A%2F%2Fimg3.imgtn.bdimg.com%2Fit%2Fu%3D2765035733%2C1282524408%26fm%3D214%26gp%3D0.jpg', + subtitle: '尾号8843', + maxMoney: 500000, + hasError: false, + value: '', + } + onErrorClick = () => { + if (this.state.hasError) { + Toast.info('超出最大金额') + } + } + onChange = (value) => { + if (value > this.state.maxMoney) { + this.setState({ + hasError: true, + }, () => { + Toast.info('超出最大金额') + }) + } else { + this.setState({ + hasError: false, + }) + } + this.setState({ + value, + }) } - componentDidMount() { } render() { + const { title, img, subtitle, hasError, maxMoney, value } = this.state return
-
+
+ {}} + > + {title}{subtitle} + +

提现金额

+ ¥ + 全部提现 }>可用余额 {maxMoney}元 + +
} diff --git a/src/models/Mine/account/withdrawCash/style.css b/src/models/Mine/account/withdrawCash/style.css index e69de29..4619cf3 100644 --- a/src/models/Mine/account/withdrawCash/style.css +++ b/src/models/Mine/account/withdrawCash/style.css @@ -0,0 +1,81 @@ +/** +* @Author: sunshiqiang +* @Date: 2018-05-21 18:38:01 +* @Title: 提现 +*/ + +.withdraw-cash { + background-color: #f6f7f8; + height: 100%; + & .title { + height: 22px; + line-height: 22px; + color: rgba(49, 63, 72, 1); + font-size: 16px; + font-family: PingFangSC-Regular; + } + & .subtitle { + height: 21px; + line-height: 21px; + color: rgba(138, 150, 160, 1); + font-size: 15px; + font-family: PingFangSC-Regular; + } + & :global(.am-list-thumb img) { + width: 35.74px; + height: 35.94px; + border-radius: 50%; + } + & .title2 { + height: 24px; + line-height: 24px; + padding: 15px; + color: rgba(49, 63, 72, 1); + margin-bottom: 0; + font-size: 17px; + font-family: PingFangSC-Regular; + background-color: #ffffff; + } + & .maxMoney { + height: 20px; + line-height: 20px; + color: rgba(138, 150, 160, 1); + font-size: 14px; + font-family: PingFangSC-Regular; + } + & .money { + width: 39px; + height: 90px; + line-height: 90px; + color: rgba(49, 63, 72, 1); + font-size: 64px; + font-family: PingFang-SC-Regular; + } + & .extra { + height: 21px; + line-height: 21px; + color: rgba(4, 103, 224, 1); + font-size: 15px; + font-family: PingFangSC-Regular; + + } + & .disabled-btn { + height: 46.94px; + line-height: 46.94px; + margin: 15px; + border-radius: 4.99px; + background-color: rgba(138, 150, 160, 1); + &:before { + display: none; + } + } + & .primary-btn { + height: 46.94px; + line-height: 46.94px; + margin: 15px; + border-radius: 4.99px; + } + & :global(.am-list-line:after) { + display: none!important; + } +} From 20c3a67c2d558204b8f220309357a505470eb5bf Mon Sep 17 00:00:00 2001 From: chengbs Date: Mon, 21 May 2018 20:11:55 +0800 Subject: [PATCH 16/87] =?UTF-8?q?=E5=AF=B9=E6=97=A0=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Router/index.js | 6 +- src/components/Menus/Container.css | 2 + src/components/Menus/index.js | 6 +- src/models/Home/index.js | 5 +- src/models/Mine/MyWorkList/index.js | 2 +- src/models/Mine/MyWorkList/style.css | 1 + src/models/Mine/style.css | 1 + src/models/layout.js | 6 +- src/models/style.css | 98 ++++++++++++++++++++++++++++ 9 files changed, 117 insertions(+), 10 deletions(-) diff --git a/src/Router/index.js b/src/Router/index.js index a3f5f1b..b97085d 100644 --- a/src/Router/index.js +++ b/src/Router/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:29:52 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-16 16:54:35 +* @Last Modified time: 2018-05-21 19:03:24 */ import React from 'react' import { @@ -74,7 +74,7 @@ const routes = [ path: urls.MYWORKLIST, exact: true, component: MyWorkList, - parent: true, + parent: 'Mine', showMenu: false, title: '我的工单' }, { @@ -82,7 +82,7 @@ const routes = [ exact: true, component: Authenticate, parent: true, - showMenu: false, + showMenu: true, title: '资格认证' }, { path: urls.LOGIN, diff --git a/src/components/Menus/Container.css b/src/components/Menus/Container.css index 068bbb9..55fc5b6 100644 --- a/src/components/Menus/Container.css +++ b/src/components/Menus/Container.css @@ -37,6 +37,7 @@ :global(.transitionWrapperX) { position: relative; + height: 100%; } :global(.transitionWrapperY-enter) { @@ -65,6 +66,7 @@ } :global(.transitionWrapperY) { + height: 100%; position: relative; } :global(.am-tab-bar-item) { diff --git a/src/components/Menus/index.js b/src/components/Menus/index.js index 8ca1500..b345b94 100644 --- a/src/components/Menus/index.js +++ b/src/components/Menus/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:47 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-21 14:04:08 +* @Last Modified time: 2018-05-21 17:42:11 */ import React, { Component } from 'react' // import { Route } from 'react-router-dom' @@ -137,7 +137,7 @@ class AppMenu extends Component { className='transitionWrapperX' transitionEnterTimeout={300} transitionLeaveTimeout={300}> -
+
{ comp } @@ -154,7 +154,7 @@ class AppMenu extends Component { className='transitionWrapperY' transitionEnterTimeout={300} transitionLeaveTimeout={300}> -
+
{ comp } diff --git a/src/models/Home/index.js b/src/models/Home/index.js index f61af6d..5557552 100644 --- a/src/models/Home/index.js +++ b/src/models/Home/index.js @@ -5,7 +5,7 @@ * @Last Modified time= 2018-05-16 14=40=01 */ import React, { Component } from 'react' -import Header from 'Components/Header' +import { Header, Content } from 'Components' import style from './style.css' class Home extends Component { @@ -25,6 +25,9 @@ class Home extends Component { leftTitle1={city} rightTitle='筛选' /> + + 找工作 +
} } diff --git a/src/models/Mine/MyWorkList/index.js b/src/models/Mine/MyWorkList/index.js index 9cf439d..8b4c118 100644 --- a/src/models/Mine/MyWorkList/index.js +++ b/src/models/Mine/MyWorkList/index.js @@ -72,7 +72,7 @@ class MyWorkList extends Component { } render() { - return
+ return
+
{this.showMenu()}
) diff --git a/src/models/style.css b/src/models/style.css index e69de29..998d637 100644 --- a/src/models/style.css +++ b/src/models/style.css @@ -0,0 +1,98 @@ +/* +* @Author: chengbs +* @Date: 2018-05-16 18:38:22 +* @Last Modified by: chengbs +* @Last Modified time: 2018-05-21 20:07:40 +*/ +:global(.animated) { + -webkit-animation-duration: 500ms; + animation-duration: 500ms; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +:global(.animated.infinite) { + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} + +@-webkit-keyframes bounceInRight { + from, + 60%, + 75%, + 90%, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + + from { + opacity: 0; + -webkit-transform: translate3d(3000px, 0, 0); + transform: translate3d(3000px, 0, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(25px, 0, 0); + transform: translate3d(25px, 0, 0); + } + + 75% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + + 90% { + -webkit-transform: translate3d(5px, 0, 0); + transform: translate3d(5px, 0, 0); + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes bounceInRight { + from, + 60%, + 75%, + 90%, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + + from { + opacity: 0; + -webkit-transform: translate3d(3000px, 0, 0); + transform: translate3d(3000px, 0, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(25px, 0, 0); + transform: translate3d(25px, 0, 0); + } + + 75% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + + 90% { + -webkit-transform: translate3d(5px, 0, 0); + transform: translate3d(5px, 0, 0); + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.bounceInRight { + -webkit-animation-name: bounceInRight; + animation-name: bounceInRight; +} \ No newline at end of file From 3052cef3b189c5d0ccadc73afd6de01f0e6e3724 Mon Sep 17 00:00:00 2001 From: chengbs Date: Mon, 21 May 2018 23:55:56 +0800 Subject: [PATCH 17/87] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E5=8A=A8?= =?UTF-8?q?=E7=94=BBbug=EF=BC=9B2=E3=80=81=E8=B7=AF=E7=94=B1=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8A=A8=E7=94=BB=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 37 +++++++++++--- src/Router/index.js | 84 ++++++++++++++++++------------- src/components/Menus/index.js | 35 +++++-------- src/models/Mine/account/style.css | 2 + src/models/layout.js | 16 +++--- src/models/style.css | 83 +++++++++++++++--------------- 6 files changed, 146 insertions(+), 111 deletions(-) diff --git a/README.md b/README.md index f6a2308..9316ebc 100644 --- a/README.md +++ b/README.md @@ -28,18 +28,29 @@ Example: ```javascript const routes = [ + { + path: '/', + exact: true, + component: Home, + parent: null, + showMenu: true, + animated: false, + title: '找工作' + }, { path: urls.HOME, exact: true, component: Home, parent: null, showMenu: true, + animated: false, title: '找工作' }, { path: urls.TOBEDONE, exact: true, component: TobeDone, parent: null, + animated: false, showMenu: true, title: '待办' }, { @@ -48,12 +59,14 @@ const routes = [ component: PushOrder, parent: null, showMenu: true, + animated: true, title: '发布工单' }, { path: urls.MESSAGE, exact: true, component: Message, parent: null, + animated: false, showMenu: true, title: '消息' }, { @@ -61,16 +74,26 @@ const routes = [ exact: true, component: Mine, parent: null, + animated: false, showMenu: true, title: '我的' }, { - path: urls.LOGIN, + path: urls.MYWORKLIST, exact: true, - component: Login, - parent: null, + component: MyWorkList, + parent: 'Mine', + animated: true, showMenu: false, - title: '登录' - } + title: '我的工单' + }, { + path: urls.AUTHENTICATE, + exact: true, + component: Authenticate, + parent: true, + animated: true, + showMenu: true, + title: '资格认证' + }, ... ] ``` @@ -81,6 +104,7 @@ exact: 路由是否精确匹配 component: 路由对应的组件 parent:父组件 showMenu: 是否显示footer的菜单 +animated: 是否有动画(注意:批量设置主菜单的动画不在这里设置,也就是TabBar组件,需要手动写css动画给antdMobile的 am-tabs-pane-wrap 样式,可以单独设置菜单的动画,如发布工单模块,需要在layout.js和menu里面配置相应的路由路径) title: 标题 ``` ## Icon使用说明 @@ -230,7 +254,7 @@ async componentWillMount() { ## 脚本 ### 运行 ```javascript -cd youmingApp +cd yaqueApp-wugong yarn(或者npm install) npm start ``` @@ -239,4 +263,5 @@ npm start npm run build:test npm run build:pre npm run build +npm run upload // 上传服务器 ``` diff --git a/src/Router/index.js b/src/Router/index.js index f01a1a0..6b803df 100644 --- a/src/Router/index.js +++ b/src/Router/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:29:52 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-21 19:03:24 +* @Last Modified time: 2018-05-21 23:17:46 */ import React from 'react' import { @@ -20,10 +20,10 @@ import TobeDone from '../models/TobeDone' import Mine from '../models/Mine' import MyWorkList from '../models/Mine/MyWorkList' // 我的工单 import Authenticate from '../models/Mine/Authenticate' // 资格认证 -import Account from '../models/Mine/Account' // 我的账户 -import AccountDetail from '../models/Mine/Account/detail' // 账户详情 -import AccountRecharge from '../models/Mine/Account/recharge' // 充值 -import AccountWithdrawCash from '../models/Mine/Account/withdrawCash' // 提现 +// import Account from '../models/Mine/Account' // 我的账户 +// import AccountDetail from '../models/Mine/Account/detail' // 账户详情 +// import AccountRecharge from '../models/Mine/Account/recharge' // 充值 +// import AccountWithdrawCash from '../models/Mine/Account/withdrawCash' // 提现 import Login from '../models/Login/login' import Register from '../models/Login/register' @@ -37,6 +37,7 @@ const routes = [ component: Home, parent: null, showMenu: true, + animated: false, title: '找工作' }, { @@ -45,12 +46,14 @@ const routes = [ component: Home, parent: null, showMenu: true, + animated: false, title: '找工作' }, { path: urls.TOBEDONE, exact: true, component: TobeDone, parent: null, + animated: false, showMenu: true, title: '待办' }, { @@ -59,12 +62,14 @@ const routes = [ component: PushOrder, parent: null, showMenu: true, + animated: true, title: '发布工单' }, { path: urls.MESSAGE, exact: true, component: Message, parent: null, + animated: false, showMenu: true, title: '消息' }, { @@ -72,6 +77,7 @@ const routes = [ exact: true, component: Mine, parent: null, + animated: false, showMenu: true, title: '我的' }, { @@ -79,6 +85,7 @@ const routes = [ exact: true, component: MyWorkList, parent: 'Mine', + animated: true, showMenu: false, title: '我的工单' }, { @@ -86,41 +93,47 @@ const routes = [ exact: true, component: Authenticate, parent: true, + animated: true, showMenu: true, title: '资格认证' - }, { - path: urls.ACCOUNT, - exact: true, - component: Account, - parent: true, - showMenu: false, - title: '我的账户' - }, { - path: urls.ACCOUNTDETAIL, - exact: true, - component: AccountDetail, - parent: true, - showMenu: false, - title: '账户详情' - }, { - path: urls.ACCOUNTRECHARGE, - exact: true, - component: AccountRecharge, - parent: true, - showMenu: false, - title: '充值' - }, { - path: urls.ACCOUNTWITHDRAWCASH, - exact: true, - component: AccountWithdrawCash, - parent: true, - showMenu: false, - title: '提现' - }, { + }, + // }, { + // path: urls.ACCOUNT, + // exact: true, + // component: Account, + // parent: true, + // showMenu: false, + // title: '我的账户' + // }, + // }, { + // path: urls.ACCOUNTDETAIL, + // exact: true, + // component: AccountDetail, + // parent: true, + // showMenu: false, + // title: '账户详情' + // }, { + // { + // path: urls.ACCOUNTRECHARGE, + // exact: true, + // component: AccountRecharge, + // parent: true, + // showMenu: false, + // title: '充值' + // }, { + // path: urls.ACCOUNTWITHDRAWCASH, + // exact: true, + // component: AccountWithdrawCash, + // parent: true, + // showMenu: false, + // title: '提现' + // }, { + { path: urls.LOGIN, exact: true, component: Login, parent: null, + animated: true, showMenu: false, title: '登录' }, { @@ -128,6 +141,7 @@ const routes = [ exact: true, component: Register, parent: null, + animated: true, showMenu: false, title: '注册' }, { @@ -135,6 +149,7 @@ const routes = [ exact: true, component: ForgetPwd, parent: null, + animated: true, showMenu: false, title: '忘记密码' }, { @@ -142,6 +157,7 @@ const routes = [ exact: true, component: TaskList, parent: 'PushOrder', + animated: true, showMenu: true, title: '任务列表' } diff --git a/src/components/Menus/index.js b/src/components/Menus/index.js index b345b94..ca1cb9c 100644 --- a/src/components/Menus/index.js +++ b/src/components/Menus/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:47 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-21 17:42:11 +* @Last Modified time: 2018-05-21 23:21:08 */ import React, { Component } from 'react' // import { Route } from 'react-router-dom' @@ -14,7 +14,7 @@ import './Container.css' // import './Container.css' import menuStyle from './style.css' import { isIphoneX } from 'Util/ua' -// import TouchFeedback from './touchFeedback.js' +import TouchFeedback from './touchFeedback.js' const data = [ { @@ -74,7 +74,7 @@ class AppMenu extends Component { }) } componentDidMount() { - // new TouchFeedback('.am-tabs-tab-bar-wrap') + new TouchFeedback('.am-tabs-tab-bar-wrap') } getComponentByUrl(url) { const childAry = this.props.children @@ -93,7 +93,6 @@ class AppMenu extends Component { } render() { - console.log(this.props) return (
{ componentAry.map((comp, i) => { - if (comp.props.parent !== null) { - return ( -
- -
- { - comp - } -
-
-
- ) - } else if (comp.props.path === '/PushOrder') { + console.log(comp.props) + if (comp.props.path === '/PushOrder' && comp.props.animated) { return (
) + } else if (comp.props.parent === null && comp.props.animated) { + return ( +
+ { + comp + } +
+ ) } else { return (
diff --git a/src/models/Mine/account/style.css b/src/models/Mine/account/style.css index 2cf99c9..dae9e03 100644 --- a/src/models/Mine/account/style.css +++ b/src/models/Mine/account/style.css @@ -52,3 +52,5 @@ } } } + + diff --git a/src/models/layout.js b/src/models/layout.js index 065495c..e093684 100644 --- a/src/models/layout.js +++ b/src/models/layout.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:24:57 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-21 20:11:29 +* @Last Modified time: 2018-05-21 23:39:42 */ import React, { Component } from 'react' import { Route } from 'react-router-dom' @@ -16,7 +16,8 @@ class MainLayout extends Component { this.state = { title: '', path: '', - isMenuPage: true + isMenuPage: true, + animated: false } this.goBack = this.goBack.bind(this) this.showMenu = this.showMenu.bind(this) @@ -26,6 +27,7 @@ class MainLayout extends Component { this.setState({ title: propObj['title'], isMenuPage: propObj['showMenu'], + animated: propObj['animated'], path: nextProps.location.pathname }) } @@ -33,6 +35,7 @@ class MainLayout extends Component { const rtObj = this.getRouteByPath() this.setState({ isMenuPage: rtObj['showMenu'], + animated: rtObj['animated'], title: rtObj['title'] }) } @@ -46,6 +49,7 @@ class MainLayout extends Component { return ( { - return ( -
- -
- ) + return }} /> ) @@ -103,7 +103,7 @@ class MainLayout extends Component { } render() { return ( -
+
{this.showMenu()}
) diff --git a/src/models/style.css b/src/models/style.css index 998d637..6b3c045 100644 --- a/src/models/style.css +++ b/src/models/style.css @@ -2,11 +2,11 @@ * @Author: chengbs * @Date: 2018-05-16 18:38:22 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-21 20:07:40 +* @Last Modified time: 2018-05-21 23:44:14 */ :global(.animated) { - -webkit-animation-duration: 500ms; - animation-duration: 500ms; + -webkit-animation-duration: 300ms; + animation-duration: 300ms; -webkit-animation-fill-mode: both; animation-fill-mode: both; } @@ -18,9 +18,6 @@ @-webkit-keyframes bounceInRight { from, - 60%, - 75%, - 90%, to { -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); @@ -28,37 +25,40 @@ from { opacity: 0; - -webkit-transform: translate3d(3000px, 0, 0); - transform: translate3d(3000px, 0, 0); + -webkit-transform: translate3d(1000px, 0, 0); + transform: translate3d(1000px, 0, 0); } - - 60% { - opacity: 1; - -webkit-transform: translate3d(25px, 0, 0); - transform: translate3d(25px, 0, 0); + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } +} - 75% { - -webkit-transform: translate3d(10px, 0, 0); - transform: translate3d(10px, 0, 0); +@keyframes bounceInRight { + from, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); } - 90% { - -webkit-transform: translate3d(5px, 0, 0); - transform: translate3d(5px, 0, 0); + from { + opacity: 0; + -webkit-transform: translate3d(1000px, 0, 0); + transform: translate3d(1000px, 0, 0); } - to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } -@keyframes bounceInRight { +.bounceInRight { + -webkit-animation-name: bounceInRight; + animation-name: bounceInRight; +} + +@-webkit-keyframes bounceInLeft { from, - 60%, - 75%, - 90%, to { -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); @@ -66,33 +66,34 @@ from { opacity: 0; - -webkit-transform: translate3d(3000px, 0, 0); - transform: translate3d(3000px, 0, 0); + -webkit-transform: translate3d(-1000px, 0, 0); + transform: translate3d(-1000px, 0, 0); } - - 60% { - opacity: 1; - -webkit-transform: translate3d(25px, 0, 0); - transform: translate3d(25px, 0, 0); + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } +} - 75% { - -webkit-transform: translate3d(10px, 0, 0); - transform: translate3d(10px, 0, 0); +@keyframes bounceInLeft { + from, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); } - 90% { - -webkit-transform: translate3d(5px, 0, 0); - transform: translate3d(5px, 0, 0); + from { + opacity: 0; + -webkit-transform: translate3d(-1000px, 0, 0); + transform: translate3d(-1000px, 0, 0); } - to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } -.bounceInRight { - -webkit-animation-name: bounceInRight; - animation-name: bounceInRight; +.bounceInLeft { + -webkit-animation-name: bounceInLeft; + animation-name: bounceInLeft; } \ No newline at end of file From b2d78bedb436c0fb1e86fbceac0cf049a5b07c29 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Tue, 22 May 2018 10:02:57 +0800 Subject: [PATCH 18/87] =?UTF-8?q?=E6=88=91=E7=9A=84=E8=B4=A6=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Router/index.js | 74 ++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/Router/index.js b/src/Router/index.js index 6b803df..a9f59fd 100644 --- a/src/Router/index.js +++ b/src/Router/index.js @@ -20,10 +20,10 @@ import TobeDone from '../models/TobeDone' import Mine from '../models/Mine' import MyWorkList from '../models/Mine/MyWorkList' // 我的工单 import Authenticate from '../models/Mine/Authenticate' // 资格认证 -// import Account from '../models/Mine/Account' // 我的账户 -// import AccountDetail from '../models/Mine/Account/detail' // 账户详情 -// import AccountRecharge from '../models/Mine/Account/recharge' // 充值 -// import AccountWithdrawCash from '../models/Mine/Account/withdrawCash' // 提现 +import Account from '../models/Mine/Account' // 我的账户 +import AccountDetail from '../models/Mine/Account/detail' // 账户详情 +import AccountRecharge from '../models/Mine/Account/recharge' // 充值 +import AccountWithdrawCash from '../models/Mine/Account/withdrawCash' // 提现 import Login from '../models/Login/login' import Register from '../models/Login/register' @@ -96,39 +96,39 @@ const routes = [ animated: true, showMenu: true, title: '资格认证' - }, - // }, { - // path: urls.ACCOUNT, - // exact: true, - // component: Account, - // parent: true, - // showMenu: false, - // title: '我的账户' - // }, - // }, { - // path: urls.ACCOUNTDETAIL, - // exact: true, - // component: AccountDetail, - // parent: true, - // showMenu: false, - // title: '账户详情' - // }, { - // { - // path: urls.ACCOUNTRECHARGE, - // exact: true, - // component: AccountRecharge, - // parent: true, - // showMenu: false, - // title: '充值' - // }, { - // path: urls.ACCOUNTWITHDRAWCASH, - // exact: true, - // component: AccountWithdrawCash, - // parent: true, - // showMenu: false, - // title: '提现' - // }, { - { + }, { + path: urls.ACCOUNT, + exact: true, + component: Account, + parent: true, + animated: true, + showMenu: false, + title: '我的账户' + }, { + path: urls.ACCOUNTDETAIL, + exact: true, + component: AccountDetail, + parent: true, + animated: true, + showMenu: false, + title: '账户详情' + }, { + path: urls.ACCOUNTRECHARGE, + exact: true, + component: AccountRecharge, + parent: true, + animated: true, + showMenu: false, + title: '充值' + }, { + path: urls.ACCOUNTWITHDRAWCASH, + exact: true, + component: AccountWithdrawCash, + parent: true, + animated: true, + showMenu: false, + title: '提现' + }, { path: urls.LOGIN, exact: true, component: Login, From d33ae2742a5fc61d8feb36b510041f9341c4fad5 Mon Sep 17 00:00:00 2001 From: chengbs Date: Tue, 22 May 2018 10:04:54 +0800 Subject: [PATCH 19/87] update --- src/Router/index.js | 4 ++-- src/components/Menus/index.js | 10 +--------- src/models/layout.js | 4 ++-- src/models/style.css | 22 +++++++++++----------- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/Router/index.js b/src/Router/index.js index 6b803df..a203929 100644 --- a/src/Router/index.js +++ b/src/Router/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:29:52 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-21 23:17:46 +* @Last Modified time: 2018-05-22 00:15:56 */ import React from 'react' import { @@ -133,7 +133,7 @@ const routes = [ exact: true, component: Login, parent: null, - animated: true, + animated: false, showMenu: false, title: '登录' }, { diff --git a/src/components/Menus/index.js b/src/components/Menus/index.js index ca1cb9c..e448f92 100644 --- a/src/components/Menus/index.js +++ b/src/components/Menus/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:47 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-21 23:21:08 +* @Last Modified time: 2018-05-22 00:11:54 */ import React, { Component } from 'react' // import { Route } from 'react-router-dom' @@ -145,14 +145,6 @@ class AppMenu extends Component {
) - } else if (comp.props.parent === null && comp.props.animated) { - return ( -
- { - comp - } -
- ) } else { return (
diff --git a/src/models/layout.js b/src/models/layout.js index e093684..b64b6c4 100644 --- a/src/models/layout.js +++ b/src/models/layout.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:24:57 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-21 23:39:42 +* @Last Modified time: 2018-05-22 00:14:45 */ import React, { Component } from 'react' import { Route } from 'react-router-dom' @@ -103,7 +103,7 @@ class MainLayout extends Component { } render() { return ( -
+
{this.showMenu()}
) diff --git a/src/models/style.css b/src/models/style.css index 6b3c045..5c07a06 100644 --- a/src/models/style.css +++ b/src/models/style.css @@ -2,11 +2,11 @@ * @Author: chengbs * @Date: 2018-05-16 18:38:22 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-21 23:44:14 +* @Last Modified time: 2018-05-22 00:21:08 */ :global(.animated) { - -webkit-animation-duration: 300ms; - animation-duration: 300ms; + -webkit-animation-duration: 150ms; + animation-duration: 150ms; -webkit-animation-fill-mode: both; animation-fill-mode: both; } @@ -25,8 +25,8 @@ from { opacity: 0; - -webkit-transform: translate3d(1000px, 0, 0); - transform: translate3d(1000px, 0, 0); + -webkit-transform: translate3d(800px, 0, 0); + transform: translate3d(800px, 0, 0); } to { -webkit-transform: translate3d(0, 0, 0); @@ -43,8 +43,8 @@ from { opacity: 0; - -webkit-transform: translate3d(1000px, 0, 0); - transform: translate3d(1000px, 0, 0); + -webkit-transform: translate3d(800px, 0, 0); + transform: translate3d(800px, 0, 0); } to { -webkit-transform: translate3d(0, 0, 0); @@ -66,8 +66,8 @@ from { opacity: 0; - -webkit-transform: translate3d(-1000px, 0, 0); - transform: translate3d(-1000px, 0, 0); + -webkit-transform: translate3d(-800px, 0, 0); + transform: translate3d(-800px, 0, 0); } to { -webkit-transform: translate3d(0, 0, 0); @@ -84,8 +84,8 @@ from { opacity: 0; - -webkit-transform: translate3d(-1000px, 0, 0); - transform: translate3d(-1000px, 0, 0); + -webkit-transform: translate3d(-800px, 0, 0); + transform: translate3d(-800px, 0, 0); } to { -webkit-transform: translate3d(0, 0, 0); From 2c866c8c2813af91d695311815de7ea3817b1f5a Mon Sep 17 00:00:00 2001 From: chengbs Date: Tue, 22 May 2018 12:18:39 +0800 Subject: [PATCH 20/87] =?UTF-8?q?=E4=BF=AE=E6=94=B9menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Content/style.css | 134 ++++++++++++++++++ src/components/Menus/index.js | 51 ++----- src/global.css | 11 ++ src/index.js | 3 +- src/models/Message/index.js | 4 +- src/models/Mine/Authenticate/index.js | 2 +- src/models/Mine/MyWorkList/index.js | 2 +- src/models/Mine/account/detail/index.js | 2 +- src/models/Mine/account/recharge/index.js | 2 +- src/models/Mine/account/withdrawCash/index.js | 2 +- src/models/Mine/index.js | 4 +- src/models/PushOrder/index.js | 4 +- src/models/TobeDone/index.js | 4 +- src/models/layout.js | 14 +- src/models/style.css | 47 +++++- 15 files changed, 230 insertions(+), 56 deletions(-) create mode 100644 src/global.css diff --git a/src/components/Content/style.css b/src/components/Content/style.css index 9b1f0b0..66694d4 100644 --- a/src/components/Content/style.css +++ b/src/components/Content/style.css @@ -12,3 +12,137 @@ right: 0; bottom: 0; } +:global(.animated) { + -webkit-animation-duration: 300ms; + animation-duration: 300ms; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +:global(.animated.infinite) { + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} + +@-webkit-keyframes bounceInRight { + from, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + + from { + opacity: 0; + -webkit-transform: translate3d(800px, 0, 0); + transform: translate3d(800px, 0, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes bounceInRight { + from, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + + from { + opacity: 0; + -webkit-transform: translate3d(800px, 0, 0); + transform: translate3d(800px, 0, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.bounceInRight { + -webkit-animation-name: bounceInRight; + animation-name: bounceInRight; +} + +@-webkit-keyframes bounceInLeft { + from, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + + from { + opacity: 0; + -webkit-transform: translate3d(-800px, 0, 0); + transform: translate3d(-800px, 0, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes bounceInLeft { + from, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + + from { + opacity: 0; + -webkit-transform: translate3d(-800px, 0, 0); + transform: translate3d(-800px, 0, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.bounceInLeft { + -webkit-animation-name: bounceInLeft; + animation-name: bounceInLeft; +} + +@-webkit-keyframes bounceInUp { + from, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + + from { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes bounceInUp { + from, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + + from { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.bounceInUp { + -webkit-animation-name: bounceInUp; + animation-name: bounceInUp; +} \ No newline at end of file diff --git a/src/components/Menus/index.js b/src/components/Menus/index.js index e448f92..b018d7f 100644 --- a/src/components/Menus/index.js +++ b/src/components/Menus/index.js @@ -2,15 +2,13 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:47 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 00:11:54 +* @Last Modified time: 2018-05-22 12:18:19 */ import React, { Component } from 'react' // import { Route } from 'react-router-dom' import { TabBar } from 'antd-mobile' import history from 'Util/history' import * as urls from 'Contants/urls' -import ReactCSSTransitionGroup from 'react-addons-css-transition-group' -import './Container.css' // import './Container.css' import menuStyle from './style.css' import { isIphoneX } from 'Util/ua' @@ -95,6 +93,20 @@ class AppMenu extends Component { render() { return (
+ { + data.map((item, index) => { + let componentAry = [] + componentAry = this.getComponentByUrl(item['path']) + return ( + componentAry.map((comp, i) => { + console.log(comp.props) + return ( + comp + ) + }) + ) + }) + } { data.map((item, index) => { - let componentAry = [] - componentAry = this.getComponentByUrl(item['path']) return ( - { - componentAry.map((comp, i) => { - console.log(comp.props) - if (comp.props.path === '/PushOrder' && comp.props.animated) { - return ( -
- -
- { - comp - } -
-
-
- ) - } else { - return ( -
- { - comp - } -
- ) - } - }) - }
) }) diff --git a/src/global.css b/src/global.css new file mode 100644 index 0000000..e88667d --- /dev/null +++ b/src/global.css @@ -0,0 +1,11 @@ +/* +* @Author: chengbs +* @Date: 2018-05-22 10:58:21 +* @Last Modified by: chengbs +* @Last Modified time: 2018-05-22 11:00:58 +*/ +:global(.contentBox){ + position: relative; + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/src/index.js b/src/index.js index d967b7e..f77b94e 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:36:11 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-16 14:45:10 +* @Last Modified time: 2018-05-22 10:56:54 */ import React from 'react' import ReactDOM from 'react-dom' @@ -10,6 +10,7 @@ import MainRouter from './Router' import registerServiceWorker from './registerServiceWorker' import { AppContainer } from 'react-hot-loader' import 'Src/assets/iconfont.js' +import './global.css' ReactDOM.render( diff --git a/src/models/Message/index.js b/src/models/Message/index.js index abb0313..742e9e1 100644 --- a/src/models/Message/index.js +++ b/src/models/Message/index.js @@ -2,14 +2,14 @@ * @Author: chengbs * @Date: 2018-04-08 16:16:58 * @Last Modified by: chengbs -* @Last Modified time: 2018-04-08 16:17:20 +* @Last Modified time: 2018-05-22 11:31:27 */ import React, { Component } from 'react' import Header from 'Components/Header' class Message extends Component { render() { - return
+ return
} diff --git a/src/models/Mine/Authenticate/index.js b/src/models/Mine/Authenticate/index.js index 2a5ccd4..ced19d3 100644 --- a/src/models/Mine/Authenticate/index.js +++ b/src/models/Mine/Authenticate/index.js @@ -35,7 +35,7 @@ class Authenticate extends Component { render() { const { idUp, idDown, PCLL } = this.state - return
+ return
+ return
+ return
-
+
-
+
+
diff --git a/src/models/PushOrder/index.js b/src/models/PushOrder/index.js index a8d8d5e..12e7305 100644 --- a/src/models/PushOrder/index.js +++ b/src/models/PushOrder/index.js @@ -2,7 +2,7 @@ * @Author: chengbs * @Date: 2018-04-08 16:18:37 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-15 17:24:06 +* @Last Modified time: 2018-05-22 11:30:43 */ import React, { Component } from 'react' import { Link } from 'react-router-dom' @@ -55,7 +55,7 @@ const data = [ class Workplat extends Component { render() { return ( -
+
功能操作
(
diff --git a/src/models/TobeDone/index.js b/src/models/TobeDone/index.js index 57ccc28..2af117c 100644 --- a/src/models/TobeDone/index.js +++ b/src/models/TobeDone/index.js @@ -2,7 +2,7 @@ * @Author: chengbs * @Date: 2018-04-08 16:19:20 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-16 15:23:48 +* @Last Modified time: 2018-05-22 11:30:57 */ import React, { Component } from 'react' import Header from 'Components/Header' @@ -19,7 +19,7 @@ class TobeDone extends Component { } render() { const { date } = this.state - return
+ return
} diff --git a/src/models/layout.js b/src/models/layout.js index b64b6c4..a43e47e 100644 --- a/src/models/layout.js +++ b/src/models/layout.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:24:57 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 00:14:45 +* @Last Modified time: 2018-05-22 12:01:18 */ import React, { Component } from 'react' import { Route } from 'react-router-dom' @@ -64,7 +64,7 @@ class MainLayout extends Component { ) } else { return ( -
+
{ routes.map((route, index) => { return ( @@ -102,8 +102,16 @@ class MainLayout extends Component { return routeObj } render() { + let animateClass = '' + if (this.state.animated) { + if (this.state.path === '/PushOrder') { + animateClass = style['bounceInUp'] + } else { + animateClass = style['bounceInRight'] + } + } return ( -
+
{this.showMenu()}
) diff --git a/src/models/style.css b/src/models/style.css index 5c07a06..440e449 100644 --- a/src/models/style.css +++ b/src/models/style.css @@ -2,11 +2,11 @@ * @Author: chengbs * @Date: 2018-05-16 18:38:22 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 00:21:08 +* @Last Modified time: 2018-05-22 11:28:09 */ :global(.animated) { - -webkit-animation-duration: 150ms; - animation-duration: 150ms; + -webkit-animation-duration: 300ms; + animation-duration: 300ms; -webkit-animation-fill-mode: both; animation-fill-mode: both; } @@ -96,4 +96,45 @@ .bounceInLeft { -webkit-animation-name: bounceInLeft; animation-name: bounceInLeft; +} + +@-webkit-keyframes bounceInUp { + from, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + + from { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes bounceInUp { + from, + to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + + from { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.bounceInUp { + -webkit-animation-name: bounceInUp; + animation-name: bounceInUp; } \ No newline at end of file From bc2a651fc0b99516e2e02e226592a183a3b5e513 Mon Sep 17 00:00:00 2001 From: chengbs Date: Tue, 22 May 2018 13:19:13 +0800 Subject: [PATCH 21/87] update --- src/components/Menus/index.js | 27 ++++++++++++++------------- src/components/Menus/style.css | 9 ++++++++- src/global.css | 10 ++++++---- 3 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/components/Menus/index.js b/src/components/Menus/index.js index b018d7f..72aedc6 100644 --- a/src/components/Menus/index.js +++ b/src/components/Menus/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:47 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 12:18:19 +* @Last Modified time: 2018-05-22 13:07:15 */ import React, { Component } from 'react' // import { Route } from 'react-router-dom' @@ -94,18 +94,19 @@ class AppMenu extends Component { return (
{ - data.map((item, index) => { - let componentAry = [] - componentAry = this.getComponentByUrl(item['path']) - return ( - componentAry.map((comp, i) => { - console.log(comp.props) - return ( - comp - ) - }) - ) - }) + // data.map((item, index) => { + // let componentAry = [] + // componentAry = this.getComponentByUrl(item['path']) + // return ( + // componentAry.map((comp, i) => { + // console.log(comp.props) + // return ( + // comp + // ) + // }) + // ) + // }) + this.props.children } Date: Tue, 22 May 2018 15:07:30 +0800 Subject: [PATCH 22/87] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 31 +++++- src/Router/index.js | 154 +-------------------------- src/Router/routerConf.js | 159 ++++++++++++++++++++++++++++ src/components/Content/index.js | 44 +++++++- src/components/Menus/index.js | 16 +-- src/components/Menus/style.css | 10 +- src/global.css | 9 +- src/models/Mine/MyWorkList/index.js | 2 +- src/models/Mine/index.js | 2 +- src/models/PushOrder/index.js | 42 ++++---- src/models/layout.js | 5 +- 11 files changed, 281 insertions(+), 193 deletions(-) create mode 100644 src/Router/routerConf.js diff --git a/README.md b/README.md index 9316ebc..141949b 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ ### 路由书写简单规范 - 主要是以JSON数组格式进行配置,添加模块后只需要添加想要的路由配置即可 - 基于父组件的路由需要配置父组件的名称(parent)且为字符串类型,没有则设parent为null -- 路由配置文件入口:Contants/Router/index.js +- 路由配置文件入口:Contants/Router/routerConf.js Example: ```javascript @@ -196,6 +196,35 @@ icon: 默认时候的icon onIcon: 被选中状态时候的icon title: 菜单名称 ``` +## 页面模块配置说明 +1、如果需要Header直接引入import { Header, Content } from 'Components' 里面的Header既可 + +2、每个页面都必须包括Content组件,子组件的所有布局都需要写在里面 + +3、页面最外层的div需要设置固定class,分别是:contentBox(有菜单情况下使用) 或 pageBox(单页面无菜单情况使用,比如登录注册页) +Example: +```javascript +class TobeDone extends Component { + constructor(props) { + super(props) + this.state = { + date: '2018 5月' + } + } + detail = () => { + console.log('详情') + } + render() { + const { date } = this.state + return
+
+ + 你的页面代码..... + +
+ } +} +``` ## 数据请求 ### 说明 diff --git a/src/Router/index.js b/src/Router/index.js index e7c21c4..e270e77 100644 --- a/src/Router/index.js +++ b/src/Router/index.js @@ -2,166 +2,16 @@ * @Author: baosheng * @Date: 2018-04-02 22:29:52 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 00:15:56 +* @Last Modified time: 2018-05-22 14:15:14 */ import React from 'react' import { Router, Switch } from 'react-router-dom' -import * as urls from 'Contants/urls' import history from 'Util/history' import XLayout from '../models/layout' -import Home from '../models/Home' -import Message from '../models/Message' -import PushOrder from '../models/PushOrder' -import TobeDone from '../models/TobeDone' -// 我的 -import Mine from '../models/Mine' -import MyWorkList from '../models/Mine/MyWorkList' // 我的工单 -import Authenticate from '../models/Mine/Authenticate' // 资格认证 -import Account from '../models/Mine/Account' // 我的账户 -import AccountDetail from '../models/Mine/Account/detail' // 账户详情 -import AccountRecharge from '../models/Mine/Account/recharge' // 充值 -import AccountWithdrawCash from '../models/Mine/Account/withdrawCash' // 提现 - -import Login from '../models/Login/login' -import Register from '../models/Login/register' -import ForgetPwd from '../models/Login/forgetPwd' -import TaskList from '../models/PushOrder/taskList' - -const routes = [ - { - path: '/', - exact: true, - component: Home, - parent: null, - showMenu: true, - animated: false, - title: '找工作' - }, - { - path: urls.HOME, - exact: true, - component: Home, - parent: null, - showMenu: true, - animated: false, - title: '找工作' - }, { - path: urls.TOBEDONE, - exact: true, - component: TobeDone, - parent: null, - animated: false, - showMenu: true, - title: '待办' - }, { - path: urls.PUSHORDER, - exact: true, - component: PushOrder, - parent: null, - showMenu: true, - animated: true, - title: '发布工单' - }, { - path: urls.MESSAGE, - exact: true, - component: Message, - parent: null, - animated: false, - showMenu: true, - title: '消息' - }, { - path: urls.MINE, - exact: true, - component: Mine, - parent: null, - animated: false, - showMenu: true, - title: '我的' - }, { - path: urls.MYWORKLIST, - exact: true, - component: MyWorkList, - parent: 'Mine', - animated: true, - showMenu: false, - title: '我的工单' - }, { - path: urls.AUTHENTICATE, - exact: true, - component: Authenticate, - parent: true, - animated: true, - showMenu: true, - title: '资格认证' - }, { - path: urls.ACCOUNT, - exact: true, - component: Account, - parent: true, - animated: true, - showMenu: false, - title: '我的账户' - }, { - path: urls.ACCOUNTDETAIL, - exact: true, - component: AccountDetail, - parent: true, - animated: true, - showMenu: false, - title: '账户详情' - }, { - path: urls.ACCOUNTRECHARGE, - exact: true, - component: AccountRecharge, - parent: true, - animated: true, - showMenu: false, - title: '充值' - }, { - path: urls.ACCOUNTWITHDRAWCASH, - exact: true, - component: AccountWithdrawCash, - parent: true, - animated: true, - showMenu: false, - title: '提现' - }, { - path: urls.LOGIN, - exact: true, - component: Login, - parent: null, - animated: false, - showMenu: false, - title: '登录' - }, { - path: urls.REGISTER, - exact: true, - component: Register, - parent: null, - animated: true, - showMenu: false, - title: '注册' - }, { - path: urls.FORGETPWD, - exact: true, - component: ForgetPwd, - parent: null, - animated: true, - showMenu: false, - title: '忘记密码' - }, { - path: urls.TASKLIST, - exact: true, - component: TaskList, - parent: 'PushOrder', - animated: true, - showMenu: true, - title: '任务列表' - } -] +import routes from './routerConf' const RouteConfig = () => ( diff --git a/src/Router/routerConf.js b/src/Router/routerConf.js new file mode 100644 index 0000000..af0eb3c --- /dev/null +++ b/src/Router/routerConf.js @@ -0,0 +1,159 @@ +/* +* @Author: chengbs +* @Date: 2018-05-22 14:13:58 +* @Last Modified by: chengbs +* @Last Modified time: 2018-05-22 14:14:54 +*/ +import * as urls from 'Contants/urls' +import Home from '../models/Home' +import Message from '../models/Message' +import PushOrder from '../models/PushOrder' +import TobeDone from '../models/TobeDone' +// 我的 +import Mine from '../models/Mine' +import MyWorkList from '../models/Mine/MyWorkList' // 我的工单 +import Authenticate from '../models/Mine/Authenticate' // 资格认证 +import Account from '../models/Mine/Account' // 我的账户 +import AccountDetail from '../models/Mine/Account/detail' // 账户详情 +import AccountRecharge from '../models/Mine/Account/recharge' // 充值 +import AccountWithdrawCash from '../models/Mine/Account/withdrawCash' // 提现 + +import Login from '../models/Login/login' +import Register from '../models/Login/register' +import ForgetPwd from '../models/Login/forgetPwd' +import TaskList from '../models/PushOrder/taskList' + +const routes = [ + { + path: '/', + exact: true, + component: Home, + parent: null, + showMenu: true, + animated: false, + title: '找工作' + }, + { + path: urls.HOME, + exact: true, + component: Home, + parent: null, + showMenu: true, + animated: false, + title: '找工作' + }, { + path: urls.TOBEDONE, + exact: true, + component: TobeDone, + parent: null, + animated: false, + showMenu: true, + title: '待办' + }, { + path: urls.PUSHORDER, + exact: true, + component: PushOrder, + parent: null, + showMenu: true, + animated: true, + title: '发布工单' + }, { + path: urls.MESSAGE, + exact: true, + component: Message, + parent: null, + animated: false, + showMenu: true, + title: '消息' + }, { + path: urls.MINE, + exact: true, + component: Mine, + parent: null, + animated: false, + showMenu: true, + title: '我的' + }, { + path: urls.MYWORKLIST, + exact: true, + component: MyWorkList, + parent: 'Mine', + animated: true, + showMenu: false, + title: '我的工单' + }, { + path: urls.AUTHENTICATE, + exact: true, + component: Authenticate, + parent: true, + animated: true, + showMenu: true, + title: '资格认证' + }, { + path: urls.ACCOUNT, + exact: true, + component: Account, + parent: true, + animated: true, + showMenu: false, + title: '我的账户' + }, { + path: urls.ACCOUNTDETAIL, + exact: true, + component: AccountDetail, + parent: true, + animated: true, + showMenu: false, + title: '账户详情' + }, { + path: urls.ACCOUNTRECHARGE, + exact: true, + component: AccountRecharge, + parent: true, + animated: true, + showMenu: false, + title: '充值' + }, { + path: urls.ACCOUNTWITHDRAWCASH, + exact: true, + component: AccountWithdrawCash, + parent: true, + animated: true, + showMenu: false, + title: '提现' + }, { + path: urls.LOGIN, + exact: true, + component: Login, + parent: null, + animated: false, + showMenu: false, + title: '登录' + }, { + path: urls.REGISTER, + exact: true, + component: Register, + parent: null, + animated: true, + showMenu: false, + title: '注册' + }, { + path: urls.FORGETPWD, + exact: true, + component: ForgetPwd, + parent: null, + animated: true, + showMenu: false, + title: '忘记密码' + }, { + path: urls.TASKLIST, + exact: true, + component: TaskList, + parent: 'PushOrder', + animated: true, + showMenu: true, + title: '任务列表' + } +] + +export default routes diff --git a/src/components/Content/index.js b/src/components/Content/index.js index f5a1a0e..d543e1f 100644 --- a/src/components/Content/index.js +++ b/src/components/Content/index.js @@ -1,12 +1,50 @@ import React, { Component } from 'react' import { isIphoneX } from 'Util/ua' import style from './style.css' +import history from 'Util/history' +import routes from 'Src/Router/routerConf' class Content extends Component { + constructor(props) { + super(props) + this.state = { + path: '', + isMenuPage: true, + animated: false + } + } + + componentWillMount() { + const rtObj = this.getRouteByPath() + console.log(rtObj) + this.setState({ + isMenuPage: rtObj['showMenu'], + animated: rtObj['animated'], + title: rtObj['title'], + path: rtObj['path'] + }) + } + getRouteByPath(pathname = history.location.pathname) { + let routeObj = null + routes.map((route, index) => { + if (route['path'] === pathname) { + routeObj = route + } + }) + return routeObj + } render() { - return
- {this.props.children} -
+ let animateClass = '' + if (this.state.path === '/PushOrder') { + animateClass = style['bounceInUp'] + } else if (this.state.isMenuPage && this.state.animated) { + animateClass = style['bounceInRight'] + } + return ( +
+ {this.props.children} +
+ ) } } diff --git a/src/components/Menus/index.js b/src/components/Menus/index.js index 72aedc6..0dfb188 100644 --- a/src/components/Menus/index.js +++ b/src/components/Menus/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:47 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 13:07:15 +* @Last Modified time: 2018-05-22 13:48:29 */ import React, { Component } from 'react' // import { Route } from 'react-router-dom' @@ -94,18 +94,6 @@ class AppMenu extends Component { return (
{ - // data.map((item, index) => { - // let componentAry = [] - // componentAry = this.getComponentByUrl(item['path']) - // return ( - // componentAry.map((comp, i) => { - // console.log(comp.props) - // return ( - // comp - // ) - // }) - // ) - // }) this.props.children } { data.map((item, index) => { + // let componentAry = [] + // componentAry = this.getComponentByUrl(item['path']) return ( + return
-
功能操作
- ( -
- {dataItem.text} -
- {dataItem.text} +
+ +
功能操作
+ ( +
+ {dataItem.text} +
+ {dataItem.text} +
+ )} + /> +
任务日历切换列表
+
+
+
北京好望山一期开工
+
工期:3月20日-3月31日(共12 天)开工中
+
计价模式:日结工资:300元/天
+
联系人:李晓菲聊天电话
+
- )} - /> -
任务日历切换列表
-
-
-
北京好望山一期开工
-
工期:3月20日-3月31日(共12 天)开工中
-
计价模式:日结工资:300元/天
-
联系人:李晓菲聊天电话
-
-
+
) } diff --git a/src/models/layout.js b/src/models/layout.js index a43e47e..31b2ff4 100644 --- a/src/models/layout.js +++ b/src/models/layout.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:24:57 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 12:01:18 +* @Last Modified time: 2018-05-22 14:59:30 */ import React, { Component } from 'react' import { Route } from 'react-router-dom' @@ -70,6 +70,7 @@ class MainLayout extends Component { return ( { @@ -103,7 +104,7 @@ class MainLayout extends Component { } render() { let animateClass = '' - if (this.state.animated) { + if (!this.state.isMenuPage && this.state.animated) { if (this.state.path === '/PushOrder') { animateClass = style['bounceInUp'] } else { From 6df0fb95243f58a4b03a2d246a44c6b6d85142b0 Mon Sep 17 00:00:00 2001 From: chengbs Date: Tue, 22 May 2018 15:27:46 +0800 Subject: [PATCH 23/87] =?UTF-8?q?=E4=BC=98=E5=8C=96iPhonex=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Menus/style.css | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/Menus/style.css b/src/components/Menus/style.css index aed8c39..1dcae61 100644 --- a/src/components/Menus/style.css +++ b/src/components/Menus/style.css @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:11 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 13:47:50 +* @Last Modified time: 2018-05-22 15:23:45 */ .menuBtn { width: 22px; @@ -55,7 +55,8 @@ display: none; } -.tabBody-fix-iphoneX :global(.tabBody .am-tab-bar-bar .am-tab-bar-tab), .tabBody :global(.tabBody .am-tab-bar-bar .am-tab-bar-tab) { +.tabBody-fix-iphoneX :global(.tabBody .am-tab-bar-bar .am-tab-bar-tab), +.tabBody :global(.tabBody .am-tab-bar-bar .am-tab-bar-tab) { -webkit-transform: translateZ(0); transform: translateZ(0); -webkit-transition: all .2s ease-in-out; @@ -66,11 +67,13 @@ touch-callout: none; } -.tabBody-fix-iphoneX :global(.am-tab-bar-bar .am-tab-bar-tab.feedback),.tabBody :global(.am-tab-bar-bar .am-tab-bar-tab.feedback) { +.tabBody-fix-iphoneX :global(.am-tab-bar-bar .am-tab-bar-tab.feedback), +.tabBody :global(.am-tab-bar-bar .am-tab-bar-tab.feedback) { -webkit-transform: scale(0.86); transform: scale(0.86); } +.tabBody-fix-iphoneX :global(.am-tab-bar), .tabBody :global(.am-tab-bar) { width: 100%; position: absolute; @@ -78,11 +81,14 @@ height: 50px; }; +.tabBody-fix-iphoneX :global(.am-tabs-pane-wrap-inactive), .tabBody :global(.am-tabs-pane-wrap-inactive) { display: none; } +.tabBody-fix-iphoneX :global(.am-tabs-pane-wrap-active), .tabBody :global(.am-tabs-pane-wrap-active) { display: block; height: 100%; } + From 1a3b802f8bdf94e4d754f411717a37e2abdcc10e Mon Sep 17 00:00:00 2001 From: chengbs Date: Tue, 22 May 2018 15:43:52 +0800 Subject: [PATCH 24/87] update --- src/components/Content/index.js | 3 ++- src/models/layout.js | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/Content/index.js b/src/components/Content/index.js index d543e1f..96d36c8 100644 --- a/src/components/Content/index.js +++ b/src/components/Content/index.js @@ -35,9 +35,10 @@ class Content extends Component { } render() { let animateClass = '' + console.log('content:', this.state) if (this.state.path === '/PushOrder') { animateClass = style['bounceInUp'] - } else if (this.state.isMenuPage && this.state.animated) { + } else if (this.state.animated) { animateClass = style['bounceInRight'] } return ( diff --git a/src/models/layout.js b/src/models/layout.js index 31b2ff4..4757f93 100644 --- a/src/models/layout.js +++ b/src/models/layout.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:24:57 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 14:59:30 +* @Last Modified time: 2018-05-22 15:35:42 */ import React, { Component } from 'react' import { Route } from 'react-router-dom' @@ -106,13 +106,13 @@ class MainLayout extends Component { let animateClass = '' if (!this.state.isMenuPage && this.state.animated) { if (this.state.path === '/PushOrder') { - animateClass = style['bounceInUp'] + animateClass = `animated ${style['bounceInUp']}` } else { - animateClass = style['bounceInRight'] + animateClass = `animated ${style['bounceInRight']}` } } return ( -
+
{this.showMenu()}
) From 567f0bf46de4836c0b42d878a82a6c5ab9fec2a5 Mon Sep 17 00:00:00 2001 From: chengbs Date: Tue, 22 May 2018 15:47:41 +0800 Subject: [PATCH 25/87] update --- src/components/Content/index.js | 10 ++++++---- src/models/layout.js | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/Content/index.js b/src/components/Content/index.js index 96d36c8..64b2186 100644 --- a/src/components/Content/index.js +++ b/src/components/Content/index.js @@ -36,10 +36,12 @@ class Content extends Component { render() { let animateClass = '' console.log('content:', this.state) - if (this.state.path === '/PushOrder') { - animateClass = style['bounceInUp'] - } else if (this.state.animated) { - animateClass = style['bounceInRight'] + if (this.state.isMenuPage) { // 不是单页 有菜单 + if (this.state.path === '/PushOrder') { + animateClass = style['bounceInUp'] + } else if (this.state.animated) { + animateClass = style['bounceInRight'] + } } return (
diff --git a/src/models/layout.js b/src/models/layout.js index 4757f93..be92260 100644 --- a/src/models/layout.js +++ b/src/models/layout.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:24:57 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 15:35:42 +* @Last Modified time: 2018-05-22 15:46:54 */ import React, { Component } from 'react' import { Route } from 'react-router-dom' @@ -104,7 +104,7 @@ class MainLayout extends Component { } render() { let animateClass = '' - if (!this.state.isMenuPage && this.state.animated) { + if (!this.state.isMenuPage && this.state.animated) { // 单页 无菜单 if (this.state.path === '/PushOrder') { animateClass = `animated ${style['bounceInUp']}` } else { From db1aa2cf1d455506d93451eaa209ef3d0a6103a3 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Tue, 22 May 2018 15:55:39 +0800 Subject: [PATCH 26/87] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=8F=91=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Router/routerConf.js | 24 +++++++++-- src/components/Content/style.css | 2 +- src/contants/urls.js | 8 ++-- src/global.css | 2 +- src/models/Mine/Invoice/detail/index.js | 38 ++++++++++++++++++ src/models/Mine/Invoice/detail/style.css | 8 ++++ src/models/Mine/Invoice/index.js | 40 +++++++++++++++++++ src/models/Mine/Invoice/style.css | 21 ++++++++++ src/models/Mine/account/index.js | 2 +- src/models/Mine/account/recharge/index.js | 4 +- src/models/Mine/account/withdrawCash/index.js | 7 +++- src/models/Mine/index.js | 2 +- src/models/Mine/style.css | 1 + src/models/style.css | 2 +- 14 files changed, 147 insertions(+), 14 deletions(-) create mode 100644 src/models/Mine/Invoice/detail/index.js create mode 100644 src/models/Mine/Invoice/detail/style.css create mode 100644 src/models/Mine/Invoice/index.js create mode 100644 src/models/Mine/Invoice/style.css diff --git a/src/Router/routerConf.js b/src/Router/routerConf.js index af0eb3c..76b1c05 100644 --- a/src/Router/routerConf.js +++ b/src/Router/routerConf.js @@ -14,9 +14,11 @@ import Mine from '../models/Mine' import MyWorkList from '../models/Mine/MyWorkList' // 我的工单 import Authenticate from '../models/Mine/Authenticate' // 资格认证 import Account from '../models/Mine/Account' // 我的账户 -import AccountDetail from '../models/Mine/Account/detail' // 账户详情 -import AccountRecharge from '../models/Mine/Account/recharge' // 充值 -import AccountWithdrawCash from '../models/Mine/Account/withdrawCash' // 提现 +import AccountDetail from '../models/Mine/Account/detail' // 我的账户》账户详情 +import AccountRecharge from '../models/Mine/Account/recharge' // 我的账户》充值 +import AccountWithdrawCash from '../models/Mine/Account/withdrawCash' // 我的账户》提现 +import Invoice from '../models/Mine/Invoice' // 申请发票 +import InvoiceDetail from '../models/Mine/Invoice/detail' // 申请发票》详细 import Login from '../models/Login/login' import Register from '../models/Login/register' @@ -121,6 +123,22 @@ const routes = [ animated: true, showMenu: false, title: '提现' + }, { + path: urls.INVOICE, + exact: true, + component: Invoice, + parent: true, + animated: true, + showMenu: false, + title: '申请发票' + }, { + path: urls.INVOICEDETAIL, + exact: true, + component: InvoiceDetail, + parent: true, + animated: true, + showMenu: false, + title: '申请发票详情' }, { path: urls.LOGIN, exact: true, diff --git a/src/components/Content/style.css b/src/components/Content/style.css index 66694d4..eab80d8 100644 --- a/src/components/Content/style.css +++ b/src/components/Content/style.css @@ -145,4 +145,4 @@ .bounceInUp { -webkit-animation-name: bounceInUp; animation-name: bounceInUp; -} \ No newline at end of file +} diff --git a/src/contants/urls.js b/src/contants/urls.js index a20d372..baa3104 100644 --- a/src/contants/urls.js +++ b/src/contants/urls.js @@ -16,9 +16,11 @@ export const MINE = `${BASE_URL}/Mine` export const MYWORKLIST = `${BASE_URL}/Mine/MyWorkList` // 我的工单 export const AUTHENTICATE = `${BASE_URL}/Mine/Authenticate` // 资格认证 export const ACCOUNT = `${BASE_URL}/Mine/Account` // 我的账户 -export const ACCOUNTRECHARGE = `${BASE_URL}/Mine/Account/recharge` // 充值 -export const ACCOUNTWITHDRAWCASH = `${BASE_URL}/Mine/Account/withdrawCash` // 提现 -export const ACCOUNTDETAIL = `${BASE_URL}/Mine/Account/detail` // 账户详细 +export const ACCOUNTRECHARGE = `${BASE_URL}/Mine/Account/recharge` // 我的账户》充值 +export const ACCOUNTWITHDRAWCASH = `${BASE_URL}/Mine/Account/withdrawCash` // 我的账户》提现 +export const ACCOUNTDETAIL = `${BASE_URL}/Mine/Account/detail` // 我的账户》账户详细 +export const INVOICE = `${BASE_URL}/Mine/Invoice` // 申请发票 +export const INVOICEDETAIL = `${BASE_URL}/Mine/Invoice/detail` // 申请发票》详细 export const LOGIN = `${BASE_URL}/Login/login` export const REGISTER = `${BASE_URL}/Login/register` diff --git a/src/global.css b/src/global.css index aa86acd..bd57c19 100644 --- a/src/global.css +++ b/src/global.css @@ -17,4 +17,4 @@ left:0; right: 0; bottom: 0; -} \ No newline at end of file +} diff --git a/src/models/Mine/Invoice/detail/index.js b/src/models/Mine/Invoice/detail/index.js new file mode 100644 index 0000000..b352671 --- /dev/null +++ b/src/models/Mine/Invoice/detail/index.js @@ -0,0 +1,38 @@ +/** + * @Author: sunshiqiang + * @Date: 2018-05-22 10:52:31 + * @Title: 发票详情 + */ +import React, { Component } from 'react' +import {} from 'antd-mobile' +import * as urls from 'Contants/urls' +import { Header, Content } from 'Components' +import style from './style.css' + +class Detail extends Component { + constructor(props) { + super(props) + this.state = {} + } + + componentDidMount() { + } + + render() { + return
+
{ + this.props.match.history.push(urls.MINE) + }} + /> + +
+
+
+ } +} + +export default Detail diff --git a/src/models/Mine/Invoice/detail/style.css b/src/models/Mine/Invoice/detail/style.css new file mode 100644 index 0000000..0b95910 --- /dev/null +++ b/src/models/Mine/Invoice/detail/style.css @@ -0,0 +1,8 @@ +/** +* @Author: sunshiqiang +* @Date: 2018-05-22 10:53:15 +* @Title: 发票详情 +*/ +.detail { + +} diff --git a/src/models/Mine/Invoice/index.js b/src/models/Mine/Invoice/index.js new file mode 100644 index 0000000..8d167b3 --- /dev/null +++ b/src/models/Mine/Invoice/index.js @@ -0,0 +1,40 @@ +/** + * @Author: sunshiqiang + * @Date: 2018-05-22 10:49:12 + * @Title: 申请发票 + */ +import React, { Component } from 'react' +import {} from 'antd-mobile' +import * as urls from 'Contants/urls' +import { Header, Content, NewIcon } from 'Components' +import style from './style.css' + +class Invoice extends Component { + constructor(props) { + super(props) + this.state = {} + } + + componentDidMount() { + } + + render() { + return
+
{ + this.props.match.history.push(urls.MINE) + }} + /> + +
+
我的发票
+
+
+
+ } +} + +export default Invoice diff --git a/src/models/Mine/Invoice/style.css b/src/models/Mine/Invoice/style.css new file mode 100644 index 0000000..507838e --- /dev/null +++ b/src/models/Mine/Invoice/style.css @@ -0,0 +1,21 @@ +/** +* @Author: sunshiqiang +* @Date: 2018-05-22 10:50:16 +* @Title: 申请发票 +*/ +.invoice { + background-color: #f6f7f8; + height: 100%; + & .header { + position: relative; + color: rgba(49, 63, 72, 1); + font-size: 14px; + padding: 9px 0 10px 24px; + font-family: PingFangSC-Regular; + & .date { + position: absolute; + right: 25px; + top: 18px; + } + } +} diff --git a/src/models/Mine/account/index.js b/src/models/Mine/account/index.js index fe1f077..4b67ec0 100644 --- a/src/models/Mine/account/index.js +++ b/src/models/Mine/account/index.js @@ -26,7 +26,7 @@ class Account extends Component { render() { const { moneyA, moneyB } = this.state - return
+ return
+ return
-
+
¥ 全部提现 }>可用余额 {maxMoney}元 - +
diff --git a/src/models/Mine/index.js b/src/models/Mine/index.js index 2e97413..77af99b 100644 --- a/src/models/Mine/index.js +++ b/src/models/Mine/index.js @@ -36,7 +36,7 @@ class Mine extends Component { { icon: 'icon-applicationForInvoi', title: '申请发票', - link: '/Home' + link: urls.INVOICE }, { icon: 'icon-attendanceManagement', diff --git a/src/models/Mine/style.css b/src/models/Mine/style.css index 88f879a..2f4d6e2 100644 --- a/src/models/Mine/style.css +++ b/src/models/Mine/style.css @@ -1,6 +1,7 @@ .header { display: flex; padding: 16px 0 21px 0; + height: 95px; & .avatar { flex: 1; text-align: center; diff --git a/src/models/style.css b/src/models/style.css index 440e449..baf0e96 100644 --- a/src/models/style.css +++ b/src/models/style.css @@ -137,4 +137,4 @@ .bounceInUp { -webkit-animation-name: bounceInUp; animation-name: bounceInUp; -} \ No newline at end of file +} From d81239c2edb7258c3fb9777f57366dacdaa53076 Mon Sep 17 00:00:00 2001 From: chengbs Date: Tue, 22 May 2018 16:05:27 +0800 Subject: [PATCH 27/87] update --- src/components/Content/index.js | 2 + src/models/layout.js | 13 +-- src/models/style.css | 135 +------------------------------- 3 files changed, 5 insertions(+), 145 deletions(-) diff --git a/src/components/Content/index.js b/src/components/Content/index.js index 64b2186..d641290 100644 --- a/src/components/Content/index.js +++ b/src/components/Content/index.js @@ -42,6 +42,8 @@ class Content extends Component { } else if (this.state.animated) { animateClass = style['bounceInRight'] } + } else { + animateClass = style['bounceInRight'] } return (
diff --git a/src/models/layout.js b/src/models/layout.js index be92260..a1325ff 100644 --- a/src/models/layout.js +++ b/src/models/layout.js @@ -2,13 +2,12 @@ * @Author: baosheng * @Date: 2018-04-02 22:24:57 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 15:46:54 +* @Last Modified time: 2018-05-22 16:04:23 */ import React, { Component } from 'react' import { Route } from 'react-router-dom' import AppMenu from 'Components/Menus' import history from 'Util/history' -import style from './style.css' class MainLayout extends Component { constructor(props) { @@ -103,16 +102,8 @@ class MainLayout extends Component { return routeObj } render() { - let animateClass = '' - if (!this.state.isMenuPage && this.state.animated) { // 单页 无菜单 - if (this.state.path === '/PushOrder') { - animateClass = `animated ${style['bounceInUp']}` - } else { - animateClass = `animated ${style['bounceInRight']}` - } - } return ( -
+
{this.showMenu()}
) diff --git a/src/models/style.css b/src/models/style.css index baf0e96..45baba0 100644 --- a/src/models/style.css +++ b/src/models/style.css @@ -2,139 +2,6 @@ * @Author: chengbs * @Date: 2018-05-16 18:38:22 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 11:28:09 +* @Last Modified time: 2018-05-22 16:04:35 */ -:global(.animated) { - -webkit-animation-duration: 300ms; - animation-duration: 300ms; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} -:global(.animated.infinite) { - -webkit-animation-iteration-count: infinite; - animation-iteration-count: infinite; -} - -@-webkit-keyframes bounceInRight { - from, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - from { - opacity: 0; - -webkit-transform: translate3d(800px, 0, 0); - transform: translate3d(800px, 0, 0); - } - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes bounceInRight { - from, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - from { - opacity: 0; - -webkit-transform: translate3d(800px, 0, 0); - transform: translate3d(800px, 0, 0); - } - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.bounceInRight { - -webkit-animation-name: bounceInRight; - animation-name: bounceInRight; -} - -@-webkit-keyframes bounceInLeft { - from, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - from { - opacity: 0; - -webkit-transform: translate3d(-800px, 0, 0); - transform: translate3d(-800px, 0, 0); - } - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes bounceInLeft { - from, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - from { - opacity: 0; - -webkit-transform: translate3d(-800px, 0, 0); - transform: translate3d(-800px, 0, 0); - } - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.bounceInLeft { - -webkit-animation-name: bounceInLeft; - animation-name: bounceInLeft; -} - -@-webkit-keyframes bounceInUp { - from, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - from { - opacity: 0; - -webkit-transform: translate3d(0, 2000px, 0); - transform: translate3d(0, 2000px, 0); - } - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes bounceInUp { - from, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - from { - opacity: 0; - -webkit-transform: translate3d(0, 2000px, 0); - transform: translate3d(0, 2000px, 0); - } - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.bounceInUp { - -webkit-animation-name: bounceInUp; - animation-name: bounceInUp; -} From ff5b642d28b139d47b87b2f4c491215c21beb76d Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Tue, 22 May 2018 16:31:39 +0800 Subject: [PATCH 28/87] =?UTF-8?q?=E5=85=BC=E5=AE=B9iphoneX=E5=BA=95?= =?UTF-8?q?=E9=83=A8=E4=BB=8E=E4=B8=8B=E8=87=B3=E4=B8=8A=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E9=9C=B2=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Menus/style.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/Menus/style.css b/src/components/Menus/style.css index 1dcae61..ade8095 100644 --- a/src/components/Menus/style.css +++ b/src/components/Menus/style.css @@ -27,6 +27,19 @@ left: 0; right: 0; border-bottom: 15px solid #FFF; + &:after { + content: ''; + position: absolute; + background-color: #FFF; + display: block; + z-index: 1; + top: auto; + right: auto; + bottom: -15px; + left: 0; + width: 100%; + height: 15px; + } } .icon-menu { From ccfea85e93e803d5481e22b0fafd4fb16fa2d06f Mon Sep 17 00:00:00 2001 From: chengbs Date: Tue, 22 May 2018 16:55:12 +0800 Subject: [PATCH 29/87] =?UTF-8?q?=E4=BF=AE=E6=94=B9upload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/components/Content/style.css | 4 ++-- src/components/Menus/index.js | 19 +------------------ 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index bcbbdae..33cd496 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "start": "node scripts/start.js", "build": "node scripts/build.js", "test": "node scripts/test.js --env=jsdom", - "upload": "scp -P 26270 -r build/* root@69.171.71.122:/www/web/yaque_wugong/public_html" + "upload": "scp -r build/* root@119.29.199.244:/home/webservice/wwwroot/yaqueApp-wugong/public" }, "devDependencies": { "babel-plugin-import": "^1.6.7", diff --git a/src/components/Content/style.css b/src/components/Content/style.css index eab80d8..fbe29b5 100644 --- a/src/components/Content/style.css +++ b/src/components/Content/style.css @@ -13,8 +13,8 @@ bottom: 0; } :global(.animated) { - -webkit-animation-duration: 300ms; - animation-duration: 300ms; + -webkit-animation-duration: 200ms; + animation-duration: 200ms; -webkit-animation-fill-mode: both; animation-fill-mode: both; } diff --git a/src/components/Menus/index.js b/src/components/Menus/index.js index 0dfb188..73729df 100644 --- a/src/components/Menus/index.js +++ b/src/components/Menus/index.js @@ -2,7 +2,7 @@ * @Author: baosheng * @Date: 2018-04-02 22:17:47 * @Last Modified by: chengbs -* @Last Modified time: 2018-05-22 13:48:29 +* @Last Modified time: 2018-05-22 16:15:16 */ import React, { Component } from 'react' // import { Route } from 'react-router-dom' @@ -74,21 +74,6 @@ class AppMenu extends Component { componentDidMount() { new TouchFeedback('.am-tabs-tab-bar-wrap') } - getComponentByUrl(url) { - const childAry = this.props.children - let newAry = [] - childAry.map((value) => { - if (value.props.path === '/' && url === '/Home') { - newAry.push(value) - } - if (value.props.path.indexOf(url) !== -1) { - newAry.push(value) - } else if (value.props.parent === (url.substr(0, 1) === '/' ? url.substr(1) : null)) { - newAry.push(value) - } - }) - return newAry - } render() { return ( @@ -104,8 +89,6 @@ class AppMenu extends Component { > { data.map((item, index) => { - // let componentAry = [] - // componentAry = this.getComponentByUrl(item['path']) return ( Date: Tue, 22 May 2018 17:57:49 +0800 Subject: [PATCH 30/87] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B7=A5=E5=85=B7js,?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=B3=E8=AF=B7=E5=8F=91=E7=A5=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Content/style.css | 2 + src/contants/tooler.js | 115 +++++++++++++++++++++++ src/models/Mine/Invoice/detail/index.js | 34 ++++++- src/models/Mine/Invoice/detail/style.css | 31 +++++- src/models/Mine/Invoice/index.js | 50 +++++++++- src/models/Mine/Invoice/style.css | 28 +++++- 6 files changed, 251 insertions(+), 9 deletions(-) create mode 100644 src/contants/tooler.js diff --git a/src/components/Content/style.css b/src/components/Content/style.css index eab80d8..ef8dec0 100644 --- a/src/components/Content/style.css +++ b/src/components/Content/style.css @@ -4,6 +4,7 @@ left: 0; right: 0; bottom: 0; + overflow: auto; } .marginTop83 { position: absolute; @@ -11,6 +12,7 @@ left: 0; right: 0; bottom: 0; + overflow: auto; } :global(.animated) { -webkit-animation-duration: 300ms; diff --git a/src/contants/tooler.js b/src/contants/tooler.js new file mode 100644 index 0000000..413738e --- /dev/null +++ b/src/contants/tooler.js @@ -0,0 +1,115 @@ +/* +* @Author: chengbaosheng +* @Date: 2017-09-05 18:52:30 +* @Last Modified by: chengbs +* @Last Modified time: 2018-03-20 14:29:04 +*/ +export const getScopeOption = (text, ScopeOptions) => { + if (typeof text === 'undefined' || text === null) { + return + } + let textAry = [] + let result = '' + if (text.indexOf(',') > 0) { + textAry = text.split(',') + } else { + textAry.push(text) + } + ScopeOptions.forEach((value, index, arry) => { + for (let i = 0; i < textAry.length; i++) { + if (value['value'] === textAry[i]) { + result += value['label'] + ',' + } + } + }) + return result.substring(0, result.length - 1) +} + +export const setDisabledScope = (aryStr, ScopeOptions) => { + let ary = [] + let resultAry = [] + if (aryStr.indexOf(',') > 0) { + ary = aryStr.split(',') + } else { + ary.push(aryStr) + } + for (let i = 0; i < ScopeOptions.length; i++) { + let bool = false + for (let j = 0; j < ary.length; j++) { + if (ScopeOptions[i].value === ary[j]) { + resultAry.push({ ...ScopeOptions[i], ...{ disabled: false, checked: false }}) + bool = true + } + } + if (!bool) { + resultAry.push({ ...ScopeOptions[i], ...{ disabled: true, checked: false }}) + } + } + return resultAry +} + +export const returnFloat = (number) => { + if (number === 'undefined' || number === 'null' || number === '' || typeof number === 'undefined') { + return '' + } + let value = Math.round(parseFloat(number) * 100) / 100 + let xsd = value.toString().split('.') + if (xsd.length === 1) { + value = value.toString() + '.00' + return value + } + if (xsd.length > 1) { + if (xsd[1].length < 2) { + value = value.toString() + '0' + } + return value + } +} + +export const getQueryString = (name) => { + let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i') + let r = window.location.search.substr(1).match(reg) + if (r !== null) { + return r[2] + } + return null +} + +/* + 大数字每3位添加逗号 + @method addCommas + @param {Number} number 需要转换的数字 + */ +export const addCommas = (number) => { + let newStr = '' + let count = 0 + let str = '' + if (number) { + str = number + '' + } else { + return ' ' + } + if (str.indexOf('.') === -1) { + for (let i = str.length - 1; i >= 0; i--) { + if (count % 3 === 0 && count !== 0) { + newStr = str.charAt(i) + ',' + newStr + } else { + newStr = str.charAt(i) + newStr + } + count++ + } + str = newStr + return str + } else { + for (let i = str.indexOf('.') - 1; i >= 0; i--) { + if (count % 3 === 0 && count !== 0) { + newStr = str.charAt(i) + ',' + newStr + } else { + newStr = str.charAt(i) + newStr // 逐个字符相接起来 + } + count++ + } + str = newStr + (str + '00').substr((str + '00').indexOf('.'), 3) + return str + } +} diff --git a/src/models/Mine/Invoice/detail/index.js b/src/models/Mine/Invoice/detail/index.js index b352671..6e8ab94 100644 --- a/src/models/Mine/Invoice/detail/index.js +++ b/src/models/Mine/Invoice/detail/index.js @@ -8,28 +8,54 @@ import {} from 'antd-mobile' import * as urls from 'Contants/urls' import { Header, Content } from 'Components' import style from './style.css' +import { getQueryString } from 'Contants/tooler' class Detail extends Component { constructor(props) { super(props) - this.state = {} + this.state = { + id: getQueryString('id'), + data: {} + } } componentDidMount() { + setTimeout(() => { + this.setState({ + data: { + title: '个人', + target: '杭州市西湖区莫干山有限公司', + money: '100,000', + time: '2018-05-01 14:20:00', + value: '杭州市西湖区莫干山项目' + } + }) + }) } render() { - return
+ const { id, data } = this.state + console.log(id) + return
{ - this.props.match.history.push(urls.MINE) + this.props.match.history.push(urls.INVOICE) }} /> -
+
+
+
发票抬头{data.title}
+
收款方{data.target}
+
发票金额¥{data.money}
+
开票时间{data.time}
+
开票内容{data.value}
+
+
申请纸质发票
+
} diff --git a/src/models/Mine/Invoice/detail/style.css b/src/models/Mine/Invoice/detail/style.css index 0b95910..649f079 100644 --- a/src/models/Mine/Invoice/detail/style.css +++ b/src/models/Mine/Invoice/detail/style.css @@ -4,5 +4,34 @@ * @Title: 发票详情 */ .detail { - + background-color: #f6f7f8; + height: 100%; + padding-top: 18px; + & .info { + background-color: #ffffff; + padding: 5px 0 5px 24px; + border-bottom: 1Px solid #eee; + & > div { + padding: 5px 0; + height: 20px; + line-height: 20px; + color: rgba(138, 150, 160, 1); + font-size: 14px; + font-family: PingFangSC-Regular; + & > span { + display: inline-block; + width: 80px; + color: rgba(49, 63, 72, 1); + } + } + } + & .active { + text-align: center; + height: 57px; + line-height: 57px; + color: rgba(4, 103, 224, 1); + background-color: #ffffff; + font-size: 14px; + font-family: PingFangSC-Regular; + } } diff --git a/src/models/Mine/Invoice/index.js b/src/models/Mine/Invoice/index.js index 8d167b3..70c6420 100644 --- a/src/models/Mine/Invoice/index.js +++ b/src/models/Mine/Invoice/index.js @@ -12,14 +12,50 @@ import style from './style.css' class Invoice extends Component { constructor(props) { super(props) - this.state = {} + this.state = { + data: [] + } } componentDidMount() { + setTimeout(() => { + this.setState({ + data: [ + { + date: '2018年5月', + id: 1, + list: [ + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, + ] + }, + { + date: '2018年4月', + id: 2, + list: [ + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, + ] + }, + { + date: '2018年3月', + id: 3, + list: [ + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, + ] + } + ] + }) + }) } render() { - return
+ const { data } = this.state + return
-
我的发票
+
我的发票
+ {data.map((item, index) =>
+
{item.date}
+ {(item.list || []).map((list, index) =>
this.props.match.history.push(urls.INVOICEDETAIL + '?id=111')}> +
发票抬头{list.title}
+
开票金额{list.money}
+
发票内容{list.address}
+
)} +
)}
diff --git a/src/models/Mine/Invoice/style.css b/src/models/Mine/Invoice/style.css index 507838e..2c62a9c 100644 --- a/src/models/Mine/Invoice/style.css +++ b/src/models/Mine/Invoice/style.css @@ -5,7 +5,6 @@ */ .invoice { background-color: #f6f7f8; - height: 100%; & .header { position: relative; color: rgba(49, 63, 72, 1); @@ -18,4 +17,31 @@ top: 18px; } } + & .item { + & .title { + height: 17px; + line-height: 17px; + padding: 12px 24px; + color: rgba(138, 150, 160, 1); + font-size: 12px; + font-family: PingFangSC-Regular; + } + & .list { + background-color: #ffffff; + padding: 5px 0 5px 24px; + margin-bottom: 24px; + & >div { + padding: 5px 0; + height: 20px; + line-height: 20px; + color: rgba(138, 150, 160, 1); + font-size: 14px; + font-family: PingFangSC-Regular; + & >span { + margin-left: 24px; + color: rgba(49, 63, 72, 1); + } + } + } + } } From e86300322f09506ffd001f3585c5c27500b494a8 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Tue, 22 May 2018 18:51:32 +0800 Subject: [PATCH 31/87] =?UTF-8?q?=E8=80=83=E5=8B=A4=E6=89=93=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Router/routerConf.js | 9 ++++ src/contants/urls.js | 1 + src/models/Mine/Check/index.js | 69 +++++++++++++++++++++++++++++++ src/models/Mine/Check/style.css | 71 ++++++++++++++++++++++++++++++++ src/models/Mine/Invoice/index.js | 2 +- src/models/Mine/index.js | 2 +- 6 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 src/models/Mine/Check/index.js create mode 100644 src/models/Mine/Check/style.css diff --git a/src/Router/routerConf.js b/src/Router/routerConf.js index 76b1c05..b3d0708 100644 --- a/src/Router/routerConf.js +++ b/src/Router/routerConf.js @@ -19,6 +19,7 @@ import AccountRecharge from '../models/Mine/Account/recharge' // 我的账户》 import AccountWithdrawCash from '../models/Mine/Account/withdrawCash' // 我的账户》提现 import Invoice from '../models/Mine/Invoice' // 申请发票 import InvoiceDetail from '../models/Mine/Invoice/detail' // 申请发票》详细 +import Check from '../models/Mine/Check' // 考勤管理 import Login from '../models/Login/login' import Register from '../models/Login/register' @@ -139,6 +140,14 @@ const routes = [ animated: true, showMenu: false, title: '申请发票详情' + }, { + path: urls.CHECK, + exact: true, + component: Check, + parent: true, + animated: true, + showMenu: false, + title: '考勤管理' }, { path: urls.LOGIN, exact: true, diff --git a/src/contants/urls.js b/src/contants/urls.js index baa3104..ef69c32 100644 --- a/src/contants/urls.js +++ b/src/contants/urls.js @@ -21,6 +21,7 @@ export const ACCOUNTWITHDRAWCASH = `${BASE_URL}/Mine/Account/withdrawCash` // export const ACCOUNTDETAIL = `${BASE_URL}/Mine/Account/detail` // 我的账户》账户详细 export const INVOICE = `${BASE_URL}/Mine/Invoice` // 申请发票 export const INVOICEDETAIL = `${BASE_URL}/Mine/Invoice/detail` // 申请发票》详细 +export const CHECK = `${BASE_URL}/Mine/Check` // 考勤管理 export const LOGIN = `${BASE_URL}/Login/login` export const REGISTER = `${BASE_URL}/Login/register` diff --git a/src/models/Mine/Check/index.js b/src/models/Mine/Check/index.js new file mode 100644 index 0000000..a87fdfa --- /dev/null +++ b/src/models/Mine/Check/index.js @@ -0,0 +1,69 @@ +/** + * @Author: sunshiqiang + * @Date: 2018-05-22 18:16:38 + * @Title: 考勤管理 + */ +import React, { Component } from 'react' +import { List, Steps, Button } from 'antd-mobile' +import * as urls from 'Contants/urls' +import { Header, Content } from 'Components' +import style from './style.css' + +const Item = List.Item +const Brief = Item.Brief +const Step = Steps.Step + +class Check extends Component { + constructor(props) { + super(props) + this.state = { + title: '高姿态', + img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1526905577349&di=a3da7639f5b20d172a5ceb18756d0ef5&imgtype=jpg&src=http%3A%2F%2Fimg3.imgtn.bdimg.com%2Fit%2Fu%3D2765035733%2C1282524408%26fm%3D214%26gp%3D0.jpg', + subtitle: '莫干山项目', + } + } + + componentDidMount() { + setInterval(() => { + this.setState({ + time: new Date().getSeconds() + }) + }) + } + + render() { + const { title, img, subtitle, time } = this.state + return
+
{ + this.props.match.history.push(urls.MINE) + }} + rightClick={() => { + this.props.match.history.push(urls.MINE) + }} + /> + +
+ + {title}项目组:{subtitle} + +
+
今天继续向梦想出发吧
+ + +
} /> + +
+
+ +
+ } +} + +export default Check diff --git a/src/models/Mine/Check/style.css b/src/models/Mine/Check/style.css new file mode 100644 index 0000000..554cbfe --- /dev/null +++ b/src/models/Mine/Check/style.css @@ -0,0 +1,71 @@ +/** +* @Author: sunshiqiang +* @Date: 2018-05-22 18:02:53 +* @Title: 考勤管理 +*/ +.check { + & .title { + height: 22px; + line-height: 22px; + color: rgba(49, 63, 72, 1); + font-size: 16px; + font-family: PingFangSC-Regular; + } + & .subtitle { + height: 21px; + line-height: 21px; + color: rgba(138, 150, 160, 1); + font-size: 15px; + font-family: PingFangSC-Regular; + } + & :global(.am-list-thumb img) { + width: 35.74px; + height: 35.94px; + border-radius: 50%; + } + & .check-info { + padding-left: 12px; + & .tip { + padding: 20px 0; + height: 20px; + line-height: 20px; + color: rgba(138, 150, 160, 1); + font-size: 14px; + font-family: PingFangSC-Regular; + } + & .btn { + display: inline-block; + width: 130px; + height: 130px; + line-height: normal; + border-radius: 50%; + background-color: rgba(4, 103, 224, 1); + box-shadow: 0px 2px 4px 0px rgba(4, 103, 224, 0.5); + white-space: normal; + & .btn-title{ + display: inline-block; + width: 100%; + position: absolute; + left: 0; + top: 40%; + height: 28px; + line-height: 28px; + color: rgba(255, 255, 255, 1); + font-size: 20px; + font-family: PingFangSC-Regular; + } + & .time{ + display: inline-block; + position: absolute; + top: 63%; + left: 0; + width: 100%; + height: 20px; + line-height: 20px; + color: rgba(255, 255, 255, 1); + font-size: 14px; + font-family: PingFangSC-Regular; + } + } + } +} diff --git a/src/models/Mine/Invoice/index.js b/src/models/Mine/Invoice/index.js index 70c6420..da20b08 100644 --- a/src/models/Mine/Invoice/index.js +++ b/src/models/Mine/Invoice/index.js @@ -59,7 +59,7 @@ class Invoice extends Component {
{ this.props.match.history.push(urls.MINE) }} diff --git a/src/models/Mine/index.js b/src/models/Mine/index.js index 77af99b..2c9650c 100644 --- a/src/models/Mine/index.js +++ b/src/models/Mine/index.js @@ -41,7 +41,7 @@ class Mine extends Component { { icon: 'icon-attendanceManagement', title: '考勤管理', - link: '/Home' + link: urls.CHECK } ] } From 968c911e45866308993729299a509ef1a121afa1 Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Wed, 23 May 2018 11:11:38 +0800 Subject: [PATCH 32/87] =?UTF-8?q?list=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/Mine/MyWorkList/style.css | 2 +- src/models/Mine/account/detail/style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/Mine/MyWorkList/style.css b/src/models/Mine/MyWorkList/style.css index cfe4c77..c81c90b 100644 --- a/src/models/Mine/MyWorkList/style.css +++ b/src/models/Mine/MyWorkList/style.css @@ -17,7 +17,7 @@ position: fixed; height: 42px; } - & :global(.am-tabs-pane-wrap.am-tabs-pane-wrap-active) { + & :global(.am-tabs-pane-wrap.am-tabs-pane-wrap-active),& :global(.am-tabs-pane-wrap.am-tabs-pane-wrap-inactive) { padding-top: 42px; } & .item { diff --git a/src/models/Mine/account/detail/style.css b/src/models/Mine/account/detail/style.css index dd9b156..5a07e73 100644 --- a/src/models/Mine/account/detail/style.css +++ b/src/models/Mine/account/detail/style.css @@ -17,7 +17,7 @@ position: fixed; height: 42px; } - & :global(.am-tabs-pane-wrap.am-tabs-pane-wrap-active) { + & :global(.am-tabs-pane-wrap.am-tabs-pane-wrap-active), & :global(.am-tabs-pane-wrap.am-tabs-pane-wrap-inactive) { padding-top: 42px; } & .status { From fccdf442c283cf6aa6db3881bfb900e6600447db Mon Sep 17 00:00:00 2001 From: sunsq01 Date: Wed, 23 May 2018 11:34:09 +0800 Subject: [PATCH 33/87] =?UTF-8?q?=E6=95=B0=E5=AD=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/Mine/Invoice/index.js | 12 ++++++------ src/models/Mine/account/detail/index.js | 5 +++-- src/models/Mine/account/index.js | 9 +++++---- src/models/Mine/account/recharge/index.js | 3 ++- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/models/Mine/Invoice/index.js b/src/models/Mine/Invoice/index.js index da20b08..14886e4 100644 --- a/src/models/Mine/Invoice/index.js +++ b/src/models/Mine/Invoice/index.js @@ -7,6 +7,7 @@ import React, { Component } from 'react' import {} from 'antd-mobile' import * as urls from 'Contants/urls' import { Header, Content, NewIcon } from 'Components' +import { addCommas } from 'Contants/tooler' import style from './style.css' class Invoice extends Component { @@ -23,11 +24,10 @@ class Invoice extends Component { data: [ { date: '2018年5月', - id: 1, list: [ - { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, - { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, - { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目' }, + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目', id: 1 }, + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目', id: 2 }, + { title: '个人', money: '100000', address: '杭州市西湖区莫干山项目', id: 3 }, ] }, { @@ -69,9 +69,9 @@ class Invoice extends Component {
我的发票
{data.map((item, index) =>
{item.date}
- {(item.list || []).map((list, index) =>
this.props.match.history.push(urls.INVOICEDETAIL + '?id=111')}> + {(item.list || []).map((list, index) =>
this.props.match.history.push(urls.INVOICEDETAIL + `?id=${list.id}`)}>
发票抬头{list.title}
-
开票金额{list.money}
+
开票金额{addCommas(list.money)}
发票内容{list.address}
)}
)} diff --git a/src/models/Mine/account/detail/index.js b/src/models/Mine/account/detail/index.js index c380dd8..e75341d 100644 --- a/src/models/Mine/account/detail/index.js +++ b/src/models/Mine/account/detail/index.js @@ -7,6 +7,7 @@ import React, { Component } from 'react' import { Tabs, List } from 'antd-mobile' import * as urls from 'Contants/urls' import { Header, Content } from 'Components' +import { addCommas } from 'Contants/tooler' import style from './style.css' const tabs = [ @@ -48,11 +49,11 @@ class Detail extends Component { const { data } = this.state return {data[key] && data[key].map((item, index) => {item.money}{item.allMoney}}>{tabs[item.status].title}{item.address}{item.date})} + className={style['all-money']}>{addCommas(item.allMoney)}}>{tabs[item.status].title}{item.address}{item.date})} } render() { - return
+ return
{ this.setState({ - moneyA: '300,000', - moneyB: '200,000' + moneyA: 300000, + moneyB: 200000 }) }) } @@ -42,8 +43,8 @@ class Account extends Component {
账户余额(元)
-
{moneyA}
-
冻结金额 ¥{moneyB}元
+
{addCommas(moneyA)}
+
冻结金额 ¥{addCommas(moneyB)}元