diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js
index a738996..42e51f1 100644
--- a/build/webpack.base.conf.js
+++ b/build/webpack.base.conf.js
@@ -18,9 +18,9 @@ let webpackConfig = {
app: ["babel-polyfill", "./src/main.js"]
},
//添加
- externals: {
- "BMap": "BMap"
- },
+ // externals: {
+ // "BMap": "BMap"
+ // },
output: {
path: config.build.assetsRoot,
filename: '[name].js',
diff --git a/index.html b/index.html
index 33c1905..d51e4f6 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
-
+
一号家政
diff --git a/package.json b/package.json
index 5f2c6c3..31ba20d 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
"lodash": "^4.17.4",
"vue": "^2.5.9",
"vue-awesome-swiper": "^3.1.3",
+ "vue-baidu-map": "^0.21.22",
"vue-cookies": "^1.5.13",
"vue-router": "^2.8.1",
"vue-template-compiler": "^2.5.9",
diff --git a/src/main.js b/src/main.js
index a727bfb..44af255 100644
--- a/src/main.js
+++ b/src/main.js
@@ -2,6 +2,7 @@
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from "vue";
+import BMap from 'vue-baidu-map';
import {
WechatPlugin,
LoadingPlugin,
@@ -32,7 +33,10 @@ Vue.use(LoadingPlugin);
Vue.use(ToastPlugin);
Vue.use(AlertPlugin);
Vue.use(VueCookies)
-
+Vue.use(BMap, {
+ // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
+ ak: m8sGHZTpKuDeDAU5qs4YUWWDP1v6XZsq
+})
Vue.use(VueAwesomeSwiper);
Vue.mixin({
data() {
diff --git a/src/models/wxShare.js b/src/models/wxShare.js
index 8376fbd..6893183 100644
--- a/src/models/wxShare.js
+++ b/src/models/wxShare.js
@@ -87,6 +87,7 @@ wxShareModel.getShare(params).then(response => {
imgUrl: shareConfig.img, // 分享图标
success: function (res) {}
});
+ // 首次进入页面进会弹窗确认地理位置
if (localStorage.getItem("latitude") == null) {
wx.getLocation({
type: "gcj02", // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
diff --git a/src/view/home.vue b/src/view/home.vue
index f26052c..b96309a 100644
--- a/src/view/home.vue
+++ b/src/view/home.vue
@@ -173,7 +173,7 @@ import routerFooter from "../components/nav-bottom";
import popupPicker from "../components/popup-picker.vue";
import Qs from 'qs';
//引入BMap
-import BMap from 'BMap'
+// import BMap from 'BMap';
var locationUrl = configs.locationUrl;