diff --git a/public/index.html b/public/index.html index 22182a6..d63d298 100644 --- a/public/index.html +++ b/public/index.html @@ -1,20 +1,20 @@ - - - - - - - + + + + + + + vue @@ -24,5 +24,9 @@ -->
+ + diff --git a/public/static/config.js b/public/static/config.js new file mode 100644 index 0000000..8b59896 --- /dev/null +++ b/public/static/config.js @@ -0,0 +1,8 @@ +window.mapCfg = { + type: "onLine",//离线地图;地图类型 onLine:在线地图 + lgt: "", //经度 + lat: "", //纬度 + center: [], + zoom: 12, + tiles_dir: "" + "/static/newTiles/{z}/{x}/{y}.png", //瓦片地址 +}; diff --git a/public/static/map.html b/public/static/map.html index a221a59..f5b4eb9 100644 --- a/public/static/map.html +++ b/public/static/map.html @@ -1,167 +1,164 @@ - - - - + + + Document - - + + - +
- + } - \ No newline at end of file + function loadScript() { + var script = document.createElement("script"); + script.type = "text/javascript"; + script.src = + "//api.map.baidu.com/api?type=webgl&v=1.0&ak=CSfWwqFqSVkQaqcAAMxKyXg6Moe9UUqA&callback=initMap"; + document.body.appendChild(script); + } + + + diff --git a/src/router/index.js b/src/router/index.js index 40bedbf..32a7ead 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -35,9 +35,9 @@ const router = new VueRouter({ }); router.beforeEach((to, from, next) => { - console.log(to); + /* console.log(to); console.log(from); - console.log(getToken()); + console.log(getToken()); */ if (getToken() || to.path === "/login") { if (to.path == "/") { router.push({ diff --git a/src/utils/request.js b/src/utils/request.js index 6ffa818..b71cab3 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -20,11 +20,11 @@ request.interceptors.request.use( (config) => { // 是否需要设置 token const isToken = (config.headers || {}).isToken === false; - console.log("isToken:", isToken); // 是否需要防止数据重复提交 if (getToken() && !isToken) { config.headers["Authorization"] = "Bearer " + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改 + //console.log(config) } //防止重复提交