diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index 96ba3ac..93406dd 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -9,7 +9,7 @@ var vueLoaderConfig = require('./vue-loader.conf') var webpack = require("webpack") -function resolve (dir) { +function resolve(dir) { return path.join(__dirname, '..', dir) } @@ -20,9 +20,9 @@ let webpackConfig = { output: { path: config.build.assetsRoot, filename: '[name].js', - publicPath: process.env.NODE_ENV === 'production' - ? config.build.assetsPublicPath - : config.dev.assetsPublicPath + publicPath: process.env.NODE_ENV === 'production' ? + config.build.assetsPublicPath : + config.dev.assetsPublicPath }, resolve: { extensions: ['.js', '.vue', '.json'], @@ -32,8 +32,7 @@ let webpackConfig = { } }, module: { - rules: [ - { + rules: [{ test: /\.vue$/, loader: 'vue-loader', options: vueLoaderConfig @@ -62,16 +61,20 @@ let webpackConfig = { ] }, plugins: [ - new webpack.optimize.CommonsChunkPlugin('common.js'), - new webpack.ProvidePlugin({ - jQuery: "jquery", - $: "jquery" - }) - ] + new webpack.optimize.CommonsChunkPlugin('common.js'), + new webpack.ProvidePlugin({ + jQuery: "jquery", + $: "jquery" + }) + ] } module.exports = vuxLoader.merge(webpackConfig, { - plugins: ['vux-ui', 'progress-bar', 'duplicate-style'] -}) + plugins: ['vux-ui', 'progress-bar', 'duplicate-style'], + //添加 + externals: { + "BMap": "BMap" + }, +}) \ No newline at end of file diff --git a/index.html b/index.html index 7ce690d..33c1905 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,7 @@ + 一号家政 diff --git a/src/view/home.vue b/src/view/home.vue index a12cdae..f26052c 100644 --- a/src/view/home.vue +++ b/src/view/home.vue @@ -1,115 +1,168 @@