New file |
| | |
| | | 'use strict'; |
| | | |
| | | const fs = require('fs'); |
| | | const path = require('path'); |
| | | const paths = require('./paths'); |
| | | |
| | | // Make sure that including paths.js after env.js will read .env variables. |
| | | delete require.cache[require.resolve('./paths')]; |
| | | |
| | | const NODE_ENV = process.env.NODE_ENV; |
| | | if (!NODE_ENV) { |
| | | throw new Error( |
| | | 'The NODE_ENV environment variable is required but was not specified.' |
| | | ); |
| | | } |
| | | |
| | | // https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use |
| | | var dotenvFiles = [ |
| | | `${paths.dotenv}.${NODE_ENV}.local`, |
| | | `${paths.dotenv}.${NODE_ENV}`, |
| | | // Don't include `.env.local` for `test` environment |
| | | // since normally you expect tests to produce the same |
| | | // results for everyone |
| | | NODE_ENV !== 'test' && `${paths.dotenv}.local`, |
| | | paths.dotenv, |
| | | ].filter(Boolean); |
| | | |
| | | // Load environment variables from .env* files. Suppress warnings using silent |
| | | // if this file is missing. dotenv will never modify any environment variables |
| | | // that have already been set. Variable expansion is supported in .env files. |
| | | // https://github.com/motdotla/dotenv |
| | | // https://github.com/motdotla/dotenv-expand |
| | | dotenvFiles.forEach(dotenvFile => { |
| | | if (fs.existsSync(dotenvFile)) { |
| | | require('dotenv-expand')( |
| | | require('dotenv').config({ |
| | | path: dotenvFile, |
| | | }) |
| | | ); |
| | | } |
| | | }); |
| | | |
| | | // We support resolving modules according to `NODE_PATH`. |
| | | // This lets you use absolute paths in imports inside large monorepos: |
| | | // https://github.com/facebook/create-react-app/issues/253. |
| | | // It works similar to `NODE_PATH` in Node itself: |
| | | // https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders |
| | | // Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored. |
| | | // Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims. |
| | | // https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421 |
| | | // We also resolve them to make sure all tools using them work consistently. |
| | | const appDirectory = fs.realpathSync(process.cwd()); |
| | | process.env.NODE_PATH = (process.env.NODE_PATH || '') |
| | | .split(path.delimiter) |
| | | .filter(folder => folder && !path.isAbsolute(folder)) |
| | | .map(folder => path.resolve(appDirectory, folder)) |
| | | .join(path.delimiter); |
| | | |
| | | // Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be |
| | | // injected into the application via DefinePlugin in Webpack configuration. |
| | | const REACT_APP = /^REACT_APP_/i; |
| | | |
| | | function getClientEnvironment(publicUrl) { |
| | | const raw = Object.keys(process.env) |
| | | .filter(key => REACT_APP.test(key)) |
| | | .reduce( |
| | | (env, key) => { |
| | | env[key] = process.env[key]; |
| | | return env; |
| | | }, |
| | | { |
| | | // Useful for determining whether we’re running in production mode. |
| | | // Most importantly, it switches React into the correct mode. |
| | | NODE_ENV: process.env.NODE_ENV || 'development', |
| | | // Useful for resolving the correct path to static assets in `public`. |
| | | // For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />. |
| | | // This should only be used as an escape hatch. Normally you would put |
| | | // images into the `src` and `import` them in code to get their paths. |
| | | PUBLIC_URL: publicUrl, |
| | | } |
| | | ); |
| | | // Stringify all values so we can feed into Webpack DefinePlugin |
| | | const stringified = { |
| | | 'process.env': Object.keys(raw).reduce((env, key) => { |
| | | env[key] = JSON.stringify(raw[key]); |
| | | return env; |
| | | }, {}), |
| | | }; |
| | | |
| | | return { raw, stringified }; |
| | | } |
| | | |
| | | module.exports = getClientEnvironment; |
New file |
| | |
| | | 'use strict'; |
| | | |
| | | // This is a custom Jest transformer turning style imports into empty objects. |
| | | // http://facebook.github.io/jest/docs/en/webpack.html |
| | | |
| | | module.exports = { |
| | | process() { |
| | | return 'module.exports = {};'; |
| | | }, |
| | | getCacheKey() { |
| | | // The output is always the same. |
| | | return 'cssTransform'; |
| | | }, |
| | | }; |
New file |
| | |
| | | 'use strict'; |
| | | |
| | | const path = require('path'); |
| | | const camelcase = require('camelcase'); |
| | | |
| | | // This is a custom Jest transformer turning file imports into filenames. |
| | | // http://facebook.github.io/jest/docs/en/webpack.html |
| | | |
| | | module.exports = { |
| | | process(src, filename) { |
| | | const assetFilename = JSON.stringify(path.basename(filename)); |
| | | |
| | | if (filename.match(/\.svg$/)) { |
| | | // Based on how SVGR generates a component name: |
| | | // https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6 |
| | | const pascalCaseFileName = camelcase(path.parse(filename).name, { |
| | | pascalCase: true, |
| | | }); |
| | | const componentName = `Svg${pascalCaseFileName}`; |
| | | return `const React = require('react'); |
| | | module.exports = { |
| | | __esModule: true, |
| | | default: ${assetFilename}, |
| | | ReactComponent: React.forwardRef(function ${componentName}(props, ref) { |
| | | return { |
| | | $$typeof: Symbol.for('react.element'), |
| | | type: 'svg', |
| | | ref: ref, |
| | | key: null, |
| | | props: Object.assign({}, props, { |
| | | children: ${assetFilename} |
| | | }) |
| | | }; |
| | | }), |
| | | };`; |
| | | } |
| | | |
| | | return `module.exports = ${assetFilename};`; |
| | | }, |
| | | }; |
New file |
| | |
| | | 'use strict'; |
| | | |
| | | const fs = require('fs'); |
| | | const path = require('path'); |
| | | const paths = require('./paths'); |
| | | const chalk = require('react-dev-utils/chalk'); |
| | | const resolve = require('resolve'); |
| | | |
| | | /** |
| | | * Get the baseUrl of a compilerOptions object. |
| | | * |
| | | * @param {Object} options |
| | | */ |
| | | function getAdditionalModulePaths(options = {}) { |
| | | const baseUrl = options.baseUrl; |
| | | |
| | | // We need to explicitly check for null and undefined (and not a falsy value) because |
| | | // TypeScript treats an empty string as `.`. |
| | | if (baseUrl == null) { |
| | | // If there's no baseUrl set we respect NODE_PATH |
| | | // Note that NODE_PATH is deprecated and will be removed |
| | | // in the next major release of create-react-app. |
| | | |
| | | const nodePath = process.env.NODE_PATH || ''; |
| | | return nodePath.split(path.delimiter).filter(Boolean); |
| | | } |
| | | |
| | | const baseUrlResolved = path.resolve(paths.appPath, baseUrl); |
| | | |
| | | // We don't need to do anything if `baseUrl` is set to `node_modules`. This is |
| | | // the default behavior. |
| | | if (path.relative(paths.appNodeModules, baseUrlResolved) === '') { |
| | | return null; |
| | | } |
| | | |
| | | // Allow the user set the `baseUrl` to `appSrc`. |
| | | if (path.relative(paths.appSrc, baseUrlResolved) === '') { |
| | | return [paths.appSrc]; |
| | | } |
| | | |
| | | // Otherwise, throw an error. |
| | | throw new Error( |
| | | chalk.red.bold( |
| | | "Your project's `baseUrl` can only be set to `src` or `node_modules`." + |
| | | ' Create React App does not support other values at this time.' |
| | | ) |
| | | ); |
| | | } |
| | | |
| | | function getModules() { |
| | | // Check if TypeScript is setup |
| | | const hasTsConfig = fs.existsSync(paths.appTsConfig); |
| | | const hasJsConfig = fs.existsSync(paths.appJsConfig); |
| | | |
| | | if (hasTsConfig && hasJsConfig) { |
| | | throw new Error( |
| | | 'You have both a tsconfig.json and a jsconfig.json. If you are using TypeScript please remove your jsconfig.json file.' |
| | | ); |
| | | } |
| | | |
| | | let config; |
| | | |
| | | // If there's a tsconfig.json we assume it's a |
| | | // TypeScript project and set up the config |
| | | // based on tsconfig.json |
| | | if (hasTsConfig) { |
| | | const ts = require(resolve.sync('typescript', { |
| | | basedir: paths.appNodeModules, |
| | | })); |
| | | config = ts.readConfigFile(paths.appTsConfig, ts.sys.readFile).config; |
| | | // Otherwise we'll check if there is jsconfig.json |
| | | // for non TS projects. |
| | | } else if (hasJsConfig) { |
| | | config = require(paths.appJsConfig); |
| | | } |
| | | |
| | | config = config || {}; |
| | | const options = config.compilerOptions || {}; |
| | | |
| | | const additionalModulePaths = getAdditionalModulePaths(options); |
| | | |
| | | return { |
| | | additionalModulePaths: additionalModulePaths, |
| | | hasTsConfig, |
| | | }; |
| | | } |
| | | |
| | | module.exports = getModules(); |
New file |
| | |
| | | 'use strict'; |
| | | |
| | | const path = require('path'); |
| | | const fs = require('fs'); |
| | | const url = require('url'); |
| | | |
| | | // Make sure any symlinks in the project folder are resolved: |
| | | // https://github.com/facebook/create-react-app/issues/637 |
| | | const appDirectory = fs.realpathSync(process.cwd()); |
| | | const resolveApp = relativePath => path.resolve(appDirectory, relativePath); |
| | | |
| | | const envPublicUrl = process.env.PUBLIC_URL; |
| | | |
| | | function ensureSlash(inputPath, needsSlash) { |
| | | const hasSlash = inputPath.endsWith('/'); |
| | | if (hasSlash && !needsSlash) { |
| | | return inputPath.substr(0, inputPath.length - 1); |
| | | } else if (!hasSlash && needsSlash) { |
| | | return `${inputPath}/`; |
| | | } else { |
| | | return inputPath; |
| | | } |
| | | } |
| | | |
| | | const getPublicUrl = appPackageJson => |
| | | envPublicUrl || require(appPackageJson).homepage; |
| | | |
| | | // We use `PUBLIC_URL` environment variable or "homepage" field to infer |
| | | // "public path" at which the app is served. |
| | | // Webpack needs to know it to put the right <script> hrefs into HTML even in |
| | | // single-page apps that may serve index.html for nested URLs like /todos/42. |
| | | // We can't use a relative path in HTML because we don't want to load something |
| | | // like /todos/42/static/js/bundle.7289d.js. We have to know the root. |
| | | function getServedPath(appPackageJson) { |
| | | const publicUrl = getPublicUrl(appPackageJson); |
| | | const servedUrl = |
| | | envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/'); |
| | | return ensureSlash(servedUrl, true); |
| | | } |
| | | |
| | | const moduleFileExtensions = [ |
| | | 'web.mjs', |
| | | 'mjs', |
| | | 'web.js', |
| | | 'js', |
| | | 'web.ts', |
| | | 'ts', |
| | | 'web.tsx', |
| | | 'tsx', |
| | | 'json', |
| | | 'web.jsx', |
| | | 'jsx', |
| | | ]; |
| | | |
| | | // Resolve file paths in the same order as webpack |
| | | const resolveModule = (resolveFn, filePath) => { |
| | | const extension = moduleFileExtensions.find(extension => |
| | | fs.existsSync(resolveFn(`${filePath}.${extension}`)) |
| | | ); |
| | | |
| | | if (extension) { |
| | | return resolveFn(`${filePath}.${extension}`); |
| | | } |
| | | |
| | | return resolveFn(`${filePath}.js`); |
| | | }; |
| | | |
| | | // config after eject: we're in ./config/ |
| | | module.exports = { |
| | | dotenv: resolveApp('.env'), |
| | | appPath: resolveApp('.'), |
| | | appBuild: resolveApp('build'), |
| | | appPublic: resolveApp('public'), |
| | | appHtml: resolveApp('public/index.html'), |
| | | appIndexJs: resolveModule(resolveApp, 'src/index'), |
| | | appPackageJson: resolveApp('package.json'), |
| | | appSrc: resolveApp('src'), |
| | | appTsConfig: resolveApp('tsconfig.json'), |
| | | appJsConfig: resolveApp('jsconfig.json'), |
| | | yarnLockFile: resolveApp('yarn.lock'), |
| | | testsSetup: resolveModule(resolveApp, 'src/setupTests'), |
| | | proxySetup: resolveApp('src/setupProxy.js'), |
| | | appNodeModules: resolveApp('node_modules'), |
| | | publicUrl: getPublicUrl(resolveApp('package.json')), |
| | | servedPath: getServedPath(resolveApp('package.json')), |
| | | }; |
| | | |
| | | |
| | | |
| | | module.exports.moduleFileExtensions = moduleFileExtensions; |
New file |
| | |
| | | 'use strict'; |
| | | |
| | | const { resolveModuleName } = require('ts-pnp'); |
| | | |
| | | exports.resolveModuleName = ( |
| | | typescript, |
| | | moduleName, |
| | | containingFile, |
| | | compilerOptions, |
| | | resolutionHost |
| | | ) => { |
| | | return resolveModuleName( |
| | | moduleName, |
| | | containingFile, |
| | | compilerOptions, |
| | | resolutionHost, |
| | | typescript.resolveModuleName |
| | | ); |
| | | }; |
| | | |
| | | exports.resolveTypeReferenceDirective = ( |
| | | typescript, |
| | | moduleName, |
| | | containingFile, |
| | | compilerOptions, |
| | | resolutionHost |
| | | ) => { |
| | | return resolveModuleName( |
| | | moduleName, |
| | | containingFile, |
| | | compilerOptions, |
| | | resolutionHost, |
| | | typescript.resolveTypeReferenceDirective |
| | | ); |
| | | }; |
New file |
| | |
| | | 'use strict'; |
| | | |
| | | const fs = require('fs'); |
| | | const isWsl = require('is-wsl'); |
| | | const path = require('path'); |
| | | const webpack = require('webpack'); |
| | | const resolve = require('resolve'); |
| | | const PnpWebpackPlugin = require('pnp-webpack-plugin'); |
| | | const HtmlWebpackPlugin = require('html-webpack-plugin'); |
| | | const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); |
| | | const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin'); |
| | | const TerserPlugin = require('terser-webpack-plugin'); |
| | | const MiniCssExtractPlugin = require('mini-css-extract-plugin'); |
| | | const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); |
| | | const safePostCssParser = require('postcss-safe-parser'); |
| | | const ManifestPlugin = require('webpack-manifest-plugin'); |
| | | const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); |
| | | const WorkboxWebpackPlugin = require('workbox-webpack-plugin'); |
| | | const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); |
| | | const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); |
| | | const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent'); |
| | | const paths = require('./paths'); |
| | | const modules = require('./modules'); |
| | | const getClientEnvironment = require('./env'); |
| | | const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin'); |
| | | const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin'); |
| | | const typescriptFormatter = require('react-dev-utils/typescriptFormatter'); |
| | | const eslint = require('eslint'); |
| | | |
| | | const postcssNormalize = require('postcss-normalize'); |
| | | |
| | | const appPackageJson = require(paths.appPackageJson); |
| | | |
| | | // Source maps are resource heavy and can cause out of memory issue for large source files. |
| | | const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false'; |
| | | // Some apps do not need the benefits of saving a web request, so not inlining the chunk |
| | | // makes for a smoother build process. |
| | | const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false'; |
| | | |
| | | const imageInlineSizeLimit = parseInt( |
| | | process.env.IMAGE_INLINE_SIZE_LIMIT || '10000' |
| | | ); |
| | | |
| | | // Check if TypeScript is setup |
| | | const useTypeScript = fs.existsSync(paths.appTsConfig); |
| | | |
| | | // style files regexes |
| | | const cssRegex = /\.css$/; |
| | | const cssModuleRegex = /\.module\.css$/; |
| | | const sassRegex = /\.(scss|sass)$/; |
| | | const sassModuleRegex = /\.module\.(scss|sass)$/; |
| | | |
| | | // src => @ |
| | | function resolves(dir) { |
| | | return path.join(__dirname, '..', dir) |
| | | } |
| | | // This is the production and development configuration. |
| | | // It is focused on developer experience, fast rebuilds, and a minimal bundle. |
| | | module.exports = function(webpackEnv) { |
| | | const isEnvDevelopment = webpackEnv === 'development'; |
| | | const isEnvProduction = webpackEnv === 'production'; |
| | | |
| | | // Webpack uses `publicPath` to determine where the app is being served from. |
| | | // It requires a trailing slash, or the file assets will get an incorrect path. |
| | | // In development, we always serve from the root. This makes config easier. |
| | | const publicPath = isEnvProduction |
| | | ? paths.servedPath |
| | | : isEnvDevelopment && '/'; |
| | | // Some apps do not use client-side routing with pushState. |
| | | // For these, "homepage" can be set to "." to enable relative asset paths. |
| | | const shouldUseRelativeAssetPaths = publicPath === './'; |
| | | |
| | | // `publicUrl` is just like `publicPath`, but 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 = isEnvProduction |
| | | ? publicPath.slice(0, -1) |
| | | : isEnvDevelopment && ''; |
| | | // Get environment variables to inject into our app. |
| | | const env = getClientEnvironment(publicUrl); |
| | | |
| | | // common function to get style loaders |
| | | const getStyleLoaders = (cssOptions, preProcessor) => { |
| | | const loaders = [ |
| | | isEnvDevelopment && require.resolve('style-loader'), |
| | | isEnvProduction && { |
| | | loader: MiniCssExtractPlugin.loader, |
| | | options: shouldUseRelativeAssetPaths ? { publicPath: '../../' } : {}, |
| | | }, |
| | | { |
| | | loader: require.resolve('css-loader'), |
| | | options: cssOptions, |
| | | }, |
| | | { |
| | | // Options for PostCSS as we reference these options twice |
| | | // Adds vendor prefixing based on your specified browser support in |
| | | // package.json |
| | | loader: require.resolve('postcss-loader'), |
| | | options: { |
| | | // Necessary for external CSS imports to work |
| | | // https://github.com/facebook/create-react-app/issues/2677 |
| | | ident: 'postcss', |
| | | plugins: () => [ |
| | | require('postcss-flexbugs-fixes'), |
| | | require('postcss-preset-env')({ |
| | | autoprefixer: { |
| | | flexbox: 'no-2009', |
| | | }, |
| | | stage: 3, |
| | | }), |
| | | // Adds PostCSS Normalize as the reset css with default options, |
| | | // so that it honors browserslist config in package.json |
| | | // which in turn let's users customize the target behavior as per their needs. |
| | | postcssNormalize(), |
| | | ], |
| | | sourceMap: isEnvProduction && shouldUseSourceMap, |
| | | }, |
| | | }, |
| | | ].filter(Boolean); |
| | | if (preProcessor) { |
| | | loaders.push( |
| | | { |
| | | loader: require.resolve('resolve-url-loader'), |
| | | options: { |
| | | sourceMap: isEnvProduction && shouldUseSourceMap, |
| | | }, |
| | | }, |
| | | { |
| | | loader: require.resolve(preProcessor), |
| | | options: { |
| | | sourceMap: true, |
| | | }, |
| | | } |
| | | ); |
| | | } |
| | | return loaders; |
| | | }; |
| | | |
| | | return { |
| | | mode: isEnvProduction ? 'production' : isEnvDevelopment && 'development', |
| | | // Stop compilation early in production |
| | | bail: isEnvProduction, |
| | | devtool: isEnvProduction |
| | | ? shouldUseSourceMap |
| | | ? 'source-map' |
| | | : false |
| | | : isEnvDevelopment && 'cheap-module-source-map', |
| | | // These are the "entry points" to our application. |
| | | // This means they will be the "root" imports that are included in JS bundle. |
| | | entry: [ |
| | | // Include an alternative client for WebpackDevServer. A client's job is to |
| | | // connect to WebpackDevServer by a socket and get notified about changes. |
| | | // When you save a file, the client will either apply hot updates (in case |
| | | // of CSS changes), or refresh the page (in case of JS changes). When you |
| | | // make a syntax error, this client will display a syntax error overlay. |
| | | // Note: instead of the default WebpackDevServer client, we use a custom one |
| | | // to bring better experience for Create React App users. You can replace |
| | | // the line below with these two lines if you prefer the stock client: |
| | | // require.resolve('webpack-dev-server/client') + '?/', |
| | | // require.resolve('webpack/hot/dev-server'), |
| | | isEnvDevelopment && |
| | | require.resolve('react-dev-utils/webpackHotDevClient'), |
| | | // Finally, this is your app's code: |
| | | paths.appIndexJs, |
| | | // We include the app code last so that if there is a runtime error during |
| | | // initialization, it doesn't blow up the WebpackDevServer client, and |
| | | // changing JS code would still trigger a refresh. |
| | | ].filter(Boolean), |
| | | output: { |
| | | // The build folder. |
| | | path: isEnvProduction ? paths.appBuild : undefined, |
| | | // Add /* filename */ comments to generated require()s in the output. |
| | | pathinfo: isEnvDevelopment, |
| | | // There will be one main bundle, and one file per asynchronous chunk. |
| | | // In development, it does not produce real files. |
| | | filename: isEnvProduction |
| | | ? 'static/js/[name].[contenthash:8].js' |
| | | : isEnvDevelopment && 'static/js/bundle.js', |
| | | // TODO: remove this when upgrading to webpack 5 |
| | | futureEmitAssets: true, |
| | | // There are also additional JS chunk files if you use code splitting. |
| | | chunkFilename: isEnvProduction |
| | | ? 'static/js/[name].[contenthash:8].chunk.js' |
| | | : isEnvDevelopment && 'static/js/[name].chunk.js', |
| | | // We inferred the "public path" (such as / or /my-project) from homepage. |
| | | // We use "/" in development. |
| | | publicPath: publicPath, |
| | | // Point sourcemap entries to original disk location (format as URL on Windows) |
| | | devtoolModuleFilenameTemplate: isEnvProduction |
| | | ? info => |
| | | path |
| | | .relative(paths.appSrc, info.absoluteResourcePath) |
| | | .replace(/\\/g, '/') |
| | | : isEnvDevelopment && |
| | | (info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')), |
| | | // Prevents conflicts when multiple Webpack runtimes (from different apps) |
| | | // are used on the same page. |
| | | jsonpFunction: `webpackJsonp${appPackageJson.name}`, |
| | | }, |
| | | optimization: { |
| | | minimize: isEnvProduction, |
| | | minimizer: [ |
| | | // This is only used in production mode |
| | | new TerserPlugin({ |
| | | terserOptions: { |
| | | parse: { |
| | | // We want terser to parse ecma 8 code. However, we don't want it |
| | | // to apply any minification steps that turns valid ecma 5 code |
| | | // into invalid ecma 5 code. This is why the 'compress' and 'output' |
| | | // sections only apply transformations that are ecma 5 safe |
| | | // https://github.com/facebook/create-react-app/pull/4234 |
| | | ecma: 8, |
| | | }, |
| | | compress: { |
| | | ecma: 5, |
| | | warnings: false, |
| | | // Disabled because of an issue with Uglify breaking seemingly valid code: |
| | | // https://github.com/facebook/create-react-app/issues/2376 |
| | | // Pending further investigation: |
| | | // https://github.com/mishoo/UglifyJS2/issues/2011 |
| | | comparisons: false, |
| | | // Disabled because of an issue with Terser breaking valid code: |
| | | // https://github.com/facebook/create-react-app/issues/5250 |
| | | // Pending further investigation: |
| | | // https://github.com/terser-js/terser/issues/120 |
| | | inline: 2, |
| | | }, |
| | | mangle: { |
| | | safari10: true, |
| | | }, |
| | | output: { |
| | | ecma: 5, |
| | | comments: false, |
| | | // Turned on because emoji and regex is not minified properly using default |
| | | // https://github.com/facebook/create-react-app/issues/2488 |
| | | ascii_only: true, |
| | | }, |
| | | }, |
| | | // Use multi-process parallel running to improve the build speed |
| | | // Default number of concurrent runs: os.cpus().length - 1 |
| | | // Disabled on WSL (Windows Subsystem for Linux) due to an issue with Terser |
| | | // https://github.com/webpack-contrib/terser-webpack-plugin/issues/21 |
| | | parallel: !isWsl, |
| | | // Enable file caching |
| | | cache: true, |
| | | sourceMap: shouldUseSourceMap, |
| | | }), |
| | | // This is only used in production mode |
| | | new OptimizeCSSAssetsPlugin({ |
| | | cssProcessorOptions: { |
| | | parser: safePostCssParser, |
| | | map: shouldUseSourceMap |
| | | ? { |
| | | // `inline: false` forces the sourcemap to be output into a |
| | | // separate file |
| | | inline: false, |
| | | // `annotation: true` appends the sourceMappingURL to the end of |
| | | // the css file, helping the browser find the sourcemap |
| | | annotation: true, |
| | | } |
| | | : false, |
| | | }, |
| | | }), |
| | | ], |
| | | // Automatically split vendor and commons |
| | | // https://twitter.com/wSokra/status/969633336732905474 |
| | | // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366 |
| | | splitChunks: { |
| | | chunks: 'all', |
| | | name: false, |
| | | }, |
| | | // Keep the runtime chunk separated to enable long term caching |
| | | // https://twitter.com/wSokra/status/969679223278505985 |
| | | runtimeChunk: true, |
| | | }, |
| | | resolve: { |
| | | // This allows you to set a fallback for where Webpack should look for modules. |
| | | // We placed these paths second because we want `node_modules` to "win" |
| | | // if there are any conflicts. This matches Node resolution mechanism. |
| | | // https://github.com/facebook/create-react-app/issues/253 |
| | | modules: ['node_modules', paths.appNodeModules].concat( |
| | | modules.additionalModulePaths || [] |
| | | ), |
| | | // These are the reasonable defaults supported by the Node ecosystem. |
| | | // We also include JSX as a common component filename extension to support |
| | | // some tools, although we do not recommend using it, see: |
| | | // https://github.com/facebook/create-react-app/issues/290 |
| | | // `web` extension prefixes have been added for better support |
| | | // for React Native Web. |
| | | extensions: paths.moduleFileExtensions |
| | | .map(ext => `.${ext}`) |
| | | .filter(ext => useTypeScript || !ext.includes('ts')), |
| | | 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', |
| | | '@': resolves('src') |
| | | }, |
| | | plugins: [ |
| | | // Adds support for installing with Plug'n'Play, leading to faster installs and adding |
| | | // guards against forgotten dependencies and such. |
| | | PnpWebpackPlugin, |
| | | // Prevents users from importing files from outside of src/ (or node_modules/). |
| | | // This often causes confusion because we only process files within src/ with babel. |
| | | // To fix this, we prevent you from importing files out of src/ -- if you'd like to, |
| | | // please link the files into your node_modules/ and let module-resolution kick in. |
| | | // Make sure your source files are compiled, as they will not be processed in any way. |
| | | new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]), |
| | | ], |
| | | }, |
| | | resolveLoader: { |
| | | plugins: [ |
| | | // Also related to Plug'n'Play, but this time it tells Webpack to load its loaders |
| | | // from the current package. |
| | | PnpWebpackPlugin.moduleLoader(module), |
| | | ], |
| | | }, |
| | | module: { |
| | | strictExportPresence: true, |
| | | rules: [ |
| | | // Disable require.ensure as it's not a standard language feature. |
| | | { parser: { requireEnsure: false } }, |
| | | |
| | | // First, run the linter. |
| | | // It's important to do this before Babel processes the JS. |
| | | { |
| | | test: /\.(js|mjs|jsx|ts|tsx)$/, |
| | | enforce: 'pre', |
| | | use: [ |
| | | { |
| | | options: { |
| | | formatter: require.resolve('react-dev-utils/eslintFormatter'), |
| | | eslintPath: require.resolve('eslint'), |
| | | resolvePluginsRelativeTo: __dirname, |
| | | |
| | | }, |
| | | loader: require.resolve('eslint-loader'), |
| | | }, |
| | | ], |
| | | include: paths.appSrc, |
| | | }, |
| | | { |
| | | // "oneOf" will traverse all following loaders until one will |
| | | // match the requirements. When no loader matches it will fall |
| | | // back to the "file" loader at the end of the loader list. |
| | | oneOf: [ |
| | | // "url" loader works like "file" loader except that it embeds assets |
| | | // smaller than specified limit in bytes as data URLs to avoid requests. |
| | | // A missing `test` is equivalent to a match. |
| | | { |
| | | test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/], |
| | | loader: require.resolve('url-loader'), |
| | | options: { |
| | | limit: imageInlineSizeLimit, |
| | | name: 'static/media/[name].[hash:8].[ext]', |
| | | }, |
| | | }, |
| | | // Process application JS with Babel. |
| | | // The preset includes JSX, Flow, TypeScript, and some ESnext features. |
| | | { |
| | | test: /\.(js|mjs|jsx|ts|tsx)$/, |
| | | include: paths.appSrc, |
| | | loader: require.resolve('babel-loader'), |
| | | options: { |
| | | customize: require.resolve( |
| | | 'babel-preset-react-app/webpack-overrides' |
| | | ), |
| | | |
| | | plugins: [ |
| | | [ |
| | | require.resolve('babel-plugin-named-asset-import'), |
| | | { |
| | | loaderMap: { |
| | | svg: { |
| | | ReactComponent: |
| | | '@svgr/webpack?-svgo,+titleProp,+ref![path]', |
| | | }, |
| | | }, |
| | | }, |
| | | ], |
| | | ], |
| | | // This is a feature of `babel-loader` for webpack (not Babel itself). |
| | | // It enables caching results in ./node_modules/.cache/babel-loader/ |
| | | // directory for faster rebuilds. |
| | | cacheDirectory: true, |
| | | cacheCompression: isEnvProduction, |
| | | compact: isEnvProduction, |
| | | }, |
| | | }, |
| | | // Process any JS outside of the app with Babel. |
| | | // Unlike the application JS, we only compile the standard ES features. |
| | | { |
| | | test: /\.(js|mjs)$/, |
| | | exclude: /@babel(?:\/|\\{1,2})runtime/, |
| | | loader: require.resolve('babel-loader'), |
| | | options: { |
| | | babelrc: false, |
| | | configFile: false, |
| | | compact: false, |
| | | presets: [ |
| | | [ |
| | | require.resolve('babel-preset-react-app/dependencies'), |
| | | { helpers: true }, |
| | | ], |
| | | ], |
| | | cacheDirectory: true, |
| | | cacheCompression: isEnvProduction, |
| | | |
| | | // If an error happens in a package, it's possible to be |
| | | // because it was compiled. Thus, we don't want the browser |
| | | // debugger to show the original code. Instead, the code |
| | | // being evaluated would be much more helpful. |
| | | sourceMaps: false, |
| | | }, |
| | | }, |
| | | // "postcss" loader applies autoprefixer to our CSS. |
| | | // "css" loader resolves paths in CSS and adds assets as dependencies. |
| | | // "style" loader turns CSS into JS modules that inject <style> tags. |
| | | // In production, we use MiniCSSExtractPlugin to extract that CSS |
| | | // to a file, but in development "style" loader enables hot editing |
| | | // of CSS. |
| | | // By default we support CSS Modules with the extension .module.css |
| | | { |
| | | test: cssRegex, |
| | | exclude: cssModuleRegex, |
| | | use: getStyleLoaders({ |
| | | importLoaders: 1, |
| | | sourceMap: isEnvProduction && shouldUseSourceMap, |
| | | }), |
| | | // Don't consider CSS imports dead code even if the |
| | | // containing package claims to have no side effects. |
| | | // Remove this when webpack adds a warning or an error for this. |
| | | // See https://github.com/webpack/webpack/issues/6571 |
| | | sideEffects: true, |
| | | }, |
| | | // Adds support for CSS Modules (https://github.com/css-modules/css-modules) |
| | | // using the extension .module.css |
| | | { |
| | | test: cssModuleRegex, |
| | | use: getStyleLoaders({ |
| | | importLoaders: 1, |
| | | sourceMap: isEnvProduction && shouldUseSourceMap, |
| | | modules: true, |
| | | getLocalIdent: getCSSModuleLocalIdent, |
| | | }), |
| | | }, |
| | | // Opt-in support for SASS (using .scss or .sass extensions). |
| | | // By default we support SASS Modules with the |
| | | // extensions .module.scss or .module.sass |
| | | { |
| | | test: sassRegex, |
| | | exclude: sassModuleRegex, |
| | | use: getStyleLoaders( |
| | | { |
| | | importLoaders: 2, |
| | | sourceMap: isEnvProduction && shouldUseSourceMap, |
| | | }, |
| | | 'sass-loader' |
| | | ), |
| | | // Don't consider CSS imports dead code even if the |
| | | // containing package claims to have no side effects. |
| | | // Remove this when webpack adds a warning or an error for this. |
| | | // See https://github.com/webpack/webpack/issues/6571 |
| | | sideEffects: true, |
| | | }, |
| | | // Adds support for CSS Modules, but using SASS |
| | | // using the extension .module.scss or .module.sass |
| | | { |
| | | test: sassModuleRegex, |
| | | use: getStyleLoaders( |
| | | { |
| | | importLoaders: 2, |
| | | sourceMap: isEnvProduction && shouldUseSourceMap, |
| | | modules: true, |
| | | getLocalIdent: getCSSModuleLocalIdent, |
| | | }, |
| | | 'sass-loader' |
| | | ), |
| | | }, |
| | | // "file" loader makes sure those assets get served by WebpackDevServer. |
| | | // When you `import` an asset, you get its (virtual) filename. |
| | | // In production, they would get copied to the `build` folder. |
| | | // This loader doesn't use a "test" so it will catch all modules |
| | | // that fall through the other loaders. |
| | | { |
| | | loader: require.resolve('file-loader'), |
| | | // Exclude `js` files to keep "css" loader working as it injects |
| | | // its runtime that would otherwise be processed through "file" loader. |
| | | // Also exclude `html` and `json` extensions so they get processed |
| | | // by webpacks internal loaders. |
| | | exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/], |
| | | options: { |
| | | name: 'static/media/[name].[hash:8].[ext]', |
| | | }, |
| | | }, |
| | | // ** STOP ** Are you adding a new loader? |
| | | // Make sure to add the new loader(s) before the "file" loader. |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | plugins: [ |
| | | // Generates an `index.html` file with the <script> injected. |
| | | new HtmlWebpackPlugin( |
| | | Object.assign( |
| | | {}, |
| | | { |
| | | inject: true, |
| | | template: paths.appHtml, |
| | | }, |
| | | isEnvProduction |
| | | ? { |
| | | minify: { |
| | | removeComments: true, |
| | | collapseWhitespace: true, |
| | | removeRedundantAttributes: true, |
| | | useShortDoctype: true, |
| | | removeEmptyAttributes: true, |
| | | removeStyleLinkTypeAttributes: true, |
| | | keepClosingSlash: true, |
| | | minifyJS: true, |
| | | minifyCSS: true, |
| | | minifyURLs: true, |
| | | }, |
| | | } |
| | | : undefined |
| | | ) |
| | | ), |
| | | // Inlines the webpack runtime script. This script is too small to warrant |
| | | // a network request. |
| | | isEnvProduction && |
| | | shouldInlineRuntimeChunk && |
| | | new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]), |
| | | // Makes some environment variables available in index.html. |
| | | // The public URL is available as %PUBLIC_URL% in index.html, e.g.: |
| | | // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> |
| | | // In production, it will be an empty string unless you specify "homepage" |
| | | // in `package.json`, in which case it will be the pathname of that URL. |
| | | // In development, this will be an empty string. |
| | | new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw), |
| | | // This gives some necessary context to module not found errors, such as |
| | | // the requesting resource. |
| | | new ModuleNotFoundPlugin(paths.appPath), |
| | | // Makes some environment variables available to the JS code, for example: |
| | | // if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`. |
| | | // It is absolutely essential that NODE_ENV is set to production |
| | | // during a production build. |
| | | // Otherwise React will be compiled in the very slow development mode. |
| | | new webpack.DefinePlugin(env.stringified), |
| | | // This is necessary to emit hot updates (currently CSS only): |
| | | isEnvDevelopment && new webpack.HotModuleReplacementPlugin(), |
| | | // Watcher doesn't work well if you mistype casing in a path so we use |
| | | // a plugin that prints an error when you attempt to do this. |
| | | // See https://github.com/facebook/create-react-app/issues/240 |
| | | isEnvDevelopment && new CaseSensitivePathsPlugin(), |
| | | // If you require a missing module and then `npm install` it, you still have |
| | | // to restart the development server for Webpack to discover it. This plugin |
| | | // makes the discovery automatic so you don't have to restart. |
| | | // See https://github.com/facebook/create-react-app/issues/186 |
| | | isEnvDevelopment && |
| | | new WatchMissingNodeModulesPlugin(paths.appNodeModules), |
| | | isEnvProduction && |
| | | new MiniCssExtractPlugin({ |
| | | // Options similar to the same options in webpackOptions.output |
| | | // both options are optional |
| | | filename: 'static/css/[name].[contenthash:8].css', |
| | | chunkFilename: 'static/css/[name].[contenthash:8].chunk.css', |
| | | }), |
| | | // Generate a manifest file which contains a mapping of all asset filenames |
| | | // to their corresponding output file so that tools can pick it up without |
| | | // having to parse `index.html`. |
| | | new ManifestPlugin({ |
| | | fileName: 'asset-manifest.json', |
| | | publicPath: publicPath, |
| | | generate: (seed, files) => { |
| | | const manifestFiles = files.reduce(function(manifest, file) { |
| | | manifest[file.name] = file.path; |
| | | return manifest; |
| | | }, seed); |
| | | |
| | | return { |
| | | files: manifestFiles, |
| | | }; |
| | | }, |
| | | }), |
| | | // Moment.js is an extremely popular library that bundles large locale files |
| | | // by default due to how Webpack interprets its code. This is a practical |
| | | // solution that requires the user to opt into importing specific locales. |
| | | // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack |
| | | // You can remove this if you don't use Moment.js: |
| | | new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), |
| | | // Generate a service worker script that will precache, and keep up to date, |
| | | // the HTML & assets that are part of the Webpack build. |
| | | isEnvProduction && |
| | | new WorkboxWebpackPlugin.GenerateSW({ |
| | | clientsClaim: true, |
| | | exclude: [/\.map$/, /asset-manifest\.json$/], |
| | | importWorkboxFrom: 'cdn', |
| | | navigateFallback: publicUrl + '/index.html', |
| | | navigateFallbackBlacklist: [ |
| | | // Exclude URLs starting with /_, as they're likely an API call |
| | | new RegExp('^/_'), |
| | | // Exclude any URLs whose last part seems to be a file extension |
| | | // as they're likely a resource and not a SPA route. |
| | | // URLs containing a "?" character won't be blacklisted as they're likely |
| | | // a route with query params (e.g. auth callbacks). |
| | | new RegExp('/[^/?]+\\.[^/]+$'), |
| | | ], |
| | | }), |
| | | // TypeScript type checking |
| | | useTypeScript && |
| | | new ForkTsCheckerWebpackPlugin({ |
| | | typescript: resolve.sync('typescript', { |
| | | basedir: paths.appNodeModules, |
| | | }), |
| | | async: isEnvDevelopment, |
| | | useTypescriptIncrementalApi: true, |
| | | checkSyntacticErrors: true, |
| | | resolveModuleNameModule: process.versions.pnp |
| | | ? `${__dirname}/pnpTs.js` |
| | | : undefined, |
| | | resolveTypeReferenceDirectiveModule: process.versions.pnp |
| | | ? `${__dirname}/pnpTs.js` |
| | | : undefined, |
| | | tsconfig: paths.appTsConfig, |
| | | reportFiles: [ |
| | | '**', |
| | | '!**/__tests__/**', |
| | | '!**/?(*.)(spec|test).*', |
| | | '!**/src/setupProxy.*', |
| | | '!**/src/setupTests.*', |
| | | ], |
| | | watch: paths.appSrc, |
| | | silent: true, |
| | | // The formatter is invoked directly in WebpackDevServerUtils during development |
| | | formatter: isEnvProduction ? typescriptFormatter : undefined, |
| | | }), |
| | | ].filter(Boolean), |
| | | // Some libraries import Node modules but don't use them in the browser. |
| | | // Tell Webpack to provide empty mocks for them so importing them works. |
| | | node: { |
| | | module: 'empty', |
| | | dgram: 'empty', |
| | | dns: 'mock', |
| | | fs: 'empty', |
| | | http2: 'empty', |
| | | net: 'empty', |
| | | tls: 'empty', |
| | | child_process: 'empty', |
| | | }, |
| | | // Turn off performance processing because we utilize |
| | | // our own hints via the FileSizeReporter |
| | | performance: false, |
| | | }; |
| | | }; |
New file |
| | |
| | | 'use strict'; |
| | | |
| | | const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware'); |
| | | const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware'); |
| | | const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware'); |
| | | const ignoredFiles = require('react-dev-utils/ignoredFiles'); |
| | | const paths = require('./paths'); |
| | | const fs = require('fs'); |
| | | |
| | | const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; |
| | | const host = process.env.HOST || '0.0.0.0'; |
| | | |
| | | module.exports = function(proxy, allowedHost) { |
| | | return { |
| | | // WebpackDevServer 2.4.3 introduced a security fix that prevents remote |
| | | // websites from potentially accessing local content through DNS rebinding: |
| | | // https://github.com/webpack/webpack-dev-server/issues/887 |
| | | // https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a |
| | | // However, it made several existing use cases such as development in cloud |
| | | // environment or subdomains in development significantly more complicated: |
| | | // https://github.com/facebook/create-react-app/issues/2271 |
| | | // https://github.com/facebook/create-react-app/issues/2233 |
| | | // While we're investigating better solutions, for now we will take a |
| | | // compromise. Since our WDS configuration only serves files in the `public` |
| | | // folder we won't consider accessing them a vulnerability. However, if you |
| | | // use the `proxy` feature, it gets more dangerous because it can expose |
| | | // remote code execution vulnerabilities in backends like Django and Rails. |
| | | // So we will disable the host check normally, but enable it if you have |
| | | // specified the `proxy` setting. Finally, we let you override it if you |
| | | // really know what you're doing with a special environment variable. |
| | | disableHostCheck: |
| | | !proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true', |
| | | // Enable gzip compression of generated files. |
| | | compress: true, |
| | | // Silence WebpackDevServer's own logs since they're generally not useful. |
| | | // It will still show compile warnings and errors with this setting. |
| | | clientLogLevel: 'none', |
| | | // By default WebpackDevServer serves physical files from current directory |
| | | // in addition to all the virtual build products that it serves from memory. |
| | | // This is confusing because those files won’t automatically be available in |
| | | // production build folder unless we copy them. However, copying the whole |
| | | // project directory is dangerous because we may expose sensitive files. |
| | | // Instead, we establish a convention that only files in `public` directory |
| | | // get served. Our build script will copy `public` into the `build` folder. |
| | | // In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%: |
| | | // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> |
| | | // In JavaScript code, you can access it with `process.env.PUBLIC_URL`. |
| | | // Note that we only recommend to use `public` folder as an escape hatch |
| | | // for files like `favicon.ico`, `manifest.json`, and libraries that are |
| | | // for some reason broken when imported through Webpack. If you just want to |
| | | // use an image, put it in `src` and `import` it from JavaScript instead. |
| | | contentBase: paths.appPublic, |
| | | // By default files from `contentBase` will not trigger a page reload. |
| | | watchContentBase: true, |
| | | // Enable hot reloading server. It will provide /sockjs-node/ endpoint |
| | | // for the WebpackDevServer client so it can learn when the files were |
| | | // updated. The WebpackDevServer client is included as an entry point |
| | | // in the Webpack development configuration. Note that only changes |
| | | // to CSS are currently hot reloaded. JS changes will refresh the browser. |
| | | hot: true, |
| | | // It is important to tell WebpackDevServer to use the same "root" path |
| | | // as we specified in the config. In development, we always serve from /. |
| | | publicPath: '/', |
| | | // WebpackDevServer is noisy by default so we emit custom message instead |
| | | // by listening to the compiler events with `compiler.hooks[...].tap` calls above. |
| | | quiet: true, |
| | | // Reportedly, this avoids CPU overload on some systems. |
| | | // https://github.com/facebook/create-react-app/issues/293 |
| | | // src/node_modules is not ignored to support absolute imports |
| | | // https://github.com/facebook/create-react-app/issues/1065 |
| | | watchOptions: { |
| | | ignored: ignoredFiles(paths.appSrc), |
| | | }, |
| | | // Enable HTTPS if the HTTPS environment variable is set to 'true' |
| | | https: protocol === 'https', |
| | | host, |
| | | overlay: false, |
| | | historyApiFallback: { |
| | | // Paths with dots should still use the history fallback. |
| | | // See https://github.com/facebook/create-react-app/issues/387. |
| | | disableDotRule: true, |
| | | }, |
| | | public: allowedHost, |
| | | proxy, |
| | | before(app, server) { |
| | | if (fs.existsSync(paths.proxySetup)) { |
| | | // This registers user provided middleware for proxy reasons |
| | | require(paths.proxySetup)(app); |
| | | } |
| | | |
| | | // This lets us fetch source contents from webpack for the error overlay |
| | | app.use(evalSourceMapMiddleware(server)); |
| | | // This lets us open files from the runtime error overlay. |
| | | app.use(errorOverlayMiddleware()); |
| | | |
| | | // This service worker file is effectively a 'no-op' that will reset any |
| | | // previous service worker registered for the same host:port combination. |
| | | // We do this in development to avoid hitting the production cache if |
| | | // it used the same host and port. |
| | | // https://github.com/facebook/create-react-app/issues/2272#issuecomment-302832432 |
| | | app.use(noopServiceWorkerMiddleware()); |
| | | }, |
| | | }; |
| | | }; |
| | |
| | | "version": "0.1.0", |
| | | "private": true, |
| | | "dependencies": { |
| | | "@babel/core": "7.5.5", |
| | | "@svgr/webpack": "4.3.2", |
| | | "@typescript-eslint/eslint-plugin": "1.13.0", |
| | | "@typescript-eslint/parser": "1.13.0", |
| | | "antd": "^3.23.2", |
| | | "axios": "^0.19.0", |
| | | "babel-eslint": "10.0.2", |
| | | "babel-jest": "^24.8.0", |
| | | "babel-loader": "8.0.6", |
| | | "babel-plugin-named-asset-import": "^0.3.3", |
| | | "babel-preset-react-app": "9.0.0", |
| | | "camelcase": "^5.2.0", |
| | | "case-sensitive-paths-webpack-plugin": "2.2.0", |
| | | "css-loader": "2.1.1", |
| | | "dotenv": "6.2.0", |
| | | "dotenv-expand": "4.2.0", |
| | | "eslint": "^6.1.0", |
| | | "eslint-config-react-app": "^5.0.1", |
| | | "eslint-loader": "2.2.1", |
| | | "eslint-plugin-flowtype": "3.13.0", |
| | | "eslint-plugin-import": "2.18.2", |
| | | "eslint-plugin-jsx-a11y": "6.2.3", |
| | | "eslint-plugin-react": "7.14.3", |
| | | "eslint-plugin-react-hooks": "^1.6.1", |
| | | "file-loader": "3.0.1", |
| | | "fs-extra": "7.0.1", |
| | | "html-webpack-plugin": "4.0.0-beta.5", |
| | | "identity-obj-proxy": "3.0.0", |
| | | "immutable": "^4.0.0-rc.12", |
| | | "is-wsl": "^1.1.0", |
| | | "jest": "24.8.0", |
| | | "jest-environment-jsdom-fourteen": "0.1.0", |
| | | "jest-resolve": "24.8.0", |
| | | "jest-watch-typeahead": "0.3.1", |
| | | "mini-css-extract-plugin": "0.5.0", |
| | | "node-sass": "^4.12.0", |
| | | "optimize-css-assets-webpack-plugin": "5.0.3", |
| | | "pnp-webpack-plugin": "1.5.0", |
| | | "postcss-flexbugs-fixes": "4.1.0", |
| | | "postcss-loader": "3.0.0", |
| | | "postcss-normalize": "7.0.1", |
| | | "postcss-preset-env": "6.7.0", |
| | | "postcss-safe-parser": "4.0.1", |
| | | "prop-types": "^15.7.2", |
| | | "react": "^16.9.0", |
| | | "react-app-polyfill": "^1.0.2", |
| | | "react-dev-utils": "^9.0.3", |
| | | "react-dom": "^16.9.0", |
| | | "react-scripts": "3.1.1" |
| | | "react-redux": "^7.1.1", |
| | | "react-router-dom": "^5.0.1", |
| | | "redux": "^4.0.4", |
| | | "redux-thunk": "^2.3.0", |
| | | "resolve": "1.12.0", |
| | | "resolve-url-loader": "3.1.0", |
| | | "sass-loader": "7.2.0", |
| | | "semver": "6.3.0", |
| | | "style-loader": "1.0.0", |
| | | "terser-webpack-plugin": "1.4.1", |
| | | "ts-pnp": "1.1.2", |
| | | "url-loader": "2.1.0", |
| | | "webpack": "4.39.1", |
| | | "webpack-dev-server": "3.2.1", |
| | | "webpack-manifest-plugin": "2.0.4", |
| | | "workbox-webpack-plugin": "4.3.1" |
| | | }, |
| | | "scripts": { |
| | | "start": "react-scripts start", |
| | | "build": "react-scripts build", |
| | | "test": "react-scripts test", |
| | | "eject": "react-scripts eject" |
| | | "dev": "set PORT=3001 HOST=192.168.1.30 && node scripts/start.js", |
| | | "build": "node scripts/build.js", |
| | | "test": "node scripts/test.js" |
| | | }, |
| | | "eslintConfig": { |
| | | "extends": "react-app" |
| | |
| | | "last 1 firefox version", |
| | | "last 1 safari version" |
| | | ] |
| | | }, |
| | | "jest": { |
| | | "roots": [ |
| | | "<rootDir>/src" |
| | | ], |
| | | "collectCoverageFrom": [ |
| | | "src/**/*.{js,jsx,ts,tsx}", |
| | | "!src/**/*.d.ts" |
| | | ], |
| | | "setupFiles": [ |
| | | "react-app-polyfill/jsdom" |
| | | ], |
| | | "setupFilesAfterEnv": [], |
| | | "testMatch": [ |
| | | "<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}", |
| | | "<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}" |
| | | ], |
| | | "testEnvironment": "jest-environment-jsdom-fourteen", |
| | | "transform": { |
| | | "^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest", |
| | | "^.+\\.css$": "<rootDir>/config/jest/cssTransform.js", |
| | | "^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js" |
| | | }, |
| | | "transformIgnorePatterns": [ |
| | | "[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$", |
| | | "^.+\\.module\\.(css|sass|scss)$" |
| | | ], |
| | | "modulePaths": [], |
| | | "moduleNameMapper": { |
| | | "^react-native$": "react-native-web", |
| | | "^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy" |
| | | }, |
| | | "moduleFileExtensions": [ |
| | | "web.js", |
| | | "js", |
| | | "web.ts", |
| | | "ts", |
| | | "web.tsx", |
| | | "tsx", |
| | | "json", |
| | | "web.jsx", |
| | | "jsx", |
| | | "node" |
| | | ], |
| | | "watchPlugins": [ |
| | | "jest-watch-typeahead/filename", |
| | | "jest-watch-typeahead/testname" |
| | | ] |
| | | }, |
| | | "babel": { |
| | | "presets": [ |
| | | "react-app" |
| | | ] |
| | | } |
| | | } |
| | |
| | | <meta name="theme-color" content="#000000" /> |
| | | <meta |
| | | name="description" |
| | | content="Web site created using create-react-app" |
| | | content="minkesoft" |
| | | /> |
| | | <link rel="apple-touch-icon" href="logo192.png" /> |
| | | <!-- |
| | | manifest.json provides metadata used when your web app is installed on a |
| | | user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ |
| | | --> |
| | | <link rel="apple-touch-icon" href="logo.png" /> |
| | | <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> |
| | | <!-- |
| | | Notice the use of %PUBLIC_URL% in the tags above. |
| | | It will be replaced with the URL of the `public` folder during the build. |
| | | Only files inside the `public` folder can be referenced from the HTML. |
| | | |
| | | Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will |
| | | work correctly both with client-side routing and a non-root public URL. |
| | | Learn how to configure a non-root public URL by running `npm run build`. |
| | | --> |
| | | <title>React App</title> |
| | | <title>MinkeSoft</title> |
| | | </head> |
| | | <body> |
| | | <noscript>You need to enable JavaScript to run this app.</noscript> |
| | | <div id="root"></div> |
| | | <!-- |
| | | This HTML file is a template. |
| | | If you open it directly in the browser, you will see an empty page. |
| | | |
| | | You can add webfonts, meta tags, or analytics to this file. |
| | | The build step will place the bundled scripts into the <body> tag. |
| | | |
| | | To begin the development, run `npm start` or `yarn start`. |
| | | To create a production bundle, use `npm run build` or `yarn build`. |
| | | --> |
| | | </body> |
| | | </html> |
| | |
| | | "type": "image/x-icon" |
| | | }, |
| | | { |
| | | "src": "logo192.png", |
| | | "src": "logo.png", |
| | | "type": "image/png", |
| | | "sizes": "192x192" |
| | | }, |
| | | { |
| | | "src": "logo512.png", |
| | | "type": "image/png", |
| | | "sizes": "512x512" |
| | | } |
| | | "sizes": "64x64" |
| | | } |
| | | ], |
| | | "start_url": ".", |
| | | "display": "standalone", |
New file |
| | |
| | | 'use strict'; |
| | | |
| | | // Do this as the first thing so that any code reading it knows the right env. |
| | | process.env.BABEL_ENV = 'production'; |
| | | process.env.NODE_ENV = 'production'; |
| | | |
| | | // Makes the script crash on unhandled rejections instead of silently |
| | | // ignoring them. In the future, promise rejections that are not handled will |
| | | // terminate the Node.js process with a non-zero exit code. |
| | | process.on('unhandledRejection', err => { |
| | | throw err; |
| | | }); |
| | | |
| | | // Ensure environment variables are read. |
| | | require('../config/env'); |
| | | |
| | | |
| | | const path = require('path'); |
| | | const chalk = require('react-dev-utils/chalk'); |
| | | const fs = require('fs-extra'); |
| | | const webpack = require('webpack'); |
| | | const configFactory = require('../config/webpack.config'); |
| | | const paths = require('../config/paths'); |
| | | const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); |
| | | const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages'); |
| | | const printHostingInstructions = require('react-dev-utils/printHostingInstructions'); |
| | | const FileSizeReporter = require('react-dev-utils/FileSizeReporter'); |
| | | const printBuildError = require('react-dev-utils/printBuildError'); |
| | | |
| | | const measureFileSizesBeforeBuild = |
| | | FileSizeReporter.measureFileSizesBeforeBuild; |
| | | const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild; |
| | | const useYarn = fs.existsSync(paths.yarnLockFile); |
| | | |
| | | // These sizes are pretty large. We'll warn for bundles exceeding them. |
| | | const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024; |
| | | const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024; |
| | | |
| | | const isInteractive = process.stdout.isTTY; |
| | | |
| | | // Warn and crash if required files are missing |
| | | if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { |
| | | process.exit(1); |
| | | } |
| | | |
| | | // Generate configuration |
| | | const config = configFactory('production'); |
| | | |
| | | // We require that you explicitly set browsers and do not fall back to |
| | | // browserslist defaults. |
| | | const { checkBrowsers } = require('react-dev-utils/browsersHelper'); |
| | | checkBrowsers(paths.appPath, isInteractive) |
| | | .then(() => { |
| | | // First, read the current file sizes in build directory. |
| | | // This lets us display how much they changed later. |
| | | return measureFileSizesBeforeBuild(paths.appBuild); |
| | | }) |
| | | .then(previousFileSizes => { |
| | | // Remove all content but keep the directory so that |
| | | // if you're in it, you don't end up in Trash |
| | | fs.emptyDirSync(paths.appBuild); |
| | | // Merge with the public folder |
| | | copyPublicFolder(); |
| | | // Start the webpack build |
| | | return build(previousFileSizes); |
| | | }) |
| | | .then( |
| | | ({ stats, previousFileSizes, warnings }) => { |
| | | if (warnings.length) { |
| | | console.log(chalk.yellow('Compiled with warnings.\n')); |
| | | console.log(warnings.join('\n\n')); |
| | | console.log( |
| | | '\nSearch for the ' + |
| | | chalk.underline(chalk.yellow('keywords')) + |
| | | ' to learn more about each warning.' |
| | | ); |
| | | console.log( |
| | | 'To ignore, add ' + |
| | | chalk.cyan('// eslint-disable-next-line') + |
| | | ' to the line before.\n' |
| | | ); |
| | | } else { |
| | | console.log(chalk.green('Compiled successfully.\n')); |
| | | } |
| | | |
| | | console.log('File sizes after gzip:\n'); |
| | | printFileSizesAfterBuild( |
| | | stats, |
| | | previousFileSizes, |
| | | paths.appBuild, |
| | | WARN_AFTER_BUNDLE_GZIP_SIZE, |
| | | WARN_AFTER_CHUNK_GZIP_SIZE |
| | | ); |
| | | console.log(); |
| | | |
| | | const appPackage = require(paths.appPackageJson); |
| | | const publicUrl = paths.publicUrl; |
| | | const publicPath = config.output.publicPath; |
| | | const buildFolder = path.relative(process.cwd(), paths.appBuild); |
| | | printHostingInstructions( |
| | | appPackage, |
| | | publicUrl, |
| | | publicPath, |
| | | buildFolder, |
| | | useYarn |
| | | ); |
| | | }, |
| | | err => { |
| | | console.log(chalk.red('Failed to compile.\n')); |
| | | printBuildError(err); |
| | | process.exit(1); |
| | | } |
| | | ) |
| | | .catch(err => { |
| | | if (err && err.message) { |
| | | console.log(err.message); |
| | | } |
| | | process.exit(1); |
| | | }); |
| | | |
| | | // Create the production build and print the deployment instructions. |
| | | function build(previousFileSizes) { |
| | | // We used to support resolving modules according to `NODE_PATH`. |
| | | // This now has been deprecated in favor of jsconfig/tsconfig.json |
| | | // This lets you use absolute paths in imports inside large monorepos: |
| | | if (process.env.NODE_PATH) { |
| | | console.log( |
| | | chalk.yellow( |
| | | 'Setting NODE_PATH to resolve modules absolutely has been deprecated in favor of setting baseUrl in jsconfig.json (or tsconfig.json if you are using TypeScript) and will be removed in a future major release of create-react-app.' |
| | | ) |
| | | ); |
| | | console.log(); |
| | | } |
| | | |
| | | console.log('Creating an optimized production build...'); |
| | | |
| | | const compiler = webpack(config); |
| | | return new Promise((resolve, reject) => { |
| | | compiler.run((err, stats) => { |
| | | let messages; |
| | | if (err) { |
| | | if (!err.message) { |
| | | return reject(err); |
| | | } |
| | | messages = formatWebpackMessages({ |
| | | errors: [err.message], |
| | | warnings: [], |
| | | }); |
| | | } else { |
| | | messages = formatWebpackMessages( |
| | | stats.toJson({ all: false, warnings: true, errors: true }) |
| | | ); |
| | | } |
| | | if (messages.errors.length) { |
| | | // Only keep the first error. Others are often indicative |
| | | // of the same problem, but confuse the reader with noise. |
| | | if (messages.errors.length > 1) { |
| | | messages.errors.length = 1; |
| | | } |
| | | return reject(new Error(messages.errors.join('\n\n'))); |
| | | } |
| | | if ( |
| | | process.env.CI && |
| | | (typeof process.env.CI !== 'string' || |
| | | process.env.CI.toLowerCase() !== 'false') && |
| | | messages.warnings.length |
| | | ) { |
| | | console.log( |
| | | chalk.yellow( |
| | | '\nTreating warnings as errors because process.env.CI = true.\n' + |
| | | 'Most CI servers set it automatically.\n' |
| | | ) |
| | | ); |
| | | return reject(new Error(messages.warnings.join('\n\n'))); |
| | | } |
| | | |
| | | return resolve({ |
| | | stats, |
| | | previousFileSizes, |
| | | warnings: messages.warnings, |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | function copyPublicFolder() { |
| | | fs.copySync(paths.appPublic, paths.appBuild, { |
| | | dereference: true, |
| | | filter: file => file !== paths.appHtml, |
| | | }); |
| | | } |
New file |
| | |
| | | 'use strict'; |
| | | |
| | | // Do this as the first thing so that any code reading it knows the right env. |
| | | process.env.BABEL_ENV = 'development'; |
| | | process.env.NODE_ENV = 'development'; |
| | | |
| | | // Makes the script crash on unhandled rejections instead of silently |
| | | // ignoring them. In the future, promise rejections that are not handled will |
| | | // terminate the Node.js process with a non-zero exit code. |
| | | process.on('unhandledRejection', err => { |
| | | throw err; |
| | | }); |
| | | |
| | | // Ensure environment variables are read. |
| | | require('../config/env'); |
| | | |
| | | |
| | | const fs = require('fs'); |
| | | const chalk = require('react-dev-utils/chalk'); |
| | | const webpack = require('webpack'); |
| | | const WebpackDevServer = require('webpack-dev-server'); |
| | | const clearConsole = require('react-dev-utils/clearConsole'); |
| | | const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); |
| | | const { |
| | | choosePort, |
| | | createCompiler, |
| | | prepareProxy, |
| | | prepareUrls, |
| | | } = require('react-dev-utils/WebpackDevServerUtils'); |
| | | const openBrowser = require('react-dev-utils/openBrowser'); |
| | | const paths = require('../config/paths'); |
| | | const configFactory = require('../config/webpack.config'); |
| | | const createDevServerConfig = require('../config/webpackDevServer.config'); |
| | | |
| | | const useYarn = fs.existsSync(paths.yarnLockFile); |
| | | const isInteractive = process.stdout.isTTY; |
| | | |
| | | // Warn and crash if required files are missing |
| | | if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { |
| | | process.exit(1); |
| | | } |
| | | |
| | | // Tools like Cloud9 rely on this. |
| | | const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000; |
| | | const HOST = process.env.HOST || '0.0.0.0'; |
| | | |
| | | if (process.env.HOST) { |
| | | console.log( |
| | | chalk.cyan( |
| | | `Attempting to bind to HOST environment variable: ${chalk.yellow( |
| | | chalk.bold(process.env.HOST) |
| | | )}` |
| | | ) |
| | | ); |
| | | console.log( |
| | | `If this was unintentional, check that you haven't mistakenly set it in your shell.` |
| | | ); |
| | | console.log( |
| | | `Learn more here: ${chalk.yellow('https://bit.ly/CRA-advanced-config')}` |
| | | ); |
| | | console.log(); |
| | | } |
| | | |
| | | // We require that you explicitly set browsers and do not fall back to |
| | | // browserslist defaults. |
| | | const { checkBrowsers } = require('react-dev-utils/browsersHelper'); |
| | | checkBrowsers(paths.appPath, isInteractive) |
| | | .then(() => { |
| | | // We attempt to use the default port but if it is busy, we offer the user to |
| | | // run on a different port. `choosePort()` Promise resolves to the next free port. |
| | | return choosePort(HOST, DEFAULT_PORT); |
| | | }) |
| | | .then(port => { |
| | | if (port == null) { |
| | | // We have not found a port. |
| | | return; |
| | | } |
| | | const config = configFactory('development'); |
| | | const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; |
| | | const appName = require(paths.appPackageJson).name; |
| | | const useTypeScript = fs.existsSync(paths.appTsConfig); |
| | | const urls = prepareUrls(protocol, HOST, port); |
| | | const devSocket = { |
| | | warnings: warnings => |
| | | devServer.sockWrite(devServer.sockets, 'warnings', warnings), |
| | | errors: errors => |
| | | devServer.sockWrite(devServer.sockets, 'errors', errors), |
| | | }; |
| | | // Create a webpack compiler that is configured with custom messages. |
| | | const compiler = createCompiler({ |
| | | appName, |
| | | config, |
| | | devSocket, |
| | | urls, |
| | | useYarn, |
| | | useTypeScript, |
| | | webpack, |
| | | }); |
| | | // Load proxy config |
| | | const proxySetting = require(paths.appPackageJson).proxy; |
| | | const proxyConfig = prepareProxy(proxySetting, paths.appPublic); |
| | | // Serve webpack assets generated by the compiler over a web server. |
| | | const serverConfig = createDevServerConfig( |
| | | proxyConfig, |
| | | urls.lanUrlForConfig |
| | | ); |
| | | const devServer = new WebpackDevServer(compiler, serverConfig); |
| | | // Launch WebpackDevServer. |
| | | devServer.listen(port, HOST, err => { |
| | | if (err) { |
| | | return console.log(err); |
| | | } |
| | | if (isInteractive) { |
| | | clearConsole(); |
| | | } |
| | | |
| | | // We used to support resolving modules according to `NODE_PATH`. |
| | | // This now has been deprecated in favor of jsconfig/tsconfig.json |
| | | // This lets you use absolute paths in imports inside large monorepos: |
| | | if (process.env.NODE_PATH) { |
| | | console.log( |
| | | chalk.yellow( |
| | | 'Setting NODE_PATH to resolve modules absolutely has been deprecated in favor of setting baseUrl in jsconfig.json (or tsconfig.json if you are using TypeScript) and will be removed in a future major release of create-react-app.' |
| | | ) |
| | | ); |
| | | console.log(); |
| | | } |
| | | |
| | | console.log(chalk.cyan('Starting the development server...\n')); |
| | | openBrowser(urls.localUrlForBrowser); |
| | | }); |
| | | |
| | | ['SIGINT', 'SIGTERM'].forEach(function(sig) { |
| | | process.on(sig, function() { |
| | | devServer.close(); |
| | | process.exit(); |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(err => { |
| | | if (err && err.message) { |
| | | console.log(err.message); |
| | | } |
| | | process.exit(1); |
| | | }); |
New file |
| | |
| | | 'use strict'; |
| | | |
| | | // Do this as the first thing so that any code reading it knows the right env. |
| | | process.env.BABEL_ENV = 'test'; |
| | | process.env.NODE_ENV = 'test'; |
| | | process.env.PUBLIC_URL = ''; |
| | | |
| | | // Makes the script crash on unhandled rejections instead of silently |
| | | // ignoring them. In the future, promise rejections that are not handled will |
| | | // terminate the Node.js process with a non-zero exit code. |
| | | process.on('unhandledRejection', err => { |
| | | throw err; |
| | | }); |
| | | |
| | | // Ensure environment variables are read. |
| | | require('../config/env'); |
| | | |
| | | |
| | | const jest = require('jest'); |
| | | const execSync = require('child_process').execSync; |
| | | let argv = process.argv.slice(2); |
| | | |
| | | function isInGitRepository() { |
| | | try { |
| | | execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' }); |
| | | return true; |
| | | } catch (e) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | function isInMercurialRepository() { |
| | | try { |
| | | execSync('hg --cwd . root', { stdio: 'ignore' }); |
| | | return true; |
| | | } catch (e) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | // Watch unless on CI or explicitly running all tests |
| | | if ( |
| | | !process.env.CI && |
| | | argv.indexOf('--watchAll') === -1 && |
| | | argv.indexOf('--watchAll=false') === -1 |
| | | ) { |
| | | // https://github.com/facebook/create-react-app/issues/5210 |
| | | const hasSourceControl = isInGitRepository() || isInMercurialRepository(); |
| | | argv.push(hasSourceControl ? '--watch' : '--watchAll'); |
| | | } |
| | | |
| | | |
| | | jest.run(argv); |
New file |
| | |
| | | import axios from 'axios' |
| | | |
| | | // axios.defaults.baseURL = 'http://localhost:8888/dostar' |
| | | axios.defaults.crossDomain = true |
| | | axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' |
| | | axios.defaults.withCredentials = true |
| | | |
| | | axios.interceptors.request.use((config) => { |
| | | config.url = config.url || '/dostar' |
| | | config.method = 'post' |
| | | config.data = config.data || {} |
| | | config.data.userid = 'U000001' |
| | | config.data = JSON.stringify(config.data) |
| | | return config |
| | | }, (error) => { |
| | | return Promise.reject(error) |
| | | }) |
| | | |
| | | axios.interceptors.response.use((response) => { |
| | | return Promise.resolve(response.data) |
| | | }, (error) => { |
| | | return Promise.reject(error) |
| | | }) |
| | | |
| | | class Api { |
| | | constructor() { |
| | | if (process.env.NODE_ENV === 'production') { |
| | | axios.defaults.baseURL = document.location.origin + '/' + window.Glob.Service |
| | | } else { |
| | | axios.defaults.baseURL = 'http://127.0.0.1:8888' |
| | | } |
| | | } |
| | | /** |
| | | * @description 获取主菜单数据 |
| | | */ |
| | | getMainMenuData () { |
| | | return axios({ |
| | | url: '/dostar', |
| | | data: { |
| | | func: 'GetTopMenus' |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 获取子菜单数据 |
| | | * @param {String} menuId 主菜单Id |
| | | */ |
| | | getSubMenuData (menuId) { |
| | | return axios({ |
| | | url: '/dostar', |
| | | data: { |
| | | func: 'GetSubMenus', |
| | | ParentID: menuId |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | export default new Api() |
New file |
| | |
| | | $header-bg: #2b3643; |
| | | $header-font: #c4c7d0; |
| | | |
| | | $blue: #3190e8; |
| | | $bc: #e4e4e4; |
| | | $fc:#fff; |
| | | $common-left: 0.2rem; |
| | | $common-right: 0.6rem; |
| | | |
| | | // $header-bg: #505771; |
| | | // 元素长宽 |
| | | @mixin wh($width, $height) { |
| | | width: $width; |
| | | height: $height; |
| | | } |
| | | |
| | | // 字体颜色,大小, 水平布局 |
| | | @mixin font($size, $color: #333, $text-align: left){ |
| | | font-size: $size; |
| | | color: $color; |
| | | text-align: $text-align; |
| | | } |
| | | |
| | | // flex布局 |
| | | @mixin flex($justify-content: center, $align-items: center) { |
| | | display: flex; |
| | | justify-content: $justify-content; |
| | | align-items: $align-items; |
| | | } |
| | | |
| | | // 默认按照父元素的剧中 |
| | | @mixin positionCenter($position: absolute) { |
| | | position: $position; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate3d(-50%, -50%, 0); |
| | | } |
| | | |
| | | // 默认按照父元素的剧中 |
| | | @mixin positionHCenter($position: absolute) { |
| | | position: $position; |
| | | top: 50%; |
| | | transform: translate3d(0, -50%, 0); |
| | | } |
| | | |
| | | @mixin positionLeft($position: absolute, $left: $common-left) { |
| | | position: $position; |
| | | top: 50%; |
| | | left: $left; |
| | | transform: translate3d(0, -50%, 0); |
| | | } |
| | | |
| | | @mixin positionRight($position: absolute, $right: $common-right) { |
| | | position: $position; |
| | | top: 50%; |
| | | right: $right; |
| | | transform: translate3d(0, -50%, 0); |
| | | } |
New file |
| | |
| | | |
| | | @font-face {font-family: "iconfont"; |
| | | src: url('../font/iconfont.eot?t=1541234426200'); /* IE9*/ |
| | | src: url('../font/iconfont.eot?t=1541234426200#iefix') format('embedded-opentype'), /* IE6-IE8 */ |
| | | url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAA34AAsAAAAAFNwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8fkmVY21hcAAAAYAAAADrAAAC5Guzo/BnbHlmAAACbAAACL8AAAwka0O1smhlYWQAAAssAAAAMQAAADYTxEPqaGhlYQAAC2AAAAAgAAAAJAh9BDNobXR4AAALgAAAABsAAABQUMT/+WxvY2EAAAucAAAAKgAAACoeHBsAbWF4cAAAC8gAAAAfAAAAIAEkAJBuYW1lAAAL6AAAAUUAAAJtPlT+fXBvc3QAAA0wAAAAxgAAAREv3Fv7eJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk4WKcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMTyfwdzwv4EhhrmRoQMozAiSAwDsEgyPeJzdkj1SAkEQhb9ZEP9QFA7A1gSWVHkJbkFIyDm4BByAkAMQeZy3VUYG5vh621TJ7alva6ard6e33wOugIF5M0MonxQiPpwtfX7AXZ8f8u5zpfWuUaOJWlUttNRKa2201U4HHXXqarc/n0G4Zv53zYUovu/F6/XXBTP388Ajt+5zwjP3jP1X1zz57RGN+79h6k+NLt72/2PcP79+TrPQKOn3JQkfqEk8WauYeMZonnjaqE3CH6oJUbtIrAVaJlYFrZLoQusk/KdNYs3QNrF6aJeED3VIrCg6JkSPpyQ83NXEetPtE6bfb61jXwB4nG1WfYzcxBX3m7HH64+117dee9d3543Pu9672/ve2124OzaQLxI1aogiFGjUcmkJiZpCEUqhgpAL6ZcCrdSCKgUCKKIolEiFtIEKISVBAaVpo1AptGoDqAkgIfXaopQ/qER2fX2zmwOCYo3fzBu/+XjPv/ebEUDAh5wkJ4W0IACzXXAaEJVgBOrQQCnDd+wMVGVLBzk+zYBBTQbdkuG59EQ6/i8Dw2JgSoYEOWYZwPh0OOfCHP033S2sEwQpqo5C1C6uw+QGVEegZIDsgzuxFLDwVUzCymBio9SAOn6xmWxAnjp5wFKKanUDfKg3gM4TSVUzx21VpkBYY7k4/9vD85I0fziRiIxgWFXlLjX0Far5yf1nRPHM/v1vitN1mRAiKZrNx2EzkSCGjWJWhISmO69ntIQkJfSZp2898pEkfXTkpY8koGpS7LJVqiUIBfHs00+dFcWzT617uKonmLg4iuEo2baIrCvcb4p+7xYFul3QBFeoYSA+c7UBxY5nqI4AZIJqVCj1ycxxJxzXEd16gCb1dsANoJ548MEHD1LKZWue7t26bS8he7dt3Ru3RIHF7/w1l030UJWpr4HMcs3JHNy3TWWKrX7vx2T5roOieHBXR257mJCHt7Vl67jnHWkyAinNJtJ7+3O5rS/UpLTNxJmTl//ZP8iHNBQkVGQFXICVM7Al3jcDz9K+6Xhf/OQMHGjb/Y68R9cLKfy3CtQmoz65g5uJ2iR5O56FA7JpJ+KbZBkOJ2wzhOfhANZyvFbG7hsTpr0Yqzfpz+kExqpbKAtC+gvxkfqiEuuErR6V2l1X6HeL7x869L7YlvDTnSfGAuj0QDB2Yueu10fzi3p+9HVy+8YdhOzYuHEHpTteWl6Phjv6cFRfPg8rrimWO3q5eM0KdH3h04Xvi0XEbgmV2kQegcdfExCQ4DAEcp8JLFoKNQ7qGsdvHeZT5dSW1KrChTCZe8bzpJIU5v8Y3BycWhJi2/OeySXDC4VVFp1dsuTPQYUFbNA70L2h+EEhl9puWdtTucIHxQ3dB7xB/FQJeEq28/I/5DFhSJgRhCKLSlG95iJYGC4vt/OhVq+VsBsVDqR2gpQQQKyO4Yq4GTfHTsIq6+3yzPTm0YIKWjQ5mWQp37rjjpTiTe6YW7qCif2DM8+stIimeXbxGOiMMjqqSEZSUg3vXVIZ/Pr6tUmWT6jM8fNKrldWp6cVcypcN+VvWXntbH/dHNL0VDqh2HcariYC8ZjiuojILu5HOyd2t3MCGUaQHcGtCfVIoEFfNFmrBBOOzYhwLj7PGATnzkHAWHxej+9we3pceAIl3Y0d575g0HqrZ6QHSydOn81f+tL8YcZmfdF1EPJ1pqE6WZtweqFy9fWewPn4Yu5i4yqrXvG93Wjj+Gf0Ono35oMn+JgT6FXJQlAEiFdkxBApDXOE2Y6bDqyAKvES3AT0OnAhw+vMRSOd7k2nzYvxEjh/T69DH+h8b/7I6a0A/9SbBrq6NdZe6yl6J/1me61B9DboY7LlA8awVrdGIET+4E4ifRbxDUagak3W+E4ytNg67fcD9Puk2qnj/zm+P+z7LiiobPT7+3143u+nmwf85ml/YMCnVX+gOQv+iI8FPr08OtupOTwZjz19gT4kmEJeqAh1YY1w6+VdZTq7ug59l0MEKOrTgLtE9ocA9fauG7AUOjunk9XxatjH3AyGj2+awyIjB52RizORE/GcogPoCjyk6PpbrygagKZ0KphrkXQOIJcmGG39DFh4JuVfxEDHac0wNPKyZhy5Yjz8OqlqSjKpaGryT6CrWGGHqpNfgWc3b7O7QdXOZB1y3O5u/gtg2Ol50dToJs00tcNfMBdEjMP79GN6vbBEWCU8IMxhDCg/5vj2qRvyo66ODrvocN1yKihDuvh/QmQ9jMHVhBtiJldDDuLSFdIADNIVEtnTDWoIMdSLQSagH2/RB/pbT/YPaltkEcYLhs7j95XSJOjJ4jiIv+x1Wi8jAKkeDhZ0FKGe5EIvcBGWQ53CsrQ34pVycFlEHgwDyhHIlToCZtWcTW63s9osxr11PSm03oXz0Eu8CCDy4vcIXyp+daAOUB+AVbiRYrw1mwfIZ2FWTHV1pb78ihrkbDt39RdSbhog7cYX7dy7AwJbWFiYE59F/CXxDFkrfE34rvADzMCx8Xb4xkcAgRhcoRXDEUDaLnGGLMPYOM+X+th4hdOn63S5yKPOMOCZPD42biDps+JEgdMq59pIDtI0qFX4ie3aMhIs3meYLNH05zbVSWTkPjmANTC0rAxQXjYEZDMM3TAEbRGf+PvUV5mXNcDu0q1vmJmMeduA74eQGqHQO7YJbGiY3Efz0KNx1oN39tw+Rf0eU7kl0TyWv5Fuk5XsgNUDktmdh9U75v4ZX3Rq34JHtq4dI363SZWkJYnNC5WgXA6CoaFgsf5JYv3Ua7/Z1T1mKWDnbQC3e035wfi5lLRawZuUbZrYB2cVpq4Q77tzzS2u1PqQNMAy+0Zta823d+obkkyS4FJ8k8LkIfHe7atVvctUABbP8jfoq/QGISHYQj+iH93j14GILt5+EMhprkisD88xftYXaxOuA5d6StF0FPlHm5LUPHqsKdKmvokoUjwvaSTBeBMyDJvwB4imStG1/XA/GnbMjzbjS2iokE0gyho4l1v8BrNwmm6hcvvMmRAawmrcE/42pOM2uYTILZbN2jwNmIUl7MOeRSLlFJpB285RUQZ+fEjIRyxEcqqRm7UkQDZrHFCNbBYgCW78aGUl9sCgD3f5g2DYBqyMz92vGobKRRyTR5OGkWzdhZJkDDXexVXYww0+b7d+D0tHiWokk0brE69Q8IjKDVqfjC6lUzgnljVZfHi8MeiPkbeRgZOChb5pUEpzcFK3G+oS5j/Zt2/fpRXk6RX3tk4On9qz51TrL/BGPAO/gNXxK8dbfyMDcQrueRy8+MPHF669fP87QY/RBp89bQXWMrqTNpo/pDuF/wNaIkGHAHicY2BkYGAA4gfZM27H89t8ZeBmYQCBG8z1v2D0/1//K1iWMDcCuRwMTCBRAHapDb0AAAB4nGNgZGBgbvjfwBDDsvj/r/+/WZYwAEVQgAgAvBAHt3icY2FgYGDBhRX+/8IpB8KL//9HFwMApG4FCwAAAAAAACoApgEEARgBPAGIAcwCMAJgAqAC1gMeA6IEXgUiBWoF2gYEBhIAAHicY2BkYGAQYWhhYGMAASYg5gJCBob/YD4DABfUAbUAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicbUzRToNAELxp6yFUS1X8DBNN/J/mPOjdAtlNgA2Fr/dQH52H2czMzpid+UVh/keFHfY44A4WGe6Ro8ARD3jECSXOeMIzXlDh1Ry+nO/s2LjBx8x5L8rT0Q2DzG8DhTiVN3IcVpU23UnUtnRt+MPOeiMOpY8pXYRDL0E+30+zKnnhUSX1pPqTPxupmLh2+6np7RhFW8pq2hzOx22mTl92pUUdF2skdrzGhrMt81HzmPwQEp2X7rJNderocqW+N+YbuJZLKwAA') format('woff'), |
| | | url('../font/iconfont.ttf?t=1541234426200') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ |
| | | url('../font/iconfont.svg?t=1541234426200#iconfont') format('svg'); /* iOS 4.1- */ |
| | | } |
| | | |
| | | .iconfont { |
| | | font-family:"iconfont" !important; |
| | | font-size:16px; |
| | | font-style:normal; |
| | | -webkit-font-smoothing: antialiased; |
| | | -moz-osx-font-smoothing: grayscale; |
| | | } |
| | | |
| | | .icon-back:before { content: "\e697"; } |
| | | |
| | | .icon-search:before { content: "\e6ac"; } |
| | | |
| | | .icon-account:before { content: "\e6b8"; } |
| | | |
| | | .icon-arrow-right:before { content: "\e601"; } |
| | | |
| | | .icon-xiangzuojiantou:before { content: "\e660"; } |
| | | |
| | | .icon-jifen1:before { content: "\e6a4"; } |
| | | |
| | | .icon-wuxing:before { content: "\e668"; } |
| | | |
| | | .icon-changyonglogo40:before { content: "\e722"; } |
| | | |
| | | .icon-wuuiconsuoxiao:before { content: "\e61f"; } |
| | | |
| | | .icon-wuuiconxiangjifangda:before { content: "\e620"; } |
| | | |
| | | .icon-tel:before { content: "\e641"; } |
| | | |
| | | .icon-shouji:before { content: "\e658"; } |
| | | |
| | | .icon-dingdan:before { content: "\e602"; } |
| | | |
| | | .icon-shangdian:before { content: "\e60f"; } |
| | | |
| | | .icon-ziyuan:before { content: "\e622"; } |
| | | |
| | | .icon-zhinanzhen:before { content: "\e682"; } |
| | | |
| | | .icon-shanchu:before { content: "\e629"; } |
| | | |
| | | .icon-huangguan:before { content: "\e798"; } |
| | | |
| | | .icon-yk_fangkuai_fill:before { content: "\e600"; } |
| | | |
New file |
| | |
| | | * { |
| | | padding: 0; |
| | | margin: 0; |
| | | list-style: none; |
| | | font-style: normal; |
| | | /*防止点击闪烁*/ |
| | | -webkit-tap-highlight-color: transparent; |
| | | /*缩放网页,文字大小不变*/ |
| | | -webkit-text-size-adjust: none; |
| | | font-family: "Helvetica Neue", Helvetica, STHeiTi, sans-serif; |
| | | -webkit-font-smoothing: antialiased; |
| | | box-sizing: border-box; |
| | | font-weight: normal; |
| | | &:hover { |
| | | outline: none; |
| | | } |
| | | } |
| | | |
| | | /* 设置iconfont标签font-family */ |
| | | [class^="icon-"],[class*=" icon-"] { |
| | | font-family: "iconfont"; |
| | | font-size: 16px; |
| | | font-style: normal; |
| | | -webkit-font-smoothing: antialiased; |
| | | -moz-osx-font-smoothing: grayscale; |
| | | } |
| | | |
| | | |
| | | /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/ |
| | | // ::-webkit-scrollbar { |
| | | // width: 0px; |
| | | // height: 0px; |
| | | // background-color: #F5F5F5; |
| | | // } |
| | | |
| | | /*定义滚动条轨道 内阴影+圆角*/ |
| | | // ::-webkit-scrollbar-track { |
| | | // box-shadow: inset 0 0 1px rgba(0,0,0,0); |
| | | // border-radius: 10px; |
| | | // background-color: #F5F5F5; |
| | | // } |
| | | |
| | | |
| | | /*去除虚线*/ |
| | | input:focus, select:focus, textarea:focus, button:focus { |
| | | outline: none; |
| | | } |
| | | input { |
| | | border: none |
| | | } |
| | | |
| | | /*背景色*/ |
| | | html, body { |
| | | width: 100%; |
| | | font-size: 10px; |
| | | } |
| | | #root { |
| | | height: 100%; |
| | | } |
| | | |
| | | input[type="button"], input[type="submit"], input[type="search"], input[type="reset"] { |
| | | -webkit-appearance: none; |
| | | } |
| | | |
| | | a { |
| | | text-decoration: none; |
| | | /*ios禁止页面在新窗口打开*/ |
| | | -webkit-touch-callout: none; |
| | | } |
| | | .ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected { |
| | | background-color: unset; |
| | | color: unset; |
| | | } |
| | | .side-menu.ant-menu-dark .ant-menu-item-selected { |
| | | background-color: unset; |
| | | color: unset; |
| | | } |
| | | |
| | | // ::-webkit-scrollbar { |
| | | // width: 4px; |
| | | // height: 4px; |
| | | // } |
| | | // ::-webkit-scrollbar-thumb { |
| | | // border-radius: 5px; |
| | | // box-shadow: inset 0 0 5px rgba(0,0,0,0.2); |
| | | // background: rgba(0,0,0,0.2); |
| | | // } |
| | | // ::-webkit-scrollbar-track {/*滚动条里面轨道*/ |
| | | // box-shadow: inset 0 0 5px rgba(0,0,0,0.2); |
| | | // border-radius: 0; |
| | | // background: rgba(0,0,0,0.1); |
| | | // } |
New file |
| | |
| | | @font-face { |
| | | font-family: 'anticonicon'; |
| | | src: url('../font/minkeicon.eot?httt7e'); |
| | | src: url('../font/minkeicon.eot?httt7e#iefix') format('embedded-opentype'), |
| | | url('../font/minkeicon.ttf?httt7e') format('truetype'), |
| | | url('../font/minkeicon.woff?httt7e') format('woff'), |
| | | url('../font/minkeicon.svg?httt7e#minkeicon') format('svg'); |
| | | font-weight: normal; |
| | | font-style: normal; |
| | | font-display: block; |
| | | } |
| | | |
| | | [class^="anticon-"], [class*=" anticon-"] { |
| | | /* use !important to prevent issues with browser extensions that change fonts */ |
| | | font-family: 'anticonicon' !important; |
| | | speak: none; |
| | | font-style: normal; |
| | | font-weight: normal; |
| | | font-variant: normal; |
| | | text-transform: none; |
| | | line-height: 1; |
| | | |
| | | /* Better Font Rendering =========== */ |
| | | -webkit-font-smoothing: antialiased; |
| | | -moz-osx-font-smoothing: grayscale; |
| | | } |
| | | |
| | | .anticon-check-circle-o:before { |
| | | content: "\e900"; |
| | | } |
| | | .anticon-dashboard:before { |
| | | content: "\e901"; |
| | | } |
| | | .anticon-form:before { |
| | | content: "\e902"; |
| | | } |
| | | .anticon-highlight:before { |
| | | content: "\e903"; |
| | | } |
| | | .anticon-profile:before { |
| | | content: "\e904"; |
| | | } |
| | | .anticon-table:before { |
| | | content: "\e905"; |
| | | } |
| | | .anticon-user:before { |
| | | content: "\e906"; |
| | | } |
| | | .anticon-warning:before { |
| | | content: "\e907"; |
| | | } |
New file |
| | |
| | | (function(window){var svgSprite='<svg><symbol id="icon-back" viewBox="0 0 1024 1024"><path d="M363.840919 472.978737C336.938714 497.358861 337.301807 537.486138 364.730379 561.486138L673.951902 832.05497C682.818816 839.813519 696.296418 838.915012 704.05497 830.048098 711.813519 821.181184 710.915012 807.703582 702.048098 799.94503L392.826577 529.376198C384.59578 522.174253 384.502227 511.835287 392.492414 504.59418L702.325747 223.807723C711.056111 215.895829 711.719614 202.404616 703.807723 193.674252 695.895829 184.943889 682.404617 184.280386 673.674253 192.192278L363.840919 472.978737Z" ></path></symbol><symbol id="icon-search" viewBox="0 0 1024 1024"><path d="M1001.526404 991.699618C999.922771 986.822379 999.922771 986.822379 998.661741 984.531443 997.556333 982.547938 996.293839 980.724943 994.702325 978.653549 992.500075 975.787264 989.423708 972.169135 985.358477 967.619563 978.223881 959.634933 967.82403 948.546074 954.04227 934.18551 932.495573 911.733901 910.909628 889.684252 858.479859 836.391998 806.561909 783.619985 784.782022 761.370402 763.425645 739.113463 750.035742 725.158933 739.986204 714.441517 733.331893 706.993367 730.0273 703.294545 727.65239 700.501581 726.365602 698.828322 727.222236 700.438869 727.222236 700.438869 728.57702 704.41879 730.685899 711.913483 730.685899 711.913483 721.610157 729.174018 803.853596 649.91606 851.33145 539.987051 851.33145 422.399774 851.33145 189.11482 665.530044 0 436.332393 0 207.134741 0 21.333333 189.11482 21.333333 422.399774 21.333333 655.684727 207.134741 844.799548 436.332393 844.799548 441.356706 844.799548 446.556279 844.56416 452.347883 844.11767 456.487002 843.798575 460.079727 843.454155 466.651669 842.776804 479.958906 841.405269 484.804847 841.014569 490.397372 841.014558 499.896397 841.014541 514.964663 837.646929 537.39015 831.429666 540.021178 830.700239 542.719546 829.938705 545.476431 829.148403 553.976567 826.711712 562.667765 824.108471 571.097184 821.505798 576.160226 819.942528 580.026436 818.721914 582.233225 818.013231 595.480279 813.759108 602.830912 799.380094 598.651326 785.896804 594.471738 772.413515 580.344653 764.931795 567.097598 769.18592 565.058735 769.840674 561.367413 771.006074 556.494825 772.510539 548.364858 775.020755 539.986116 777.530404 531.839533 779.865745 529.217662 780.617342 526.657771 781.339795 524.170112 782.029476 506.936476 786.807345 493.480702 789.814579 490.397278 789.814586 482.458716 789.814601 476.720548 790.277235 461.583853 791.837329 455.416051 792.473024 452.140828 792.787008 448.548723 793.063932 443.933724 793.419714 439.960704 793.599575 436.332393 793.599575 234.916275 793.599575 71.63625 627.407763 71.63625 422.399774 71.63625 217.391785 234.916275 51.199973 436.332393 51.199973 637.74851 51.199973 801.028533 217.391785 801.028533 422.399774 801.028533 525.775443 759.336083 622.309077 687.025254 691.994987 677.769918 709.563029 677.769918 709.563029 679.976768 717.62707 681.566101 722.305182 681.566101 722.305182 682.808947 724.550298 683.910231 726.511657 685.170219 728.326692 686.754421 730.386692 688.964348 733.260343 692.047349 736.886044 696.115554 741.439575 703.261474 749.437982 713.66454 760.532418 727.438434 774.887134 749.001325 797.359294 770.84669 819.675765 822.916311 872.601946 875.194278 925.7399 896.716879 947.724843 918.057933 969.962174 931.455439 983.922347 941.502012 994.634524 948.144469 1002.068378 951.440527 1005.757135 953.805218 1008.538259 955.077419 1010.194061 954.139053 1008.441707 954.139053 1008.441707 952.75811 1004.249822 950.686453 996.172693 950.686453 996.172693 960.850534 978.849743 950.24269 987.977788 948.913429 1004.130236 957.881542 1014.927251 966.849655 1025.724265 982.719104 1027.077231 993.326948 1017.949188 1003.683753 1000.332838 1003.683753 1000.332838 1001.526404 991.699618Z" ></path></symbol><symbol id="icon-account" viewBox="0 0 1024 1024"><path d="M793.6 316.991454C793.6 153.703982 661.792629 21.333333 499.2 21.333333 336.607371 21.333333 204.8 153.703982 204.8 316.991454 204.8 480.278923 336.607371 612.649572 499.2 612.649572 661.792629 612.649572 793.6 480.278923 793.6 316.991454ZM256 316.991454C256 182.101803 364.88435 72.752137 499.2 72.752137 633.51565 72.752137 742.4 182.101803 742.4 316.991454 742.4 451.881103 633.51565 561.230769 499.2 561.230769 364.88435 561.230769 256 451.881103 256 316.991454Z" ></path><path d="M0 998.290598 0 1024 25.6 1024 486.4 1024 998.4 1024 1024 1024 1024 998.290598C1024 767.462671 787.090923 561.230769 512 561.230769 495.448045 561.230769 478.989086 561.900892 462.660538 563.232578 448.568439 564.381869 485.255599 576.786276 486.4 590.938596 501.350035 589.719337 496.831226 612.649572 512 612.649572 760.310844 612.649572 972.8 797.623669 972.8 998.290598L998.4 972.581197 486.4 972.581197 25.6 972.581197 51.2 998.290598C51.2 861.757427 137.013906 736.945338 275.263548 667.439085 287.906261 661.082846 293.024384 645.637353 286.695191 632.94061 280.366001 620.243866 264.986234 615.103872 252.34352 621.460111 97.581613 699.268053 0 841.195691 0 998.290598Z" ></path></symbol><symbol id="icon-arrow-right" viewBox="0 0 1024 1024"><path d="M325.048 93.511l-60.030 59.435 357.181 359.631-360.184 356.603 59.522 59.93 420.207-416.043z" ></path></symbol><symbol id="icon-xiangzuojiantou" viewBox="0 0 1024 1024"><path d="M729.6 931.2l-416-425.6 416-416c9.6-9.6 9.6-25.6 0-35.2-9.6-9.6-25.6-9.6-35.2 0l-432 435.2c-9.6 9.6-9.6 25.6 0 35.2l432 441.6c9.6 9.6 25.6 9.6 35.2 0C739.2 956.8 739.2 940.8 729.6 931.2z" ></path></symbol><symbol id="icon-jifen1" viewBox="0 0 1024 1024"><path d="M112.12673 284.089243a390.766 200.815 0 1 0 799.74654 0 390.766 200.815 0 1 0-799.74654 0Z" ></path><path d="M512 551.408545c-163.335019 0-303.791981-50.327222-365.869828-122.45189-21.856797 25.394367-34.003442 53.489238-34.003442 83.043345 0 113.491821 179.029466 205.495234 399.87327 205.495234s399.87327-92.003414 399.87327-205.495234c0-29.554106-12.145621-57.648978-34.003442-83.043345C815.791981 501.081323 675.335019 551.408545 512 551.408545z" ></path><path d="M512 784.985348c-165.466566 0-307.456441-51.64831-368.263341-125.285424-20.35049 24.644283-31.609928 51.751664-31.609928 80.20981 0 113.491821 179.029466 205.495234 399.87327 205.495234s399.87327-92.003414 399.87327-205.495234c0-28.459169-11.259438-55.565527-31.609928-80.20981C819.456441 733.337037 677.466566 784.985348 512 784.985348z" ></path></symbol><symbol id="icon-wuxing" viewBox="0 0 1056 1024"><path d="M489.72845 32.177681c20.819595-42.896749 54.843563-42.896749 75.663157 0l100.150633 206.519198c20.819595 42.896749 75.907682 83.6277 122.43738 90.509344l223.950369 33.11573c46.529697 6.881645 57.044292 39.857647 23.369645 73.252835l-162.050501 160.723077c-33.674646 33.395188-54.703833 99.31226-46.774223 146.435805l38.250765 226.989471c7.964543 47.158477-19.596967 67.523953-61.201224 45.237206l-200.336198-107.172006c-41.604257-22.251815-109.722057-22.251815-151.326314 0l-200.336198 107.172006c-41.604257 22.286747-69.165767 1.921271-61.201224-45.237206l38.250765-226.989471c7.964543-47.123545-13.099578-113.040617-46.774223-146.435805l-162.085434-160.723077c-33.674646-33.395188-23.12512-66.336258 23.369645-73.252835l223.985301-33.11573c46.529697-6.881645 101.617786-47.612596 122.43738-90.509344L489.72845 32.177681z" ></path></symbol><symbol id="icon-changyonglogo40" viewBox="0 0 1024 1024"><path d="M517.741259 676.457586c-67.105351 3.637854-126.141932-36.759205-151.879106-91.833545-28.284183-60.517305-22.948665-120.268154 17.433044-173.59264 38.496779-50.837852 92.007507-71.033823 155.378813-63.46545 31.457456 3.75758 59.190077 16.672728 83.367733 37.193087 13.117762 11.140735 12.825097 16.119119-1.718131 24.465205-12.636808 7.255241-25.337061 14.395872-37.908378 21.765723-34.756595 20.361747-69.728084 40.370453-104.07945 61.402465-18.395976 11.256368-22.074761 29.214369-11.792581 47.845705 11.123338 20.149922 32.68747 24.840758 55.534827 11.631922 67.890226-39.261189 135.553279-78.912257 203.657376-117.804033 11.268648-6.433526 12.506848-12.979616 7.499811-23.883967-17.61724-38.361703-43.562145-69.872371-78.328973-93.444229-76.822666-52.086285-158.791539-60.431348-242.733347-20.86419-83.740216 39.473013-129.229247 108.788705-136.791479 200.144366-6.265704 75.734892 22.550599 139.857305 77.215616 192.627159 76.216869 73.571622 203.592908 85.148285 291.139823 26.002211 22.796192-15.395642 22.796192-15.395642 8.662287-38.911218-15.282055-25.418926-30.446429-30.143531-56.975643-17.425881C570.320779 670.340261 544.299125 678.157297 517.741259 676.457586z" ></path><path d="M748.179582 568.833403c-1.26276-18.193361-11.128455-32.971949-19.642362-48.208978-2.7793-4.976338-7.238868-3.061732-11.218506-0.791016-15.604396 8.933463-31.160697 17.943674-46.883797 26.660196-6.683213 3.705392-7.865131 8.192589-4.001127 14.705933 8.954953 15.093766 17.844413 30.227442 26.429952 45.528939 3.730974 6.647397 8.205892 8.16803 14.644535 4.097318 9.402137-5.942339 19.108197-11.453866 28.184923-17.853623C743.767086 587.272357 748.511133 579.263963 748.179582 568.833403z" ></path></symbol><symbol id="icon-wuuiconsuoxiao" viewBox="0 0 1024 1024"><path d="M512 0C230.4 0 0 230.4 0 512c0 281.6 230.4 512 512 512 281.6 0 512-230.4 512-512C1024 230.4 793.6 0 512 0zM716.8 563.2 307.2 563.2c-30.72 0-51.2-20.48-51.2-51.2 0-30.72 20.48-51.2 51.2-51.2l409.6 0c30.72 0 51.2 20.48 51.2 51.2C768 542.72 747.52 563.2 716.8 563.2z" ></path></symbol><symbol id="icon-wuuiconxiangjifangda" viewBox="0 0 1024 1024"><path d="M512 0C230.4 0 0 230.4 0 512c0 281.6 230.4 512 512 512 281.6 0 512-230.4 512-512C1024 230.4 793.6 0 512 0zM716.8 563.2l-153.6 0 0 153.6c0 30.72-20.48 51.2-51.2 51.2s-51.2-20.48-51.2-51.2l0-153.6L307.2 563.2c-30.72 0-51.2-20.48-51.2-51.2 0-30.72 20.48-51.2 51.2-51.2l153.6 0L460.8 307.2c0-30.72 20.48-51.2 51.2-51.2s51.2 20.48 51.2 51.2l0 153.6 153.6 0c30.72 0 51.2 20.48 51.2 51.2C768 542.72 747.52 563.2 716.8 563.2z" ></path></symbol><symbol id="icon-tel" viewBox="0 0 1024 1024"><path d="M776.676 1010.080h-479.92c-28.332 0-51.33-22.999-51.33-51.33v-891.12c0-28.332 22.999-51.33 51.33-51.33h479.92c28.332 0 51.33 22.999 51.33 51.33v891.12c0 28.332-22.999 51.33-51.33 51.33v0zM536.576 958.751c19.073 0 34.221-15.426 34.221-34.221s-15.426-34.221-34.221-34.221-34.221 15.426-34.221 34.221 15.426 34.221 34.221 34.221v0zM776.676 118.96h-479.92v719.742h479.641v-719.742h0.279z" ></path></symbol><symbol id="icon-shouji" viewBox="0 0 1024 1024"><path d="M805.36064 30.72 239.66208 30.72C200.62208 30.72 168.96 62.68928 168.96 102.08256l0 820.82304c0 39.39328 31.66208 71.36256 70.70208 71.36256l565.69856 0c39.04 0 70.70208-31.96416 70.70208-71.36256L876.06272 102.08256C876.0576 62.68928 844.40064 30.72 805.36064 30.72L805.36064 30.72zM540.22144 958.61248c-29.312 0-53.05856-23.99232-53.05856-53.53984 0-29.54752 23.74656-53.5296 53.05856-53.5296 29.30176 0 53.04832 23.9872 53.04832 53.5296C593.26976 934.62528 569.46176 958.61248 540.22144 958.61248L540.22144 958.61248zM805.36064 708.8128c0 39.3984-31.66208 71.36256-70.69696 71.36256L310.35904 780.17536c-39.04 0-70.69696-31.96416-70.69696-71.36256L239.66208 173.44512c0-39.3984 31.66208-71.36256 70.69696-71.36256l424.30976 0c39.03488 0 70.69696 31.96416 70.69696 71.36256L805.36576 708.8128 805.36064 708.8128z" ></path></symbol><symbol id="icon-dingdan" viewBox="0 0 1024 1024"><path d="M706.066 472.244H320.784c-11.817 0-21.406 10.05-21.406 22.441v11.176c0 12.402 9.589 22.452 21.406 22.452h385.282c11.817 0 21.406-10.061 21.406-22.452v-11.176c0.011-12.391-9.589-22.441-21.406-22.441zM504.208 674.462H319.862c-11.311 0-20.483 10.095-20.483 22.542v11.344c0 12.436 9.172 22.531 20.483 22.531h184.346c11.311 0 20.483-10.084 20.483-22.531v-11.344c0-12.447-9.172-22.542-20.483-22.542zM896.456 0H130.395C105.5 0 85.333 20.888 85.333 46.661v929.722c0 25.761 20.168 46.661 45.062 46.661h545.307c8.306-1.733 23.004-6.798 38.479-21.811l204.615-205.201s17.759-17.118 22.734-45.603V46.66c-0.011-25.772-20.19-46.661-45.074-46.661z m-11.434 789.02c-0.034-0.574-0.113-1.137-0.169-1.699l0.169-0.169v1.868z m0-47.009h-174.96c-40.178 0-50.093 12.076-50.093 50.42v115.582l-0.023 0.023v58.939H166.611c-13.685 0-24.771-11.479-24.771-25.604V81.696c0-14.158 11.086-25.615 24.771-25.615h693.64c13.685 0 24.771 11.457 24.771 25.615v660.316zM706.066 258.434H320.784c-11.817 0-21.406 10.084-21.406 22.531v11.344c0 12.436 9.589 22.531 21.406 22.531h385.282c11.817 0 21.406-10.084 21.406-22.531v-11.344c0.011-12.436-9.589-22.531-21.406-22.531z" fill="" ></path></symbol><symbol id="icon-shangdian" viewBox="0 0 1024 1024"><path d="M1009.52064 417.08544l-100.096-285.0816-0.82944-2.01728c-16.10752-33.82272-38.5024-65.1264-92.78464-65.1264H203.96032c-54.28224 0-76.66688 31.30368-92.78464 65.1264L10.24 417.08544l6.42048 2.2528h-3.72736c0 47.68768 38.79936 86.4768 86.4768 86.4768 8.8064 0 17.3056-1.34144 25.32352-3.79904v325.71392c0 53.63712 41.15456 97.28 91.72992 97.28h586.84416c50.57536 0 91.72992-43.64288 91.72992-97.28V502.016a86.2208 86.2208 0 0 0 25.32352 3.79904c47.68768 0 86.4768-38.78912 86.4768-86.4768h-3.72736l6.41024-2.2528z m-155.4432 410.64448c0 31.04768-22.784 56.32-50.76992 56.32H216.46336c-27.99616 0-50.76992-25.27232-50.76992-56.32V475.72992h-0.8704c1.04448-1.19808 2.02752-2.44736 3.00032-3.70688 15.83104 20.50048 40.57088 33.78176 68.41344 33.78176s52.5824-13.28128 68.41344-33.78176c15.83104 20.50048 40.57088 33.78176 68.41344 33.78176s52.5824-13.28128 68.41344-33.78176c15.83104 20.50048 40.57088 33.78176 68.41344 33.78176s52.5824-13.28128 68.41344-33.78176c15.83104 20.50048 40.57088 33.78176 68.41344 33.78176s52.59264-13.28128 68.41344-33.78176c15.83104 20.50048 40.57088 33.78176 68.41344 33.78176s52.5824-13.28128 68.41344-33.78176c0.9728 1.25952 1.96608 2.49856 3.00032 3.70688h-0.8704v352z m66.27328-362.87488a45.568 45.568 0 0 1-45.50656-45.5168h-45.80352a45.568 45.568 0 0 1-45.50656 45.5168 45.568 45.568 0 0 1-45.5168-45.5168H692.224a45.568 45.568 0 0 1-45.5168 45.5168 45.568 45.568 0 0 1-45.50656-45.5168h-45.80352a45.568 45.568 0 0 1-45.50656 45.5168 45.568 45.568 0 0 1-45.5168-45.5168H418.58048c0 25.09824-20.41856 45.5168-45.5168 45.5168s-45.5168-20.41856-45.5168-45.5168H281.7536c0 25.09824-20.41856 45.5168-45.5168 45.5168s-45.5168-20.41856-45.5168-45.5168H144.92672c0 25.09824-20.41856 45.5168-45.5168 45.5168s-45.5168-20.41856-45.5168-45.5168h-1.03424l95.75424-272.71168c15.0528-31.25248 28.09856-40.81664 55.33696-40.81664h611.86048c27.2384 0 40.2944 9.56416 55.33696 40.8064l95.75424 272.71168h-1.03424a45.55776 45.55776 0 0 1-45.5168 45.52704z" ></path><path d="M236.2368 243.72224h547.29728v40.96H236.2368z" ></path></symbol><symbol id="icon-ziyuan" viewBox="0 0 1187 1024"><path d="M406.736182 946.759263m-77.240737 0a77.240737 77.240737 0 1 0 154.481473 0 77.240737 77.240737 0 1 0-154.481473 0Z" fill="#727171" ></path><path d="M1015.373632 946.759263m-77.240737 0a77.240737 77.240737 0 1 0 154.481473 0 77.240737 77.240737 0 1 0-154.481473 0Z" fill="#727171" ></path><path d="M620.370371 811.832407H404.291855a160.836724 160.836724 0 0 1-141.770973-146.659626c0-2.933193-48.886542-345.627853-64.530235-491.309749a132.971395 132.971395 0 0 0-38.620369-91.417834 48.886542 48.886542 0 0 0-28.84306-9.777309H36.176192A35.687176 35.687176 0 1 1 36.176192 0.315807h86.040314a116.34997 116.34997 0 0 1 79.685064 23.954406 195.546169 195.546169 0 0 1 66.485697 140.304376c17.599155 146.659626 64.04137 488.865422 64.530236 488.865421S342.694811 733.61394 408.691643 738.991459c74.307544 4.399789 677.567474 0 684.411591 0a34.709445 34.709445 0 0 1 35.687175 35.198311 35.687176 35.687176 0 0 1-35.19831 35.687175c-17.599155 0-275.720098 1.955462-473.221728 1.955462z" fill="#727171" ></path><path d="M289.897346 602.109141S782.673691 594.77616 920.53374 586.954313 1075.992944 504.824922 1075.992944 504.824922s56.708389-217.545113 72.840948-301.1411C1171.321701 80.489736 1062.304712 98.088891 1062.304712 98.088891H227.811437z" fill="#727171" ></path><path d="M258.609959 635.840855L187.724473 62.401716h872.135912a120.749759 120.749759 0 0 1 97.773084 30.309656 126.616144 126.616144 0 0 1 24.443271 117.816566c-16.132559 83.595987-70.885486 293.319253-73.329813 303.096562s-27.376464 97.773084-186.746591 108.039258c-136.882318 8.799578-612.059508 15.643693-632.10299 16.132559z m9.777308-504.509115l53.286331 432.157033c111.461316 0 482.021306-7.821847 596.90468-15.154828 105.594931-6.844116 121.72749-53.286331 122.216356-55.241793S1097.014157 278.480232 1112.65785 195.861976a65.996832 65.996832 0 0 0-5.377519-54.752928 52.3086 52.3086 0 0 0-39.109234-9.288443H267.898402z" fill="#727171" ></path></symbol><symbol id="icon-zhinanzhen" viewBox="0 0 1024 1024"><path d="M507.448889 441.457778c-36.408889 0-68.266667 29.582222-68.266667 68.266666 0 36.408889 29.582222 68.266667 68.266667 68.266667s68.266667-29.582222 68.266667-68.266667c0-36.408889-29.582222-68.266667-68.266667-68.266666z" fill="" ></path><path d="M507.448889 63.715556c-245.76 0-446.008889 200.248889-446.008889 446.008888S261.688889 955.733333 507.448889 955.733333s446.008889-200.248889 446.008889-446.008889C955.733333 263.964444 755.484444 63.715556 507.448889 63.715556z m202.524444 266.24l-91.022222 277.617777c-2.275556 6.826667-9.102222 13.653333-15.928889 15.928889l-277.617778 91.022222c-6.826667 2.275556-15.928889 2.275556-18.204444-2.275555-4.551111-4.551111-6.826667-11.377778-2.275556-18.204445l91.022223-277.617777c2.275556-6.826667 9.102222-13.653333 15.928889-15.928889l277.617777-91.022222c6.826667-2.275556 15.928889-2.275556 18.204445 2.275555 4.551111 4.551111 6.826667 11.377778 2.275555 18.204445z" fill="" ></path></symbol><symbol id="icon-shanchu" viewBox="0 0 1024 1024"><path d="M597.171103 362.634221a24.334601 24.334601 0 0 1 24.3346 24.3346v385.557415a24.334601 24.334601 0 1 1-48.669201 0V386.968821a24.334601 24.334601 0 0 1 24.334601-24.3346zM426.828897 362.634221a24.334601 24.334601 0 0 1 24.334601 24.3346v385.557415a24.334601 24.334601 0 1 1-48.669201 0V386.968821a24.334601 24.334601 0 0 1 24.3346-24.3346z" fill="" ></path><path d="M694.509506 948.952091h-365.019012c-67.090494 0-121.673004-49.910266-121.673004-111.23346V316.252471a24.334601 24.334601 0 1 1 48.669202 0v521.46616c0 34.506464 32.754373 62.564259 73.003802 62.564259h365.019012c40.24943 0 73.003802-28.057795 73.003802-62.564259V316.252471a24.334601 24.334601 0 1 1 48.669202 0v521.46616c0 61.323194-54.58251 111.23346-121.673004 111.23346z" fill="" ></path><path d="M451.163498 121.575665h121.673004a24.334601 24.334601 0 1 1 0 48.669202h-121.673004a24.334601 24.334601 0 1 1 0-48.669202zM183.48289 194.579468h657.03422a24.334601 24.334601 0 1 1 0 48.669201h-657.03422a24.334601 24.334601 0 1 1 0-48.669201z" fill="" ></path></symbol><symbol id="icon-huangguan" viewBox="0 0 1024 1024"><path d="M663.742703 494.542431L512.00614 166.828253 360.25525 494.542431 109.308326 303.70644l67.638358 553.465307h670.05035L914.69065 303.70644 663.742703 494.542431z m133.479794 305.102227H226.747827l-45.136922-369.173346 200.190014 152.214446 130.206244-281.198865 130.163265 281.198865 200.219691-152.214446-45.167622 369.173346z" ></path><path d="M286.436135 684.564896h451.12466v57.552672H286.436135z" ></path></symbol><symbol id="icon-yk_fangkuai_fill" viewBox="0 0 1024 1024"><path d="M65.95584 66.06848v891.91936h892.032V66.06848H65.95584z" ></path></symbol></svg>';var script=function(){var scripts=document.getElementsByTagName("script");return scripts[scripts.length-1]}();var shouldInjectCss=script.getAttribute("data-injectcss");var ready=function(fn){if(document.addEventListener){if(~["complete","loaded","interactive"].indexOf(document.readyState)){setTimeout(fn,0)}else{var loadFn=function(){document.removeEventListener("DOMContentLoaded",loadFn,false);fn()};document.addEventListener("DOMContentLoaded",loadFn,false)}}else if(document.attachEvent){IEContentLoaded(window,fn)}function IEContentLoaded(w,fn){var d=w.document,done=false,init=function(){if(!done){done=true;fn()}};var polling=function(){try{d.documentElement.doScroll("left")}catch(e){setTimeout(polling,50);return}init()};polling();d.onreadystatechange=function(){if(d.readyState==="complete"){d.onreadystatechange=null;init()}}}};var before=function(el,target){target.parentNode.insertBefore(el,target)};var prepend=function(el,target){if(target.firstChild){before(el,target.firstChild)}else{target.appendChild(el)}};function appendSvg(){var div,svg;div=document.createElement("div");div.innerHTML=svgSprite;svgSprite=null;svg=div.getElementsByTagName("svg")[0];if(svg){svg.setAttribute("aria-hidden","true");svg.style.position="absolute";svg.style.width=0;svg.style.height=0;svg.style.overflow="hidden";prepend(svg,document.body)}}if(shouldInjectCss&&!window.__iconfont__svg__cssinject__){window.__iconfont__svg__cssinject__=true;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(e){console&&console.log(e)}}ready(appendSvg)})(window) |
New file |
| | |
| | | <?xml version="1.0" standalone="no"?> |
| | | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > |
| | | <!-- |
| | | 2013-9-30: Created. |
| | | --> |
| | | <svg> |
| | | <metadata> |
| | | Created by iconfont |
| | | </metadata> |
| | | <defs> |
| | | |
| | | <font id="iconfont" horiz-adv-x="1024" > |
| | | <font-face |
| | | font-family="iconfont" |
| | | font-weight="500" |
| | | font-stretch="normal" |
| | | units-per-em="1024" |
| | | ascent="896" |
| | | descent="-128" |
| | | /> |
| | | <missing-glyph /> |
| | | |
| | | <glyph glyph-name="back" unicode="" d="M363.840919 423.021263C336.938714 398.641139 337.301807 358.513862 364.730379 334.513862L673.951902 63.94503C682.818816 56.186481 696.296418 57.084988 704.05497 65.951902 711.813519 74.818816 710.915012 88.296418 702.048098 96.05497L392.826577 366.623802C384.59578 373.825747 384.502227 384.164713 392.492414 391.40582L702.325747 672.192277C711.056111 680.104171 711.719614 693.595384 703.807723 702.325748 695.895829 711.056111 682.404617 711.719614 673.674253 703.807722L363.840919 423.021263Z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="search" unicode="" d="M1001.526404-95.699618C999.922771-90.822379 999.922771-90.822379 998.661741-88.531443 997.556333-86.547938 996.293839-84.724943 994.702325-82.653549 992.500075-79.787264 989.423708-76.169135 985.358477-71.619563 978.223881-63.634933 967.82403-52.546074 954.04227-38.18551 932.495573-15.733901 910.909628 6.315748 858.479859 59.608002 806.561909 112.380015 784.782022 134.629598 763.425645 156.886537 750.035742 170.841067 739.986204 181.558483 733.331893 189.006633 730.0273 192.705455 727.65239 195.498419 726.365602 197.171678 727.222236 195.561131 727.222236 195.561131 728.57702 191.58121 730.685899 184.086517 730.685899 184.086517 721.610157 166.825982 803.853596 246.08394 851.33145 356.012949 851.33145 473.600226 851.33145 706.88518 665.530044 896 436.332393 896 207.134741 896 21.333333 706.88518 21.333333 473.600226 21.333333 240.315273 207.134741 51.200452 436.332393 51.200452 441.356706 51.200452 446.556279 51.43584 452.347883 51.88233 456.487002 52.201425 460.079727 52.545845 466.651669 53.223196 479.958906 54.594731 484.804847 54.985431 490.397372 54.985442 499.896397 54.985459 514.964663 58.353071 537.39015 64.570334 540.021178 65.299761 542.719546 66.061295 545.476431 66.851597 553.976567 69.288288 562.667765 71.891529 571.097184 74.494202 576.160226 76.057472 580.026436 77.278086 582.233225 77.986769 595.480279 82.240892 602.830912 96.619906 598.651326 110.103196 594.471738 123.586485 580.344653 131.068205 567.097598 126.81408 565.058735 126.159326 561.367413 124.993926 556.494825 123.489461 548.364858 120.979245 539.986116 118.469596 531.839533 116.134255 529.217662 115.382658 526.657771 114.660205 524.170112 113.970524 506.936476 109.192655 493.480702 106.185421 490.397278 106.185414 482.458716 106.185399 476.720548 105.722765 461.583853 104.162671 455.416051 103.526976 452.140828 103.212992 448.548723 102.936068 443.933724 102.580286 439.960704 102.400425 436.332393 102.400425 234.916275 102.400425 71.63625 268.592237 71.63625 473.600226 71.63625 678.608215 234.916275 844.800027 436.332393 844.800027 637.74851 844.800027 801.028533 678.608215 801.028533 473.600226 801.028533 370.224557 759.336083 273.690923 687.025254 204.005013 677.769918 186.436971 677.769918 186.436971 679.976768 178.37293 681.566101 173.694818 681.566101 173.694818 682.808947 171.449702 683.910231 169.488343 685.170219 167.673308 686.754421 165.613308 688.964348 162.739657 692.047349 159.113956 696.115554 154.560425 703.261474 146.562018 713.66454 135.467582 727.438434 121.112866 749.001325 98.640706 770.84669 76.324235 822.916311 23.398054 875.194278-29.7399 896.716879-51.724843 918.057933-73.962174 931.455439-87.922347 941.502012-98.634524 948.144469-106.068378 951.440527-109.757135 953.805218-112.538259 955.077419-114.194061 954.139053-112.441707 954.139053-112.441707 952.75811-108.249822 950.686453-100.172693 950.686453-100.172693 960.850534-82.849743 950.24269-91.977788 948.913429-108.130236 957.881542-118.927251 966.849655-129.724265 982.719104-131.077231 993.326948-121.949188 1003.683753-104.332838 1003.683753-104.332838 1001.526404-95.699618Z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="account" unicode="" d="M793.6 579.008546C793.6 742.296018 661.792629 874.666667 499.2 874.666667 336.607371 874.666667 204.8 742.296018 204.8 579.008546 204.8 415.721077 336.607371 283.350428 499.2 283.350428 661.792629 283.350428 793.6 415.721077 793.6 579.008546ZM256 579.008546C256 713.898197 364.88435 823.247863 499.2 823.247863 633.51565 823.247863 742.4 713.898197 742.4 579.008546 742.4 444.118897 633.51565 334.769231 499.2 334.769231 364.88435 334.769231 256 444.118897 256 579.008546ZM0-102.290598 0-128 25.6-128 486.4-128 998.4-128 1024-128 1024-102.290598C1024 128.537329 787.090923 334.769231 512 334.769231 495.448045 334.769231 478.989086 334.099108 462.660538 332.767422 448.568439 331.618131 485.255599 319.213724 486.4 305.061404 501.350035 306.280663 496.831226 283.350428 512 283.350428 760.310844 283.350428 972.8 98.376331 972.8-102.290598L998.4-76.581197 486.4-76.581197 25.6-76.581197 51.2-102.290598C51.2 34.242573 137.013906 159.054662 275.263548 228.560915 287.906261 234.917154 293.024384 250.362647 286.695191 263.05939 280.366001 275.756134 264.986234 280.896128 252.34352 274.539889 97.581613 196.731947 0 54.804309 0-102.290598Z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="arrow-right" unicode="" d="M325.048 802.489l-60.030-59.435 357.181-359.631-360.184-356.603 59.522-59.93 420.207 416.043z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="xiangzuojiantou" unicode="" d="M729.6-35.2l-416 425.6 416 416c9.6 9.6 9.6 25.6 0 35.2-9.6 9.6-25.6 9.6-35.2 0l-432-435.2c-9.6-9.6-9.6-25.6 0-35.2l432-441.6c9.6-9.6 25.6-9.6 35.2 0C739.2-60.8 739.2-44.8 729.6-35.2z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="jifen1" unicode="" d="M112.12673 611.910757a390.766 200.815 0 1 0 799.74654 0 390.766 200.815 0 1 0-799.74654 0ZM512 344.591455c-163.335019 0-303.791981 50.327222-365.869828 122.45189-21.856797-25.394367-34.003442-53.489238-34.003442-83.043345 0-113.491821 179.029466-205.495234 399.87327-205.495234s399.87327 92.003414 399.87327 205.495234c0 29.554106-12.145621 57.648978-34.003442 83.043345C815.791981 394.918677 675.335019 344.591455 512 344.591455zM512 111.014652c-165.466566 0-307.456441 51.64831-368.263341 125.285424-20.35049-24.644283-31.609928-51.751664-31.609928-80.20981 0-113.491821 179.029466-205.495234 399.87327-205.495234s399.87327 92.003414 399.87327 205.495234c0 28.459169-11.259438 55.565527-31.609928 80.20981C819.456441 162.662963 677.466566 111.014652 512 111.014652z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="wuxing" unicode="" d="M489.72845 863.822319c20.819595 42.896749 54.843563 42.896749 75.663157 0l100.150633-206.519198c20.819595-42.896749 75.907682-83.6277 122.43738-90.509344l223.950369-33.11573c46.529697-6.881645 57.044292-39.857647 23.369645-73.252835l-162.050501-160.723077c-33.674646-33.395188-54.703833-99.31226-46.774223-146.435805l38.250765-226.989471c7.964543-47.158477-19.596967-67.523953-61.201224-45.237206l-200.336198 107.172006c-41.604257 22.251815-109.722057 22.251815-151.326314 0l-200.336198-107.172006c-41.604257-22.286747-69.165767-1.921271-61.201224 45.237206l38.250765 226.989471c7.964543 47.123545-13.099578 113.040617-46.774223 146.435805l-162.085434 160.723077c-33.674646 33.395188-23.12512 66.336258 23.369645 73.252835l223.985301 33.11573c46.529697 6.881645 101.617786 47.612596 122.43738 90.509344L489.72845 863.822319z" horiz-adv-x="1056" /> |
| | | |
| | | |
| | | <glyph glyph-name="changyonglogo40" unicode="" d="M517.741259 219.542414c-67.105351-3.637854-126.141932 36.759205-151.879106 91.833545-28.284183 60.517305-22.948665 120.268154 17.433044 173.59264 38.496779 50.837852 92.007507 71.033823 155.378813 63.46545 31.457456-3.75758 59.190077-16.672728 83.367733-37.193087 13.117762-11.140735 12.825097-16.119119-1.718131-24.465205-12.636808-7.255241-25.337061-14.395872-37.908378-21.765723-34.756595-20.361747-69.728084-40.370453-104.07945-61.402465-18.395976-11.256368-22.074761-29.214369-11.792581-47.845705 11.123338-20.149922 32.68747-24.840758 55.534827-11.631922 67.890226 39.261189 135.553279 78.912257 203.657376 117.804033 11.268648 6.433526 12.506848 12.979616 7.499811 23.883967-17.61724 38.361703-43.562145 69.872371-78.328973 93.444229-76.822666 52.086285-158.791539 60.431348-242.733347 20.86419-83.740216-39.473013-129.229247-108.788705-136.791479-200.144366-6.265704-75.734892 22.550599-139.857305 77.215616-192.627159 76.216869-73.571622 203.592908-85.148285 291.139823-26.002211 22.796192 15.395642 22.796192 15.395642 8.662287 38.911218-15.282055 25.418926-30.446429 30.143531-56.975643 17.425881C570.320779 225.659739 544.299125 217.842703 517.741259 219.542414zM748.179582 327.166597c-1.26276 18.193361-11.128455 32.971949-19.642362 48.208978-2.7793 4.976338-7.238868 3.061732-11.218506 0.791016-15.604396-8.933463-31.160697-17.943674-46.883797-26.660196-6.683213-3.705392-7.865131-8.192589-4.001127-14.705933 8.954953-15.093766 17.844413-30.227442 26.429952-45.528939 3.730974-6.647397 8.205892-8.16803 14.644535-4.097318 9.402137 5.942339 19.108197 11.453866 28.184923 17.853623C743.767086 308.727643 748.511133 316.736037 748.179582 327.166597z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="wuuiconsuoxiao" unicode="" d="M512 896C230.4 896 0 665.6 0 384c0-281.6 230.4-512 512-512 281.6 0 512 230.4 512 512C1024 665.6 793.6 896 512 896zM716.8 332.8 307.2 332.8c-30.72 0-51.2 20.48-51.2 51.2 0 30.72 20.48 51.2 51.2 51.2l409.6 0c30.72 0 51.2-20.48 51.2-51.2C768 353.28 747.52 332.8 716.8 332.8z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="wuuiconxiangjifangda" unicode="" d="M512 896C230.4 896 0 665.6 0 384c0-281.6 230.4-512 512-512 281.6 0 512 230.4 512 512C1024 665.6 793.6 896 512 896zM716.8 332.8l-153.6 0 0-153.6c0-30.72-20.48-51.2-51.2-51.2s-51.2 20.48-51.2 51.2l0 153.6L307.2 332.8c-30.72 0-51.2 20.48-51.2 51.2 0 30.72 20.48 51.2 51.2 51.2l153.6 0L460.8 588.8c0 30.72 20.48 51.2 51.2 51.2s51.2-20.48 51.2-51.2l0-153.6 153.6 0c30.72 0 51.2-20.48 51.2-51.2C768 353.28 747.52 332.8 716.8 332.8z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="tel" unicode="" d="M776.676-114.080h-479.92c-28.332 0-51.33 22.999-51.33 51.33v891.12c0 28.332 22.999 51.33 51.33 51.33h479.92c28.332 0 51.33-22.999 51.33-51.33v-891.12c0-28.332-22.999-51.33-51.33-51.33v0zM536.576-62.751c19.073 0 34.221 15.426 34.221 34.221s-15.426 34.221-34.221 34.221-34.221-15.426-34.221-34.221 15.426-34.221 34.221-34.221v0zM776.676 777.040h-479.92v-719.742h479.641v719.742h0.279z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="shouji" unicode="" d="M805.36064 865.28 239.66208 865.28C200.62208 865.28 168.96 833.31072 168.96 793.91744l0-820.82304c0-39.39328 31.66208-71.36256 70.70208-71.36256l565.69856 0c39.04 0 70.70208 31.96416 70.70208 71.36256L876.06272 793.91744C876.0576 833.31072 844.40064 865.28 805.36064 865.28L805.36064 865.28zM540.22144-62.61248c-29.312 0-53.05856 23.99232-53.05856 53.53984 0 29.54752 23.74656 53.5296 53.05856 53.5296 29.30176 0 53.04832-23.9872 53.04832-53.5296C593.26976-38.62528 569.46176-62.61248 540.22144-62.61248L540.22144-62.61248zM805.36064 187.1872c0-39.3984-31.66208-71.36256-70.69696-71.36256L310.35904 115.82464c-39.04 0-70.69696 31.96416-70.69696 71.36256L239.66208 722.55488c0 39.3984 31.66208 71.36256 70.69696 71.36256l424.30976 0c39.03488 0 70.69696-31.96416 70.69696-71.36256L805.36576 187.1872 805.36064 187.1872z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="dingdan" unicode="" d="M706.066 423.756H320.784c-11.817 0-21.406-10.05-21.406-22.441v-11.176c0-12.402 9.589-22.452 21.406-22.452h385.282c11.817 0 21.406 10.061 21.406 22.452v11.176c0.011 12.391-9.589 22.441-21.406 22.441zM504.208 221.538H319.862c-11.311 0-20.483-10.095-20.483-22.542v-11.344c0-12.436 9.172-22.531 20.483-22.531h184.346c11.311 0 20.483 10.084 20.483 22.531v11.344c0 12.447-9.172 22.542-20.483 22.542zM896.456 896H130.395C105.5 896 85.333 875.112 85.333 849.339v-929.722c0-25.761 20.168-46.661 45.062-46.661h545.307c8.306 1.733 23.004 6.798 38.479 21.811l204.615 205.201s17.759 17.118 22.734 45.603V849.34c-0.011 25.772-20.19 46.661-45.074 46.661z m-11.434-789.02c-0.034 0.574-0.113 1.137-0.169 1.699l0.169 0.169v-1.868z m0 47.009h-174.96c-40.178 0-50.093-12.076-50.093-50.42v-115.582l-0.023-0.023v-58.939H166.611c-13.685 0-24.771 11.479-24.771 25.604V814.304c0 14.158 11.086 25.615 24.771 25.615h693.64c13.685 0 24.771-11.457 24.771-25.615v-660.316zM706.066 637.566H320.784c-11.817 0-21.406-10.084-21.406-22.531v-11.344c0-12.436 9.589-22.531 21.406-22.531h385.282c11.817 0 21.406 10.084 21.406 22.531v11.344c0.011 12.436-9.589 22.531-21.406 22.531z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="shangdian" unicode="" d="M1009.52064 478.91456l-100.096 285.0816-0.82944 2.01728c-16.10752 33.82272-38.5024 65.1264-92.78464 65.1264H203.96032c-54.28224 0-76.66688-31.30368-92.78464-65.1264L10.24 478.91456l6.42048-2.2528h-3.72736c0-47.68768 38.79936-86.4768 86.4768-86.4768 8.8064 0 17.3056 1.34144 25.32352 3.79904v-325.71392c0-53.63712 41.15456-97.28 91.72992-97.28h586.84416c50.57536 0 91.72992 43.64288 91.72992 97.28V393.984a86.2208 86.2208 0 0 1 25.32352-3.79904c47.68768 0 86.4768 38.78912 86.4768 86.4768h-3.72736l6.41024 2.2528z m-155.4432-410.64448c0-31.04768-22.784-56.32-50.76992-56.32H216.46336c-27.99616 0-50.76992 25.27232-50.76992 56.32V420.27008h-0.8704c1.04448 1.19808 2.02752 2.44736 3.00032 3.70688 15.83104-20.50048 40.57088-33.78176 68.41344-33.78176s52.5824 13.28128 68.41344 33.78176c15.83104-20.50048 40.57088-33.78176 68.41344-33.78176s52.5824 13.28128 68.41344 33.78176c15.83104-20.50048 40.57088-33.78176 68.41344-33.78176s52.5824 13.28128 68.41344 33.78176c15.83104-20.50048 40.57088-33.78176 68.41344-33.78176s52.59264 13.28128 68.41344 33.78176c15.83104-20.50048 40.57088-33.78176 68.41344-33.78176s52.5824 13.28128 68.41344 33.78176c0.9728-1.25952 1.96608-2.49856 3.00032-3.70688h-0.8704v-352z m66.27328 362.87488a45.568 45.568 0 0 0-45.50656 45.5168h-45.80352a45.568 45.568 0 0 0-45.50656-45.5168 45.568 45.568 0 0 0-45.5168 45.5168H692.224a45.568 45.568 0 0 0-45.5168-45.5168 45.568 45.568 0 0 0-45.50656 45.5168h-45.80352a45.568 45.568 0 0 0-45.50656-45.5168 45.568 45.568 0 0 0-45.5168 45.5168H418.58048c0-25.09824-20.41856-45.5168-45.5168-45.5168s-45.5168 20.41856-45.5168 45.5168H281.7536c0-25.09824-20.41856-45.5168-45.5168-45.5168s-45.5168 20.41856-45.5168 45.5168H144.92672c0-25.09824-20.41856-45.5168-45.5168-45.5168s-45.5168 20.41856-45.5168 45.5168h-1.03424l95.75424 272.71168c15.0528 31.25248 28.09856 40.81664 55.33696 40.81664h611.86048c27.2384 0 40.2944-9.56416 55.33696-40.8064l95.75424-272.71168h-1.03424a45.55776 45.55776 0 0 0-45.5168-45.52704zM236.2368 652.27776h547.29728v-40.96H236.2368z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="ziyuan" unicode="" d="M329.495-50.759c-0-0.003-0-0.006-0-0.009 0-42.659 34.582-77.241 77.241-77.241 42.659 0 77.241 34.582 77.241 77.241 0 0.003-0 0.006-0 0.009 0 0.002 0 0.005 0 0.008 0 42.659-34.582 77.241-77.241 77.241-42.659 0-77.241-34.582-77.241-77.241 0-0.003 0-0.006 0-0.009zM938.133-50.759c-0-0.003-0-0.006-0-0.009 0-42.659 34.582-77.241 77.241-77.241 42.659 0 77.241 34.582 77.241 77.241 0 0.003-0 0.006-0 0.009 0 0.002 0 0.005 0 0.008 0 42.659-34.582 77.241-77.241 77.241-42.659 0-77.241-34.582-77.241-77.241 0-0.003 0-0.006 0-0.009zM620.37 84.168h-216.079c-76.354 9.112-135.837 70.577-141.812 147.067 0.041 2.526-48.846 345.221-64.489 490.903-0.645 36.131-15.602 68.648-39.426 92.222-7.211 5.262-17.336 8.928-28.317 8.975l-94.071-0.002c-0 0-0 0-0 0-19.979 0-36.176 16.197-36.176 36.176 0 19.979 16.197 36.176 36.176 36.176 0 0 0 0 0-0l86.040 0c2.562 0.201 5.549 0.315 8.561 0.315 26.905 0 51.677-9.132 71.385-24.466 39.769-35.043 65.211-86.036 66.302-142.99 17.521-143.778 63.963-485.984 64.452-485.984s9.777-80.174 75.774-85.551c74.308-4.4 677.567 0 684.412 0 0.292 0.009 0.636 0.014 0.981 0.014 19.169 0 34.709-15.54 34.709-34.709 0-0.177-0.001-0.353-0.004-0.529 0 0.026 0 0.024 0 0.023 0-19.538-15.7-35.408-35.172-35.684-17.625-0-275.746-1.956-473.248-1.956zM289.897 293.891s492.776 7.333 630.636 15.155 155.459 82.129 155.459 82.129 56.708 217.545 72.841 301.141c22.488 123.194-86.529 105.595-86.529 105.595h-834.493zM258.61 260.159l-70.885 573.439h872.136c4.958 0.721 10.683 1.133 16.503 1.133 31.345 0 59.901-11.943 81.364-31.528 18.408-21.783 29.657-50.306 29.657-81.455 0-12.936-1.94-25.419-5.545-37.173-15.896-82.699-70.649-292.422-73.093-302.2s-27.376-97.773-186.747-108.039c-136.882-8.8-612.060-15.644-632.103-16.133zM268.387 764.668l53.286-432.157c111.461 0 482.021 7.822 596.905 15.155 105.595 6.844 121.727 53.286 122.216 55.242s56.22 214.612 71.863 297.23c2.284 6.412 3.605 13.808 3.605 21.513 0 12.248-3.336 23.717-9.15 33.547-8.336 5.922-19.004 9.66-30.546 9.66-2.965 0-5.872-0.247-8.702-0.72l-799.966 0.042z" horiz-adv-x="1187" /> |
| | | |
| | | |
| | | <glyph glyph-name="zhinanzhen" unicode="" d="M507.448889 454.542222c-36.408889 0-68.266667-29.582222-68.266667-68.266666 0-36.408889 29.582222-68.266667 68.266667-68.266667s68.266667 29.582222 68.266667 68.266667c0 36.408889-29.582222 68.266667-68.266667 68.266666zM507.448889 832.284444c-245.76 0-446.008889-200.248889-446.008889-446.008888S261.688889-59.733333 507.448889-59.733333s446.008889 200.248889 446.008889 446.008889C955.733333 632.035556 755.484444 832.284444 507.448889 832.284444z m202.524444-266.24l-91.022222-277.617777c-2.275556-6.826667-9.102222-13.653333-15.928889-15.928889l-277.617778-91.022222c-6.826667-2.275556-15.928889-2.275556-18.204444 2.275555-4.551111 4.551111-6.826667 11.377778-2.275556 18.204445l91.022223 277.617777c2.275556 6.826667 9.102222 13.653333 15.928889 15.928889l277.617777 91.022222c6.826667 2.275556 15.928889 2.275556 18.204445-2.275555 4.551111-4.551111 6.826667-11.377778 2.275555-18.204445z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="shanchu" unicode="" d="M597.171103 533.365779a24.334601 24.334601 0 0 0 24.3346-24.3346v-385.557415a24.334601 24.334601 0 1 0-48.669201 0V509.031179a24.334601 24.334601 0 0 0 24.334601 24.3346zM426.828897 533.365779a24.334601 24.334601 0 0 0 24.334601-24.3346v-385.557415a24.334601 24.334601 0 1 0-48.669201 0V509.031179a24.334601 24.334601 0 0 0 24.3346 24.3346zM694.509506-52.952091h-365.019012c-67.090494 0-121.673004 49.910266-121.673004 111.23346V579.747529a24.334601 24.334601 0 1 0 48.669202 0v-521.46616c0-34.506464 32.754373-62.564259 73.003802-62.564259h365.019012c40.24943 0 73.003802 28.057795 73.003802 62.564259V579.747529a24.334601 24.334601 0 1 0 48.669202 0v-521.46616c0-61.323194-54.58251-111.23346-121.673004-111.23346zM451.163498 774.424335h121.673004a24.334601 24.334601 0 1 0 0-48.669202h-121.673004a24.334601 24.334601 0 1 0 0 48.669202zM183.48289 701.420532h657.03422a24.334601 24.334601 0 1 0 0-48.669201h-657.03422a24.334601 24.334601 0 1 0 0 48.669201z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="huangguan" unicode="" d="M663.742703 401.457569L512.00614 729.171747 360.25525 401.457569 109.308326 592.29356l67.638358-553.465307h670.05035L914.69065 592.29356 663.742703 401.457569z m133.479794-305.102227H226.747827l-45.136922 369.173346 200.190014-152.214446 130.206244 281.198865 130.163265-281.198865 200.219691 152.214446-45.167622-369.173346zM286.436135 211.435104h451.12466v-57.552672H286.436135z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | <glyph glyph-name="yk_fangkuai_fill" unicode="" d="M65.95584 829.93152v-891.91936h892.032V829.93152H65.95584z" horiz-adv-x="1024" /> |
| | | |
| | | |
| | | |
| | | |
| | | </font> |
| | | </defs></svg> |
New file |
| | |
| | | <?xml version="1.0" standalone="no"?> |
| | | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > |
| | | <svg xmlns="http://www.w3.org/2000/svg"> |
| | | <metadata>Generated by IcoMoon</metadata> |
| | | <defs> |
| | | <font id="minkeicon" horiz-adv-x="1024"> |
| | | <font-face units-per-em="1024" ascent="877.7142857142858" descent="-146.28571428571428" /> |
| | | <missing-glyph horiz-adv-x="1024" /> |
| | | <glyph unicode=" " horiz-adv-x="256" d="" /> |
| | | <glyph unicode="" glyph-name="check-circle-o" d="M725.714 533.714h-53.6c-11.657 0-22.743-5.6-29.6-15.2l-179.657-249.143-81.371 112.914c-6.857 9.486-17.829 15.2-29.6 15.2h-53.6c-7.429 0-11.771-8.457-7.429-14.514l142.4-197.486c6.675-9.236 17.415-15.176 29.543-15.176s22.868 5.94 29.47 15.070l0.073 0.106 240.686 333.714c4.457 6.057 0.114 14.514-7.314 14.514zM512 864c-282.743 0-512-229.257-512-512s229.257-512 512-512 512 229.257 512 512-229.257 512-512 512zM512-73.143c-234.743 0-425.143 190.4-425.143 425.143s190.4 425.143 425.143 425.143 425.143-190.4 425.143-425.143-190.4-425.143-425.143-425.143z" /> |
| | | <glyph unicode="" glyph-name="dashboard" d="M983.771 496.457c-27.128 63.268-64.145 117.28-109.705 162.733l-0.010 0.010c-45.463 45.569-99.475 82.586-159.429 108.443l-3.313 1.272c-63.2 26.743-130.171 40.229-199.314 40.229s-136.114-13.486-199.314-40.229c-63.268-27.128-117.28-64.145-162.733-109.705l-0.010-0.010c-45.569-45.463-82.586-99.475-108.443-159.429l-1.272-3.313c-26.743-63.2-40.229-130.171-40.229-199.314 0-151.657 66.629-294.514 182.743-392.114l1.943-1.6c6.629-5.486 14.971-8.571 23.543-8.571h607.657c8.571 0 16.914 3.086 23.543 8.571l1.943 1.6c116 97.6 182.629 240.457 182.629 392.114 0 69.143-13.6 136.114-40.229 199.314zM797.029-18.286h-570.057c-86.19 77.939-140.115 190.171-140.115 314.998 0 0.151 0 0.303 0 0.454v-0.023c0 113.6 44.229 220.343 124.571 300.571 80.343 80.343 187.086 124.571 300.571 124.571 113.6 0 220.343-44.229 300.571-124.571 80.343-80.343 124.571-187.086 124.571-300.571 0-120.686-50.857-234.857-140.114-315.429zM639.429 455.429c-1.657 1.642-3.939 2.656-6.457 2.656s-4.8-1.014-6.458-2.657l-96.57-96.57c-21.371 5.714-45.029 0.229-61.829-16.571-11.597-11.576-18.771-27.579-18.771-45.257s7.174-33.681 18.77-45.256l0.001-0.001c11.576-11.597 27.579-18.771 45.257-18.771s33.681 7.174 45.256 18.77l0.001 0.001c11.596 11.562 18.77 27.552 18.77 45.218 0 5.908-0.802 11.629-2.304 17.059l0.106-0.449 96.571 96.571c3.543 3.543 3.543 9.371 0 12.914l-32.343 32.343zM486.857 571.429h50.286c5.029 0 9.143 4.114 9.143 9.143v91.429c0 5.029-4.114 9.143-9.143 9.143h-50.286c-5.029 0-9.143-4.114-9.143-9.143v-91.429c0-5.029 4.114-9.143 9.143-9.143zM784 322.286v-50.286c0-5.029 4.114-9.143 9.143-9.143h91.429c5.029 0 9.143 4.114 9.143 9.143v50.286c0 5.029-4.114 9.143-9.143 9.143h-91.429c-5.029 0-9.143-4.114-9.143-9.143zM798.514 547.657l-35.543 35.543c-1.657 1.642-3.939 2.656-6.457 2.656s-4.8-1.014-6.458-2.657l-64.685-64.685c-1.642-1.657-2.656-3.939-2.656-6.457s1.014-4.8 2.657-6.458l35.542-35.542c3.543-3.543 9.371-3.543 12.914 0l64.686 64.686c3.543 3.543 3.543 9.371 0 12.914zM274.4 583.2c-1.657 1.642-3.939 2.656-6.457 2.656s-4.8-1.014-6.458-2.657l-35.542-35.542c-1.642-1.657-2.656-3.939-2.656-6.457s1.014-4.8 2.657-6.458l64.685-64.685c3.543-3.543 9.371-3.543 12.914 0l35.543 35.543c3.543 3.543 3.543 9.371 0 12.914l-64.686 64.686zM226.286 331.429h-91.429c-5.029 0-9.143-4.114-9.143-9.143v-50.286c0-5.029 4.114-9.143 9.143-9.143h91.429c5.029 0 9.143 4.114 9.143 9.143v50.286c0 5.029-4.114 9.143-9.143 9.143z" /> |
| | | <glyph unicode="" glyph-name="form" d="M960 352h-64c-5.029 0-9.143-4.114-9.143-9.143v-365.714h-749.714v749.714h365.714c5.029 0 9.143 4.114 9.143 9.143v64c0 5.029-4.114 9.143-9.143 9.143h-411.429c-20.229 0-36.571-16.343-36.571-36.571v-841.143c0-20.229 16.343-36.571 36.571-36.571h841.143c20.229 0 36.571 16.343 36.571 36.571v411.429c0 5.029-4.114 9.143-9.143 9.143zM333.6 325.829l-2.171-135.886c-0.114-10.171 8.114-18.514 18.286-18.514h0.457l134.857 3.314c2.286 0.114 4.571 1.029 6.171 2.629l475.314 474.286c3.543 3.543 3.543 9.371 0 12.914l-142.057 141.943c-1.829 1.829-4.114 2.629-6.514 2.629s-4.686-0.914-6.514-2.629l-475.2-474.286c-1.593-1.664-2.586-3.912-2.628-6.392v-0.008zM406.171 298.857l411.771 410.857 51.657-51.543-412-411.086-52.229-1.257 0.8 53.029z" /> |
| | | <glyph unicode="" glyph-name="highlight" d="M1021.257 357.257l-405.029 399.086c-1.635 1.643-3.899 2.66-6.4 2.66s-4.765-1.017-6.4-2.66v0l-272.8-268.8c-1.676-1.663-2.714-3.968-2.714-6.515 0-2.49 0.992-4.748 2.601-6.401l0.112-0.112 45.714-45.029-133.943-131.771c-1.676-1.663-2.714-3.968-2.714-6.515 0-2.49 0.992-4.748 2.601-6.401l0.112-0.112 45.143-44.457-216.114-213.714h-62.171c-5.029 0-9.257-4.114-9.257-9.143v-63.086c0-5.029 4.114-9.143 9.143-9.143h394.171c2.4 0 4.686 0.914 6.4 2.629l86.971 86.4 46.171-45.486c1.635-1.643 3.899-2.66 6.4-2.66s4.765 1.017 6.4 2.66v0l133.829 132.114 45.829-45.143c1.635-1.643 3.899-2.66 6.4-2.66s4.765 1.017 6.4 2.66v0l272.8 268.8c3.886 3.429 3.886 9.143 0.343 12.8zM372.343 27.2h-183.086l153.6 152 91.543-90.171-62.057-61.829zM549.257 98.171l-195.886 193.029 78.4 77.257 195.886-193.029-78.4-77.257zM741.829 185.143l-300.343 295.886 168.343 165.829 300.343-296-168.343-165.714z" /> |
| | | <glyph unicode="" glyph-name="profile" d="M932.571 809.143h-841.143c-20.229 0-36.571-16.343-36.571-36.571v-841.143c0-20.229 16.343-36.571 36.571-36.571h841.143c20.229 0 36.571 16.343 36.571 36.571v841.143c0 20.229-16.343 36.571-36.571 36.571zM886.857-22.857h-749.714v749.714h749.714v-749.714zM489.143 480h210.286c5.029 0 9.143 4.114 9.143 9.143v54.857c0 5.029-4.114 9.143-9.143 9.143h-210.286c-5.029 0-9.143-4.114-9.143-9.143v-54.857c0-5.029 4.114-9.143 9.143-9.143zM489.143 315.429h210.286c5.029 0 9.143 4.114 9.143 9.143v54.857c0 5.029-4.114 9.143-9.143 9.143h-210.286c-5.029 0-9.143-4.114-9.143-9.143v-54.857c0-5.029 4.114-9.143 9.143-9.143zM489.143 150.857h210.286c5.029 0 9.143 4.114 9.143 9.143v54.857c0 5.029-4.114 9.143-9.143 9.143h-210.286c-5.029 0-9.143-4.114-9.143-9.143v-54.857c0-5.029 4.114-9.143 9.143-9.143zM315.429 516.571c0-25.247 20.467-45.714 45.714-45.714s45.714 20.467 45.714 45.714v0c0 25.247-20.467 45.714-45.714 45.714s-45.714-20.467-45.714-45.714v0zM315.429 352c0-25.247 20.467-45.714 45.714-45.714s45.714 20.467 45.714 45.714v0c0 25.247-20.467 45.714-45.714 45.714s-45.714-20.467-45.714-45.714v0zM315.429 187.429c0-25.247 20.467-45.714 45.714-45.714s45.714 20.467 45.714 45.714v0c0 25.247-20.467 45.714-45.714 45.714s-45.714-20.467-45.714-45.714v0z" /> |
| | | <glyph unicode="" glyph-name="table" d="M987.429 754.286h-950.857c-20.229 0-36.571-16.343-36.571-36.571v-731.429c0-20.229 16.343-36.571 36.571-36.571h950.857c20.229 0 36.571 16.343 36.571 36.571v731.429c0 20.229-16.343 36.571-36.571 36.571zM941.714 516.571h-242.286v155.429h242.286v-155.429zM941.714 260.571h-242.286v182.857h242.286v-182.857zM397.714 443.429h228.571v-182.857h-228.571v182.857zM626.286 516.571h-228.571v155.429h228.571v-155.429zM82.286 443.429h242.286v-182.857h-242.286v182.857zM82.286 672h242.286v-155.429h-242.286v155.429zM82.286 187.429h242.286v-155.429h-242.286v155.429zM397.714 187.429h228.571v-155.429h-228.571v155.429zM941.714 32h-242.286v155.429h242.286v-155.429z" /> |
| | | <glyph unicode="" glyph-name="user" d="M908 64.457c-22.754 53.104-53.836 98.434-92.102 136.559l-0.013 0.013c-38.161 38.24-83.484 69.315-133.789 91.044l-2.783 1.070c-0.457 0.229-0.914 0.343-1.371 0.571 71.2 51.429 117.486 135.2 117.486 229.714 0 156.571-126.857 283.429-283.429 283.429s-283.429-126.857-283.429-283.429c0-94.514 46.286-178.286 117.486-229.829-0.457-0.229-0.914-0.343-1.371-0.571-51.2-21.6-97.143-52.571-136.571-92.114-38.24-38.161-69.315-83.484-91.044-133.789l-1.070-2.783c-20.284-46.497-32.574-100.58-33.708-157.399l-0.007-0.43c-0.002-0.068-0.003-0.148-0.003-0.229 0-5.049 4.093-9.143 9.143-9.143 0.001 0 0.002 0 0.003 0h68.571c5.029 0 9.029 4 9.143 8.914 2.286 88.229 37.714 170.857 100.343 233.486 64.8 64.8 150.857 100.457 242.514 100.457s177.714-35.657 242.514-100.457c62.629-62.629 98.057-145.257 100.343-233.486 0.114-5.029 4.114-8.914 9.143-8.914h68.571c0.001 0 0.002 0 0.003 0 5.049 0 9.143 4.093 9.143 9.143 0 0.080-0.001 0.161-0.003 0.24v-0.012c-1.143 54.629-12.457 107.771-33.714 157.943zM512 326.857c-52.457 0-101.829 20.457-138.971 57.6s-57.6 86.514-57.6 138.971c0 52.457 20.457 101.829 57.6 138.971s86.514 57.6 138.971 57.6 101.829-20.457 138.971-57.6 57.6-86.514 57.6-138.971c0-52.457-20.457-101.829-57.6-138.971s-86.514-57.6-138.971-57.6z" /> |
| | | <glyph unicode="" glyph-name="warning" d="M457.143 114.286c0-30.297 24.56-54.857 54.857-54.857s54.857 24.56 54.857 54.857v0c0 30.297-24.56 54.857-54.857 54.857s-54.857-24.56-54.857-54.857v0zM475.429 461.714v-210.286c0-5.029 4.114-9.143 9.143-9.143h54.857c5.029 0 9.143 4.114 9.143 9.143v210.286c0 5.029-4.114 9.143-9.143 9.143h-54.857c-5.029 0-9.143-4.114-9.143-9.143zM1019.086-41.143l-475.429 822.857c-7.086 12.229-19.314 18.286-31.657 18.286s-24.686-6.057-31.657-18.286l-475.429-822.857c-14.057-24.457 3.543-54.857 31.657-54.857h950.857c28.114 0 45.714 30.4 31.657 54.857zM123.657-9.257l388.343 672.229 388.343-672.229h-776.686z" /> |
| | | </font></defs></svg> |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | import {NavLink} from 'react-router-dom' |
| | | import './footer.scss' |
| | | import '../../assets/font/iconfont.js' |
| | | |
| | | class Footer extends Component { |
| | | // constructor(props) { |
| | | // super(props) |
| | | // console.log(props) |
| | | // } |
| | | // static defaultProps = { |
| | | // collapse: false |
| | | // } |
| | | // static propTypes = { |
| | | // collapse: PropTypes.string |
| | | // } |
| | | |
| | | // state = { |
| | | // menulist: [], |
| | | // selectmenu: '' |
| | | // } |
| | | render () { |
| | | return ( |
| | | <footer className="footer-container"> |
| | | <NavLink className="guide-item" to="/msite"> |
| | | <div className='icon-changyonglogo40 icon-style'></div> |
| | | <span className='spec-text'>外卖</span> |
| | | </NavLink> |
| | | <NavLink className='guide-item' to='/search'> |
| | | <div className='icon-zhinanzhen icon-style'></div> |
| | | <span>搜索</span> |
| | | </NavLink> |
| | | <NavLink className='guide-item' to='/technology'> |
| | | <div className='icon-dingdan icon-style'></div> |
| | | <span>订单</span> |
| | | </NavLink> |
| | | <NavLink className='guide-item' to='/personal'> |
| | | <div className='icon-account icon-style'></div> |
| | | <span>我的</span> |
| | | </NavLink> |
| | | </footer> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default Footer |
New file |
| | |
| | | @import '../../assets/css/iconfont.css'; |
| | | @import '../../assets/css/global.scss'; |
| | | |
| | | .footer-container{ |
| | | background-color: #fff; |
| | | position: fixed; |
| | | z-index: 101; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | @include wh(100%, 4.5rem); |
| | | display: flex; |
| | | box-shadow: 0 -0.026667rem 0.053333rem rgba(0,0,0,.1); |
| | | .guide-item { |
| | | flex: 1; |
| | | @include flex; |
| | | text-align: center; |
| | | flex-direction: column; |
| | | |
| | | .icon-changyonglogo40{ |
| | | @include font(3rem, #666); |
| | | margin-top: -0.8rem; |
| | | } |
| | | .spec-text{ |
| | | margin-top: -0.8rem; |
| | | } |
| | | .icon-zhinanzhen{ |
| | | @include font(1.8rem, #666); |
| | | margin-top: -0.2rem; |
| | | } |
| | | .icon-dingdan{ |
| | | @include font(1.7rem, #666); |
| | | margin-top: -0.2rem; |
| | | } |
| | | .icon-account{ |
| | | @include font(1.8rem, #666); |
| | | margin-top: -0.2rem; |
| | | fill: $blue; |
| | | } |
| | | span{ |
| | | @include font(1.2rem, #666) |
| | | } |
| | | } |
| | | } |
| | | |
| | | .active{ |
| | | color: $blue; |
| | | font-size: 25px; |
| | | .icon-style{ |
| | | color: $blue!important; |
| | | font-weight: bold; |
| | | } |
| | | span{ |
| | | color: $blue!important; |
| | | } |
| | | } |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import {Dropdown, Menu, Icon} from 'antd' |
| | | import {toggleCollapse, modifyMainMenu} from '@/store/action' |
| | | import Api from '@/api' |
| | | import logourl from '../../assets/img/mlogo.png' |
| | | import avatar from '../../assets/img/avatar.jpg' |
| | | import './header.scss' |
| | | |
| | | class Header extends Component { |
| | | static propTpyes = { |
| | | collapse: PropTypes.bool, |
| | | mainMenu: PropTypes.oneOfType([ |
| | | PropTypes.string, |
| | | PropTypes.object |
| | | ]) |
| | | } |
| | | state = { |
| | | menulist: null |
| | | } |
| | | |
| | | handleCollapse = () => { |
| | | this.props.toggleCollapse(!this.props.collapse) |
| | | } |
| | | |
| | | onClick = () => { |
| | | console.log('menu') |
| | | } |
| | | |
| | | changeMenu = (value) => { |
| | | this.props.modifyMainMenu(value) |
| | | } |
| | | |
| | | async loadmenu () { |
| | | // 获取主菜单 |
| | | let result = await Api.getMainMenuData() |
| | | if (result.status) { |
| | | this.setState({ |
| | | menulist: result.data |
| | | }) |
| | | this.props.modifyMainMenu(result.data[0]) |
| | | } |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | this.loadmenu() |
| | | } |
| | | componentDidMount () { |
| | | console.log(13) |
| | | } |
| | | UNSAFE_componentWillReceiveProps () { |
| | | // console.log('header componentWillReceiveProps') |
| | | } |
| | | |
| | | shouldComponentUpdate(nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | componentDidUpdate () { |
| | | |
| | | } |
| | | |
| | | render () { |
| | | const menu = ( |
| | | <Menu className="header-dropdown" onClick={this.onClick}> |
| | | <Menu.Item key="1">修改密码</Menu.Item> |
| | | <Menu.Item key="2">退出</Menu.Item> |
| | | </Menu> |
| | | ) |
| | | return ( |
| | | <header className="header-container ant-menu-dark"> |
| | | <div className={this.props.collapse ? "collapse header-logo" : "header-logo"}><img src={logourl} alt=""/></div> |
| | | <div className={this.props.collapse ? "collapse header-collapse" : "header-collapse"} onClick={this.handleCollapse}> |
| | | <Icon type={this.props.collapse ? 'menu-unfold' : 'menu-fold'} /> |
| | | </div> |
| | | {this.state.menulist && <ul className="header-menu">{ |
| | | this.state.menulist.map(item => { |
| | | return ( |
| | | <li key={item.id} onClick={() => {this.changeMenu(item)}} className={this.props.selectmenu.id === item.id ? 'active' : ''}> |
| | | {item.MenuName} |
| | | </li> |
| | | ) |
| | | }) |
| | | }</ul>} |
| | | <Dropdown className="header-setting" overlay={menu}> |
| | | <div> |
| | | <img src={avatar} alt=""/> |
| | | <span> |
| | | admin <Icon type="down" /> |
| | | </span> |
| | | </div> |
| | | </Dropdown> |
| | | </header> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | collapse: state.collapse, |
| | | selectmenu: state.selectedMainMenu |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = (dispatch) => { |
| | | return { |
| | | toggleCollapse: (collapse) => dispatch(toggleCollapse(collapse)), |
| | | modifyMainMenu: (selectmenu) => dispatch(modifyMainMenu(selectmenu)) |
| | | } |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(Header) |
New file |
| | |
| | | @import '../../assets/css/iconfont.css'; |
| | | @import '../../assets/css/global.scss'; |
| | | |
| | | .header-container { |
| | | position: fixed; |
| | | // background-color: $header-bg; |
| | | z-index: 10; |
| | | left: 0; |
| | | top: 0; |
| | | font-weight: bold!important; |
| | | width: 100%; |
| | | height: 48px; |
| | | |
| | | .header-logo { |
| | | float: left; |
| | | width: 155px; |
| | | line-height: 48px; |
| | | text-align: center; |
| | | opacity: 1; |
| | | transition: width 0.2s, opacity 0.15s; |
| | | img { |
| | | max-width: 100%; |
| | | max-height: 35px; |
| | | } |
| | | } |
| | | .header-logo.collapse { |
| | | opacity: 0; |
| | | width: 0px; |
| | | } |
| | | |
| | | .header-collapse { |
| | | float: left; |
| | | width: 80px; |
| | | line-height: 48px; |
| | | padding-left: 45px; |
| | | cursor: pointer; |
| | | transition: padding-left 0.15s; |
| | | i { |
| | | position: relative; |
| | | top: 3px; |
| | | font-size: 20px; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | .header-collapse.collapse { |
| | | padding-left: 30px; |
| | | } |
| | | .header-menu { |
| | | float: left; |
| | | margin: 0; |
| | | line-height: 48px; |
| | | li { |
| | | float: left; |
| | | // color: $header-font; |
| | | font-size: 1.7rem; |
| | | margin: 0 10px; |
| | | cursor: pointer; |
| | | |
| | | &:hover { |
| | | color: #eeeeee; |
| | | } |
| | | &.active { |
| | | color: #ffffff; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | } |
| | | .header-setting { |
| | | float: right; |
| | | line-height: 48px; |
| | | margin-right: 10px; |
| | | img { |
| | | border-radius: 30px; |
| | | margin-right: 7px; |
| | | } |
| | | span { |
| | | color: #ffffff; |
| | | font-size: 1.3rem; |
| | | } |
| | | } |
| | | } |
| | | .header-dropdown { |
| | | margin-top: -5px; |
| | | li { |
| | | padding: 5px 25px; |
| | | } |
| | | } |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | // import { Lifecycle } from 'react-router' |
| | | import { withRouter } from 'react-router-dom' |
| | | import PropTypes from 'prop-types' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Menu, Icon } from 'antd' |
| | | import {modifyTabview} from '@/store/action' |
| | | import Api from '@/api' |
| | | import './sidemenu.scss' |
| | | |
| | | const { SubMenu } = Menu |
| | | |
| | | class Smenu extends Component { |
| | | static propTypes = { |
| | | collapse: PropTypes.bool, |
| | | mainMenu: PropTypes.oneOfType([ |
| | | PropTypes.string, |
| | | PropTypes.object |
| | | ]) |
| | | } |
| | | |
| | | state = { |
| | | subMenulist: null, |
| | | rootSubmenuKeys: null, |
| | | openKeys: null |
| | | } |
| | | |
| | | async loadsubmenu (menu) { |
| | | let result = await Api.getSubMenuData(menu.MenuID) |
| | | if (result.status) { |
| | | this.setState({ |
| | | subMenulist: result.data, |
| | | rootSubmenuKeys: result.data.map(item => item.id), |
| | | openKeys: this.props.collapse ? [] : [result.data[0].id] |
| | | }) |
| | | } |
| | | } |
| | | |
| | | changemenu(e) { |
| | | let menu = JSON.parse(e.target.dataset.item) |
| | | let tabs = JSON.parse(JSON.stringify(this.props.tabviews)) |
| | | tabs = tabs.filter(tab => { |
| | | tab.selected = false |
| | | return tab.MenuID !== menu.MenuID |
| | | }) |
| | | menu.selected = true |
| | | tabs.push(menu) |
| | | this.props.modifyTabview(tabs) |
| | | // this.props.history.push('/main') |
| | | // this.props.history.replace('/main') |
| | | e.preventDefault() |
| | | } |
| | | |
| | | // mixins = [ Lifecycle ] |
| | | |
| | | routerWillLeave(nextLocation) { |
| | | if (!this.state.isSaved) |
| | | return 'Your work is not saved! Are you sure you want to leave?' |
| | | } |
| | | |
| | | componentDidMount () { |
| | | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | if (nextProps.mainMenu && !is(fromJS(this.props.mainMenu), fromJS(nextProps.mainMenu))) { |
| | | // 主菜单切换,请求2、3级菜单数据 |
| | | this.loadsubmenu(nextProps.mainMenu) |
| | | } else if (nextProps.collapse && this.props.collapse !== nextProps.collapse) { |
| | | // 展开合并时,关闭展开菜单 |
| | | this.setState({ |
| | | openKeys: [] |
| | | }) |
| | | } |
| | | } |
| | | |
| | | shouldComponentUpdate(nextProps, nextState) { |
| | | if (!is(fromJS(this.props.mainMenu), fromJS(nextProps.mainMenu)) || (!this.props.collapse && !is(fromJS(this.props.tabviews), fromJS(nextProps.tabviews)))) { |
| | | // 主菜单切换,或菜单展开下的tab页变化,不会刷新 |
| | | return false |
| | | } else { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | } |
| | | |
| | | componentDidUpdate () { |
| | | // console.log('componentDidUpdate') |
| | | } |
| | | |
| | | onOpenChange = openKeys => { |
| | | const latestOpenKey = openKeys.find(key => this.state.openKeys.indexOf(key) === -1) |
| | | if (this.state.rootSubmenuKeys.indexOf(latestOpenKey) === -1) { |
| | | this.setState({ openKeys }) |
| | | } else { |
| | | this.setState({ |
| | | openKeys: latestOpenKey ? [latestOpenKey] : [] |
| | | }) |
| | | } |
| | | } |
| | | render () { |
| | | return ( |
| | | <aside className={"side-menu ant-menu-dark" + (this.props.collapse ? ' side-menu-collapsed' : '')}> |
| | | {this.state.subMenulist && |
| | | <Menu openKeys={this.state.openKeys} onOpenChange={this.onOpenChange} mode="inline" theme="dark" inlineCollapsed={this.props.collapse}> |
| | | {this.state.subMenulist.map(item => { |
| | | return ( |
| | | <SubMenu |
| | | key={item.id} |
| | | title={ |
| | | <span> |
| | | {item.icon ? <Icon type={item.icon} /> : <Icon type="folder" />} |
| | | <span>{item.MenuName}</span> |
| | | </span> |
| | | } |
| | | > |
| | | {item.children.map(cell => { |
| | | return ( |
| | | <Menu.Item key={cell.id}> |
| | | <a href="#/main/0345" id={cell.MenuID} data-item={JSON.stringify(cell)} onClick={this.changemenu.bind(this)}>{cell.MenuName}</a> |
| | | </Menu.Item> |
| | | ) |
| | | })} |
| | | </SubMenu> |
| | | ) |
| | | })} |
| | | </Menu>} |
| | | </aside> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | tabviews: state.tabviews, |
| | | collapse: state.collapse, |
| | | mainMenu: state.selectedMainMenu |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = (dispatch) => { |
| | | return { |
| | | modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews)) |
| | | } |
| | | } |
| | | |
| | | export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Smenu)) |
New file |
| | |
| | | @import '../../assets/css/iconfont.css'; |
| | | @import '../../assets/css/minkeicon.css'; |
| | | @import '../../assets/css/global.scss'; |
| | | |
| | | .side-menu { |
| | | flex: 0 0 235px; |
| | | width: 235px; |
| | | height: 100%; |
| | | padding: 48px 0 20px; |
| | | transition: width 0.2s, flex 0.2s; |
| | | .ant-menu-item { |
| | | padding-left: 0!important; |
| | | cursor: default; |
| | | a { |
| | | padding-left: 48px; |
| | | } |
| | | } |
| | | |
| | | max-height: 100vh; |
| | | overflow-y: scroll; |
| | | &::-webkit-scrollbar { |
| | | display: none; |
| | | } |
| | | } |
| | | .side-menu.side-menu-collapsed { |
| | | flex: 0 0 80px; |
| | | width: 80px; |
| | | } |
| | | .ant-menu-submenu.ant-menu-submenu-popup { |
| | | max-height: 80vh; |
| | | overflow-y: scroll; |
| | | &::-webkit-scrollbar { |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | .ant-menu-vertical .ant-menu-item { |
| | | cursor: default; |
| | | a { |
| | | cursor: pointer; |
| | | } |
| | | } |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import {Tabs, Icon} from 'antd' |
| | | import {modifyTabview} from '@/store/action' |
| | | import './tabview.scss' |
| | | |
| | | class Header extends Component { |
| | | static propTpyes = { |
| | | tabviews: PropTypes.array |
| | | } |
| | | |
| | | state = { |
| | | selectedTabId: '', |
| | | iFrameHeight: 0 |
| | | } |
| | | |
| | | handleTabview (menu) { |
| | | let tabs = JSON.parse(JSON.stringify(this.props.tabviews)) |
| | | tabs = tabs.filter(tab => { |
| | | if (tab.MenuID === this.state.selectedTabId) { |
| | | tab.selected = true |
| | | } else { |
| | | tab.selected = false |
| | | } |
| | | return tab.MenuID !== menu.MenuID |
| | | }) |
| | | if (menu.MenuID === this.state.selectedTabId) { |
| | | tabs[0] && (tabs[0].selected = true) |
| | | } |
| | | this.props.modifyTabview(tabs) |
| | | } |
| | | |
| | | changeTab (menu) { |
| | | this.setState({ |
| | | selectedTabId: menu.MenuID |
| | | }) |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | console.log(this.props) |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | if (nextProps.tabviews && !is(fromJS(this.props.tabviews), fromJS(nextProps.tabviews))) { |
| | | let view = nextProps.tabviews.filter(tab => tab.selected)[0] |
| | | this.setState({ |
| | | selectedTabId: view ? view.MenuID : '' |
| | | }) |
| | | } |
| | | } |
| | | |
| | | shouldComponentUpdate(nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | componentDidUpdate () { |
| | | |
| | | } |
| | | |
| | | render () { |
| | | return ( |
| | | <section className="flex-container content-box"> |
| | | <div className="content-header"> |
| | | {this.props.tabviews && this.props.tabviews.length > 0 && |
| | | <Tabs activeKey={this.state.selectedTabId}> |
| | | {this.props.tabviews.map(view => { |
| | | return ( |
| | | <Tabs.TabPane |
| | | className="test" |
| | | tab={ |
| | | <span> |
| | | <span className="tab-name" onClick={() => {this.changeTab(view)}}> |
| | | {view.MenuName} |
| | | </span> |
| | | <Icon type="close" onClick={() => {this.handleTabview(view)}}/> |
| | | </span> |
| | | } |
| | | key={view.MenuID} |
| | | > |
| | | <iframe |
| | | title={view.MenuName} |
| | | src={'http://qingqiumarket.cn/MKWMS/zh-CN/' + view.LinkUrl} |
| | | /> |
| | | </Tabs.TabPane> |
| | | ) |
| | | })} |
| | | </Tabs> |
| | | } |
| | | </div> |
| | | </section> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | tabviews: state.tabviews |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = (dispatch) => { |
| | | return { |
| | | modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews)) |
| | | } |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(Header) |
New file |
| | |
| | | .content-box { |
| | | padding-top: 48px; |
| | | |
| | | .content-header { |
| | | width: 100%; |
| | | height: 100%; |
| | | // .ant-tabs .ant-tabs-top-content.ant-tabs-content-animated { |
| | | // transition: margin-left 0s cubic-bezier(0.645, 0.045, 0.355, 1); |
| | | // } |
| | | .ant-tabs-tab { |
| | | padding: 18px 16px 6px; |
| | | cursor: default; |
| | | span i { |
| | | position: relative; |
| | | left: 7px; |
| | | top: -6px; |
| | | font-size: 10px; |
| | | margin: 0px; |
| | | cursor: pointer; |
| | | } |
| | | span.tab-name { |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | iframe { |
| | | width: 100%; |
| | | height: calc(100vh - 115px); |
| | | overflow-y: scroll; |
| | | border: 0; |
| | | // &:-webkit-scrollbar { |
| | | // width: 4px; |
| | | // height: 4px; |
| | | // } |
| | | // &:-webkit-scrollbar-thumb { |
| | | // border-radius: 5px; |
| | | // box-shadow: inset 0 0 5px rgba(0,0,0,0.2); |
| | | // background: rgba(0,0,0,0.2); |
| | | // } |
| | | // &:-webkit-scrollbar-track {/*滚动条里面轨道*/ |
| | | // box-shadow: inset 0 0 5px rgba(0,0,0,0.2); |
| | | // border-radius: 0; |
| | | // background: rgba(0,0,0,0.1); |
| | | // } |
| | | } |
| | | } |
| | | } |
| | |
| | | import React from 'react'; |
| | | import ReactDOM from 'react-dom'; |
| | | import './index.css'; |
| | | import App from './App'; |
| | | import * as serviceWorker from './serviceWorker'; |
| | | import Route from './router' |
| | | import {Provider} from 'react-redux' |
| | | import store from '@/store' |
| | | import * as serviceWorker from './serviceWorker' |
| | | import 'antd/dist/antd.css' |
| | | import '@/assets/css/main.scss' |
| | | |
| | | ReactDOM.render(<App />, document.getElementById('root')); |
| | | const render = Component => { |
| | | ReactDOM.render( |
| | | <Provider store={store}> |
| | | <Component/> |
| | | </Provider>, |
| | | document.getElementById('root') |
| | | ) |
| | | } |
| | | |
| | | // If you want your app to work offline and load faster, you can change |
| | | // unregister() to register() below. Note this comes with some pitfalls. |
| | | // Learn more about service workers: https://bit.ly/CRA-PWA |
| | | render(Route) |
| | | |
| | | serviceWorker.unregister(); |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | import {HashRouter, Switch, Route, Redirect} from 'react-router-dom' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | const personal = asyncComponent(() => import('@/views/personal/personal')) |
| | | |
| | | export default class RouteConfig extends Component { |
| | | render () { |
| | | return ( |
| | | <HashRouter> |
| | | <Switch> |
| | | <Route path="/main" exact component={personal}/> |
| | | <Route path="/main/:param" exact component={personal}/> |
| | | <Redirect exact from="/" to="main"/> |
| | | <Route component= {personal}/> |
| | | </Switch> |
| | | </HashRouter> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | // import React, { lazy } from 'react'; |
| | | // import { Route } from 'react-router-dom'; |
| | | |
| | | // const RouteLis = [ |
| | | // { |
| | | // component: lazy(() => import ('../views/home')), |
| | | // path: '/' |
| | | // } |
| | | // ]; |
| | | |
| | | // const RouterList = () => ( |
| | | // RouteLis.map((item, key) => { |
| | | // return <Route key={key} exact path={item.path} component={item.component}/>; |
| | | // }) |
| | | // ); |
| | | |
| | | // export default RouterList; |
New file |
| | |
| | | // 切换主菜单 |
| | | export const MODIFY_MAINMENU = 'MODIFY_MAINMENU' |
| | | |
| | | // 展开合并菜单栏 |
| | | export const Toggle_COLLAPSE = 'Toggle_COLLAPSE' |
| | | |
| | | // 修改导航栏菜单 |
| | | export const MODIFY_TABVIEW = 'MODIFY_TABVIEW' |
New file |
| | |
| | | import * as user from './action-type' |
| | | |
| | | // 展开合并菜单栏 |
| | | export const toggleCollapse = (collapse) => { |
| | | return { |
| | | type: user.Toggle_COLLAPSE, |
| | | collapse |
| | | } |
| | | } |
| | | |
| | | // 切换主菜单 |
| | | export const modifyMainMenu = (selectedMainMenu) => { |
| | | return { |
| | | type: user.MODIFY_MAINMENU, |
| | | selectedMainMenu |
| | | } |
| | | } |
| | | |
| | | // 修改导航栏菜单 |
| | | export const modifyTabview = (tabviews) => { |
| | | return { |
| | | type: user.MODIFY_TABVIEW, |
| | | tabviews |
| | | } |
| | | } |
New file |
| | |
| | | import {createStore, applyMiddleware} from 'redux' |
| | | import userReducer from './reducer' |
| | | import thunk from 'redux-thunk' |
| | | |
| | | let store = createStore( |
| | | userReducer, |
| | | applyMiddleware(thunk) |
| | | ) |
| | | |
| | | export default store |
New file |
| | |
| | | import * as Type from './action-type' |
| | | |
| | | let defaultState = { |
| | | selectedMainMenu: '', // 已选主菜单 |
| | | tabviews: [], // 导航栏 |
| | | collapse: false // 是否收起侧边栏导航 |
| | | } |
| | | |
| | | // 用户消息 |
| | | export default (state = defaultState, action = {}) => { |
| | | switch (action.type) { |
| | | case Type.Toggle_COLLAPSE: |
| | | return { |
| | | ...state, |
| | | collapse: action.collapse |
| | | } |
| | | case Type.MODIFY_MAINMENU: |
| | | return { |
| | | ...state, |
| | | selectedMainMenu: action.selectedMainMenu |
| | | } |
| | | case Type.MODIFY_TABVIEW: |
| | | return { |
| | | ...state, |
| | | tabviews: action.tabviews |
| | | } |
| | | default: |
| | | return state |
| | | } |
| | | } |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | |
| | | /** |
| | | * @description 异步加载模块 |
| | | * @param {*} importComponent |
| | | */ |
| | | export default function asyncComponent(importComponent) { |
| | | return class extends Component { |
| | | constructor(props) { |
| | | super(props) |
| | | |
| | | this.state = { |
| | | component: null |
| | | } |
| | | } |
| | | |
| | | async componentDidMount() { |
| | | const {default: component} = await importComponent() |
| | | |
| | | this.setState({component}) |
| | | } |
| | | |
| | | render() { |
| | | const C = this.state.component |
| | | |
| | | return C ? <C {...this.props} /> : null |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import Header from '@/components/header/header' |
| | | import Smenu from '@/components/sidemenu/sidemenu' |
| | | import Tabview from '@/components/tabview/tabview' |
| | | import './personal.scss' |
| | | |
| | | class Personal extends Component { |
| | | state = { |
| | | |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps () { |
| | | |
| | | } |
| | | |
| | | shouldComponentUpdate(nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | console.log(this.props) |
| | | this.props.history.replace('/main') |
| | | } |
| | | |
| | | componentDidMount () { |
| | | console.log(this.props) |
| | | } |
| | | |
| | | render () { |
| | | return ( |
| | | <div className="flex-container"> |
| | | <Header key="header"/> |
| | | <Smenu key="sidemenu"/> |
| | | <Tabview param={this.props.match.params.param} key="tabview"/> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = () => { |
| | | return { |
| | | |
| | | } |
| | | } |
| | | |
| | | export default connect(mapStateToProps, {})(Personal) |
| | | // export default withRouter(connect(mapStateToProps, {})(Personal)) |
New file |
| | |
| | | // @import '../../assets/css/iconfont.css'; |
| | | // @import '../../assets/css/minkeicon.css'; |
| | | // @import '../../assets/css/global.scss'; |
| | | |
| | | .flex-container { |
| | | display: flex; |
| | | flex: auto; |
| | | height: 100%; |
| | | } |
| | |
| | | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" |
| | | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= |
| | | |
| | | fsevents@2.0.7: |
| | | version "2.0.7" |
| | | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.0.7.tgz#382c9b443c6cbac4c57187cdda23aa3bf1ccfc2a" |
| | | integrity sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ== |
| | | |
| | | fsevents@^1.2.7: |
| | | version "1.2.9" |
| | | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" |
| | |
| | | strip-ansi "5.2.0" |
| | | text-table "0.2.0" |
| | | |
| | | react-dom@16.9.0: |
| | | react-dom@^16.9.0: |
| | | version "16.9.0" |
| | | resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.9.0.tgz#5e65527a5e26f22ae3701131bcccaee9fb0d3962" |
| | | integrity sha512-YFT2rxO9hM70ewk9jq0y6sQk8cL02xm4+IzYBz75CQGlClQQ1Bxq0nhHF6OtSbit+AIahujJgb/CPRibFkMNJQ== |
| | |
| | | resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" |
| | | integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== |
| | | |
| | | react-scripts@3.1.1: |
| | | version "3.1.1" |
| | | resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-3.1.1.tgz#1796bc92447f3a2d3072c3b71ca99f88d099c48d" |
| | | integrity sha512-dbjTG9vJC61OI62hIswQYg5xHvwlxDTH6QXz6ICEuA5AqkFQWk1LKl76sk8fVL2WsyumbBc4FErALwKcEV2vNA== |
| | | dependencies: |
| | | "@babel/core" "7.5.5" |
| | | "@svgr/webpack" "4.3.2" |
| | | "@typescript-eslint/eslint-plugin" "1.13.0" |
| | | "@typescript-eslint/parser" "1.13.0" |
| | | babel-eslint "10.0.2" |
| | | babel-jest "^24.8.0" |
| | | babel-loader "8.0.6" |
| | | babel-plugin-named-asset-import "^0.3.3" |
| | | babel-preset-react-app "^9.0.1" |
| | | camelcase "^5.2.0" |
| | | case-sensitive-paths-webpack-plugin "2.2.0" |
| | | css-loader "2.1.1" |
| | | dotenv "6.2.0" |
| | | dotenv-expand "4.2.0" |
| | | eslint "^6.1.0" |
| | | eslint-config-react-app "^5.0.1" |
| | | eslint-loader "2.2.1" |
| | | eslint-plugin-flowtype "3.13.0" |
| | | eslint-plugin-import "2.18.2" |
| | | eslint-plugin-jsx-a11y "6.2.3" |
| | | eslint-plugin-react "7.14.3" |
| | | eslint-plugin-react-hooks "^1.6.1" |
| | | file-loader "3.0.1" |
| | | fs-extra "7.0.1" |
| | | html-webpack-plugin "4.0.0-beta.5" |
| | | identity-obj-proxy "3.0.0" |
| | | is-wsl "^1.1.0" |
| | | jest "24.8.0" |
| | | jest-environment-jsdom-fourteen "0.1.0" |
| | | jest-resolve "24.8.0" |
| | | jest-watch-typeahead "0.3.1" |
| | | mini-css-extract-plugin "0.5.0" |
| | | optimize-css-assets-webpack-plugin "5.0.3" |
| | | pnp-webpack-plugin "1.5.0" |
| | | postcss-flexbugs-fixes "4.1.0" |
| | | postcss-loader "3.0.0" |
| | | postcss-normalize "7.0.1" |
| | | postcss-preset-env "6.7.0" |
| | | postcss-safe-parser "4.0.1" |
| | | react-app-polyfill "^1.0.2" |
| | | react-dev-utils "^9.0.3" |
| | | resolve "1.12.0" |
| | | resolve-url-loader "3.1.0" |
| | | sass-loader "7.2.0" |
| | | semver "6.3.0" |
| | | style-loader "1.0.0" |
| | | terser-webpack-plugin "1.4.1" |
| | | ts-pnp "1.1.2" |
| | | url-loader "2.1.0" |
| | | webpack "4.39.1" |
| | | webpack-dev-server "3.2.1" |
| | | webpack-manifest-plugin "2.0.4" |
| | | workbox-webpack-plugin "4.3.1" |
| | | optionalDependencies: |
| | | fsevents "2.0.7" |
| | | |
| | | react@16.9.0: |
| | | react@^16.9.0: |
| | | version "16.9.0" |
| | | resolved "https://registry.yarnpkg.com/react/-/react-16.9.0.tgz#40ba2f9af13bc1a38d75dbf2f4359a5185c4f7aa" |
| | | integrity sha512-+7LQnFBwkiw+BobzOF6N//BdoNw0ouwmSJTEm9cglOOmsg/TMiFHZLe2sEoN5M7LgJTj9oHH0gxklfnQe66S1w== |