wennjie 7 years ago
commit
867fa2bcd7
100 changed files with 1132 additions and 0 deletions
  1. 23 0
      init/.babelrc
  2. 9 0
      init/.editorconfig
  3. 7 0
      init/.gitignore
  4. 8 0
      init/.postcssrc.js
  5. 28 0
      init/.project
  6. 25 0
      init/README.md
  7. BIN
      init/assets/icons/Path 3 Copy 2.png
  8. BIN
      init/assets/icons/Triangle.png
  9. BIN
      init/assets/icons/ic_access_time_black_24px copy 2.png
  10. BIN
      init/assets/icons/ic_area.png
  11. BIN
      init/assets/icons/ic_date_range_black_24px.png
  12. BIN
      init/assets/icons/selected.png
  13. BIN
      init/assets/images/Corn Star pt II.png
  14. BIN
      init/assets/images/Group.png
  15. BIN
      init/assets/images/Rectangle 4.png
  16. BIN
      init/assets/images/Rectangle.png
  17. BIN
      init/assets/images/back.png
  18. BIN
      init/assets/images/btm.png
  19. BIN
      init/assets/images/button.png
  20. BIN
      init/assets/images/corp/_dasuan.png
  21. BIN
      init/assets/images/corp/_default.png
  22. BIN
      init/assets/images/corp/_ganju.png
  23. BIN
      init/assets/images/corp/_ganzhe.png
  24. BIN
      init/assets/images/corp/_mianhua.png
  25. BIN
      init/assets/images/corp/_putao.png
  26. BIN
      init/assets/images/corp/_shuidao.png
  27. BIN
      init/assets/images/corp/_xiaomai.png
  28. BIN
      init/assets/images/corp/_yumi.png
  29. BIN
      init/assets/images/icon/ad.png
  30. BIN
      init/assets/images/icon/h.png
  31. BIN
      init/assets/images/icon/icon_my_h.png
  32. BIN
      init/assets/images/icon/icon_my_n.png
  33. BIN
      init/assets/images/icon/icon_order_h.png
  34. BIN
      init/assets/images/icon/icon_order_n.png
  35. BIN
      init/assets/images/icon/lits.png
  36. BIN
      init/assets/images/icon/mybm.png
  37. BIN
      init/assets/images/icon/n.png
  38. BIN
      init/assets/images/icon/r.png
  39. BIN
      init/assets/images/jia.png
  40. BIN
      init/assets/images/jt.png
  41. BIN
      init/assets/images/klx.png
  42. BIN
      init/assets/images/logo.png
  43. BIN
      init/assets/images/top.png
  44. BIN
      init/assets/images/touxiang.jpg
  45. BIN
      init/assets/images/vux_logo.png
  46. BIN
      init/assets/images/ybm.png
  47. BIN
      init/assets/images/ygb.png
  48. BIN
      init/assets/images/yxz.png
  49. BIN
      init/assets/images/手持证件.png
  50. BIN
      init/assets/images/身份证正面.png
  51. BIN
      init/assets/images/身份证背面.png
  52. 35 0
      init/build/build.js
  53. 48 0
      init/build/check-versions.js
  54. 9 0
      init/build/dev-client.js
  55. 89 0
      init/build/dev-server.js
  56. 151 0
      init/build/multipage-helper.js
  57. 71 0
      init/build/utils.js
  58. 12 0
      init/build/vue-loader.conf.js
  59. 69 0
      init/build/webpack.base.conf.js
  60. 41 0
      init/build/webpack.dev.conf.js
  61. 126 0
      init/build/webpack.prod.conf.js
  62. 6 0
      init/config/dev.env.js
  63. 38 0
      init/config/index.js
  64. 3 0
      init/config/prod.env.js
  65. 34 0
      init/demosa/.project
  66. 1 0
      init/demosa/about.html
  67. 1 0
      init/demosa/addorder.html
  68. 1 0
      init/demosa/agreement.html
  69. 1 0
      init/demosa/apply.html
  70. 1 0
      init/demosa/bmapshow.html
  71. 1 0
      init/demosa/certification.html
  72. 1 0
      init/demosa/flyteamcompile.html
  73. 1 0
      init/demosa/flyteamdetails.html
  74. 1 0
      init/demosa/homepage.html
  75. 1 0
      init/demosa/index.html
  76. 270 0
      init/demosa/manifest.json
  77. 1 0
      init/demosa/mine.html
  78. 1 0
      init/demosa/orderdetails.html
  79. 1 0
      init/demosa/orderhistory.html
  80. 1 0
      init/demosa/phonebinding.html
  81. 1 0
      init/demosa/rephone.html
  82. 1 0
      init/demosa/static/css/about.dd95708d83c7e384981d2392c34b1527.css
  83. 1 0
      init/demosa/static/css/addorder.a7a20d2475c4f40535b771b8304d6244.css
  84. 0 0
      init/demosa/static/css/agreement.d41d8cd98f00b204e9800998ecf8427e.css
  85. 1 0
      init/demosa/static/css/apply.f36aa81797afbfb18174a1305f1eafd1.css
  86. 1 0
      init/demosa/static/css/bmapshow.3cdd9aa7e0597e8d08136ab7aa9ca208.css
  87. 1 0
      init/demosa/static/css/certification.a3e311dab5ac21ec8e356555a3ca973d.css
  88. 1 0
      init/demosa/static/css/flyteamcompile.e51cdbe7403e4e8286430accaec58f03.css
  89. 1 0
      init/demosa/static/css/flyteamdetails.39eb6f232c919ebed2a631a75e463272.css
  90. 1 0
      init/demosa/static/css/homepage.a535f6b6d66aaa367a796d2642bca3b9.css
  91. 1 0
      init/demosa/static/css/index.347e801848edc821957ff879f078a41f.css
  92. 1 0
      init/demosa/static/css/mine.f024efcb01ae3aa5ac6de0d3ba94c188.css
  93. 1 0
      init/demosa/static/css/orderdetails.a64b776a697831aab296d6f809b254d7.css
  94. 1 0
      init/demosa/static/css/orderhistory.ad7fd354b7a576150700e18cb017280b.css
  95. 1 0
      init/demosa/static/css/phonebinding.68f85012d8a91c357a2ec57cf209854d.css
  96. 1 0
      init/demosa/static/css/rephone.d909d29d8c1e14eb63b564fc9c3363cd.css
  97. 1 0
      init/demosa/static/css/tabbar.1eefee9de31dd31e75dcaddbeb521fcf.css
  98. BIN
      init/demosa/static/fonts/element-icons.6f0a763.ttf
  99. BIN
      init/demosa/static/fonts/mui-icons-extra.ttf
  100. 0 0
      init/demosa/static/fonts/mui.ttf

+ 23 - 0
init/.babelrc

@@ -0,0 +1,23 @@
+{
+  "presets": [
+    ["env", { "modules": false }],
+    "stage-2"
+  ],
+  "plugins": [
+    "transform-runtime",
+    [
+      "component",
+      {
+        "libraryName": "element-ui",
+        "styleLibraryName": "theme-chalk"
+      }
+    ]
+  ],
+  "comments": false,
+  "env": {
+    "test": {
+      "presets": ["env", "stage-2"],
+      "plugins": [ "istanbul" ]
+    }
+  }
+}

+ 9 - 0
init/.editorconfig

@@ -0,0 +1,9 @@
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true

+ 7 - 0
init/.gitignore

@@ -0,0 +1,7 @@
+.DS_Store
+.idea/
+node_modules/
+dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*

+ 8 - 0
init/.postcssrc.js

@@ -0,0 +1,8 @@
+// https://github.com/michael-ciniawsky/postcss-load-config
+
+module.exports = {
+  "plugins": {
+    // to edit target browsers: use "browserlist" field in package.json
+    "autoprefixer": {}
+  }
+}

+ 28 - 0
init/.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>vue-webpack-multipage-master</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.aptana.ide.core.unifiedBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.aptana.projects.webnature</nature>
+	</natures>
+	<filteredResources>
+		<filter>
+			<id>1531233787910</id>
+			<name></name>
+			<type>26</type>
+			<matcher>
+				<id>org.eclipse.ui.ide.multiFilter</id>
+				<arguments>1.0-name-matches-false-false-node_modules</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
+</projectDescription>

+ 25 - 0
init/README.md

@@ -0,0 +1,25 @@
+# vue-webpack-multipage
+
+> A Vue.js multipage project
+
+Learn more from blog: [http://www.cnblogs.com/xuelongqy/p/7081419.html](http://www.cnblogs.com/xuelongqy/p/7081419.html)
+ 
+**Sorry, my English is poor. I would appreciate it if you translate it into English.**
+
+## Build Setup
+
+``` bash
+# install dependencies
+npm install
+
+# serve with hot reload at localhost:8080
+npm run dev
+
+# build for production with minification
+npm run build
+
+# build for production and view the bundle analyzer report
+npm run build --report
+```
+
+For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

BIN
init/assets/icons/Path 3 Copy 2.png


BIN
init/assets/icons/Triangle.png


BIN
init/assets/icons/ic_access_time_black_24px copy 2.png


BIN
init/assets/icons/ic_area.png


BIN
init/assets/icons/ic_date_range_black_24px.png


BIN
init/assets/icons/selected.png


BIN
init/assets/images/Corn Star pt II.png


BIN
init/assets/images/Group.png


BIN
init/assets/images/Rectangle 4.png


BIN
init/assets/images/Rectangle.png


BIN
init/assets/images/back.png


BIN
init/assets/images/btm.png


BIN
init/assets/images/button.png


BIN
init/assets/images/corp/_dasuan.png


BIN
init/assets/images/corp/_default.png


BIN
init/assets/images/corp/_ganju.png


BIN
init/assets/images/corp/_ganzhe.png


BIN
init/assets/images/corp/_mianhua.png


BIN
init/assets/images/corp/_putao.png


BIN
init/assets/images/corp/_shuidao.png


BIN
init/assets/images/corp/_xiaomai.png


BIN
init/assets/images/corp/_yumi.png


BIN
init/assets/images/icon/ad.png


BIN
init/assets/images/icon/h.png


BIN
init/assets/images/icon/icon_my_h.png


BIN
init/assets/images/icon/icon_my_n.png


BIN
init/assets/images/icon/icon_order_h.png


BIN
init/assets/images/icon/icon_order_n.png


BIN
init/assets/images/icon/lits.png


BIN
init/assets/images/icon/mybm.png


BIN
init/assets/images/icon/n.png


BIN
init/assets/images/icon/r.png


BIN
init/assets/images/jia.png


BIN
init/assets/images/jt.png


BIN
init/assets/images/klx.png


BIN
init/assets/images/logo.png


BIN
init/assets/images/top.png


BIN
init/assets/images/touxiang.jpg


BIN
init/assets/images/vux_logo.png


BIN
init/assets/images/ybm.png


BIN
init/assets/images/ygb.png


BIN
init/assets/images/yxz.png


BIN
init/assets/images/手持证件.png


BIN
init/assets/images/身份证正面.png


BIN
init/assets/images/身份证背面.png


+ 35 - 0
init/build/build.js

@@ -0,0 +1,35 @@
+require('./check-versions')()
+
+process.env.NODE_ENV = 'production'
+
+var ora = require('ora')
+var rm = require('rimraf')
+var path = require('path')
+var chalk = require('chalk')
+var webpack = require('webpack')
+var config = require('../config')
+var webpackConfig = require('./webpack.prod.conf')
+
+var spinner = ora('building for production...')
+spinner.start()
+
+rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
+  if (err) throw err
+  webpack(webpackConfig, function (err, stats) {
+    spinner.stop()
+    if (err) throw err
+    process.stdout.write(stats.toString({
+      colors: true,
+      modules: false,
+      children: false,
+      chunks: false,
+      chunkModules: false
+    }) + '\n\n')
+
+    console.log(chalk.cyan('  Build complete.\n'))
+    console.log(chalk.yellow(
+      '  Tip: built files are meant to be served over an HTTP server.\n' +
+      '  Opening index.html over file:// won\'t work.\n'
+    ))
+  })
+})

+ 48 - 0
init/build/check-versions.js

@@ -0,0 +1,48 @@
+var chalk = require('chalk')
+var semver = require('semver')
+var packageConfig = require('../package.json')
+var shell = require('shelljs')
+function exec (cmd) {
+  return require('child_process').execSync(cmd).toString().trim()
+}
+
+var versionRequirements = [
+  {
+    name: 'node',
+    currentVersion: semver.clean(process.version),
+    versionRequirement: packageConfig.engines.node
+  },
+]
+
+if (shell.which('npm')) {
+  versionRequirements.push({
+    name: 'npm',
+    currentVersion: exec('npm --version'),
+    versionRequirement: packageConfig.engines.npm
+  })
+}
+
+module.exports = function () {
+  var warnings = []
+  for (var i = 0; i < versionRequirements.length; i++) {
+    var mod = versionRequirements[i]
+    if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
+      warnings.push(mod.name + ': ' +
+        chalk.red(mod.currentVersion) + ' should be ' +
+        chalk.green(mod.versionRequirement)
+      )
+    }
+  }
+
+  if (warnings.length) {
+    console.log('')
+    console.log(chalk.yellow('To use this template, you must update following to modules:'))
+    console.log()
+    for (var i = 0; i < warnings.length; i++) {
+      var warning = warnings[i]
+      console.log('  ' + warning)
+    }
+    console.log()
+    process.exit(1)
+  }
+}

+ 9 - 0
init/build/dev-client.js

@@ -0,0 +1,9 @@
+/* eslint-disable */
+require('eventsource-polyfill')
+var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
+
+hotClient.subscribe(function (event) {
+  if (event.action === 'reload') {
+    window.location.reload()
+  }
+})

+ 89 - 0
init/build/dev-server.js

@@ -0,0 +1,89 @@
+require('./check-versions')()
+
+var config = require('../config')
+if (!process.env.NODE_ENV) {
+  process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
+}
+
+var opn = require('opn')
+var path = require('path')
+var express = require('express')
+var webpack = require('webpack')
+var proxyMiddleware = require('http-proxy-middleware')
+var webpackConfig = require('./webpack.dev.conf')
+
+// default port where dev server listens for incoming traffic
+var port = process.env.PORT || config.dev.port
+// automatically open browser, if not set will be false
+var autoOpenBrowser = !!config.dev.autoOpenBrowser
+// Define HTTP proxies to your custom API backend
+// https://github.com/chimurai/http-proxy-middleware
+var proxyTable = config.dev.proxyTable
+
+var app = express()
+var compiler = webpack(webpackConfig)
+
+var devMiddleware = require('webpack-dev-middleware')(compiler, {
+  publicPath: webpackConfig.output.publicPath,
+  quiet: true
+})
+
+var hotMiddleware = require('webpack-hot-middleware')(compiler, {
+  log: () => {}
+})
+// force page reload when html-webpack-plugin template changes
+compiler.plugin('compilation', function (compilation) {
+  compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
+    hotMiddleware.publish({ action: 'reload' })
+    cb()
+  })
+})
+
+// proxy api requests
+Object.keys(proxyTable).forEach(function (context) {
+  var options = proxyTable[context]
+  if (typeof options === 'string') {
+    options = { target: options }
+  }
+  app.use(proxyMiddleware(options.filter || context, options))
+})
+
+// handle fallback for HTML5 history API
+app.use(require('connect-history-api-fallback')())
+
+// serve webpack bundle output
+app.use(devMiddleware)
+
+// enable hot-reload and state-preserving
+// compilation error display
+app.use(hotMiddleware)
+
+// serve pure static assets
+var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
+app.use(staticPath, express.static('./static'))
+
+var uri = 'http://localhost:' + port
+
+var _resolve
+var readyPromise = new Promise(resolve => {
+  _resolve = resolve
+})
+
+console.log('> Starting dev server...')
+devMiddleware.waitUntilValid(() => {
+  console.log('> Listening at ' + uri + '\n')
+  // when env is testing, don't need open it
+  if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
+    opn(uri)
+  }
+  _resolve()
+})
+
+var server = app.listen(port)
+
+module.exports = {
+  ready: readyPromise,
+  close: () => {
+    server.close()
+  }
+}

+ 151 - 0
init/build/multipage-helper.js

@@ -0,0 +1,151 @@
+/**
+ * 多页面支持
+ * @File:
+ * @Description: 多页面支持
+ * @author qingyi xuelongqy@foxmail.com
+ * @date 2017/6/15 10:16
+ * @version V1.0
+ */
+
+var path = require('path')
+var fs = require("fs")
+var HtmlWebpackPlugin = require('html-webpack-plugin')
+
+var moduleList          //缓存多页面模块列表
+var moduleRootPath = './src/page' //模块根目录(这个可以根据自己的需求命名)
+
+/**
+ * 获取js入口数组
+ */
+exports.getEntries = function getEntries(){
+  //缓存js入口数组
+  var entries = {}
+  //初始化模块列表
+  this.getModuleList()
+  //变量模块列表
+  moduleList.forEach(function (module) {
+    if (module.moduleID != "" && module.moduleJS != ""){
+      entries[module.moduleID] = module.moduleJS
+    }
+  })
+  console.log("*********************************** entries ***********************************")
+  console.log(entries)
+  return entries
+}
+
+/**
+ * 获取多页面模块列表
+ * @returns {模块的信息集合}
+ */
+exports.getModuleList = function getModuleList() {
+  //判断是否为空,不为空则直接返回
+  if (moduleList){
+    return moduleList
+  }else {//为空则读取列表
+    moduleList = new Array();
+    readDirSync(moduleRootPath, "")
+    console.log("*********************************** moduleList ***********************************")
+    console.log(moduleList)
+    return moduleList
+  }
+}
+
+/**
+ * 获取dev的Html模板集合
+ * @returns {dev的Html模板集合}
+ */
+exports.getDevHtmlWebpackPluginList = function getDevHtmlWebpackPluginList(){
+  console.log("*********************************** devHtmlWebpackPluginList ***********************************")
+  //缓存dev的Html模板集合
+  var devHtmlWebpackPluginList = []
+  //获取多页面模块集合
+  var moduleList = this.getModuleList()
+  //遍历生成模块的HTML模板
+  moduleList.forEach(function (mod) {
+    //生成配置
+    var conf = {
+      filename: mod.moduleID+".html",
+      template: mod.moduleHTML,
+      chunks: [mod.moduleID],
+      inject: true
+    }
+    console.log(conf)
+    //添加HtmlWebpackPlugin对象
+    devHtmlWebpackPluginList.push(new HtmlWebpackPlugin(conf))
+  })
+  return devHtmlWebpackPluginList
+}
+
+/**
+ * 获取prod的Html模板集合
+ * @returns {prod的Html模板集合}
+ */
+exports.getProdHtmlWebpackPluginList = function getProdHtmlWebpackPluginList(){
+  console.log("*********************************** prodHtmlWebpackPluginList ***********************************")
+  //缓存dev的Html模板集合
+  var prodHtmlWebpackPluginList = []
+  //获取多页面模块集合
+  var moduleList = this.getModuleList()
+  //遍历生成模块的HTML模板
+  moduleList.forEach(function (mod) {
+    //生成配置
+    var conf = {
+      filename: mod.moduleID+".html",
+      template: mod.moduleHTML,
+      inject: true,
+      minify: {
+        removeComments: true,
+        collapseWhitespace: true,
+        removeAttributeQuotes: true
+        // more options:
+        // https://github.com/kangax/html-minifier#options-quick-reference
+      },
+      // necessary to consistently work with multiple chunks via CommonsChunkPlugin
+      chunksSortMode: 'dependency',
+      chunks: ['manifest','vendor',mod.moduleID]
+    }
+    console.log(conf)
+    //添加HtmlWebpackPlugin对象
+    prodHtmlWebpackPluginList.push(new HtmlWebpackPlugin(conf))
+  })
+  return prodHtmlWebpackPluginList
+}
+
+/**
+ * 深度遍历目录,并整理多页面模块
+ * @param path 需要变量的路径
+ * @param moduleName 模块名称
+ */
+function readDirSync(path,moduleName){
+  //缓存模块对象
+  var module = {moduleID:"",moduleHTML:"",moduleJS:""}
+  //获取当前模块ID
+  var moduleID = path.replace(moduleRootPath+"/","")
+  if (path == moduleRootPath){
+    moduleID = ""
+  }
+  module.moduleID = moduleID
+  //获取目录下所有文件及文件夹
+  var pa = fs.readdirSync(path)
+  pa.forEach(function(ele,index){
+    var info = fs.statSync(path+"/"+ele)
+    if(info.isDirectory()){
+      // console.log("dir: "+ele)
+      readDirSync(path+"/"+ele, ele)
+    }else{
+      //判断当前模块的html是否存在
+      if (moduleName+".html" == ele){
+        module.moduleHTML = path+"/"+ele
+      }
+      //判断当前模块的js是否存在
+      if (moduleName+".js" == ele){
+        module.moduleJS = path+"/"+ele
+      }
+      // console.log("file: "+ele)
+    }
+  })
+  //判断模块是否真实(可能只是个分级目录)
+  if ((module.moduleID != "" && module.moduleHTML != "") || (module.moduleID != "" && module.moduleJS != "")){
+    moduleList.push(module)
+  }
+}

+ 71 - 0
init/build/utils.js

@@ -0,0 +1,71 @@
+var path = require('path')
+var config = require('../config')
+var ExtractTextPlugin = require('extract-text-webpack-plugin')
+
+exports.assetsPath = function (_path) {
+  var assetsSubDirectory = process.env.NODE_ENV === 'production'
+    ? config.build.assetsSubDirectory
+    : config.dev.assetsSubDirectory
+  return path.posix.join(assetsSubDirectory, _path)
+}
+
+exports.cssLoaders = function (options) {
+  options = options || {}
+
+  var cssLoader = {
+    loader: 'css-loader',
+    options: {
+      minimize: process.env.NODE_ENV === 'production',
+      sourceMap: options.sourceMap
+    }
+  }
+
+  // generate loader string to be used with extract text plugin
+  function generateLoaders (loader, loaderOptions) {
+    var loaders = [cssLoader]
+    if (loader) {
+      loaders.push({
+        loader: loader + '-loader',
+        options: Object.assign({}, loaderOptions, {
+          sourceMap: options.sourceMap
+        })
+      })
+    }
+
+    // Extract CSS when that option is specified
+    // (which is the case during production build)
+    if (options.extract) {
+      return ExtractTextPlugin.extract({
+        use: loaders,
+        fallback: 'vue-style-loader'
+      })
+    } else {
+      return ['vue-style-loader'].concat(loaders)
+    }
+  }
+
+  // https://vue-loader.vuejs.org/en/configurations/extract-css.html
+  return {
+    css: generateLoaders(),
+    postcss: generateLoaders(),
+    less: generateLoaders('less'),
+    sass: generateLoaders('sass', { indentedSyntax: true }),
+    scss: generateLoaders('sass'),
+    stylus: generateLoaders('stylus'),
+    styl: generateLoaders('stylus')
+  }
+}
+
+// Generate loaders for standalone style files (outside of .vue)
+exports.styleLoaders = function (options) {
+  var output = []
+  var loaders = exports.cssLoaders(options)
+  for (var extension in loaders) {
+    var loader = loaders[extension]
+    output.push({
+      test: new RegExp('\\.' + extension + '$'),
+      use: loader
+    })
+  }
+  return output
+}

+ 12 - 0
init/build/vue-loader.conf.js

@@ -0,0 +1,12 @@
+var utils = require('./utils')
+var config = require('../config')
+var isProduction = process.env.NODE_ENV === 'production'
+
+module.exports = {
+  loaders: utils.cssLoaders({
+    sourceMap: isProduction
+      ? config.build.productionSourceMap
+      : config.dev.cssSourceMap,
+    extract: isProduction
+  })
+}

+ 69 - 0
init/build/webpack.base.conf.js

@@ -0,0 +1,69 @@
+var path = require('path')
+var utils = require('./utils')
+var config = require('../config')
+var vueLoaderConfig = require('./vue-loader.conf')
+const vuxLoader = require('vux-loader')
+
+//引入多页面支持
+var multipageHelper = require('./multipage-helper')
+
+function resolve(dir) {
+  return path.join(__dirname, '..', dir)
+}
+
+
+const webpackConfig={
+  entry: multipageHelper.getEntries(), //设置入口集合
+  output: {
+    path: config.build.assetsRoot,
+    filename: '[name].js',
+    publicPath: process.env.NODE_ENV === 'production' ?
+      config.build.assetsPublicPath :
+      config.dev.assetsPublicPath
+  },
+  resolve: {
+    extensions: ['.js', '.vue', '.json'],
+    alias: {
+      'vue$': 'vue/dist/vue.esm.js',
+      '@': resolve('src')
+    }
+  },
+  module: {
+    rules: [{
+        test: /\.vue$/,
+        loader: 'vue-loader',
+        options: vueLoaderConfig
+      },
+      {
+        test: /\.js$/,
+        loader: 'babel-loader',
+        include: [resolve('src'), resolve('test')]
+      },
+      {
+        test: /\.less$/,
+        loader: 'style-loader!css-loader!less-loader'
+      },
+      {
+        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
+        loader: 'url-loader',
+        options: {
+          limit: 10000,
+          name: utils.assetsPath('img/[name].[hash:7].[ext]')
+        }
+      },
+      {
+        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
+        loader: 'url-loader',
+        options: {
+          limit: 10000,
+          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
+        }
+      }
+    ]
+  }
+}
+
+
+module.exports = vuxLoader.merge(webpackConfig, {
+  plugins: ['vux-ui']
+})

+ 41 - 0
init/build/webpack.dev.conf.js

@@ -0,0 +1,41 @@
+var utils = require('./utils')
+var webpack = require('webpack')
+var config = require('../config')
+var merge = require('webpack-merge')
+var baseWebpackConfig = require('./webpack.base.conf')
+var HtmlWebpackPlugin = require('html-webpack-plugin')
+var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
+
+//引入多页面支持
+var multipageHelper = require('./multipage-helper')
+
+// add hot-reload related code to entry chunks
+Object.keys(baseWebpackConfig.entry).forEach(function (name) {
+  baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
+})
+
+module.exports = merge(baseWebpackConfig, {
+  module: {
+    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
+  },
+  // cheap-module-eval-source-map is faster for development
+  devtool: '#cheap-module-eval-source-map',
+  plugins: [
+    new webpack.DefinePlugin({
+      'process.env': config.dev.env
+    }),
+    // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
+    new webpack.HotModuleReplacementPlugin(),
+    new webpack.NoEmitOnErrorsPlugin(),
+    // https://github.com/ampedandwired/html-webpack-plugin
+    // new HtmlWebpackPlugin({
+    //   filename: 'index.html',
+    //   template: 'index.html',
+    //   inject: true
+    // }),
+    new FriendlyErrorsPlugin()
+  ]
+})
+
+//添加Html模板集合
+Array.prototype.push.apply(module.exports.plugins,multipageHelper.getDevHtmlWebpackPluginList())

+ 126 - 0
init/build/webpack.prod.conf.js

@@ -0,0 +1,126 @@
+var path = require('path')
+var utils = require('./utils')
+var webpack = require('webpack')
+var config = require('../config')
+var merge = require('webpack-merge')
+var baseWebpackConfig = require('./webpack.base.conf')
+var CopyWebpackPlugin = require('copy-webpack-plugin')
+var HtmlWebpackPlugin = require('html-webpack-plugin')
+var ExtractTextPlugin = require('extract-text-webpack-plugin')
+var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
+
+//引入多页面支持
+var multipageHelper = require('./multipage-helper')
+
+var env = config.build.env
+
+var webpackConfig = merge(baseWebpackConfig, {
+  module: {
+    rules: utils.styleLoaders({
+      sourceMap: config.build.productionSourceMap,
+      extract: true
+    })
+  },
+  devtool: config.build.productionSourceMap ? '#source-map' : false,
+  output: {
+    path: config.build.assetsRoot,
+    filename: utils.assetsPath('js/[name].[chunkhash].js'),
+    chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
+  },
+  plugins: [
+    // http://vuejs.github.io/vue-loader/en/workflow/production.html
+    new webpack.DefinePlugin({
+      'process.env': env
+    }),
+    new webpack.optimize.UglifyJsPlugin({
+      compress: {
+        warnings: false
+      },
+      sourceMap: true
+    }),
+    // extract css into its own file
+    new ExtractTextPlugin({
+      filename: utils.assetsPath('css/[name].[contenthash].css')
+    }),
+    // Compress extracted CSS. We are using this plugin so that possible
+    // duplicated CSS from different components can be deduped.
+    new OptimizeCSSPlugin({
+      cssProcessorOptions: {
+        safe: true
+      }
+    }),
+    // generate dist index.html with correct asset hash for caching.
+    // you can customize output by editing /index.html
+    // see https://github.com/ampedandwired/html-webpack-plugin
+    // new HtmlWebpackPlugin({
+    //   filename: config.build.index,
+    //   template: 'index.html',
+    //   inject: true,
+    //   minify: {
+    //     removeComments: true,
+    //     collapseWhitespace: true,
+    //     removeAttributeQuotes: true
+    //     // more options:
+    //     // https://github.com/kangax/html-minifier#options-quick-reference
+    //   },
+    //   // necessary to consistently work with multiple chunks via CommonsChunkPlugin
+    //   chunksSortMode: 'dependency'
+    // }),
+    // split vendor js into its own file
+    new webpack.optimize.CommonsChunkPlugin({
+      name: 'vendor',
+      minChunks: function (module, count) {
+        // any required modules inside node_modules are extracted to vendor
+        return (
+          module.resource &&
+          /\.js$/.test(module.resource) &&
+          module.resource.indexOf(
+            path.join(__dirname, '../node_modules')
+          ) === 0
+        )
+      }
+    }),
+    // extract webpack runtime and module manifest to its own file in order to
+    // prevent vendor hash from being updated whenever app bundle is updated
+    new webpack.optimize.CommonsChunkPlugin({
+      name: 'manifest',
+      chunks: ['vendor']
+    }),
+    // copy custom static assets
+    new CopyWebpackPlugin([
+      {
+        from: path.resolve(__dirname, '../static'),
+        to: config.build.assetsSubDirectory,
+        ignore: ['.*']
+      }
+    ])
+  ]
+})
+
+if (config.build.productionGzip) {
+  var CompressionWebpackPlugin = require('compression-webpack-plugin')
+
+  webpackConfig.plugins.push(
+    new CompressionWebpackPlugin({
+      asset: '[path].gz[query]',
+      algorithm: 'gzip',
+      test: new RegExp(
+        '\\.(' +
+        config.build.productionGzipExtensions.join('|') +
+        ')$'
+      ),
+      threshold: 10240,
+      minRatio: 0.8
+    })
+  )
+}
+
+if (config.build.bundleAnalyzerReport) {
+  var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
+  webpackConfig.plugins.push(new BundleAnalyzerPlugin())
+}
+
+module.exports = webpackConfig
+
+//添加Html模板集合
+Array.prototype.push.apply(module.exports.plugins,multipageHelper.getProdHtmlWebpackPluginList())

+ 6 - 0
init/config/dev.env.js

@@ -0,0 +1,6 @@
+var merge = require('webpack-merge')
+var prodEnv = require('./prod.env')
+
+module.exports = merge(prodEnv, {
+  NODE_ENV: '"development"'
+})

+ 38 - 0
init/config/index.js

@@ -0,0 +1,38 @@
+// see http://vuejs-templates.github.io/webpack for documentation.
+var path = require('path')
+
+module.exports = {
+  build: {
+    env: require('./prod.env'),
+    index: path.resolve(__dirname, '../dist/index.html'),
+    assetsRoot: path.resolve(__dirname, '../dist'),
+    assetsSubDirectory: 'static',
+    assetsPublicPath: './',
+    productionSourceMap: false,
+    // Gzip off by default as many popular static hosts such as
+    // Surge or Netlify already gzip all static assets for you.
+    // Before setting to `true`, make sure to:
+    // npm install --save-dev compression-webpack-plugin
+    productionGzip: false,
+    productionGzipExtensions: ['js', 'css'],
+    // Run the build command with an extra argument to
+    // View the bundle analyzer report after build finishes:
+    // `npm run build --report`
+    // Set to `true` or `false` to always turn it on or off
+    bundleAnalyzerReport: process.env.npm_config_report
+  },
+  dev: {
+    env: require('./dev.env'),
+    port: 8081,
+    autoOpenBrowser: true,
+    assetsSubDirectory: 'static',
+    assetsPublicPath: '/',
+    proxyTable: {},
+    // CSS Sourcemaps off by default because relative paths are "buggy"
+    // with this option, according to the CSS-Loader README
+    // (https://github.com/webpack/css-loader#sourcemaps)
+    // In our experience, they generally work as expected,
+    // just be aware of this issue when enabling this option.
+    cssSourceMap: false
+  }
+}

+ 3 - 0
init/config/prod.env.js

@@ -0,0 +1,3 @@
+module.exports = {
+  NODE_ENV: '"production"'
+}

+ 34 - 0
init/demosa/.project

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>demosa</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.aptana.ide.core.unifiedBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.pandora.projects.ui.MKeyBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.pandora.projects.ui.MKeyNature</nature>
+		<nature>com.aptana.projects.webnature</nature>
+	</natures>
+	<filteredResources>
+		<filter>
+			<id>1531385072239</id>
+			<name></name>
+			<type>26</type>
+			<matcher>
+				<id>org.eclipse.ui.ide.multiFilter</id>
+				<arguments>1.0-name-matches-false-false-node_modules</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
+</projectDescription>

File diff suppressed because it is too large
+ 1 - 0
init/demosa/about.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/addorder.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/agreement.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/apply.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/bmapshow.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/certification.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/flyteamcompile.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/flyteamdetails.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/homepage.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/index.html


File diff suppressed because it is too large
+ 270 - 0
init/demosa/manifest.json


File diff suppressed because it is too large
+ 1 - 0
init/demosa/mine.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/orderdetails.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/orderhistory.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/phonebinding.html


File diff suppressed because it is too large
+ 1 - 0
init/demosa/rephone.html


+ 1 - 0
init/demosa/static/css/about.dd95708d83c7e384981d2392c34b1527.css

@@ -0,0 +1 @@
+header a{color:#8ec1a0}header .mui-pull-left{padding:7px!important;font-size:30px!important}header .mui-pull-right{font-size:.16rem!important;color:#8ec1a0;padding:12px 10px;z-index:1}

File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/addorder.a7a20d2475c4f40535b771b8304d6244.css


+ 0 - 0
init/demosa/static/css/agreement.d41d8cd98f00b204e9800998ecf8427e.css


File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/apply.f36aa81797afbfb18174a1305f1eafd1.css


+ 1 - 0
init/demosa/static/css/bmapshow.3cdd9aa7e0597e8d08136ab7aa9ca208.css

@@ -0,0 +1 @@
+header a{color:#8ec1a0}header .mui-pull-left{padding:7px!important;font-size:30px!important}header .mui-pull-right{font-size:.16rem!important;color:#8ec1a0;padding:12px 10px;z-index:1}.bmap-show,.bmap-show .bm-view{width:100%;height:100%}.bmap-show .bm-view{margin:0;padding:0}

File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/certification.a3e311dab5ac21ec8e356555a3ca973d.css


File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/flyteamcompile.e51cdbe7403e4e8286430accaec58f03.css


File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/flyteamdetails.39eb6f232c919ebed2a631a75e463272.css


File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/homepage.a535f6b6d66aaa367a796d2642bca3b9.css


File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/index.347e801848edc821957ff879f078a41f.css


File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/mine.f024efcb01ae3aa5ac6de0d3ba94c188.css


File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/orderdetails.a64b776a697831aab296d6f809b254d7.css


File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/orderhistory.ad7fd354b7a576150700e18cb017280b.css


+ 1 - 0
init/demosa/static/css/phonebinding.68f85012d8a91c357a2ec57cf209854d.css

@@ -0,0 +1 @@
+.count{width:100%}

File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/rephone.d909d29d8c1e14eb63b564fc9c3363cd.css


File diff suppressed because it is too large
+ 1 - 0
init/demosa/static/css/tabbar.1eefee9de31dd31e75dcaddbeb521fcf.css


BIN
init/demosa/static/fonts/element-icons.6f0a763.ttf


BIN
init/demosa/static/fonts/mui-icons-extra.ttf


+ 0 - 0
init/demosa/static/fonts/mui.ttf


Some files were not shown because too many files changed in this diff