├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build ├── build.js ├── check-versions.js ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── dev.env.js ├── index.js ├── prod.env.js └── test.env.js ├── logs └── log-2018-04-26.log ├── manifest.json ├── package-lock.json ├── package.json ├── server ├── lib │ ├── Util │ │ └── until.js │ ├── auth │ │ └── auth.service.js │ ├── config │ │ └── config.js │ └── log4js │ │ └── logger.js ├── router │ └── router.js └── server.js ├── src ├── components │ ├── MyButton.js │ ├── MyButtonController.js │ ├── fleeinggoods.js │ ├── integration.js │ ├── nav.js │ ├── security.js │ └── tips.js ├── data │ ├── music │ │ └── music.mp3 │ └── video │ │ ├── wild.mp4 │ │ └── wild.webm ├── flux │ ├── actions │ │ └── ButtonActions.js │ ├── dispatcher │ │ └── AppDispatcher.js │ └── stores │ │ └── ListStore.js ├── index.js ├── page │ ├── FleeingGoods.js │ ├── Inteagration.js │ ├── Security.js │ └── index.js ├── static │ ├── css │ │ ├── animate.css │ │ ├── bootstrap.css │ │ ├── flexslider.css │ │ ├── icomoon.css │ │ ├── magnific-popup.css │ │ ├── owl.carousel.min.css │ │ ├── owl.theme.default.min.css │ │ ├── style.css │ │ └── themify-icons.css │ ├── font │ │ ├── arial.ttf │ │ ├── arialbd.ttf │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ ├── fonts │ │ ├── bootstrap │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── icomoon │ │ │ ├── icomoon.eot │ │ │ ├── icomoon.svg │ │ │ ├── icomoon.ttf │ │ │ └── icomoon.woff │ │ └── themify-icons │ │ │ ├── themify.eot │ │ │ ├── themify.svg │ │ │ ├── themify.ttf │ │ │ └── themify.woff │ ├── images │ │ ├── 221950.jpg │ │ ├── grid.png │ │ ├── img_1.jpg │ │ ├── img_2.jpg │ │ ├── img_3.jpg │ │ ├── img_4.jpg │ │ ├── img_5.jpg │ │ ├── img_6.jpg │ │ ├── img_bg_1.jpg │ │ ├── img_bg_2.jpg │ │ ├── img_bg_3.jpg │ │ ├── loader.gif │ │ └── refresh.png │ └── js │ │ └── main.js └── template │ └── index.html └── static ├── .gitkeep └── js ├── autoRem.js ├── layer ├── layer.js ├── mobile │ ├── layer.js │ └── need │ │ └── layer.css └── skin │ └── default │ ├── icon-ext.png │ ├── icon.png │ ├── layer.css │ ├── loading-0.gif │ ├── loading-1.gif │ └── loading-2.gif └── layer_mobile ├── layer.js └── need └── layer.css /.babelrc: -------------------------------------------------------------------------------- 1 | // { 2 | // "presets": [ 3 | // "react" 4 | // ] 5 | // } 6 | { 7 | "presets": [ 8 | ["env", { 9 | "targets": { 10 | "browsers": ["last 2 versions", "safari >= 7" ,"chrome >=60"], 11 | "node": "9.2", 12 | "uglify":true, 13 | "debug":true 14 | } 15 | }] 16 | ] 17 | } 18 | 19 | // { 20 | // "presets": [ 21 | // ["env", { 22 | // "modules": false, 23 | // "targets": { 24 | // "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 25 | // } 26 | // }], 27 | // "stage-2" 28 | // ], 29 | // "plugins": ["transform-vue-jsx", "transform-runtime"], 30 | // "env": { 31 | // "test": { 32 | // "presets": ["env", "stage-2"], 33 | // "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 34 | // } 35 | // } 36 | // } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode/ 3 | node_modules/ 4 | /dist/ 5 | npm-debug.log* 6 | yarn-debug.log* 7 | yarn-error.log* 8 | /test/unit/coverage/ 9 | /test/e2e/reports/ 10 | selenium-debug.log 11 | 12 | # Editor directories and files 13 | .idea 14 | .vscode 15 | *.suo 16 | *.ntvs* 17 | *.njsproj 18 | *.sln 19 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | // to edit target browsers: use "browserslist" field in package.json 6 | "postcss-import": {}, 7 | "autoprefixer": {} 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Welcome to webpack-for-react-vue-template 2 | 3 | ## 模版下载 4 | ``` bash 5 | $ git clone https://github.com/xulayen/webpack-for-react-template.git && cd webpack-for-react-template 6 | ``` 7 | 8 | ## 模版安装 9 | 10 | ``` bash 11 | $ npm i 12 | ``` 13 | 14 | ## 开发 15 | 16 | - 开发过程中使用代理访问服务器 17 | 18 | ``` bash 19 | $ npm run start 20 | 21 | $ npm run dev_server_win 22 | ``` 23 | 24 | ## 打包 25 | 26 | ``` bash 27 | $ npm run build 28 | ``` 29 | 30 | ## 启动后端服务 31 | 32 | ``` bash 33 | $ npm run server_win 34 | 35 | $ npm run server_linux 36 | 37 | $ npm run server_mac 38 | ``` 39 | 40 | ## 打包之后访问 41 | 42 | http://127.0.0.1:8011/ 43 | 44 | ## 文件结构 45 | ``` bash 46 | node_modules 47 | build 48 | build.js 49 | # build config 50 | check-versions.js 51 | # 版本控制 52 | utils.js 53 | # 默认工具 54 | vue-loader.conf.js 55 | # vue配置 56 | webpack.base.conf.js 57 | # 基础配置默认包含react配置 58 | webpack.dev.conf.js 59 | # 开发环境下使用 60 | webpack.prod.conf.js 61 | # 正式环境下使用 62 | config 63 | dev.env.js 64 | # 开发环境配置 65 | index.js 66 | # 默认基础配置 67 | prod.env.js 68 | # 生产环境配置 69 | test.env.js 70 | # 测试环境配置 71 | static 72 | ... 73 | # Static resources used by the project 74 | server 75 | config 76 | config.js 77 | # config file 78 | router 79 | router.js 80 | # router file 81 | static 82 | # All the resource files that are generated after the site is released 83 | Util 84 | until.js 85 | # until file 86 | index.html 87 | # script build the file 88 | server.js 89 | # start a nodejs server 90 | src 91 | components 92 | # Store the directory of the project components 93 | data 94 | # website resource files eg. mp3 file or and so on 95 | flux 96 | # use flux to get or set data flow 97 | page 98 | # website page components 99 | static 100 | # src resource files that need to package 101 | template 102 | # html template 103 | index.js 104 | # app entryn file 105 | .babelrc 106 | # .babelrc file 107 | package.json 108 | # package manage 109 | .editorconfig 110 | # 开发工具统一管理器 111 | .gitignore 112 | # git 忽略的文件配置 113 | .postcssrc.js 114 | # 通过JS插件来转换CSS 115 | ``` -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // if you are using ts-loader, setting this to true will make tyescript errors show up during build 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const config = require('../config') 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const packageConfig = require('../package.json') 6 | 7 | exports.assetsPath = function (_path) { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 9 | ? config.build.assetsSubDirectory 10 | : config.dev.assetsSubDirectory 11 | 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | const cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | sourceMap: options.sourceMap 22 | } 23 | } 24 | 25 | const postcssLoader = { 26 | loader: 'postcss-loader', 27 | options: { 28 | sourceMap: options.sourceMap 29 | } 30 | } 31 | 32 | // generate loader string to be used with extract text plugin 33 | function generateLoaders (loader, loaderOptions) { 34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] 35 | 36 | if (loader) { 37 | loaders.push({ 38 | loader: loader + '-loader', 39 | options: Object.assign({}, loaderOptions, { 40 | sourceMap: options.sourceMap 41 | }) 42 | }) 43 | } 44 | 45 | // Extract CSS when that option is specified 46 | // (which is the case during production build) 47 | if (options.extract) { 48 | return ExtractTextPlugin.extract({ 49 | use: loaders, 50 | fallback: 'vue-style-loader' 51 | }) 52 | } else { 53 | return ['vue-style-loader'].concat(loaders) 54 | } 55 | } 56 | 57 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 58 | return { 59 | css: generateLoaders(), 60 | postcss: generateLoaders(), 61 | less: generateLoaders('less'), 62 | sass: generateLoaders('sass', { indentedSyntax: true }), 63 | scss: generateLoaders('sass'), 64 | stylus: generateLoaders('stylus'), 65 | styl: generateLoaders('stylus') 66 | } 67 | } 68 | 69 | // Generate loaders for standalone style files (outside of .vue) 70 | exports.styleLoaders = function (options) { 71 | const output = [] 72 | const loaders = exports.cssLoaders(options) 73 | 74 | for (const extension in loaders) { 75 | const loader = loaders[extension] 76 | output.push({ 77 | test: new RegExp('\\.' + extension + '$'), 78 | use: loader 79 | }) 80 | } 81 | 82 | return output 83 | } 84 | 85 | exports.createNotifierCallback = () => { 86 | const notifier = require('node-notifier') 87 | 88 | return (severity, errors) => { 89 | if (severity !== 'error') return 90 | 91 | const error = errors[0] 92 | const filename = error.file && error.file.split('!').pop() 93 | 94 | notifier.notify({ 95 | title: packageConfig.name, 96 | message: severity + ': ' + error.name, 97 | subtitle: filename || '', 98 | icon: path.join(__dirname, 'logo.png') 99 | }) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const config = require('../config') 5 | const vueLoaderConfig = require('./vue-loader.conf') 6 | 7 | function resolve (dir) { 8 | return path.join(__dirname, '..', dir) 9 | } 10 | 11 | const createLintingRule = () => ({ 12 | test: /\.(js|vue)$/, 13 | loader: 'eslint-loader', 14 | enforce: 'pre', 15 | include: [resolve('src'), resolve('test')], 16 | options: { 17 | formatter: require('eslint-friendly-formatter'), 18 | emitWarning: !config.dev.showEslintErrorsInOverlay 19 | } 20 | }) 21 | 22 | module.exports = { 23 | context: path.resolve(__dirname, '../'), 24 | entry: { 25 | app: './src/index.js' 26 | }, 27 | output: { 28 | path: config.build.assetsRoot, 29 | filename: '[name].js', 30 | publicPath: process.env.NODE_ENV === 'production' 31 | ? config.build.assetsPublicPath 32 | : config.dev.assetsPublicPath 33 | }, 34 | resolve: { 35 | extensions: ['.js', '.vue', '.json','.jsx'], 36 | alias: { 37 | 'vue$': 'vue/dist/vue.esm.js', 38 | '@': resolve('src'), 39 | } 40 | }, 41 | module: { 42 | rules: [ 43 | ...(config.dev.useEslint ? [createLintingRule()] : []), 44 | { 45 | test: /\.vue$/, 46 | loader: 'vue-loader', 47 | options: vueLoaderConfig 48 | }, 49 | { 50 | test:/\.jsx?$/, 51 | loader: 'babel-loader', 52 | include: [resolve('src'), resolve('test')], 53 | options: { 54 | presets: ['react'], 55 | plugins: ['transform-runtime'] 56 | } 57 | }, 58 | { 59 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 60 | loader: 'url-loader', 61 | options: { 62 | limit: 1, 63 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 64 | } 65 | }, 66 | { 67 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 68 | loader: 'url-loader', 69 | options: { 70 | limit: 1, 71 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 72 | } 73 | }, 74 | { 75 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 76 | loader: 'url-loader', 77 | options: { 78 | limit: 1, 79 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 80 | } 81 | }, 82 | { 83 | test: /\.xml$/, 84 | loader: 'xml-loader', 85 | options: { 86 | limit: 1, 87 | name:'data/[name].[hash:7].[ext]' 88 | } 89 | }, 90 | ] 91 | }, 92 | node: { 93 | // prevent webpack from injecting useless setImmediate polyfill because Vue 94 | // source contains it (although only uses it if it's native). 95 | setImmediate: false, 96 | // prevent webpack from injecting mocks to Node native modules 97 | // that does not make sense for the client 98 | dgram: 'empty', 99 | fs: 'empty', 100 | net: 'empty', 101 | tls: 'empty', 102 | child_process: 'empty' 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const webpack = require('webpack') 4 | const config = require('../config') 5 | const merge = require('webpack-merge') 6 | const baseWebpackConfig = require('./webpack.base.conf') 7 | const HtmlWebpackPlugin = require('html-webpack-plugin') 8 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 9 | const portfinder = require('portfinder') 10 | 11 | const HOST = process.env.HOST 12 | const PORT = process.env.PORT && Number(process.env.PORT) 13 | 14 | const devWebpackConfig = merge(baseWebpackConfig, { 15 | module: { 16 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) 17 | }, 18 | // cheap-module-eval-source-map is faster for development 19 | devtool: config.dev.devtool, 20 | 21 | // these devServer options should be customized in /config/index.js 22 | devServer: { 23 | clientLogLevel: 'warning', 24 | historyApiFallback: true, 25 | hot: true, 26 | compress: true, 27 | host: HOST || config.dev.host, 28 | port: PORT || config.dev.port, 29 | open: config.dev.autoOpenBrowser, 30 | overlay: config.dev.errorOverlay 31 | ? { warnings: false, errors: true } 32 | : false, 33 | publicPath: config.dev.assetsPublicPath, 34 | proxy: config.dev.proxyTable, 35 | quiet: true, // necessary for FriendlyErrorsPlugin 36 | watchOptions: { 37 | poll: config.dev.poll, 38 | } 39 | }, 40 | plugins: [ 41 | new webpack.DefinePlugin({ 42 | 'process.env': require('../config/dev.env') 43 | }), 44 | new webpack.HotModuleReplacementPlugin(), 45 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 46 | new webpack.NoEmitOnErrorsPlugin(), 47 | // https://github.com/ampedandwired/html-webpack-plugin 48 | new HtmlWebpackPlugin({ 49 | title: '模版', 50 | viewport:'width=device-width, initial-scale=1', 51 | template:'./src/template/index.html', 52 | inject: true, 53 | CDN:'/' 54 | }), 55 | new webpack.ProvidePlugin({ 56 | join: ['lodash', 'join'], 57 | $:['jquery'], 58 | trim:['jquery','trim'], 59 | jQuery:['jquery'] 60 | }) 61 | ] 62 | }) 63 | 64 | module.exports = new Promise((resolve, reject) => { 65 | portfinder.basePort = process.env.PORT || config.dev.port 66 | portfinder.getPort((err, port) => { 67 | if (err) { 68 | reject(err) 69 | } else { 70 | // publish the new Port, necessary for e2e tests 71 | process.env.PORT = port 72 | // add port to devServer config 73 | devWebpackConfig.devServer.port = port 74 | 75 | // Add FriendlyErrorsPlugin 76 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 77 | compilationSuccessInfo: { 78 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 79 | }, 80 | onErrors: config.dev.notifyOnErrors 81 | ? utils.createNotifierCallback() 82 | : undefined 83 | })) 84 | 85 | resolve(devWebpackConfig) 86 | } 87 | }) 88 | }) 89 | -------------------------------------------------------------------------------- /build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const webpack = require('webpack') 5 | const config = require('../config') 6 | const merge = require('webpack-merge') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 13 | const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin') 14 | const ImageminPlugin = require('imagemin-webpack-plugin').default 15 | 16 | const env = process.env.NODE_ENV === 'testing' 17 | ? require('../config/test.env') 18 | : require('../config/prod.env') 19 | 20 | const webpackConfig = merge(baseWebpackConfig, { 21 | module: { 22 | rules: utils.styleLoaders({ 23 | sourceMap: config.build.productionSourceMap, 24 | extract: true, 25 | usePostCSS: true 26 | }) 27 | }, 28 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 29 | output: { 30 | path: config.build.assetsRoot, 31 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 32 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 33 | }, 34 | plugins: [ 35 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 36 | new webpack.DefinePlugin({ 37 | 'process.env': env 38 | }), 39 | new UglifyJsPlugin({ 40 | uglifyOptions: { 41 | compress: { 42 | warnings: false 43 | } 44 | }, 45 | sourceMap: config.build.productionSourceMap, 46 | parallel: true 47 | }), 48 | // extract css into its own file 49 | new ExtractTextPlugin({ 50 | filename: utils.assetsPath('css/[name].[contenthash].css'), 51 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 52 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 53 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 54 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 55 | allChunks: true, 56 | }), 57 | // Compress extracted CSS. We are using this plugin so that possible 58 | // duplicated CSS from different components can be deduped. 59 | new OptimizeCSSPlugin({ 60 | cssProcessorOptions: config.build.productionSourceMap 61 | ? { safe: true, map: { inline: false } } 62 | : { safe: true } 63 | }), 64 | // generate dist index.html with correct asset hash for caching. 65 | // you can customize output by editing /index.html 66 | // see https://github.com/ampedandwired/html-webpack-plugin 67 | new HtmlWebpackPlugin({ 68 | filename: process.env.NODE_ENV === 'testing' 69 | ? 'index.html' 70 | : config.build.index, 71 | template: './src/template/index.html', 72 | inject: true, 73 | minify: { 74 | removeComments: true, 75 | collapseWhitespace: true, 76 | removeAttributeQuotes: true 77 | // more options: 78 | // https://github.com/kangax/html-minifier#options-quick-reference 79 | }, 80 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 81 | chunksSortMode: 'dependency', 82 | CDN:config.build.cdn 83 | }), 84 | // keep module.id stable when vender modules does not change 85 | new webpack.HashedModuleIdsPlugin(), 86 | // enable scope hoisting 87 | new webpack.optimize.ModuleConcatenationPlugin(), 88 | // mark 89 | new webpack.BannerPlugin("作者:xulayen 模版地址:https://github.com/xulayen/webpack-for-react-template"), 90 | /** 91 | * 优化CSS 92 | */ 93 | new OptimizeCSSPlugin(), 94 | /** 95 | * 优化 CSS(去重/压缩) 96 | */ 97 | new OptimizeCssAssetsPlugin(), 98 | // split vendor js into its own file 99 | new webpack.optimize.CommonsChunkPlugin({ 100 | name: 'vendor', 101 | minChunks (module) { 102 | // any required modules inside node_modules are extracted to vendor 103 | return ( 104 | module.resource && 105 | /\.js$/.test(module.resource) && 106 | module.resource.indexOf( 107 | path.join(__dirname, '../node_modules') 108 | ) === 0 109 | ) 110 | } 111 | }), 112 | // extract webpack runtime and module manifest to its own file in order to 113 | // prevent vendor hash from being updated whenever app bundle is updated 114 | new webpack.optimize.CommonsChunkPlugin({ 115 | name: 'manifest', 116 | minChunks: Infinity 117 | }), 118 | // This instance extracts shared chunks from code splitted chunks and bundles them 119 | // in a separate chunk, similar to the vendor chunk 120 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 121 | new webpack.optimize.CommonsChunkPlugin({ 122 | name: 'app', 123 | async: 'vendor-async', 124 | children: true, 125 | minChunks: 3 126 | }), 127 | new ImageminPlugin({ 128 | test: /\.(jpe?g|png|gif|svg)$/i, 129 | pngquant: { 130 | quality: '70' 131 | }, 132 | jpegtran: { 133 | quality: '70', 134 | progressive: true 135 | } 136 | }), 137 | // copy custom static assets 138 | new CopyWebpackPlugin([ 139 | { 140 | from: path.resolve(__dirname, '../static'), 141 | to: config.build.assetsSubDirectory, 142 | ignore: ['.*'] 143 | }, 144 | { 145 | from: path.resolve(__dirname, '../server'), 146 | ignore: ['.*'] 147 | } 148 | ]), 149 | new webpack.ProvidePlugin({ 150 | join: ['lodash', 'join'], 151 | $:['jquery'], 152 | trim:['jquery','trim'], 153 | jQuery:['jquery'] 154 | }) 155 | ] 156 | }) 157 | 158 | if (config.build.productionGzip) { 159 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 160 | 161 | webpackConfig.plugins.push( 162 | new CompressionWebpackPlugin({ 163 | asset: '[path].gz[query]', 164 | algorithm: 'gzip', 165 | test: new RegExp( 166 | '\\.(' + 167 | config.build.productionGzipExtensions.join('|') + 168 | ')$' 169 | ), 170 | threshold: 1024, 171 | minRatio: 0.8 172 | }) 173 | ) 174 | } 175 | 176 | if (config.build.bundleAnalyzerReport) { 177 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 178 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 179 | } 180 | 181 | module.exports = webpackConfig 182 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.2.7 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: { 14 | "/gettoken":{ 15 | target:'http://127.0.0.1:8011/', 16 | changeOrigin:true, 17 | secure:false 18 | }, 19 | "/index":{ 20 | target:'http://127.0.0.1:8011/', 21 | changeOrigin:true, 22 | secure:false 23 | }, 24 | "/c":{ 25 | target:'http://127.0.0.1:8011/', 26 | changeOrigin:true, 27 | secure:false 28 | } 29 | }, 30 | // Various Dev Server settings 31 | host: 'localhost', // can be overwritten by process.env.HOST 32 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 33 | autoOpenBrowser: false, 34 | errorOverlay: true, 35 | notifyOnErrors: true, 36 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 37 | 38 | // Use Eslint Loader? 39 | // If true, your code will be linted during bundling and 40 | // linting errors and warnings will be shown in the console. 41 | useEslint: false, 42 | // If true, eslint errors and warnings will also be shown in the error overlay 43 | // in the browser. 44 | showEslintErrorsInOverlay: false, 45 | 46 | /** 47 | * Source Maps 48 | */ 49 | 50 | // https://webpack.js.org/configuration/devtool/#development 51 | devtool: 'eval-source-map', 52 | 53 | // If you have problems debugging vue-files in devtools, 54 | // set this to false - it *may* help 55 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 56 | cacheBusting: true, 57 | 58 | // CSS Sourcemaps off by default because relative paths are "buggy" 59 | // with this option, according to the CSS-Loader README 60 | // (https://github.com/webpack/css-loader#sourcemaps) 61 | // In our experience, they generally work as expected, 62 | // just be aware of this issue when enabling this option. 63 | cssSourceMap: false, 64 | }, 65 | 66 | build: { 67 | // Template for index.html 68 | index: path.resolve(__dirname, '../dist/index.html'), 69 | 70 | // Paths 71 | assetsRoot: path.resolve(__dirname, '../dist'), 72 | assetsSubDirectory: 'static', 73 | assetsPublicPath: '/', 74 | cdn:'/', 75 | /** 76 | * Source Maps 77 | */ 78 | 79 | productionSourceMap: true, 80 | // https://webpack.js.org/configuration/devtool/#production 81 | devtool: '#source-map', 82 | 83 | // Gzip off by default as many popular static hosts such as 84 | // Surge or Netlify already gzip all static assets for you. 85 | // Before setting to `true`, make sure to: 86 | // npm install --save-dev compression-webpack-plugin 87 | productionGzip: false, 88 | productionGzipExtensions: ['js', 'css','html','img','png','jpg','gif'], 89 | 90 | // Run the build command with an extra argument to 91 | // View the bundle analyzer report after build finishes: 92 | // `npm run build --report` 93 | // Set to `true` or `false` to always turn it on or off 94 | bundleAnalyzerReport: process.env.npm_config_report 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /logs/log-2018-04-26.log: -------------------------------------------------------------------------------- 1 | [2018-04-26T14:10:13.358] [INFO] cheese - App (production) is now running on port 8011 2 | [2018-04-26T17:33:19.653] [INFO] cheese - App (production) is now running on port 8011 3 | [2018-04-26T17:39:12.629] [INFO] cheese - App (production) is now running on port 8011 4 | [2018-04-26T17:46:02.247] [INFO] cheese - App (production) is now running on port 8011 5 | [2018-04-26T17:48:10.106] [INFO] cheese - App (production) is now running on port 8011 6 | [2018-04-26T17:49:00.703] [INFO] cheese - App (dev) is now running on port 8011 7 | [2018-04-26T17:52:53.742] [INFO] cheese - App (dev) is now running on port 8011 8 | [2018-04-26T17:53:14.415] [INFO] cheese - App (dev) is now running on port 8011 9 | [2018-04-26T17:54:40.525] [INFO] cheese - App (dev) is now running on port 8011 10 | [2018-04-26T17:55:12.456] [INFO] cheese - App (dev) is now running on port 8011 11 | [2018-04-26T17:55:34.814] [INFO] cheese - App (dev) is now running on port 8011 12 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | {"name":"vendor.62c2fbe6a6a618685aba","content":{"./node_modules/process/browser.js":{"id":0,"meta":{}},"./node_modules/invariant/browser.js":{"id":1,"meta":{}},"./node_modules/react/index.js":{"id":2,"meta":{}},"./node_modules/prop-types/index.js":{"id":3,"meta":{}},"./node_modules/create-react-class/index.js":{"id":4,"meta":{}},"./node_modules/fbjs/lib/emptyFunction.js":{"id":5,"meta":{}},"./node_modules/warning/browser.js":{"id":6,"meta":{}},"./node_modules/react-router/es/RouteUtils.js":{"id":7,"meta":{"harmonyModule":true},"exports":["isReactChildren","createRouteFromReactElement","createRoutesFromReactChildren","createRoutes"]},"./node_modules/history/lib/PathUtils.js":{"id":8,"meta":{}},"./node_modules/object-assign/index.js":{"id":9,"meta":{}},"./node_modules/fbjs/lib/invariant.js":{"id":10,"meta":{}},"./node_modules/react-router/es/routerWarning.js":{"id":11,"meta":{"harmonyModule":true},"exports":["default","_resetWarned"]},"./node_modules/react-router/es/PatternUtils.js":{"id":12,"meta":{"harmonyModule":true},"exports":["compilePattern","matchPattern","getParamNames","getParams","formatPattern"]},"./node_modules/history/lib/LocationUtils.js":{"id":13,"meta":{}},"./node_modules/fbjs/lib/emptyObject.js":{"id":14,"meta":{}},"./node_modules/fbjs/lib/warning.js":{"id":15,"meta":{}},"./node_modules/react-router/es/InternalPropTypes.js":{"id":16,"meta":{"harmonyModule":true},"exports":["falsy","history","component","components","route","routes"]},"./node_modules/history/lib/Actions.js":{"id":17,"meta":{}},"./node_modules/history/lib/DOMUtils.js":{"id":18,"meta":{}},"./node_modules/prop-types/checkPropTypes.js":{"id":19,"meta":{}},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":{"id":20,"meta":{}},"./node_modules/react-router/es/AsyncUtils.js":{"id":21,"meta":{"harmonyModule":true},"exports":["loopAsync","mapAsync"]},"./node_modules/react-router/es/RouterContext.js":{"id":22,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/ContextUtils.js":{"id":23,"meta":{"harmonyModule":true},"exports":["ContextProvider","ContextSubscriber"]},"./node_modules/react-router/es/PropTypes.js":{"id":24,"meta":{"harmonyModule":true},"exports":["routerShape","locationShape"]},"./node_modules/history/lib/runTransitionHook.js":{"id":25,"meta":{}},"./node_modules/history/lib/createHistory.js":{"id":26,"meta":{}},"./node_modules/history/lib/ExecutionEnvironment.js":{"id":27,"meta":{}},"./node_modules/history/lib/BrowserProtocol.js":{"id":28,"meta":{}},"./node_modules/fbjs/lib/ExecutionEnvironment.js":{"id":29,"meta":{}},"./node_modules/fbjs/lib/EventListener.js":{"id":30,"meta":{}},"./node_modules/fbjs/lib/getActiveElement.js":{"id":31,"meta":{}},"./node_modules/fbjs/lib/shallowEqual.js":{"id":32,"meta":{}},"./node_modules/fbjs/lib/containsNode.js":{"id":33,"meta":{}},"./node_modules/fbjs/lib/focusNode.js":{"id":34,"meta":{}},"./node_modules/react-router/es/createTransitionManager.js":{"id":35,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/PromiseUtils.js":{"id":36,"meta":{"harmonyModule":true},"exports":["isPromise"]},"./node_modules/react-router/es/RouterUtils.js":{"id":37,"meta":{"harmonyModule":true},"exports":["createRouterObject","assignRouterState"]},"./node_modules/react-router/es/Link.js":{"id":38,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/Redirect.js":{"id":39,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/createMemoryHistory.js":{"id":40,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/history/lib/useQueries.js":{"id":41,"meta":{}},"./node_modules/history/lib/useBasename.js":{"id":42,"meta":{}},"./node_modules/react-router/es/useRouterHistory.js":{"id":43,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/history/lib/DOMStateStorage.js":{"id":44,"meta":{}},"./node_modules/react-router/es/createRouterHistory.js":{"id":45,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/jquery_wechat_sdk/index.js":{"id":47,"meta":{}},"./node_modules/jquery/dist/jquery.js":{"id":48,"meta":{}},"./node_modules/react/cjs/react.production.min.js":{"id":49,"meta":{}},"./node_modules/react/cjs/react.development.js":{"id":50,"meta":{}},"./node_modules/react-dom/index.js":{"id":51,"meta":{}},"./node_modules/react-dom/cjs/react-dom.production.min.js":{"id":52,"meta":{}},"./node_modules/fbjs/lib/isTextNode.js":{"id":53,"meta":{}},"./node_modules/fbjs/lib/isNode.js":{"id":54,"meta":{}},"./node_modules/react-dom/cjs/react-dom.development.js":{"id":55,"meta":{}},"./node_modules/fbjs/lib/hyphenateStyleName.js":{"id":56,"meta":{}},"./node_modules/fbjs/lib/hyphenate.js":{"id":57,"meta":{}},"./node_modules/fbjs/lib/camelizeStyleName.js":{"id":58,"meta":{}},"./node_modules/fbjs/lib/camelize.js":{"id":59,"meta":{}},"./node_modules/react-router/es/index.js":{"id":60,"meta":{"harmonyModule":true},"exports":["Router","Link","IndexLink","withRouter","IndexRedirect","IndexRoute","Redirect","Route","createRoutes","RouterContext","locationShape","routerShape","match","useRouterHistory","formatPattern","applyRouterMiddleware","browserHistory","hashHistory","createMemoryHistory"]},"./node_modules/react-router/es/Router.js":{"id":61,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/create-react-class/factory.js":{"id":62,"meta":{}},"./node_modules/prop-types/factoryWithTypeCheckers.js":{"id":63,"meta":{}},"./node_modules/prop-types/factoryWithThrowingShims.js":{"id":64,"meta":{}},"./node_modules/react-router/es/computeChangedRoutes.js":{"id":65,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/TransitionUtils.js":{"id":66,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/isActive.js":{"id":67,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/getComponents.js":{"id":68,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/matchRoutes.js":{"id":69,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/getRouteParams.js":{"id":70,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/IndexLink.js":{"id":71,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/withRouter.js":{"id":72,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/hoist-non-react-statics/index.js":{"id":73,"meta":{}},"./node_modules/react-router/es/IndexRedirect.js":{"id":74,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/IndexRoute.js":{"id":75,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/Route.js":{"id":76,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/match.js":{"id":77,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/query-string/index.js":{"id":78,"meta":{}},"./node_modules/strict-uri-encode/index.js":{"id":79,"meta":{}},"./node_modules/history/lib/createMemoryHistory.js":{"id":80,"meta":{}},"./node_modules/history/lib/AsyncUtils.js":{"id":81,"meta":{}},"./node_modules/react-router/es/applyRouterMiddleware.js":{"id":82,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/react-router/es/browserHistory.js":{"id":83,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/history/lib/createBrowserHistory.js":{"id":84,"meta":{}},"./node_modules/history/lib/RefreshProtocol.js":{"id":85,"meta":{}},"./node_modules/react-router/es/hashHistory.js":{"id":86,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/history/lib/createHashHistory.js":{"id":87,"meta":{}},"./node_modules/history/lib/HashProtocol.js":{"id":88,"meta":{}}}} -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webpack-for-react-template", 3 | "version": "1.0.0", 4 | "description": "webpack for react/vue project", 5 | "author": "xulayen ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "build": "node build/build.js", 11 | "dev_server_win": "set NODE_ENV=dev && node server/server.js", 12 | "server_win": "set NODE_ENV=production && set LEANCLOUD_APP_PORT=8011 && node dist/server.js", 13 | "server_linux": "export NODE_ENV=production && export LEANCLOUD_APP_PORT=8011 && node dist/server.js", 14 | "server_mac": "export NODE_ENV=production && export LEANCLOUD_APP_PORT=8011 && node dist/server.js" 15 | }, 16 | "dependencies": { 17 | "vue": "^2.5.2", 18 | "vue-router": "^3.0.1", 19 | "react-intl": "^2.4.0" 20 | }, 21 | "devDependencies": { 22 | "autoprefixer": "^7.1.2", 23 | "babel-core": "^6.22.1", 24 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 25 | "babel-jest": "^21.0.2", 26 | "babel-loader": "^7.1.1", 27 | "babel-plugin-dynamic-import-node": "^1.2.0", 28 | "babel-plugin-syntax-jsx": "^6.18.0", 29 | "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", 30 | "babel-plugin-transform-runtime": "^6.22.0", 31 | "babel-plugin-transform-vue-jsx": "^3.5.0", 32 | "babel-preset-env": "^1.3.2", 33 | "babel-preset-react": "^6.24.1", 34 | "babel-preset-stage-2": "^6.22.0", 35 | "babel-register": "^6.22.0", 36 | "chalk": "^2.0.1", 37 | "chromedriver": "^2.27.2", 38 | "composable-middleware": "^0.3.0", 39 | "connect-mongo": "^2.0.0", 40 | "copy-webpack-plugin": "^4.0.1", 41 | "cross-spawn": "^5.0.1", 42 | "css-loader": "^0.28.0", 43 | "edge": "^7.10.1", 44 | "express-jwt": "^5.3.0", 45 | "express-session": "^1.15.6", 46 | "extract-text-webpack-plugin": "^3.0.0", 47 | "file-loader": "^1.1.4", 48 | "friendly-errors-webpack-plugin": "^1.6.1", 49 | "html-webpack-plugin": "^2.30.1", 50 | "imagemin-webpack-plugin": "^1.5.2", 51 | "jest": "^21.2.0", 52 | "jest-serializer-vue": "^0.3.0", 53 | "jquery": "^3.2.1", 54 | "jsonwebtoken": "^8.1.0", 55 | "lodash": "^4.17.4", 56 | "log4js": "^2.4.1", 57 | "morgan": "^1.9.0", 58 | "nightwatch": "^0.9.12", 59 | "node-notifier": "^5.1.2", 60 | "optimize-css-assets-webpack-plugin": "^3.2.0", 61 | "ora": "^1.2.0", 62 | "oracledb": "^2.2.0", 63 | "portfinder": "^1.0.13", 64 | "postcss-import": "^11.0.0", 65 | "postcss-loader": "^2.0.8", 66 | "react": "^16.1.1", 67 | "react-dom": "^16.1.1", 68 | "react-router": "^3.0.0", 69 | "react-router-dom": "^4.2.2", 70 | "react-test-renderer": "^16.2.0", 71 | "rimraf": "^2.6.0", 72 | "selenium-server": "^3.0.1", 73 | "semver": "^5.3.0", 74 | "sha1": "^1.1.1", 75 | "shelljs": "^0.7.6", 76 | "soap": "^0.23.0", 77 | "uglifyjs-webpack-plugin": "^1.1.1", 78 | "url-loader": "^0.5.8", 79 | "vue-jest": "^1.0.2", 80 | "vue-loader": "^13.3.0", 81 | "vue-style-loader": "^3.0.1", 82 | "vue-template-compiler": "^2.5.2", 83 | "webpack": "^3.6.0", 84 | "webpack-bundle-analyzer": "^2.9.0", 85 | "webpack-dev-server": "^2.9.1", 86 | "webpack-merge": "^4.1.0" 87 | }, 88 | "engines": { 89 | "node": ">= 4.0.0", 90 | "npm": ">= 3.0.0" 91 | }, 92 | "browserslist": [ 93 | "> 1%", 94 | "last 2 versions", 95 | "not ie <= 8" 96 | ] 97 | } 98 | -------------------------------------------------------------------------------- /server/lib/Util/until.js: -------------------------------------------------------------------------------- 1 | var Until={ 2 | getClientIp:function(req) { 3 | var ipAddress; 4 | var forwardedIpsStr = req.header('HTTP_X_FORWARDED_FOR'); 5 | console.log(forwardedIpsStr); 6 | if (forwardedIpsStr) { 7 | var forwardedIps = forwardedIpsStr.split(','); 8 | ipAddress = forwardedIps[0]; 9 | } 10 | if (!ipAddress) { 11 | ipAddress = req.connection.remoteAddress; 12 | } 13 | console.log(ipAddress); 14 | return ipAddress; 15 | } 16 | } 17 | 18 | module.exports=Until; -------------------------------------------------------------------------------- /server/lib/auth/auth.service.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zhengguorong on 16/11/2. 3 | * 用户权限认证方法 4 | * 5 | * * Q&A 6 | * 为什么要使用composable-middleware,为了解决什么问题? 7 | * 他的作用是合并两个中间件,让其不需要在挂在在express实例上,例如expressJwt中间件是在执行后操作req对象,在req对象 8 | * 上加入user对象,但该中间件未提供回调方法,无法在验证后执行我们的代码,因此需要使用composable插件来完成两个中间件的 9 | * 合并. 10 | * 当然,你也可以像官方提供示例一样,router.get('/',jwtvalidate,function(req,res,next){req.user})获取结果,但是 11 | * 我的路由第三个参数主要执行数据库相关操作,不想引入验证逻辑,所以在第二个参数这里完成权限的认证. 12 | * 13 | */ 14 | 15 | const jwt = require('jsonwebtoken'); 16 | const expressJwt = require('express-jwt'); 17 | const config = require('../config/config.js'); 18 | const compose = require('composable-middleware'); 19 | var log4js=require('../log4js/logger.js'); 20 | 21 | const validateJwt = expressJwt({ 22 | secret: config.session.secret 23 | }) 24 | 25 | module.exports.isAuthenticated = () => { 26 | return compose() 27 | .use(function (req, res, next) { 28 | log4js.info(JSON.stringify(req.headers)); 29 | // allow access_token to be passed through query parameter as well 30 | if (req.query && req.query.hasOwnProperty('access_token')) { 31 | req.headers.authorization = `Bearer ${req.query.access_token}`; 32 | } 33 | if(req.body && req.body.hasOwnProperty('access_token')) { 34 | req.headers.authorization = `Bearer ${req.body.access_token}`; 35 | } 36 | // IE11 forgets to set Authorization header sometimes. Pull from cookie instead. 37 | if (req.query && typeof req.headers.authorization === 'undefined') { 38 | req.headers.authorization = `Bearer ${req.cookies.token}`; 39 | } 40 | //验证是否服务端生成的token 41 | var token = req.headers.authorization.split('Bearer')[1]; 42 | log4js.info("【token-token:"+token+"】"); 43 | //验证token是否过期 44 | validateJwt(req, res, next); 45 | 46 | }) 47 | // Attach user to request 48 | .use(function (req, res, next) { 49 | //return res.status(200).end(); 50 | next(); 51 | }); 52 | } 53 | 54 | module.exports.hasRole = (roleRequired) => { 55 | if (!roleRequired) { 56 | throw new Error('必须输入身份名称'); 57 | } 58 | 59 | return compose() 60 | .use(this.isAuthenticated()) 61 | .use(function meetsRequirements(req, res, next) { 62 | return next(); 63 | //return res.status(403).send('没有访问权限'); 64 | }); 65 | } 66 | 67 | module.exports.signToken = (id, role) => { 68 | return jwt.sign({_id: id, role}, config.session.secret, { 69 | expiresIn: 60 * 60 * 5 // 过期时间 表示5小时过期 70 | }) 71 | } -------------------------------------------------------------------------------- /server/lib/config/config.js: -------------------------------------------------------------------------------- 1 | 2 | let config={ 3 | port:8011, 4 | log4js:{ 5 | type: "dateFile", 6 | filename:'./logs/log', 7 | alwaysIncludePattern: true, 8 | pattern: "-yyyy-MM-dd.log", 9 | category:"log_date", 10 | encoding : 'utf-8'//default "utf-8",文件的编码 11 | }, 12 | 13 | 14 | session: { 15 | secret: 'template', 16 | key: 'template', 17 | maxAge: 2592000000 18 | }, 19 | mongodb: 'http://localhost:8011', 20 | 21 | oracle:{ 22 | user : process.env.NODE_ORACLEDB_USER || "develop", 23 | 24 | // Instead of hard coding the password, consider prompting for it, 25 | // passing it in an environment variable via process.env, or using 26 | // External Authentication. 27 | password : process.env.NODE_ORACLEDB_PASSWORD || "develop", 28 | 29 | // For information on connection strings see: 30 | // https://oracle.github.io/node-oracledb/doc/api.html#connectionstrings 31 | connectString : process.env.NODE_ORACLEDB_CONNECTIONSTRING || "10.20.31.11/CCN1", 32 | 33 | // Setting externalAuth is optional. It defaults to false. See: 34 | // https://oracle.github.io/node-oracledb/doc/api.html#extauth 35 | externalAuth : process.env.NODE_ORACLEDB_EXTERNALAUTH ? true : false 36 | } 37 | 38 | } 39 | 40 | module.exports=config; 41 | -------------------------------------------------------------------------------- /server/lib/log4js/logger.js: -------------------------------------------------------------------------------- 1 | const log4js = require('log4js'); 2 | const logconfig = require('../config/config.js'); 3 | 4 | log4js.configure({ 5 | appenders: { 6 | cheese: logconfig.log4js 7 | }, 8 | categories: { default: { appenders: ['cheese'], level: 'trace' } } 9 | }); 10 | 11 | const logger = log4js.getLogger('cheese'); 12 | 13 | 14 | module.exports =logger; 15 | 16 | 17 | // logger.trace('Entering cheese testing'); 18 | // logger.debug('Got cheese.'); 19 | // logger.info('Cheese is Gouda.'); 20 | // logger.warn('Cheese is quite smelly.'); 21 | // logger.error('Cheese is too ripe!'); 22 | // logger.fatal('Cheese was breeding ground for listeria.'); -------------------------------------------------------------------------------- /server/router/router.js: -------------------------------------------------------------------------------- 1 | var Until=require('../lib/Util/until.js'); 2 | var Config=require('../lib/config/config.js'); 3 | var log4js=require('../lib/log4js/logger.js'); 4 | const auth = require('../lib/auth/auth.service.js'); 5 | const config = require('../lib/config/config.js') 6 | var sha1 = require('sha1'); 7 | var soap = require('soap'); 8 | var fs=require('fs'); 9 | const path=require('path'); 10 | const token = "Bearer "+auth.signToken(config.session.secret); 11 | var oracledb = require('oracledb'); 12 | // routes/index.js 13 | module.exports = function (app) { 14 | 15 | 16 | app.get('/c',function(req, res,next){ 17 | oracledb.getConnection({ 18 | user : Config.oracle.user, 19 | password : Config.oracle.password, 20 | connectString : Config.oracle.connectString 21 | },function(err, connection){ 22 | if (err) { 23 | console.error(err.message); 24 | return; 25 | } 26 | connection.execute( 27 | 28 | `SELECT mobile 29 | FROM t_sgm_user_1003 30 | WHERE FACID = :id`, 31 | 32 | [1003] 33 | 34 | ,function(err, result){ 35 | if (err) { 36 | console.error(err.message); 37 | doRelease(connection); 38 | return; 39 | } 40 | console.log(result.metaData); // [ { name: 'DEPARTMENT_ID' }, { name: 'DEPARTMENT_NAME' } ] 41 | console.log(result.rows); // [ [ 180, 'Construction' ] ] 42 | doRelease(connection); 43 | return res.send(result.rows); 44 | 45 | }) 46 | 47 | 48 | // Note: connections should always be released when not needed 49 | function doRelease(connection) { 50 | connection.close( 51 | function(err) { 52 | if (err) { 53 | console.error(err.message); 54 | } 55 | }); 56 | } 57 | }) 58 | 59 | 60 | 61 | }); 62 | 63 | 64 | 65 | app.post('/gettoken',function(req, res,next){ 66 | res.writeHead(200,{ 67 | 'authorization':token 68 | }); 69 | res.end(token); 70 | 71 | 72 | 73 | }); 74 | 75 | 76 | app.post('/index',auth.isAuthenticated(),function(req, res,next){ 77 | return res.send("index api"); 78 | }); 79 | 80 | 81 | app.post('/fw',function(req, res,next) { 82 | log4js.info("【action: /fw 】"); 83 | return res.send("fw apissssssssssssss"); 84 | }); 85 | 86 | app.get('/fw',function(req, res,next) { 87 | log4js.info("【action: /fw 】"); 88 | return res.send("fw apisssssssssssssssssssfffffffffffffffffffffff"); 89 | }); 90 | 91 | app.get('/gettoken',function(req, res,next){ 92 | 93 | return res.end("222222222222222222323232 "); 94 | 95 | }); 96 | 97 | 98 | 99 | app.post('/SendAcVerifyInfo',function(req, res,next){ 100 | log4js.info("【action: /SendAcVerifyInfo 】"); 101 | return res.send("SendAcVerifyInfo api"); 102 | }); 103 | 104 | 105 | 106 | app.use(function(req, res, next) { 107 | 108 | //判断是主动导向404页面,还是传来的前端路由。 109 |    //如果是前端路由则如下处理'./server/index.html' 110 | 111 | fs.readFile(path.join(__dirname,'../index.html'),'utf-8', function(err, data){ 112 | if(err){ 113 | console.log(err); 114 | res.send('后台错误'); 115 | return next(); 116 | } else { 117 | res.writeHead(200,{ 118 | 'Content-type': 'text/html', 119 | 'Connection':'keep-alive' 120 | }); 121 | res.end(data); 122 | return next(); 123 | } 124 | }) 125 | }); 126 | 127 | }; 128 | -------------------------------------------------------------------------------- /server/server.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var http=require('http'); 3 | var express=require('express'); 4 | var path=require('path'); 5 | var ejs=require('ejs'); 6 | var bodyParser = require('body-parser'); 7 | var logger = require('morgan'); 8 | const session = require('express-session') 9 | const MongoStore = require('connect-mongo')(session) 10 | var app=express(); 11 | var log4js=require('./lib/log4js/logger.js'); 12 | var config=require('./lib/config/config.js'); 13 | 14 | 15 | app.use(bodyParser.urlencoded({extended:false})); 16 | app.use(logger('dev')); 17 | app.engine('.html',ejs.__express); 18 | app.set('view engine','html'); 19 | app.set('views',path.join(__dirname)); 20 | app.use(express.static(__dirname)); 21 | 22 | // session 中间件 23 | app.use(session({ 24 | name: config.session.key, // 设置 cookie 中保存 session id 的字段名称 25 | secret: config.session.secret, // 通过设置 secret 来计算 hash 值并放在 cookie 中,使产生的 signedCookie 防篡改 26 | resave: true, // 强制更新 session 27 | saveUninitialized: false, // 设置为 false,强制创建一个 session,即使用户未登录 28 | cookie: { 29 | maxAge: config.session.maxAge// 过期时间,过期后 cookie 中的 session id 自动删除 30 | }, 31 | // store: new MongoStore({// 将 session 存储到 mongodb 32 | // url: config.mongodb// mongodb 地址 33 | // }) 34 | })); 35 | 36 | 37 | var routes = require('./router/router.js')(app); 38 | const PORT = parseInt(process.env.LEANCLOUD_APP_PORT || config.port); 39 | var server = http.createServer(app); 40 | let _s=''; 41 | if(process.env.NODE_ENV && process.env.NODE_ENV.indexOf('production')>-1){ 42 | server.listen(PORT, function(){ 43 | _s='App (production) is now running on port '+PORT; 44 | console.log(_s); 45 | log4js.info(_s); 46 | }); 47 | 48 | }else{ 49 | server.listen(PORT, function(){ 50 | _s='App (dev) is now running on port '+PORT; 51 | console.log(_s); 52 | log4js.info(_s); 53 | }); 54 | } 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/components/MyButton.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | class MyButton extends React.Component{ 4 | constructor(props) { 5 | super(props); 6 | console.log('MyButton.constructor'); 7 | console.log(this.props.items); 8 | var _self=this; 9 | $.ajax({ 10 | url: "/gettoken", 11 | method: "post", 12 | type: "json", 13 | success: function (token) { 14 | console.log(token) 15 | 16 | // _self.state={ 17 | // token:token 18 | // } 19 | } 20 | }); 21 | 22 | } 23 | 24 | submit(){ 25 | 26 | 27 | var _self=this; 28 | $.ajax({ 29 | url: "/index", 30 | method: "post", 31 | type: "json", 32 | // headers: { 33 | // 'Authorization': _self.state.token, 34 | // }, 35 | success: function (resp) { 36 | if (resp.code == 200) { 37 | console.log(resp) 38 | }else{ 39 | console.log(resp) 40 | } 41 | } 42 | }) 43 | } 44 | 45 | 46 | 47 | 48 | 49 | 50 | render(){ 51 | return ( 52 |
53 | 54 | 61 | 62 | 63 | 64 | 65 | 66 |
67 | puizzzz 68 | 69 |
70 | 71 |
72 | ) 73 | } 74 | } 75 | export {MyButton}; 76 | -------------------------------------------------------------------------------- /src/components/MyButtonController.js: -------------------------------------------------------------------------------- 1 | import React from'react'; 2 | import ListStore from '../flux/stores/ListStore.js'; 3 | import ButtonActions from '../flux/actions/ButtonActions.js'; 4 | import {MyButton} from './MyButton.js'; 5 | 6 | 7 | class MyButtonController extends React.Component{ 8 | constructor(props) { 9 | super(props); 10 | this.state={ 11 | items:ListStore.getAll() 12 | }; 13 | } 14 | 15 | componentDidMount() { 16 | console.log(trim(' 7788 ')); 17 | ListStore.addChangeListener(this._onChange.bind(this)); 18 | }; 19 | 20 | componentWillUnmount() { 21 | ListStore.removeChangeListener(this._onChange.bind(this)); 22 | }; 23 | 24 | _onChange () { 25 | console.log('_onChange') 26 | console.log(ListStore.getAll()) 27 | this.setState({ 28 | items: ListStore.getAll() 29 | }); 30 | }; 31 | 32 | createNewItem (event) { 33 | console.log('createNewItem'); 34 | //用法1 推荐 35 | ButtonActions.addNewItem('new item'); 36 | 37 | // //用法2 38 | // ListStore.addNewItemHandler('new item'); 39 | // ListStore.emitChange(); 40 | // ListStore.addChangeListener(this._onChange.bind(this)); 41 | 42 | // //错误用法 43 | // ListStore.addNewItemHandler('new item'); 44 | }; 45 | 46 | render() { 47 | return ; 51 | } 52 | 53 | } 54 | export {MyButtonController} 55 | -------------------------------------------------------------------------------- /src/components/fleeinggoods.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | import React from 'react'; 4 | 5 | import img_1 from '../static/images/img_1.jpg'; 6 | import img_2 from '../static/images/img_2.jpg'; 7 | import img_3 from '../static/images/img_3.jpg'; 8 | import img_4 from '../static/images/img_4.jpg'; 9 | import img_5 from '../static/images/img_5.jpg'; 10 | import img_6 from '../static/images/img_6.jpg'; 11 | 12 | // 窜货 13 | class FleeinggoodsComponent extends React.Component{ 14 | 15 | constructor(props) { 16 | super(props); 17 | } 18 | 19 | render(){ 20 | return ( 21 |
22 |
23 |
24 |
25 |
26 |

27 | Blog

28 |

29 | Dignissimos asperiores vitae velit veniam totam fuga molestias accusamus alias autem 30 | provident. Odit ab aliquam dolor eius.

31 |
32 |
33 |
34 | 50 | 66 |
67 |
68 | 84 |
85 |
86 | 102 |
103 |
104 | 120 | 136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 | ) 145 | } 146 | } 147 | 148 | 149 | export {FleeinggoodsComponent}; 150 | 151 | -------------------------------------------------------------------------------- /src/components/integration.js: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react'; 3 | import img_1 from '../static/images/img_1.jpg'; 4 | import img_2 from '../static/images/img_2.jpg'; 5 | import img_3 from '../static/images/img_3.jpg'; 6 | import img_4 from '../static/images/img_4.jpg'; 7 | import img_5 from '../static/images/img_5.jpg'; 8 | import img_6 from '../static/images/img_6.jpg'; 9 | 10 | // 防伪 11 | class IntegrationComponent extends React.Component{ 12 | 13 | constructor(props) { 14 | super(props); 15 | } 16 | 17 | render(){ 18 | return ( 19 |
20 |
21 |
22 |
23 |
24 |
25 |

26 | Services

27 |

28 | Dignissimos asperiores vitae velit veniam totam fuga molestias accusamus alias autem 29 | provident. Odit ab aliquam dolor eius.

30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | 39 |
40 |

41 | Web Development

42 |

43 | Facilis ipsum reprehenderit nemo molestias. Aut cum mollitia reprehenderit.

44 |
45 |
46 |
47 |
48 |
49 | 50 |
51 |

52 | Web Design

53 |

54 | Facilis ipsum reprehenderit nemo molestias. Aut cum mollitia reprehenderit.

55 |
56 |
57 |
58 |
59 |
60 | 61 |
62 |

63 | Customer Support

64 |

65 | Facilis ipsum reprehenderit nemo molestias. Aut cum mollitia reprehenderit.

66 |
67 |
68 |
69 |
70 |
71 | 72 |
73 |

74 | Web Design

75 |

76 | Facilis ipsum reprehenderit nemo molestias. Aut cum mollitia reprehenderit.

77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | 87 |
88 |

89 | Copy Writing

90 |

91 | Facilis ipsum reprehenderit nemo molestias. Aut cum mollitia reprehenderit.

92 |
93 |
94 |
95 |
96 |
97 | 98 |
99 |

100 | CMS Development

101 |

102 | Facilis ipsum reprehenderit nemo molestias. Aut cum mollitia reprehenderit.

103 |
104 |
105 |
106 |
107 |
108 | 109 |
110 |

111 | Data Gathering

112 |

113 | Facilis ipsum reprehenderit nemo molestias. Aut cum mollitia reprehenderit.

114 |
115 |
116 |
117 |
118 |
119 | 120 |
121 |

122 | Search Engine

123 |

124 | Facilis ipsum reprehenderit nemo molestias. Aut cum mollitia reprehenderit.

125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |

138 | Portfolio

139 |

140 | Dignissimos asperiores vitae velit veniam totam fuga molestias accusamus alias autem 141 | provident. Odit ab aliquam dolor eius.

142 |
143 |
144 | 218 |
219 |
220 |
221 |
222 |
223 |
224 |

225 | Frequently Ask Questions

226 |

227 | Dignissimos asperiores vitae velit veniam totam fuga molestias accusamus alias autem 228 | provident. Odit ab aliquam dolor eius.

229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 | 237 |
238 |

239 | What is Asymmetry?

240 |
241 |
242 |
243 |

244 | Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, 245 | there live the blind texts. Separated they live in Bookmarksgrove right at the coast 246 | of the Semantics, a large language ocean.

247 |
248 |
249 |
250 |
251 |
252 |
253 | 254 |
255 |

256 | I have technical problem, who do I email?

257 |
258 |
259 |
260 |

261 | Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, 262 | there live the blind texts. Separated they live in Bookmarksgrove right at the coast 263 | of the Semantics, a large language ocean.

264 |
265 |
266 |
267 |
268 |
269 |
270 | 271 |
272 |

273 | How do I use Asymmetry features?

274 |
275 |
276 |
277 |

278 | Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, 279 | there live the blind texts. Separated they live in Bookmarksgrove right at the coast 280 | of the Semantics, a large language ocean.

281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 | 290 |
291 |

292 | What language are available?

293 |
294 |
295 |
296 |

297 | Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, 298 | there live the blind texts. Separated they live in Bookmarksgrove right at the coast 299 | of the Semantics, a large language ocean.

300 |
301 |
302 |
303 |
304 |
305 |
306 | 307 |
308 |

309 | Can I have a username that is already taken?

310 |
311 |
312 |
313 |

314 | Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, 315 | there live the blind texts. Separated they live in Bookmarksgrove right at the coast 316 | of the Semantics, a large language ocean.

317 |
318 |
319 |
320 |
321 |
322 |
323 | 324 |
325 |

326 | Is Asymmetry free?

327 |
328 |
329 |
330 |

331 | Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, 332 | there live the blind texts. Separated they live in Bookmarksgrove right at the coast 333 | of the Semantics, a large language ocean.

334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 | ) 343 | } 344 | } 345 | 346 | 347 | export {IntegrationComponent}; 348 | 349 | -------------------------------------------------------------------------------- /src/components/nav.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | import React from 'react'; 4 | 5 | class NavComponent extends React.Component{ 6 | 7 | constructor(props) { 8 | super(props); 9 | var hash=process.env.NODE_ENV==='production'?'/':'#/'; 10 | this.state={ 11 | hash:hash, 12 | router:window.location.href.substr(window.location.href.lastIndexOf('/')+1) 13 | } 14 | 15 | console.log(this.state.router) 16 | } 17 | 18 | render(){ 19 | return ( 20 | 41 | ) 42 | } 43 | } 44 | 45 | 46 | export {NavComponent}; 47 | 48 | -------------------------------------------------------------------------------- /src/components/security.js: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react'; 3 | import img_1 from '../static/images/img_1.jpg'; 4 | 5 | class SecurityComponent extends React.Component{ 6 | 7 | constructor(props) { 8 | super(props); 9 | } 10 | 11 | render(){ 12 | return ( 13 |
14 |
15 |
16 |
17 |
18 |

19 | The results of

20 |

21 | The code you queried is the authentic product from Honeywell, thank you for purchasing and using.

22 |
23 |
24 |
25 |
26 |
27 | 2122070 28 | Downloads 29 |
30 |
31 |
32 |
33 | 402002 34 | Happy Clients 35 |
36 |
37 |
38 |
39 | 402 40 | Projects Done 41 |
42 |
43 |
44 |
45 | 212023 46 | Hours Spent 47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |

57 | Products

58 |

59 | Dignissimos asperiores vitae velit veniam totam fuga molestias accusamus alias autem 60 | provident. Odit ab aliquam dolor eius.

61 |
62 |
63 |
64 |
65 |
66 | ) 67 | } 68 | } 69 | 70 | 71 | export {SecurityComponent}; 72 | 73 | -------------------------------------------------------------------------------- /src/components/tips.js: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react'; 3 | 4 | class TipsComponent extends React.Component{ 5 | 6 | constructor(props) { 7 | super(props); 8 | } 9 | 10 | render(){ 11 | return ( 12 |
13 |
14 |
15 |
16 |

17 | In Box Computing

18 |

19 | In the text box to enter the digital or two-dimensional code, the system automatically 20 | to calculate the current digital if there are security, integration, distribution, 21 | tracing and digital marketing, and gives the corresponding results.

22 |
23 |
24 |
25 |
26 | ) 27 | } 28 | } 29 | 30 | 31 | export {TipsComponent}; 32 | 33 | -------------------------------------------------------------------------------- /src/data/music/music.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/data/music/music.mp3 -------------------------------------------------------------------------------- /src/data/video/wild.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/data/video/wild.mp4 -------------------------------------------------------------------------------- /src/data/video/wild.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/data/video/wild.webm -------------------------------------------------------------------------------- /src/flux/actions/ButtonActions.js: -------------------------------------------------------------------------------- 1 | var AppDispatcher = require('../dispatcher/AppDispatcher'); 2 | 3 | var ButtonActions = { 4 | 5 | addNewItem: function (text) { 6 | AppDispatcher.dispatch({ 7 | actionType: 'ADD_NEW_ITEM', 8 | text: text 9 | }); 10 | }, 11 | 12 | }; 13 | 14 | module.exports = ButtonActions; 15 | -------------------------------------------------------------------------------- /src/flux/dispatcher/AppDispatcher.js: -------------------------------------------------------------------------------- 1 | var Dispatcher = require('flux').Dispatcher; 2 | var AppDispatcher = new Dispatcher(); 3 | var ListStore = require('../stores/ListStore.js'); 4 | 5 | AppDispatcher.register(function (action) { 6 | switch(action.actionType) { 7 | case 'ADD_NEW_ITEM': 8 | ListStore.addNewItemHandler(action.text); 9 | ListStore.emitChange(); 10 | break; 11 | default: 12 | // no op 13 | } 14 | }) 15 | 16 | module.exports = AppDispatcher; 17 | -------------------------------------------------------------------------------- /src/flux/stores/ListStore.js: -------------------------------------------------------------------------------- 1 | var EventEmitter = require('events').EventEmitter; 2 | var assign = require('object-assign'); 3 | 4 | var ListStore = assign({}, EventEmitter.prototype, { 5 | items: [], 6 | 7 | getAll: function () { 8 | return this.items; 9 | }, 10 | 11 | addNewItemHandler: function (text) { 12 | console.log('addNewItemHandler'); 13 | this.items.push(text); 14 | }, 15 | 16 | emitChange: function () { 17 | console.log('emitChange'); 18 | this.emit('change'); 19 | }, 20 | 21 | addChangeListener: function(callback) { 22 | console.log('addChangeListener'); 23 | this.on('change', callback); 24 | }, 25 | 26 | removeChangeListener: function(callback) { 27 | console.log('removeChangeListener'); 28 | this.removeListener('change', callback); 29 | } 30 | }); 31 | 32 | module.exports = ListStore; 33 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import {BrowserRouter,HashRouter, Route, Link,Redirect} from 'react-router-dom'; 4 | import $ from 'jquery'; 5 | import './static/js/main.js'; 6 | import "./static/css/animate.css"; 7 | import "./static/css/icomoon.css"; 8 | import "./static/css/themify-icons.css"; 9 | import "./static/css/bootstrap.css"; 10 | import "./static/css/magnific-popup.css"; 11 | import "./static/css/owl.carousel.min.css"; 12 | import "./static/css/owl.theme.default.min.css"; 13 | import "./static/css/flexslider.css"; 14 | import "./static/css/style.css"; 15 | import {IndexPage} from './page/index.js'; 16 | import {IntegrationPage} from './page/Inteagration.js'; 17 | import {FleeingGoodsPage} from './page/FleeingGoods.js'; 18 | import {SecurityPage} from './page/Security.js'; 19 | 20 | var div_content=document.createElement('div'); 21 | div_content.id="content"; 22 | document.body.appendChild(div_content); 23 | 24 | var AutoBrower=BrowserRouter; 25 | if(process.env.NODE_ENV==='production'){ 26 | console.info('production env use nodejs server,so use BrowserRouter to router'); 27 | AutoBrower=BrowserRouter; 28 | }else{ 29 | console.info('dev env use webpack-dev-server,so use HashRouter to router'); 30 | AutoBrower=HashRouter; 31 | } 32 | 33 | 34 | const MenuRouter=()=>( 35 | 36 |
37 | ( 38 | 39 | )} /> 40 | 41 | ( 42 | 43 | )} /> 44 | 45 | ( 46 | 47 | )} /> 48 | 49 | ( 50 | 51 | )} /> 52 |
53 |
54 | ); 55 | 56 | ReactDOM.render( 57 | () 58 | , div_content); 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/page/FleeingGoods.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {NavComponent} from '../components/nav.js'; 3 | import {FleeinggoodsComponent} from '../components/fleeinggoods.js'; 4 | 5 | class FleeingGoodsPage extends React.Component{ 6 | constructor(props) { 7 | super(props); 8 | } 9 | 10 | 11 | 12 | render(){ 13 | return ( 14 |
15 | 16 | 17 |
18 | ) 19 | } 20 | } 21 | export {FleeingGoodsPage}; 22 | -------------------------------------------------------------------------------- /src/page/Inteagration.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {NavComponent} from '../components/nav.js'; 3 | import {IntegrationComponent} from '../components/integration.js'; 4 | 5 | class IntegrationPage extends React.Component{ 6 | constructor(props) { 7 | super(props); 8 | } 9 | 10 | 11 | 12 | render(){ 13 | return ( 14 |
15 | 16 | 17 |
18 | ) 19 | } 20 | } 21 | export {IntegrationPage}; 22 | -------------------------------------------------------------------------------- /src/page/Security.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {NavComponent} from '../components/nav.js'; 3 | import {SecurityComponent} from '../components/security.js'; 4 | 5 | class SecurityPage extends React.Component{ 6 | constructor(props) { 7 | super(props); 8 | } 9 | 10 | 11 | 12 | render(){ 13 | return ( 14 |
15 | 16 | 17 |
18 | ) 19 | } 20 | } 21 | export {SecurityPage}; 22 | -------------------------------------------------------------------------------- /src/page/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {NavComponent} from '../components/nav.js'; 3 | import {TipsComponent} from '../components/tips.js'; 4 | 5 | class IndexPage extends React.Component{ 6 | constructor(props) { 7 | super(props); 8 | } 9 | 10 | 11 | 12 | render(){ 13 | return ( 14 |
15 | 16 | 17 |
18 | ) 19 | } 20 | } 21 | export {IndexPage}; 22 | -------------------------------------------------------------------------------- /src/static/css/flexslider.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery FlexSlider v2.6.0 3 | * http://www.woothemes.com/flexslider/ 4 | * 5 | * Copyright 2012 WooThemes 6 | * Free to use under the GPLv2 and later license. 7 | * http://www.gnu.org/licenses/gpl-2.0.html 8 | * 9 | * Contributing author: Tyler Smith (@mbmufffin) 10 | * 11 | */ 12 | /* ==================================================================================================================== 13 | * FONT-FACE 14 | * ====================================================================================================================*/ 15 | /*@font-face { 16 | font-family: 'flexslider-icon'; 17 | src: url('fonts/flexslider-icon.eot'); 18 | src: url('fonts/flexslider-icon.eot?#iefix') format('embedded-opentype'), url('fonts/flexslider-icon.woff') format('woff'), url('fonts/flexslider-icon.ttf') format('truetype'), url('fonts/flexslider-icon.svg#flexslider-icon') format('svg'); 19 | font-weight: normal; 20 | font-style: normal; 21 | }*/ 22 | /* ==================================================================================================================== 23 | * RESETS 24 | * ====================================================================================================================*/ 25 | .flex-container a:hover, 26 | .flex-slider a:hover { 27 | outline: none; 28 | } 29 | .slides, 30 | .slides > li, 31 | .flex-control-nav, 32 | .flex-direction-nav { 33 | margin: 0; 34 | padding: 0; 35 | list-style: none; 36 | } 37 | .flex-pauseplay span { 38 | text-transform: capitalize; 39 | } 40 | /* ==================================================================================================================== 41 | * BASE STYLES 42 | * ====================================================================================================================*/ 43 | .flexslider { 44 | margin: 0; 45 | padding: 0; 46 | } 47 | .flexslider .slides > li { 48 | display: none; 49 | -webkit-backface-visibility: hidden; 50 | } 51 | .flexslider .slides img { 52 | width: 100%; 53 | display: block; 54 | } 55 | .flexslider .slides:after { 56 | /*content: "\0020";*/ 57 | display: block; 58 | clear: both; 59 | visibility: hidden; 60 | line-height: 0; 61 | height: 0; 62 | } 63 | html[xmlns] .flexslider .slides { 64 | display: block; 65 | } 66 | * html .flexslider .slides { 67 | height: 1%; 68 | } 69 | .no-js .flexslider .slides > li:first-child { 70 | display: block; 71 | } 72 | /* ==================================================================================================================== 73 | * DEFAULT THEME 74 | * ====================================================================================================================*/ 75 | .flexslider { 76 | margin: 0 0 60px; 77 | background: #ffffff; 78 | border: 4px solid #ffffff; 79 | position: relative; 80 | zoom: 1; 81 | -webkit-border-radius: 4px; 82 | -moz-border-radius: 4px; 83 | border-radius: 4px; 84 | -webkit-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); 85 | -moz-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); 86 | -o-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); 87 | box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); 88 | } 89 | .flexslider .slides { 90 | zoom: 1; 91 | } 92 | .flexslider .slides img { 93 | height: auto; 94 | -moz-user-select: none; 95 | } 96 | .flex-viewport { 97 | max-height: 2000px; 98 | -webkit-transition: all 1s ease; 99 | -moz-transition: all 1s ease; 100 | -ms-transition: all 1s ease; 101 | -o-transition: all 1s ease; 102 | transition: all 1s ease; 103 | } 104 | .loading .flex-viewport { 105 | max-height: 300px; 106 | } 107 | .carousel li { 108 | margin-right: 5px; 109 | } 110 | .flex-direction-nav { 111 | *height: 0; 112 | } 113 | .flex-direction-nav a { 114 | text-decoration: none; 115 | display: block; 116 | width: 40px; 117 | height: 40px; 118 | margin: -20px 0 0; 119 | position: absolute; 120 | top: 50%; 121 | z-index: 10; 122 | overflow: hidden; 123 | opacity: 0; 124 | cursor: pointer; 125 | color: rgba(0, 0, 0, 0.8); 126 | text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); 127 | -webkit-transition: all 0.3s ease-in-out; 128 | -moz-transition: all 0.3s ease-in-out; 129 | -ms-transition: all 0.3s ease-in-out; 130 | -o-transition: all 0.3s ease-in-out; 131 | transition: all 0.3s ease-in-out; 132 | } 133 | .flex-direction-nav a:before { 134 | font-family: "flexslider-icon"; 135 | font-size: 40px; 136 | display: inline-block; 137 | content: '\f001'; 138 | color: rgba(0, 0, 0, 0.8); 139 | text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); 140 | } 141 | .flex-direction-nav a.flex-next:before { 142 | content: '\f002'; 143 | } 144 | .flex-direction-nav .flex-prev { 145 | left: -50px; 146 | } 147 | .flex-direction-nav .flex-next { 148 | right: -50px; 149 | text-align: right; 150 | } 151 | .flexslider:hover .flex-direction-nav .flex-prev { 152 | opacity: 0.7; 153 | left: 10px; 154 | } 155 | .flexslider:hover .flex-direction-nav .flex-prev:hover { 156 | opacity: 1; 157 | } 158 | .flexslider:hover .flex-direction-nav .flex-next { 159 | opacity: 0.7; 160 | right: 10px; 161 | } 162 | .flexslider:hover .flex-direction-nav .flex-next:hover { 163 | opacity: 1; 164 | } 165 | .flex-direction-nav .flex-disabled { 166 | opacity: 0!important; 167 | filter: alpha(opacity=0); 168 | cursor: default; 169 | z-index: -1; 170 | } 171 | .flex-pauseplay a { 172 | display: block; 173 | width: 20px; 174 | height: 20px; 175 | position: absolute; 176 | bottom: 5px; 177 | left: 10px; 178 | opacity: 0.8; 179 | z-index: 10; 180 | overflow: hidden; 181 | cursor: pointer; 182 | color: #000; 183 | } 184 | .flex-pauseplay a:before { 185 | font-family: "flexslider-icon"; 186 | font-size: 20px; 187 | display: inline-block; 188 | content: '\f004'; 189 | } 190 | .flex-pauseplay a:hover { 191 | opacity: 1; 192 | } 193 | .flex-pauseplay a.flex-play:before { 194 | content: '\f003'; 195 | } 196 | .flex-control-nav { 197 | width: 100%; 198 | position: absolute; 199 | bottom: -40px; 200 | text-align: center; 201 | } 202 | .flex-control-nav li { 203 | margin: 0 6px; 204 | display: inline-block; 205 | zoom: 1; 206 | *display: inline; 207 | } 208 | .flex-control-paging li a { 209 | width: 11px; 210 | height: 11px; 211 | display: block; 212 | background: #666; 213 | background: rgba(0, 0, 0, 0.5); 214 | cursor: pointer; 215 | text-indent: -9999px; 216 | -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); 217 | -moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); 218 | -o-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); 219 | box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); 220 | -webkit-border-radius: 20px; 221 | -moz-border-radius: 20px; 222 | border-radius: 20px; 223 | } 224 | .flex-control-paging li a:hover { 225 | background: #333; 226 | background: rgba(0, 0, 0, 0.7); 227 | } 228 | .flex-control-paging li a.flex-active { 229 | background: #000; 230 | background: rgba(0, 0, 0, 0.9); 231 | cursor: default; 232 | } 233 | .flex-control-thumbs { 234 | margin: 5px 0 0; 235 | position: static; 236 | overflow: hidden; 237 | } 238 | .flex-control-thumbs li { 239 | width: 25%; 240 | float: left; 241 | margin: 0; 242 | } 243 | .flex-control-thumbs img { 244 | width: 100%; 245 | height: auto; 246 | display: block; 247 | opacity: .7; 248 | cursor: pointer; 249 | -moz-user-select: none; 250 | -webkit-transition: all 1s ease; 251 | -moz-transition: all 1s ease; 252 | -ms-transition: all 1s ease; 253 | -o-transition: all 1s ease; 254 | transition: all 1s ease; 255 | } 256 | .flex-control-thumbs img:hover { 257 | opacity: 1; 258 | } 259 | .flex-control-thumbs .flex-active { 260 | opacity: 1; 261 | cursor: default; 262 | } 263 | /* ==================================================================================================================== 264 | * RESPONSIVE 265 | * ====================================================================================================================*/ 266 | @media screen and (max-width: 860px) { 267 | .flex-direction-nav .flex-prev { 268 | opacity: 1; 269 | left: 10px; 270 | } 271 | .flex-direction-nav .flex-next { 272 | opacity: 1; 273 | right: 10px; 274 | } 275 | } -------------------------------------------------------------------------------- /src/static/css/magnific-popup.css: -------------------------------------------------------------------------------- 1 | /* Magnific Popup CSS */ 2 | .mfp-bg { 3 | top: 0; 4 | left: 0; 5 | width: 100%; 6 | height: 100%; 7 | z-index: 1042; 8 | overflow: hidden; 9 | position: fixed; 10 | background: #0b0b0b; 11 | opacity: 0.8; 12 | filter: alpha(opacity=80); } 13 | 14 | .mfp-wrap { 15 | top: 0; 16 | left: 0; 17 | width: 100%; 18 | height: 100%; 19 | z-index: 1043; 20 | position: fixed; 21 | outline: none !important; 22 | -webkit-backface-visibility: hidden; } 23 | 24 | .mfp-container { 25 | text-align: center; 26 | position: absolute; 27 | width: 100%; 28 | height: 100%; 29 | left: 0; 30 | top: 0; 31 | padding: 0 8px; 32 | -webkit-box-sizing: border-box; 33 | -moz-box-sizing: border-box; 34 | box-sizing: border-box; } 35 | 36 | .mfp-container:before { 37 | content: ''; 38 | display: inline-block; 39 | height: 100%; 40 | vertical-align: middle; } 41 | 42 | .mfp-align-top .mfp-container:before { 43 | display: none; } 44 | 45 | .mfp-content { 46 | position: relative; 47 | display: inline-block; 48 | vertical-align: middle; 49 | margin: 0 auto; 50 | text-align: left; 51 | z-index: 1045; } 52 | 53 | .mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content { 54 | width: 100%; 55 | cursor: auto; } 56 | 57 | .mfp-ajax-cur { 58 | cursor: progress; } 59 | 60 | .mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close { 61 | cursor: -moz-zoom-out; 62 | cursor: -webkit-zoom-out; 63 | cursor: zoom-out; } 64 | 65 | .mfp-zoom { 66 | cursor: pointer; 67 | cursor: -webkit-zoom-in; 68 | cursor: -moz-zoom-in; 69 | cursor: zoom-in; } 70 | 71 | .mfp-auto-cursor .mfp-content { 72 | cursor: auto; } 73 | 74 | .mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter { 75 | -webkit-user-select: none; 76 | -moz-user-select: none; 77 | user-select: none; } 78 | 79 | .mfp-loading.mfp-figure { 80 | display: none; } 81 | 82 | .mfp-hide { 83 | display: none !important; } 84 | 85 | .mfp-preloader { 86 | color: #cccccc; 87 | position: absolute; 88 | top: 50%; 89 | width: auto; 90 | text-align: center; 91 | margin-top: -0.8em; 92 | left: 8px; 93 | right: 8px; 94 | z-index: 1044; } 95 | .mfp-preloader a { 96 | color: #cccccc; } 97 | .mfp-preloader a:hover { 98 | color: white; } 99 | 100 | .mfp-s-ready .mfp-preloader { 101 | display: none; } 102 | 103 | .mfp-s-error .mfp-content { 104 | display: none; } 105 | 106 | button.mfp-close, button.mfp-arrow { 107 | overflow: visible; 108 | cursor: pointer; 109 | background: transparent; 110 | border: 0; 111 | -webkit-appearance: none; 112 | display: block; 113 | outline: none; 114 | padding: 0; 115 | z-index: 1046; 116 | -webkit-box-shadow: none; 117 | box-shadow: none; } 118 | button::-moz-focus-inner { 119 | padding: 0; 120 | border: 0; } 121 | 122 | .mfp-close { 123 | width: 44px; 124 | height: 44px; 125 | line-height: 44px; 126 | position: absolute; 127 | right: 0; 128 | top: 0; 129 | text-decoration: none; 130 | text-align: center; 131 | opacity: 0.65; 132 | filter: alpha(opacity=65); 133 | padding: 0 0 18px 10px; 134 | color: white; 135 | font-style: normal; 136 | font-size: 28px; 137 | font-family: Arial, Baskerville, monospace; } 138 | .mfp-close:hover, .mfp-close:focus { 139 | opacity: 1; 140 | filter: alpha(opacity=100); } 141 | .mfp-close:active { 142 | top: 1px; } 143 | 144 | .mfp-close-btn-in .mfp-close { 145 | color: #333333; } 146 | 147 | .mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close { 148 | color: white; 149 | right: -6px; 150 | text-align: right; 151 | padding-right: 6px; 152 | width: 100%; } 153 | 154 | .mfp-counter { 155 | position: absolute; 156 | top: 0; 157 | right: 0; 158 | color: #cccccc; 159 | font-size: 12px; 160 | line-height: 18px; } 161 | 162 | .mfp-arrow { 163 | position: absolute; 164 | opacity: 0.65; 165 | filter: alpha(opacity=65); 166 | margin: 0; 167 | top: 50%; 168 | margin-top: -55px; 169 | padding: 0; 170 | width: 90px; 171 | height: 110px; 172 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } 173 | .mfp-arrow:active { 174 | margin-top: -54px; } 175 | .mfp-arrow:hover, .mfp-arrow:focus { 176 | opacity: 1; 177 | filter: alpha(opacity=100); } 178 | .mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a { 179 | content: ''; 180 | display: block; 181 | width: 0; 182 | height: 0; 183 | position: absolute; 184 | left: 0; 185 | top: 0; 186 | margin-top: 35px; 187 | margin-left: 35px; 188 | border: medium inset transparent; } 189 | .mfp-arrow:after, .mfp-arrow .mfp-a { 190 | border-top-width: 13px; 191 | border-bottom-width: 13px; 192 | top: 8px; } 193 | .mfp-arrow:before, .mfp-arrow .mfp-b { 194 | border-top-width: 21px; 195 | border-bottom-width: 21px; 196 | opacity: 0.7; } 197 | 198 | .mfp-arrow-left { 199 | left: 0; } 200 | .mfp-arrow-left:after, .mfp-arrow-left .mfp-a { 201 | border-right: 17px solid white; 202 | margin-left: 31px; } 203 | .mfp-arrow-left:before, .mfp-arrow-left .mfp-b { 204 | margin-left: 25px; 205 | border-right: 27px solid #3f3f3f; } 206 | 207 | .mfp-arrow-right { 208 | right: 0; } 209 | .mfp-arrow-right:after, .mfp-arrow-right .mfp-a { 210 | border-left: 17px solid white; 211 | margin-left: 39px; } 212 | .mfp-arrow-right:before, .mfp-arrow-right .mfp-b { 213 | border-left: 27px solid #3f3f3f; } 214 | 215 | .mfp-iframe-holder { 216 | padding-top: 40px; 217 | padding-bottom: 40px; } 218 | .mfp-iframe-holder .mfp-content { 219 | line-height: 0; 220 | width: 100%; 221 | max-width: 900px; } 222 | .mfp-iframe-holder .mfp-close { 223 | top: -40px; } 224 | 225 | .mfp-iframe-scaler { 226 | width: 100%; 227 | height: 0; 228 | overflow: hidden; 229 | padding-top: 56.25%; } 230 | .mfp-iframe-scaler iframe { 231 | position: absolute; 232 | display: block; 233 | top: 0; 234 | left: 0; 235 | width: 100%; 236 | height: 100%; 237 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 238 | background: black; } 239 | 240 | /* Main image in popup */ 241 | img.mfp-img { 242 | width: auto; 243 | max-width: 100%; 244 | height: auto; 245 | display: block; 246 | line-height: 0; 247 | -webkit-box-sizing: border-box; 248 | -moz-box-sizing: border-box; 249 | box-sizing: border-box; 250 | padding: 40px 0 40px; 251 | margin: 0 auto; } 252 | 253 | /* The shadow behind the image */ 254 | .mfp-figure { 255 | line-height: 0; } 256 | .mfp-figure:after { 257 | content: ''; 258 | position: absolute; 259 | left: 0; 260 | top: 40px; 261 | bottom: 40px; 262 | display: block; 263 | right: 0; 264 | width: auto; 265 | height: auto; 266 | z-index: -1; 267 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 268 | background: #444444; } 269 | .mfp-figure small { 270 | color: #bdbdbd; 271 | display: block; 272 | font-size: 12px; 273 | line-height: 14px; } 274 | .mfp-figure figure { 275 | margin: 0; } 276 | 277 | .mfp-bottom-bar { 278 | margin-top: -36px; 279 | position: absolute; 280 | top: 100%; 281 | left: 0; 282 | width: 100%; 283 | cursor: auto; } 284 | 285 | .mfp-title { 286 | text-align: left; 287 | line-height: 18px; 288 | color: #f3f3f3; 289 | word-wrap: break-word; 290 | padding-right: 36px; } 291 | 292 | .mfp-image-holder .mfp-content { 293 | max-width: 100%; } 294 | 295 | .mfp-gallery .mfp-image-holder .mfp-figure { 296 | cursor: pointer; } 297 | 298 | @media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) { 299 | /** 300 | * Remove all paddings around the image on small screen 301 | */ 302 | .mfp-img-mobile .mfp-image-holder { 303 | padding-left: 0; 304 | padding-right: 0; } 305 | .mfp-img-mobile img.mfp-img { 306 | padding: 0; } 307 | .mfp-img-mobile .mfp-figure:after { 308 | top: 0; 309 | bottom: 0; } 310 | .mfp-img-mobile .mfp-figure small { 311 | display: inline; 312 | margin-left: 5px; } 313 | .mfp-img-mobile .mfp-bottom-bar { 314 | background: rgba(0, 0, 0, 0.6); 315 | bottom: 0; 316 | margin: 0; 317 | top: auto; 318 | padding: 3px 5px; 319 | position: fixed; 320 | -webkit-box-sizing: border-box; 321 | -moz-box-sizing: border-box; 322 | box-sizing: border-box; } 323 | .mfp-img-mobile .mfp-bottom-bar:empty { 324 | padding: 0; } 325 | .mfp-img-mobile .mfp-counter { 326 | right: 5px; 327 | top: 3px; } 328 | .mfp-img-mobile .mfp-close { 329 | top: 0; 330 | right: 0; 331 | width: 35px; 332 | height: 35px; 333 | line-height: 35px; 334 | background: rgba(0, 0, 0, 0.6); 335 | position: fixed; 336 | text-align: center; 337 | padding: 0; } } 338 | 339 | @media all and (max-width: 900px) { 340 | .mfp-arrow { 341 | -webkit-transform: scale(0.75); 342 | transform: scale(0.75); } 343 | .mfp-arrow-left { 344 | -webkit-transform-origin: 0; 345 | transform-origin: 0; } 346 | .mfp-arrow-right { 347 | -webkit-transform-origin: 100%; 348 | transform-origin: 100%; } 349 | .mfp-container { 350 | padding-left: 6px; 351 | padding-right: 6px; } } 352 | 353 | .mfp-ie7 .mfp-img { 354 | padding: 0; } 355 | .mfp-ie7 .mfp-bottom-bar { 356 | width: 600px; 357 | left: 50%; 358 | margin-left: -300px; 359 | margin-top: 5px; 360 | padding-bottom: 5px; } 361 | .mfp-ie7 .mfp-container { 362 | padding: 0; } 363 | .mfp-ie7 .mfp-content { 364 | padding-top: 44px; } 365 | .mfp-ie7 .mfp-close { 366 | top: 0; 367 | right: 0; 368 | padding-top: 0; } -------------------------------------------------------------------------------- /src/static/css/owl.carousel.min.css: -------------------------------------------------------------------------------- 1 | .owl-carousel .animated{-webkit-animation-duration:1000ms;animation-duration:1000ms;-webkit-animation-fill-mode:both;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{-webkit-transition:height 500ms ease-in-out;-moz-transition:height 500ms ease-in-out;-ms-transition:height 500ms ease-in-out;-o-transition:height 500ms ease-in-out;transition:height 500ms ease-in-out}.owl-carousel{display:none;width:100%;-webkit-tap-highlight-color:transparent;position:relative;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0px,0,0)}.owl-carousel .owl-controls .owl-dot,.owl-carousel .owl-controls .owl-nav .owl-next,.owl-carousel .owl-controls .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loaded{display:block}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel .owl-refresh .owl-item{display:none}.owl-carousel .owl-item{position:relative;min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-item img{display:block;width:100%;-webkit-transform-style:preserve-3d}.owl-carousel.owl-text-select-on .owl-item{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.owl-carousel .owl-grab{cursor:move;cursor:-webkit-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.no-js .owl-carousel{display:block}.owl-carousel .owl-item .owl-lazy{opacity:0;-webkit-transition:opacity 400ms ease;-moz-transition:opacity 400ms ease;-ms-transition:opacity 400ms ease;-o-transition:opacity 400ms ease;transition:opacity 400ms ease}.owl-carousel .owl-item img{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;-webkit-transition:scale 100ms ease;-moz-transition:scale 100ms ease;-ms-transition:scale 100ms ease;-o-transition:scale 100ms ease;transition:scale 100ms ease}.owl-carousel .owl-video-play-icon:hover{-webkit-transition:scale(1.3,1.3);-moz-transition:scale(1.3,1.3);-ms-transition:scale(1.3,1.3);-o-transition:scale(1.3,1.3);transition:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;-webkit-background-size:contain;-moz-background-size:contain;-o-background-size:contain;background-size:contain;-webkit-transition:opacity 400ms ease;-moz-transition:opacity 400ms ease;-ms-transition:opacity 400ms ease;-o-transition:opacity 400ms ease;transition:opacity 400ms ease}.owl-carousel .owl-video-frame{position:relative;z-index:1} -------------------------------------------------------------------------------- /src/static/css/owl.theme.default.min.css: -------------------------------------------------------------------------------- 1 | .owl-theme .owl-controls{margin-top:10px;text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-controls .owl-nav [class*=owl-]{color:#fff;font-size:14px;margin:5px;padding:4px 7px;background:#d6d6d6;display:inline-block;cursor:pointer;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.owl-theme .owl-controls .owl-nav [class*=owl-]:hover{background:#869791;color:#fff;text-decoration:none}.owl-theme .owl-controls .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1;*display:inline}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#d6d6d6;display:block;-webkit-backface-visibility:visible;-webkit-transition:opacity 200ms ease;-moz-transition:opacity 200ms ease;-ms-transition:opacity 200ms ease;-o-transition:opacity 200ms ease;transition:opacity 200ms ease;-webkit-border-radius:30px;-moz-border-radius:30px;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791} -------------------------------------------------------------------------------- /src/static/css/themify-icons.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'themify'; 3 | src:url('../fonts/themify-icons/themify.eot?-fvbane'); 4 | src:url('../fonts/themify-icons/themify.eot?#iefix-fvbane') format('embedded-opentype'), 5 | url('../fonts/themify-icons/themify.woff?-fvbane') format('woff'), 6 | url('../fonts/themify-icons/themify.ttf?-fvbane') format('truetype'), 7 | url('../fonts/themify-icons/themify.svg?-fvbane#themify') format('svg'); 8 | font-weight: normal; 9 | font-style: normal; 10 | } 11 | 12 | [class^="ti-"], [class*=" ti-"] { 13 | font-family: 'themify'; 14 | speak: none; 15 | font-style: normal; 16 | font-weight: normal; 17 | font-variant: normal; 18 | text-transform: none; 19 | line-height: 1; 20 | 21 | /* Better Font Rendering =========== */ 22 | -webkit-font-smoothing: antialiased; 23 | -moz-osx-font-smoothing: grayscale; 24 | } 25 | 26 | .ti-wand:before { 27 | content: "\e600"; 28 | } 29 | .ti-volume:before { 30 | content: "\e601"; 31 | } 32 | .ti-user:before { 33 | content: "\e602"; 34 | } 35 | .ti-unlock:before { 36 | content: "\e603"; 37 | } 38 | .ti-unlink:before { 39 | content: "\e604"; 40 | } 41 | .ti-trash:before { 42 | content: "\e605"; 43 | } 44 | .ti-thought:before { 45 | content: "\e606"; 46 | } 47 | .ti-target:before { 48 | content: "\e607"; 49 | } 50 | .ti-tag:before { 51 | content: "\e608"; 52 | } 53 | .ti-tablet:before { 54 | content: "\e609"; 55 | } 56 | .ti-star:before { 57 | content: "\e60a"; 58 | } 59 | .ti-spray:before { 60 | content: "\e60b"; 61 | } 62 | .ti-signal:before { 63 | content: "\e60c"; 64 | } 65 | .ti-shopping-cart:before { 66 | content: "\e60d"; 67 | } 68 | .ti-shopping-cart-full:before { 69 | content: "\e60e"; 70 | } 71 | .ti-settings:before { 72 | content: "\e60f"; 73 | } 74 | .ti-search:before { 75 | content: "\e610"; 76 | } 77 | .ti-zoom-in:before { 78 | content: "\e611"; 79 | } 80 | .ti-zoom-out:before { 81 | content: "\e612"; 82 | } 83 | .ti-cut:before { 84 | content: "\e613"; 85 | } 86 | .ti-ruler:before { 87 | content: "\e614"; 88 | } 89 | .ti-ruler-pencil:before { 90 | content: "\e615"; 91 | } 92 | .ti-ruler-alt:before { 93 | content: "\e616"; 94 | } 95 | .ti-bookmark:before { 96 | content: "\e617"; 97 | } 98 | .ti-bookmark-alt:before { 99 | content: "\e618"; 100 | } 101 | .ti-reload:before { 102 | content: "\e619"; 103 | } 104 | .ti-plus:before { 105 | content: "\e61a"; 106 | } 107 | .ti-pin:before { 108 | content: "\e61b"; 109 | } 110 | .ti-pencil:before { 111 | content: "\e61c"; 112 | } 113 | .ti-pencil-alt:before { 114 | content: "\e61d"; 115 | } 116 | .ti-paint-roller:before { 117 | content: "\e61e"; 118 | } 119 | .ti-paint-bucket:before { 120 | content: "\e61f"; 121 | } 122 | .ti-na:before { 123 | content: "\e620"; 124 | } 125 | .ti-mobile:before { 126 | content: "\e621"; 127 | } 128 | .ti-minus:before { 129 | content: "\e622"; 130 | } 131 | .ti-medall:before { 132 | content: "\e623"; 133 | } 134 | .ti-medall-alt:before { 135 | content: "\e624"; 136 | } 137 | .ti-marker:before { 138 | content: "\e625"; 139 | } 140 | .ti-marker-alt:before { 141 | content: "\e626"; 142 | } 143 | .ti-arrow-up:before { 144 | content: "\e627"; 145 | } 146 | .ti-arrow-right:before { 147 | content: "\e628"; 148 | } 149 | .ti-arrow-left:before { 150 | content: "\e629"; 151 | } 152 | .ti-arrow-down:before { 153 | content: "\e62a"; 154 | } 155 | .ti-lock:before { 156 | content: "\e62b"; 157 | } 158 | .ti-location-arrow:before { 159 | content: "\e62c"; 160 | } 161 | .ti-link:before { 162 | content: "\e62d"; 163 | } 164 | .ti-layout:before { 165 | content: "\e62e"; 166 | } 167 | .ti-layers:before { 168 | content: "\e62f"; 169 | } 170 | .ti-layers-alt:before { 171 | content: "\e630"; 172 | } 173 | .ti-key:before { 174 | content: "\e631"; 175 | } 176 | .ti-import:before { 177 | content: "\e632"; 178 | } 179 | .ti-image:before { 180 | content: "\e633"; 181 | } 182 | .ti-heart:before { 183 | content: "\e634"; 184 | } 185 | .ti-heart-broken:before { 186 | content: "\e635"; 187 | } 188 | .ti-hand-stop:before { 189 | content: "\e636"; 190 | } 191 | .ti-hand-open:before { 192 | content: "\e637"; 193 | } 194 | .ti-hand-drag:before { 195 | content: "\e638"; 196 | } 197 | .ti-folder:before { 198 | content: "\e639"; 199 | } 200 | .ti-flag:before { 201 | content: "\e63a"; 202 | } 203 | .ti-flag-alt:before { 204 | content: "\e63b"; 205 | } 206 | .ti-flag-alt-2:before { 207 | content: "\e63c"; 208 | } 209 | .ti-eye:before { 210 | content: "\e63d"; 211 | } 212 | .ti-export:before { 213 | content: "\e63e"; 214 | } 215 | .ti-exchange-vertical:before { 216 | content: "\e63f"; 217 | } 218 | .ti-desktop:before { 219 | content: "\e640"; 220 | } 221 | .ti-cup:before { 222 | content: "\e641"; 223 | } 224 | .ti-crown:before { 225 | content: "\e642"; 226 | } 227 | .ti-comments:before { 228 | content: "\e643"; 229 | } 230 | .ti-comment:before { 231 | content: "\e644"; 232 | } 233 | .ti-comment-alt:before { 234 | content: "\e645"; 235 | } 236 | .ti-close:before { 237 | content: "\e646"; 238 | } 239 | .ti-clip:before { 240 | content: "\e647"; 241 | } 242 | .ti-angle-up:before { 243 | content: "\e648"; 244 | } 245 | .ti-angle-right:before { 246 | content: "\e649"; 247 | } 248 | .ti-angle-left:before { 249 | content: "\e64a"; 250 | } 251 | .ti-angle-down:before { 252 | content: "\e64b"; 253 | } 254 | .ti-check:before { 255 | content: "\e64c"; 256 | } 257 | .ti-check-box:before { 258 | content: "\e64d"; 259 | } 260 | .ti-camera:before { 261 | content: "\e64e"; 262 | } 263 | .ti-announcement:before { 264 | content: "\e64f"; 265 | } 266 | .ti-brush:before { 267 | content: "\e650"; 268 | } 269 | .ti-briefcase:before { 270 | content: "\e651"; 271 | } 272 | .ti-bolt:before { 273 | content: "\e652"; 274 | } 275 | .ti-bolt-alt:before { 276 | content: "\e653"; 277 | } 278 | .ti-blackboard:before { 279 | content: "\e654"; 280 | } 281 | .ti-bag:before { 282 | content: "\e655"; 283 | } 284 | .ti-move:before { 285 | content: "\e656"; 286 | } 287 | .ti-arrows-vertical:before { 288 | content: "\e657"; 289 | } 290 | .ti-arrows-horizontal:before { 291 | content: "\e658"; 292 | } 293 | .ti-fullscreen:before { 294 | content: "\e659"; 295 | } 296 | .ti-arrow-top-right:before { 297 | content: "\e65a"; 298 | } 299 | .ti-arrow-top-left:before { 300 | content: "\e65b"; 301 | } 302 | .ti-arrow-circle-up:before { 303 | content: "\e65c"; 304 | } 305 | .ti-arrow-circle-right:before { 306 | content: "\e65d"; 307 | } 308 | .ti-arrow-circle-left:before { 309 | content: "\e65e"; 310 | } 311 | .ti-arrow-circle-down:before { 312 | content: "\e65f"; 313 | } 314 | .ti-angle-double-up:before { 315 | content: "\e660"; 316 | } 317 | .ti-angle-double-right:before { 318 | content: "\e661"; 319 | } 320 | .ti-angle-double-left:before { 321 | content: "\e662"; 322 | } 323 | .ti-angle-double-down:before { 324 | content: "\e663"; 325 | } 326 | .ti-zip:before { 327 | content: "\e664"; 328 | } 329 | .ti-world:before { 330 | content: "\e665"; 331 | } 332 | .ti-wheelchair:before { 333 | content: "\e666"; 334 | } 335 | .ti-view-list:before { 336 | content: "\e667"; 337 | } 338 | .ti-view-list-alt:before { 339 | content: "\e668"; 340 | } 341 | .ti-view-grid:before { 342 | content: "\e669"; 343 | } 344 | .ti-uppercase:before { 345 | content: "\e66a"; 346 | } 347 | .ti-upload:before { 348 | content: "\e66b"; 349 | } 350 | .ti-underline:before { 351 | content: "\e66c"; 352 | } 353 | .ti-truck:before { 354 | content: "\e66d"; 355 | } 356 | .ti-timer:before { 357 | content: "\e66e"; 358 | } 359 | .ti-ticket:before { 360 | content: "\e66f"; 361 | } 362 | .ti-thumb-up:before { 363 | content: "\e670"; 364 | } 365 | .ti-thumb-down:before { 366 | content: "\e671"; 367 | } 368 | .ti-text:before { 369 | content: "\e672"; 370 | } 371 | .ti-stats-up:before { 372 | content: "\e673"; 373 | } 374 | .ti-stats-down:before { 375 | content: "\e674"; 376 | } 377 | .ti-split-v:before { 378 | content: "\e675"; 379 | } 380 | .ti-split-h:before { 381 | content: "\e676"; 382 | } 383 | .ti-smallcap:before { 384 | content: "\e677"; 385 | } 386 | .ti-shine:before { 387 | content: "\e678"; 388 | } 389 | .ti-shift-right:before { 390 | content: "\e679"; 391 | } 392 | .ti-shift-left:before { 393 | content: "\e67a"; 394 | } 395 | .ti-shield:before { 396 | content: "\e67b"; 397 | } 398 | .ti-notepad:before { 399 | content: "\e67c"; 400 | } 401 | .ti-server:before { 402 | content: "\e67d"; 403 | } 404 | .ti-quote-right:before { 405 | content: "\e67e"; 406 | } 407 | .ti-quote-left:before { 408 | content: "\e67f"; 409 | } 410 | .ti-pulse:before { 411 | content: "\e680"; 412 | } 413 | .ti-printer:before { 414 | content: "\e681"; 415 | } 416 | .ti-power-off:before { 417 | content: "\e682"; 418 | } 419 | .ti-plug:before { 420 | content: "\e683"; 421 | } 422 | .ti-pie-chart:before { 423 | content: "\e684"; 424 | } 425 | .ti-paragraph:before { 426 | content: "\e685"; 427 | } 428 | .ti-panel:before { 429 | content: "\e686"; 430 | } 431 | .ti-package:before { 432 | content: "\e687"; 433 | } 434 | .ti-music:before { 435 | content: "\e688"; 436 | } 437 | .ti-music-alt:before { 438 | content: "\e689"; 439 | } 440 | .ti-mouse:before { 441 | content: "\e68a"; 442 | } 443 | .ti-mouse-alt:before { 444 | content: "\e68b"; 445 | } 446 | .ti-money:before { 447 | content: "\e68c"; 448 | } 449 | .ti-microphone:before { 450 | content: "\e68d"; 451 | } 452 | .ti-menu:before { 453 | content: "\e68e"; 454 | } 455 | .ti-menu-alt:before { 456 | content: "\e68f"; 457 | } 458 | .ti-map:before { 459 | content: "\e690"; 460 | } 461 | .ti-map-alt:before { 462 | content: "\e691"; 463 | } 464 | .ti-loop:before { 465 | content: "\e692"; 466 | } 467 | .ti-location-pin:before { 468 | content: "\e693"; 469 | } 470 | .ti-list:before { 471 | content: "\e694"; 472 | } 473 | .ti-light-bulb:before { 474 | content: "\e695"; 475 | } 476 | .ti-Italic:before { 477 | content: "\e696"; 478 | } 479 | .ti-info:before { 480 | content: "\e697"; 481 | } 482 | .ti-infinite:before { 483 | content: "\e698"; 484 | } 485 | .ti-id-badge:before { 486 | content: "\e699"; 487 | } 488 | .ti-hummer:before { 489 | content: "\e69a"; 490 | } 491 | .ti-home:before { 492 | content: "\e69b"; 493 | } 494 | .ti-help:before { 495 | content: "\e69c"; 496 | } 497 | .ti-headphone:before { 498 | content: "\e69d"; 499 | } 500 | .ti-harddrives:before { 501 | content: "\e69e"; 502 | } 503 | .ti-harddrive:before { 504 | content: "\e69f"; 505 | } 506 | .ti-gift:before { 507 | content: "\e6a0"; 508 | } 509 | .ti-game:before { 510 | content: "\e6a1"; 511 | } 512 | .ti-filter:before { 513 | content: "\e6a2"; 514 | } 515 | .ti-files:before { 516 | content: "\e6a3"; 517 | } 518 | .ti-file:before { 519 | content: "\e6a4"; 520 | } 521 | .ti-eraser:before { 522 | content: "\e6a5"; 523 | } 524 | .ti-envelope:before { 525 | content: "\e6a6"; 526 | } 527 | .ti-download:before { 528 | content: "\e6a7"; 529 | } 530 | .ti-direction:before { 531 | content: "\e6a8"; 532 | } 533 | .ti-direction-alt:before { 534 | content: "\e6a9"; 535 | } 536 | .ti-dashboard:before { 537 | content: "\e6aa"; 538 | } 539 | .ti-control-stop:before { 540 | content: "\e6ab"; 541 | } 542 | .ti-control-shuffle:before { 543 | content: "\e6ac"; 544 | } 545 | .ti-control-play:before { 546 | content: "\e6ad"; 547 | } 548 | .ti-control-pause:before { 549 | content: "\e6ae"; 550 | } 551 | .ti-control-forward:before { 552 | content: "\e6af"; 553 | } 554 | .ti-control-backward:before { 555 | content: "\e6b0"; 556 | } 557 | .ti-cloud:before { 558 | content: "\e6b1"; 559 | } 560 | .ti-cloud-up:before { 561 | content: "\e6b2"; 562 | } 563 | .ti-cloud-down:before { 564 | content: "\e6b3"; 565 | } 566 | .ti-clipboard:before { 567 | content: "\e6b4"; 568 | } 569 | .ti-car:before { 570 | content: "\e6b5"; 571 | } 572 | .ti-calendar:before { 573 | content: "\e6b6"; 574 | } 575 | .ti-book:before { 576 | content: "\e6b7"; 577 | } 578 | .ti-bell:before { 579 | content: "\e6b8"; 580 | } 581 | .ti-basketball:before { 582 | content: "\e6b9"; 583 | } 584 | .ti-bar-chart:before { 585 | content: "\e6ba"; 586 | } 587 | .ti-bar-chart-alt:before { 588 | content: "\e6bb"; 589 | } 590 | .ti-back-right:before { 591 | content: "\e6bc"; 592 | } 593 | .ti-back-left:before { 594 | content: "\e6bd"; 595 | } 596 | .ti-arrows-corner:before { 597 | content: "\e6be"; 598 | } 599 | .ti-archive:before { 600 | content: "\e6bf"; 601 | } 602 | .ti-anchor:before { 603 | content: "\e6c0"; 604 | } 605 | .ti-align-right:before { 606 | content: "\e6c1"; 607 | } 608 | .ti-align-left:before { 609 | content: "\e6c2"; 610 | } 611 | .ti-align-justify:before { 612 | content: "\e6c3"; 613 | } 614 | .ti-align-center:before { 615 | content: "\e6c4"; 616 | } 617 | .ti-alert:before { 618 | content: "\e6c5"; 619 | } 620 | .ti-alarm-clock:before { 621 | content: "\e6c6"; 622 | } 623 | .ti-agenda:before { 624 | content: "\e6c7"; 625 | } 626 | .ti-write:before { 627 | content: "\e6c8"; 628 | } 629 | .ti-window:before { 630 | content: "\e6c9"; 631 | } 632 | .ti-widgetized:before { 633 | content: "\e6ca"; 634 | } 635 | .ti-widget:before { 636 | content: "\e6cb"; 637 | } 638 | .ti-widget-alt:before { 639 | content: "\e6cc"; 640 | } 641 | .ti-wallet:before { 642 | content: "\e6cd"; 643 | } 644 | .ti-video-clapper:before { 645 | content: "\e6ce"; 646 | } 647 | .ti-video-camera:before { 648 | content: "\e6cf"; 649 | } 650 | .ti-vector:before { 651 | content: "\e6d0"; 652 | } 653 | .ti-themify-logo:before { 654 | content: "\e6d1"; 655 | } 656 | .ti-themify-favicon:before { 657 | content: "\e6d2"; 658 | } 659 | .ti-themify-favicon-alt:before { 660 | content: "\e6d3"; 661 | } 662 | .ti-support:before { 663 | content: "\e6d4"; 664 | } 665 | .ti-stamp:before { 666 | content: "\e6d5"; 667 | } 668 | .ti-split-v-alt:before { 669 | content: "\e6d6"; 670 | } 671 | .ti-slice:before { 672 | content: "\e6d7"; 673 | } 674 | .ti-shortcode:before { 675 | content: "\e6d8"; 676 | } 677 | .ti-shift-right-alt:before { 678 | content: "\e6d9"; 679 | } 680 | .ti-shift-left-alt:before { 681 | content: "\e6da"; 682 | } 683 | .ti-ruler-alt-2:before { 684 | content: "\e6db"; 685 | } 686 | .ti-receipt:before { 687 | content: "\e6dc"; 688 | } 689 | .ti-pin2:before { 690 | content: "\e6dd"; 691 | } 692 | .ti-pin-alt:before { 693 | content: "\e6de"; 694 | } 695 | .ti-pencil-alt2:before { 696 | content: "\e6df"; 697 | } 698 | .ti-palette:before { 699 | content: "\e6e0"; 700 | } 701 | .ti-more:before { 702 | content: "\e6e1"; 703 | } 704 | .ti-more-alt:before { 705 | content: "\e6e2"; 706 | } 707 | .ti-microphone-alt:before { 708 | content: "\e6e3"; 709 | } 710 | .ti-magnet:before { 711 | content: "\e6e4"; 712 | } 713 | .ti-line-double:before { 714 | content: "\e6e5"; 715 | } 716 | .ti-line-dotted:before { 717 | content: "\e6e6"; 718 | } 719 | .ti-line-dashed:before { 720 | content: "\e6e7"; 721 | } 722 | .ti-layout-width-full:before { 723 | content: "\e6e8"; 724 | } 725 | .ti-layout-width-default:before { 726 | content: "\e6e9"; 727 | } 728 | .ti-layout-width-default-alt:before { 729 | content: "\e6ea"; 730 | } 731 | .ti-layout-tab:before { 732 | content: "\e6eb"; 733 | } 734 | .ti-layout-tab-window:before { 735 | content: "\e6ec"; 736 | } 737 | .ti-layout-tab-v:before { 738 | content: "\e6ed"; 739 | } 740 | .ti-layout-tab-min:before { 741 | content: "\e6ee"; 742 | } 743 | .ti-layout-slider:before { 744 | content: "\e6ef"; 745 | } 746 | .ti-layout-slider-alt:before { 747 | content: "\e6f0"; 748 | } 749 | .ti-layout-sidebar-right:before { 750 | content: "\e6f1"; 751 | } 752 | .ti-layout-sidebar-none:before { 753 | content: "\e6f2"; 754 | } 755 | .ti-layout-sidebar-left:before { 756 | content: "\e6f3"; 757 | } 758 | .ti-layout-placeholder:before { 759 | content: "\e6f4"; 760 | } 761 | .ti-layout-menu:before { 762 | content: "\e6f5"; 763 | } 764 | .ti-layout-menu-v:before { 765 | content: "\e6f6"; 766 | } 767 | .ti-layout-menu-separated:before { 768 | content: "\e6f7"; 769 | } 770 | .ti-layout-menu-full:before { 771 | content: "\e6f8"; 772 | } 773 | .ti-layout-media-right-alt:before { 774 | content: "\e6f9"; 775 | } 776 | .ti-layout-media-right:before { 777 | content: "\e6fa"; 778 | } 779 | .ti-layout-media-overlay:before { 780 | content: "\e6fb"; 781 | } 782 | .ti-layout-media-overlay-alt:before { 783 | content: "\e6fc"; 784 | } 785 | .ti-layout-media-overlay-alt-2:before { 786 | content: "\e6fd"; 787 | } 788 | .ti-layout-media-left-alt:before { 789 | content: "\e6fe"; 790 | } 791 | .ti-layout-media-left:before { 792 | content: "\e6ff"; 793 | } 794 | .ti-layout-media-center-alt:before { 795 | content: "\e700"; 796 | } 797 | .ti-layout-media-center:before { 798 | content: "\e701"; 799 | } 800 | .ti-layout-list-thumb:before { 801 | content: "\e702"; 802 | } 803 | .ti-layout-list-thumb-alt:before { 804 | content: "\e703"; 805 | } 806 | .ti-layout-list-post:before { 807 | content: "\e704"; 808 | } 809 | .ti-layout-list-large-image:before { 810 | content: "\e705"; 811 | } 812 | .ti-layout-line-solid:before { 813 | content: "\e706"; 814 | } 815 | .ti-layout-grid4:before { 816 | content: "\e707"; 817 | } 818 | .ti-layout-grid3:before { 819 | content: "\e708"; 820 | } 821 | .ti-layout-grid2:before { 822 | content: "\e709"; 823 | } 824 | .ti-layout-grid2-thumb:before { 825 | content: "\e70a"; 826 | } 827 | .ti-layout-cta-right:before { 828 | content: "\e70b"; 829 | } 830 | .ti-layout-cta-left:before { 831 | content: "\e70c"; 832 | } 833 | .ti-layout-cta-center:before { 834 | content: "\e70d"; 835 | } 836 | .ti-layout-cta-btn-right:before { 837 | content: "\e70e"; 838 | } 839 | .ti-layout-cta-btn-left:before { 840 | content: "\e70f"; 841 | } 842 | .ti-layout-column4:before { 843 | content: "\e710"; 844 | } 845 | .ti-layout-column3:before { 846 | content: "\e711"; 847 | } 848 | .ti-layout-column2:before { 849 | content: "\e712"; 850 | } 851 | .ti-layout-accordion-separated:before { 852 | content: "\e713"; 853 | } 854 | .ti-layout-accordion-merged:before { 855 | content: "\e714"; 856 | } 857 | .ti-layout-accordion-list:before { 858 | content: "\e715"; 859 | } 860 | .ti-ink-pen:before { 861 | content: "\e716"; 862 | } 863 | .ti-info-alt:before { 864 | content: "\e717"; 865 | } 866 | .ti-help-alt:before { 867 | content: "\e718"; 868 | } 869 | .ti-headphone-alt:before { 870 | content: "\e719"; 871 | } 872 | .ti-hand-point-up:before { 873 | content: "\e71a"; 874 | } 875 | .ti-hand-point-right:before { 876 | content: "\e71b"; 877 | } 878 | .ti-hand-point-left:before { 879 | content: "\e71c"; 880 | } 881 | .ti-hand-point-down:before { 882 | content: "\e71d"; 883 | } 884 | .ti-gallery:before { 885 | content: "\e71e"; 886 | } 887 | .ti-face-smile:before { 888 | content: "\e71f"; 889 | } 890 | .ti-face-sad:before { 891 | content: "\e720"; 892 | } 893 | .ti-credit-card:before { 894 | content: "\e721"; 895 | } 896 | .ti-control-skip-forward:before { 897 | content: "\e722"; 898 | } 899 | .ti-control-skip-backward:before { 900 | content: "\e723"; 901 | } 902 | .ti-control-record:before { 903 | content: "\e724"; 904 | } 905 | .ti-control-eject:before { 906 | content: "\e725"; 907 | } 908 | .ti-comments-smiley:before { 909 | content: "\e726"; 910 | } 911 | .ti-brush-alt:before { 912 | content: "\e727"; 913 | } 914 | .ti-youtube:before { 915 | content: "\e728"; 916 | } 917 | .ti-vimeo:before { 918 | content: "\e729"; 919 | } 920 | .ti-twitter:before { 921 | content: "\e72a"; 922 | } 923 | .ti-time:before { 924 | content: "\e72b"; 925 | } 926 | .ti-tumblr:before { 927 | content: "\e72c"; 928 | } 929 | .ti-skype:before { 930 | content: "\e72d"; 931 | } 932 | .ti-share:before { 933 | content: "\e72e"; 934 | } 935 | .ti-share-alt:before { 936 | content: "\e72f"; 937 | } 938 | .ti-rocket:before { 939 | content: "\e730"; 940 | } 941 | .ti-pinterest:before { 942 | content: "\e731"; 943 | } 944 | .ti-new-window:before { 945 | content: "\e732"; 946 | } 947 | .ti-microsoft:before { 948 | content: "\e733"; 949 | } 950 | .ti-list-ol:before { 951 | content: "\e734"; 952 | } 953 | .ti-linkedin:before { 954 | content: "\e735"; 955 | } 956 | .ti-layout-sidebar-2:before { 957 | content: "\e736"; 958 | } 959 | .ti-layout-grid4-alt:before { 960 | content: "\e737"; 961 | } 962 | .ti-layout-grid3-alt:before { 963 | content: "\e738"; 964 | } 965 | .ti-layout-grid2-alt:before { 966 | content: "\e739"; 967 | } 968 | .ti-layout-column4-alt:before { 969 | content: "\e73a"; 970 | } 971 | .ti-layout-column3-alt:before { 972 | content: "\e73b"; 973 | } 974 | .ti-layout-column2-alt:before { 975 | content: "\e73c"; 976 | } 977 | .ti-instagram:before { 978 | content: "\e73d"; 979 | } 980 | .ti-google:before { 981 | content: "\e73e"; 982 | } 983 | .ti-github:before { 984 | content: "\e73f"; 985 | } 986 | .ti-flickr:before { 987 | content: "\e740"; 988 | } 989 | .ti-facebook:before { 990 | content: "\e741"; 991 | } 992 | .ti-dropbox:before { 993 | content: "\e742"; 994 | } 995 | .ti-dribbble:before { 996 | content: "\e743"; 997 | } 998 | .ti-apple:before { 999 | content: "\e744"; 1000 | } 1001 | .ti-android:before { 1002 | content: "\e745"; 1003 | } 1004 | .ti-save:before { 1005 | content: "\e746"; 1006 | } 1007 | .ti-save-alt:before { 1008 | content: "\e747"; 1009 | } 1010 | .ti-yahoo:before { 1011 | content: "\e748"; 1012 | } 1013 | .ti-wordpress:before { 1014 | content: "\e749"; 1015 | } 1016 | .ti-vimeo-alt:before { 1017 | content: "\e74a"; 1018 | } 1019 | .ti-twitter-alt:before { 1020 | content: "\e74b"; 1021 | } 1022 | .ti-tumblr-alt:before { 1023 | content: "\e74c"; 1024 | } 1025 | .ti-trello:before { 1026 | content: "\e74d"; 1027 | } 1028 | .ti-stack-overflow:before { 1029 | content: "\e74e"; 1030 | } 1031 | .ti-soundcloud:before { 1032 | content: "\e74f"; 1033 | } 1034 | .ti-sharethis:before { 1035 | content: "\e750"; 1036 | } 1037 | .ti-sharethis-alt:before { 1038 | content: "\e751"; 1039 | } 1040 | .ti-reddit:before { 1041 | content: "\e752"; 1042 | } 1043 | .ti-pinterest-alt:before { 1044 | content: "\e753"; 1045 | } 1046 | .ti-microsoft-alt:before { 1047 | content: "\e754"; 1048 | } 1049 | .ti-linux:before { 1050 | content: "\e755"; 1051 | } 1052 | .ti-jsfiddle:before { 1053 | content: "\e756"; 1054 | } 1055 | .ti-joomla:before { 1056 | content: "\e757"; 1057 | } 1058 | .ti-html5:before { 1059 | content: "\e758"; 1060 | } 1061 | .ti-flickr-alt:before { 1062 | content: "\e759"; 1063 | } 1064 | .ti-email:before { 1065 | content: "\e75a"; 1066 | } 1067 | .ti-drupal:before { 1068 | content: "\e75b"; 1069 | } 1070 | .ti-dropbox-alt:before { 1071 | content: "\e75c"; 1072 | } 1073 | .ti-css3:before { 1074 | content: "\e75d"; 1075 | } 1076 | .ti-rss:before { 1077 | content: "\e75e"; 1078 | } 1079 | .ti-rss-alt:before { 1080 | content: "\e75f"; 1081 | } -------------------------------------------------------------------------------- /src/static/font/arial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/font/arial.ttf -------------------------------------------------------------------------------- /src/static/font/arialbd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/font/arialbd.ttf -------------------------------------------------------------------------------- /src/static/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/font/iconfont.eot -------------------------------------------------------------------------------- /src/static/font/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Created by FontForge 20120731 at Mon Jun 19 13:38:37 2017 6 | By admin 7 | 8 | 9 | 10 | 24 | 26 | 28 | 30 | 32 | 34 | 38 | 40 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/static/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/font/iconfont.ttf -------------------------------------------------------------------------------- /src/static/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/font/iconfont.woff -------------------------------------------------------------------------------- /src/static/fonts/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/fonts/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/static/fonts/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/fonts/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/static/fonts/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/fonts/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/static/fonts/bootstrap/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/fonts/bootstrap/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/static/fonts/icomoon/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/fonts/icomoon/icomoon.eot -------------------------------------------------------------------------------- /src/static/fonts/icomoon/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/fonts/icomoon/icomoon.ttf -------------------------------------------------------------------------------- /src/static/fonts/icomoon/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/fonts/icomoon/icomoon.woff -------------------------------------------------------------------------------- /src/static/fonts/themify-icons/themify.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/fonts/themify-icons/themify.eot -------------------------------------------------------------------------------- /src/static/fonts/themify-icons/themify.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/fonts/themify-icons/themify.ttf -------------------------------------------------------------------------------- /src/static/fonts/themify-icons/themify.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/fonts/themify-icons/themify.woff -------------------------------------------------------------------------------- /src/static/images/221950.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/221950.jpg -------------------------------------------------------------------------------- /src/static/images/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/grid.png -------------------------------------------------------------------------------- /src/static/images/img_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/img_1.jpg -------------------------------------------------------------------------------- /src/static/images/img_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/img_2.jpg -------------------------------------------------------------------------------- /src/static/images/img_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/img_3.jpg -------------------------------------------------------------------------------- /src/static/images/img_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/img_4.jpg -------------------------------------------------------------------------------- /src/static/images/img_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/img_5.jpg -------------------------------------------------------------------------------- /src/static/images/img_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/img_6.jpg -------------------------------------------------------------------------------- /src/static/images/img_bg_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/img_bg_1.jpg -------------------------------------------------------------------------------- /src/static/images/img_bg_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/img_bg_2.jpg -------------------------------------------------------------------------------- /src/static/images/img_bg_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/img_bg_3.jpg -------------------------------------------------------------------------------- /src/static/images/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/loader.gif -------------------------------------------------------------------------------- /src/static/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/src/static/images/refresh.png -------------------------------------------------------------------------------- /src/static/js/main.js: -------------------------------------------------------------------------------- 1 |  2 | 3 | console.log(trim(' 99999966666666 8888 ')); -------------------------------------------------------------------------------- /src/template/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/static/.gitkeep -------------------------------------------------------------------------------- /static/js/autoRem.js: -------------------------------------------------------------------------------- 1 | setSize(); 2 | window.addEventListener("resize", setSize, false); 3 | window.addEventListener("orientationchange", setSize, false); 4 | function setSize() { 5 | var html = document.getElementsByTagName('html')[0]; 6 | var width = html.clientWidth; 7 | var height=html.clientHeight; 8 | var ratio=width/height; 9 | html.style.fontSize = width / 18 + "px"; 10 | if(ratio>0.8){ 11 | html.style.fontSize = width / 18 + "px"; 12 | }else if(ratio>0.69){ 13 | html.style.fontSize = width / 19.8 + "px"; 14 | }else if(ratio>0.67){ 15 | html.style.fontSize = width / 19.6 + "px"; 16 | }else if(ratio>0.65){ 17 | html.style.fontSize = width / 19.2 + "px"; 18 | }else if(ratio>0.60){ 19 | html.style.fontSize = width / 18 + "px"; 20 | }else if(ratio>0.55){ 21 | html.style.fontSize = width / 17 + "px"; 22 | }else{ 23 | html.style.fontSize = width / 16 + "px"; 24 | } 25 | } -------------------------------------------------------------------------------- /static/js/layer/layer.js: -------------------------------------------------------------------------------- 1 | /*! layer-v3.0.3 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */ 2 | ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.scripts,t=e[e.length-1],i=t.src;if(!t.getAttribute("merge"))return i.substring(0,i.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"]},r={v:"3.0.3",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):r.link("skin/"+e.extend),this):this},link:function(t,n,a){if(r.path){var o=i("head")[0],s=document.createElement("link");"string"==typeof n&&(a=n);var l=(a||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,i("#"+f)[0]||o.appendChild(s),"function"==typeof n&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(i("#"+f).css("width"))?n():setTimeout(u,100))}()}},ready:function(e){var t="skinlayercss",i="303";return a?layui.addcss("modules/layer/default/layer.css?v="+r.v+i,e,t):r.link("skin/default/layer.css?v="+r.v+i,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.8,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
'+(f?r.title[0]:r.title)+"
":"";return r.zIndex=s,t([r.shade?'
':"",'
'+(e&&2!=r.type?"":u)+'
'+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
'+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
'+e+"
"}():"")+(r.resize?'':"")+"
"],u,i('
')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]&&e.layero.addClass(l.anim[t.anim]),t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){function t(e){e=s.find(e),e.height(f[1]-c-u-2*(0|parseFloat(e.css("padding-top"))))}var a=this,o=a.config,s=i("#"+l[0]+e);""===o.area[0]&&o.maxWidth>0&&(r.ie&&r.ie<8&&o.btn&&s.width(s.innerWidth()),s.outerWidth()>o.maxWidth&&s.width(o.maxWidth));var f=[s.innerWidth(),s.innerHeight()],c=s.find(l[1]).outerHeight()||0,u=s.find("."+l[6]).outerHeight()||0;switch(o.type){case 2:t("iframe");break;default:""===o.area[1]?o.fixed&&f[1]>=n.height()&&(f[1]=n.height(),t("."+l[5])):t("."+l[5])}return a},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass(a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,n="";if(e>0)for(n=''+t[0].title+"";i"+t[i].title+"";return n}(),content:'
    '+function(){var e=t.length,i=1,n="";if(e>0)for(n='
  • '+(t[0].content||"no content")+"
  • ";i'+(t[i].content||"no content")+"";return n}()+"
",success:function(t){var a=t.find(".layui-layer-title").children(),o=t.find(".layui-layer-tabmain").children();a.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var n=i(this),a=n.index();n.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),o.eq(a).show().siblings().hide(),"function"==typeof e.change&&e.change(a)}),"function"==typeof n&&n(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
'+(u.length>1?'':"")+'
'+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.jquery),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); -------------------------------------------------------------------------------- /static/js/layer/mobile/layer.js: -------------------------------------------------------------------------------- 1 | /*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */ 2 | ;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'

'+(e?n.title[0]:n.title)+"

":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e=''+n.btn[0]+"",2===t&&(e=''+n.btn[1]+""+e),'
'+e+"
"):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='

'+(n.content||"")+"

"),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"
':"")+'
"+l+'
'+n.content+"
"+c+"
",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;odiv{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} -------------------------------------------------------------------------------- /static/js/layer/skin/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/static/js/layer/skin/default/icon-ext.png -------------------------------------------------------------------------------- /static/js/layer/skin/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/static/js/layer/skin/default/icon.png -------------------------------------------------------------------------------- /static/js/layer/skin/default/layer.css: -------------------------------------------------------------------------------- 1 | .layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}*html{background-image:url(about:blank);background-attachment:fixed}html #layuicss-skinlayercss{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layui-layer{border-radius:2px;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 10px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:6px 6px 0;padding:0 15px;border:1px solid #dedede;background-color:#f1f1f1;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#4898d5;background-color:#2e8ded;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:5px 10px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:1px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#BBB5B5;border:none}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:220px;height:30px;margin:0 auto;line-height:30px;padding:0 5px;border:1px solid #ccc;box-shadow:1px 1px 5px rgba(0,0,0,.1) inset;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;border-bottom:1px solid #ccc;background-color:#eee;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;cursor:default;overflow:hidden}.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:43px;border-left:1px solid #ccc;border-right:1px solid #ccc;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block}.xubox_tabclose{position:absolute;right:10px;top:5px;cursor:pointer}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}} -------------------------------------------------------------------------------- /static/js/layer/skin/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/static/js/layer/skin/default/loading-0.gif -------------------------------------------------------------------------------- /static/js/layer/skin/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/static/js/layer/skin/default/loading-1.gif -------------------------------------------------------------------------------- /static/js/layer/skin/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xulayen/vue-and-react-template/2b21a469a2b204d5dba24e7d0de7c5588e4a9aa8/static/js/layer/skin/default/loading-2.gif -------------------------------------------------------------------------------- /static/js/layer_mobile/layer.js: -------------------------------------------------------------------------------- 1 | /*! layer mobile-v2.0 弹层组件移动版 License LGPL http://layer.layui.com/mobile By 贤心 */ 2 | ; 3 | !function (a) { 4 | "use strict"; 5 | var b = document, c = "querySelectorAll", d = "getElementsByClassName", e = function (a) { 6 | return b[c](a) 7 | }, f = {type: 0, shade: !0, shadeClose: !0, fixed: !0, anim: "scale"}, g = { 8 | extend: function (a) { 9 | var b = JSON.parse(JSON.stringify(f)); 10 | for (var c in a)b[c] = a[c]; 11 | return b 12 | }, timer: {}, end: {} 13 | }; 14 | g.touch = function (a, b) { 15 | a.addEventListener("click", function (a) { 16 | b.call(this, a) 17 | }, !1) 18 | }; 19 | var h = 0, i = ["layui-m-layer"], j = function (a) { 20 | var b = this; 21 | b.config = g.extend(a), b.view() 22 | }; 23 | j.prototype.view = function () { 24 | var a = this, c = a.config, f = b.createElement("div"); 25 | a.id = f.id = i[0] + h, f.setAttribute("class", i[0] + " " + i[0] + (c.type || 0)), f.setAttribute("index", h); 26 | var g = function () { 27 | var a = "object" == typeof c.title; 28 | return c.title ? '

' + (a ? c.title[0] : c.title) + "

" : "" 29 | }(), j = function () { 30 | "string" == typeof c.btn && (c.btn = [c.btn]); 31 | var a, b = (c.btn || []).length; 32 | return 0 !== b && c.btn ? (a = '' + c.btn[0] + "", 2 === b && (a = '' + c.btn[1] + "" + a), '
' + a + "
") : "" 33 | }(); 34 | if (c.fixed || (c.top = c.hasOwnProperty("top") ? c.top : 100, c.style = c.style || "", c.style += " top:" + (b.body.scrollTop + c.top) + "px"), 2 === c.type && (c.content = '

' + (c.content || "") + "

"), c.skin && (c.anim = "scale"), "msg" === c.skin && (c.shade = !1), f.innerHTML = (c.shade ? "
' : "") + '
" + g + '
' + c.content + "
" + j + "
", !c.type || 2 === c.type) { 35 | var k = b[d](i[0] + c.type), l = k.length; 36 | l >= 1 && layer.close(k[0].getAttribute("index")) 37 | } 38 | document.body.appendChild(f); 39 | var m = a.elem = e("#" + a.id)[0]; 40 | c.success && c.success(m), a.index = h++, a.action(c, m) 41 | }, j.prototype.action = function (a, b) { 42 | var c = this; 43 | a.time && (g.timer[c.index] = setTimeout(function () { 44 | layer.close(c.index) 45 | }, 1e3 * a.time)); 46 | var e = function () { 47 | var b = this.getAttribute("type"); 48 | 0 == b ? (a.no && a.no(), layer.close(c.index)) : a.yes ? a.yes(c.index) : layer.close(c.index) 49 | }; 50 | if (a.btn)for (var f = b[d]("layui-m-layerbtn")[0].children, h = f.length, i = 0; h > i; i++)g.touch(f[i], e); 51 | if (a.shade && a.shadeClose) { 52 | var j = b[d]("layui-m-layershade")[0]; 53 | g.touch(j, function () { 54 | layer.close(c.index, a.end) 55 | }) 56 | } 57 | a.end && (g.end[c.index] = a.end) 58 | }, a.layer = { 59 | v: "2.0", index: h, open: function (a) { 60 | var b = new j(a || {}); 61 | return b.index 62 | }, close: function (a) { 63 | var c = e("#" + i[0] + a)[0]; 64 | c && (c.innerHTML = "", b.body.removeChild(c), clearTimeout(g.timer[a]), delete g.timer[a], "function" == typeof g.end[a] && g.end[a](), delete g.end[a]) 65 | }, closeAll: function () { 66 | for (var a = b[d](i[0]), c = 0, e = a.length; e > c; c++)layer.close(0 | a[0].getAttribute("index")) 67 | } 68 | }, "function" == typeof define ? define(function () { 69 | return layer 70 | }) : function () { 71 | var a = document.scripts, c = a[a.length - 1], d = c.src, e = d.substring(0, d.lastIndexOf("/") + 1); 72 | c.getAttribute("merge") || document.head.appendChild(function () { 73 | var a = b.createElement("link"); 74 | return a.href = e + "need/layer.css?v=2.0", a.type = "text/css", a.rel = "styleSheet", a.id = "layermcss", a 75 | }()) 76 | }() 77 | }(window); -------------------------------------------------------------------------------- /static/js/layer_mobile/need/layer.css: -------------------------------------------------------------------------------- 1 | .layui-m-layer { 2 | position: relative; 3 | z-index: 19891014 4 | } 5 | 6 | .layui-m-layer * { 7 | -webkit-box-sizing: content-box; 8 | -moz-box-sizing: content-box; 9 | box-sizing: content-box 10 | } 11 | 12 | .layui-m-layermain, .layui-m-layershade { 13 | position: fixed; 14 | left: 0; 15 | top: 0; 16 | width: 100%; 17 | height: 100%; 18 | } 19 | 20 | .layui-m-layershade { 21 | background-color: rgba(0, 0, 0, .7); 22 | pointer-events: auto 23 | } 24 | 25 | .layui-m-layermain { 26 | display: table; 27 | font-family: 'qiti'; 28 | pointer-events: none; 29 | letter-spacing: 1px; 30 | } 31 | 32 | .layui-m-layermain .layui-m-layersection { 33 | display: table-cell; 34 | vertical-align: middle; 35 | text-align: center 36 | } 37 | 38 | .layui-m-layerchild { 39 | position: relative; 40 | display: inline-block; 41 | text-align: left; 42 | background-color: #fff; 43 | font-size:0.8rem; 44 | border-radius: 5px; 45 | box-shadow: 0 0 8px rgba(0, 0, 0, .1); 46 | pointer-events: auto; 47 | -webkit-overflow-scrolling: touch; 48 | -webkit-animation-fill-mode: both; 49 | animation-fill-mode: both; 50 | -webkit-animation-duration: .2s; 51 | animation-duration: .2s 52 | } 53 | 54 | @-webkit-keyframes layui-m-anim-scale { 55 | 0% { 56 | opacity: 0; 57 | -webkit-transform: scale(.5); 58 | transform: scale(.5) 59 | } 60 | 100% { 61 | opacity: 1; 62 | -webkit-transform: scale(1); 63 | transform: scale(1) 64 | } 65 | } 66 | 67 | @keyframes layui-m-anim-scale { 68 | 0% { 69 | opacity: 0; 70 | -webkit-transform: scale(.5); 71 | transform: scale(.5) 72 | } 73 | 100% { 74 | opacity: 1; 75 | -webkit-transform: scale(1); 76 | transform: scale(1) 77 | } 78 | } 79 | 80 | .layui-m-anim-scale { 81 | animation-name: layui-m-anim-scale; 82 | -webkit-animation-name: layui-m-anim-scale 83 | } 84 | 85 | @-webkit-keyframes layui-m-anim-up { 86 | 0% { 87 | opacity: 0; 88 | -webkit-transform: translateY(800px); 89 | transform: translateY(800px) 90 | } 91 | 100% { 92 | opacity: 1; 93 | -webkit-transform: translateY(0); 94 | transform: translateY(0) 95 | } 96 | } 97 | 98 | @keyframes layui-m-anim-up { 99 | 0% { 100 | opacity: 0; 101 | -webkit-transform: translateY(800px); 102 | transform: translateY(800px) 103 | } 104 | 100% { 105 | opacity: 1; 106 | -webkit-transform: translateY(0); 107 | transform: translateY(0) 108 | } 109 | } 110 | 111 | .layui-m-anim-up { 112 | -webkit-animation-name: layui-m-anim-up; 113 | animation-name: layui-m-anim-up 114 | } 115 | 116 | .layui-m-layer0 .layui-m-layerchild { 117 | width: 90%; 118 | max-width: 640px 119 | } 120 | 121 | .layui-m-layer1 .layui-m-layerchild { 122 | border: none; 123 | border-radius: 0 124 | } 125 | 126 | .layui-m-layer2 .layui-m-layerchild { 127 | width: auto; 128 | max-width: 260px; 129 | min-width: 40px; 130 | border: none; 131 | background: 0 0; 132 | box-shadow: none; 133 | color: #fff 134 | } 135 | 136 | .layui-m-layerchild h3 { 137 | padding: 0 10px; 138 | height: 60px; 139 | line-height: 60px; 140 | font-size: 16px; 141 | font-weight: 400; 142 | border-radius: 5px 5px 0 0; 143 | text-align: center 144 | } 145 | 146 | .layui-m-layerbtn span, .layui-m-layerchild h3 { 147 | text-overflow: ellipsis; 148 | overflow: hidden; 149 | white-space: nowrap 150 | } 151 | 152 | .layui-m-layercont { 153 | padding: 50px 30px; 154 | line-height: 22px; 155 | text-align: center 156 | } 157 | 158 | .layui-m-layer1 .layui-m-layercont { 159 | padding: 0; 160 | text-align: left 161 | } 162 | 163 | .layui-m-layer2 .layui-m-layercont { 164 | text-align: center; 165 | padding: 0; 166 | line-height: 0 167 | } 168 | 169 | .layui-m-layer2 .layui-m-layercont i { 170 | width: 25px; 171 | height: 25px; 172 | margin-left: 8px; 173 | display: inline-block; 174 | background-color: #fff; 175 | border-radius: 100%; 176 | -webkit-animation: layui-m-anim-loading 1.4s infinite ease-in-out; 177 | animation: layui-m-anim-loading 1.4s infinite ease-in-out; 178 | -webkit-animation-fill-mode: both; 179 | animation-fill-mode: both 180 | } 181 | 182 | .layui-m-layerbtn, .layui-m-layerbtn span { 183 | position: relative; 184 | text-align: center; 185 | border-radius: 0 0 5px 5px 186 | } 187 | 188 | .layui-m-layer2 .layui-m-layercont p { 189 | margin-top: 20px 190 | } 191 | 192 | @-webkit-keyframes layui-m-anim-loading { 193 | 0%, 100%, 80% { 194 | transform: scale(0); 195 | -webkit-transform: scale(0) 196 | } 197 | 40% { 198 | transform: scale(1); 199 | -webkit-transform: scale(1) 200 | } 201 | } 202 | 203 | @keyframes layui-m-anim-loading { 204 | 0%, 100%, 80% { 205 | transform: scale(0); 206 | -webkit-transform: scale(0) 207 | } 208 | 40% { 209 | transform: scale(1); 210 | -webkit-transform: scale(1) 211 | } 212 | } 213 | 214 | .layui-m-layer2 .layui-m-layercont i:first-child { 215 | margin-left: 0; 216 | -webkit-animation-delay: -.32s; 217 | animation-delay: -.32s 218 | } 219 | 220 | .layui-m-layer2 .layui-m-layercont i.layui-m-layerload { 221 | -webkit-animation-delay: -.16s; 222 | animation-delay: -.16s 223 | } 224 | 225 | .layui-m-layer2 .layui-m-layercont > div { 226 | line-height: 22px; 227 | padding-top: 7px; 228 | margin-bottom: 20px; 229 | font-size: 14px 230 | } 231 | 232 | .layui-m-layerbtn { 233 | display: box; 234 | display: -moz-box; 235 | display: -webkit-box; 236 | width: 100%; 237 | height: 50px; 238 | line-height: 50px; 239 | font-size: 0; 240 | border-top: 1px solid #D0D0D0; 241 | background-color: #F2F2F2 242 | } 243 | 244 | .layui-m-layerbtn span { 245 | display: block; 246 | -moz-box-flex: 1; 247 | box-flex: 1; 248 | -webkit-box-flex: 1; 249 | font-size: 14px; 250 | cursor: pointer 251 | } 252 | 253 | .layui-m-layerbtn span[yes] { 254 | color: #40AFFE 255 | } 256 | 257 | .layui-m-layerbtn span[no] { 258 | border-right: 1px solid #D0D0D0; 259 | border-radius: 0 0 0 5px 260 | } 261 | 262 | .layui-m-layerbtn span:active { 263 | background-color: #F6F6F6 264 | } 265 | 266 | .layui-m-layerend { 267 | position: absolute; 268 | right: 7px; 269 | top: 10px; 270 | width: 30px; 271 | height: 30px; 272 | border: 0; 273 | font-weight: 400; 274 | background: 0 0; 275 | cursor: pointer; 276 | -webkit-appearance: none; 277 | font-size: 30px 278 | } 279 | 280 | .layui-m-layerend::after, .layui-m-layerend::before { 281 | position: absolute; 282 | left: 5px; 283 | top: 15px; 284 | content: ''; 285 | width: 18px; 286 | height: 1px; 287 | background-color: #999; 288 | transform: rotate(45deg); 289 | -webkit-transform: rotate(45deg); 290 | border-radius: 3px 291 | } 292 | 293 | .layui-m-layerend::after { 294 | transform: rotate(-45deg); 295 | -webkit-transform: rotate(-45deg) 296 | } 297 | 298 | body .layui-m-layer .layui-m-layer-footer { 299 | position: fixed; 300 | width: 95%; 301 | max-width: 100%; 302 | margin: 0 auto; 303 | left: 0; 304 | right: 0; 305 | bottom: 10px; 306 | background: 0 0 307 | } 308 | 309 | .layui-m-layer-footer .layui-m-layercont { 310 | padding: 20px; 311 | border-radius: 5px 5px 0 0; 312 | background-color: rgba(255, 255, 255, .8) 313 | } 314 | 315 | .layui-m-layer-footer .layui-m-layerbtn { 316 | display: block; 317 | height: auto; 318 | background: 0 0; 319 | border-top: none 320 | } 321 | 322 | .layui-m-layer-footer .layui-m-layerbtn span { 323 | background-color: rgba(255, 255, 255, .8) 324 | } 325 | 326 | .layui-m-layer-footer .layui-m-layerbtn span[no] { 327 | color: #FD482C; 328 | border-top: 1px solid #c2c2c2; 329 | border-radius: 0 0 5px 5px 330 | } 331 | 332 | .layui-m-layer-footer .layui-m-layerbtn span[yes] { 333 | margin-top: 10px; 334 | border-radius: 5px 335 | } 336 | 337 | body .layui-m-layer .layui-m-layer-msg { 338 | width: auto; 339 | max-width: 90%; 340 | margin: 0 auto; 341 | bottom: 0; 342 | background-color: rgba(0, 0, 0, .7); 343 | color: #fff 344 | } 345 | 346 | .layui-m-layer-msg .layui-m-layercont { 347 | padding: 10px 20px 348 | } --------------------------------------------------------------------------------