From 7b5529066f1fa44601c7a28bdd0867f8f2999b5b Mon Sep 17 00:00:00 2001 From: nesxy Date: Wed, 14 Aug 2019 02:33:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=99=BE=E5=BA=A6=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/webpack.base.conf.js | 31 +- index.html | 1 + src/view/home.vue | 827 ++++++++++++++++++++----------------- 3 files changed, 475 insertions(+), 384 deletions(-) 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 @@