From bcac215a2a6cdfdce1f1197f0851e1583844169d Mon Sep 17 00:00:00 2001
From: dai <851733175@qq.com>
Date: Fri, 21 Oct 2022 13:21:54 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E4=B8=AD=E3=80=82=E3=80=82?=
=?UTF-8?q?=E8=BF=98=E4=B8=8D=E5=A5=BD=E4=BD=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/index.html | 5 +++--
src/main.js | 4 ++++
src/utils/tiandi2qq.js | 20 +++++++++++++++++++
src/views/modules/cpts/base/cpts/edit.vue | 24 +++++++++++------------
4 files changed, 39 insertions(+), 14 deletions(-)
create mode 100644 src/utils/tiandi2qq.js
diff --git a/public/index.html b/public/index.html
index 012587ee5..b91b1e447 100644
--- a/public/index.html
+++ b/public/index.html
@@ -7,8 +7,9 @@
-
-
+
+
diff --git a/src/main.js b/src/main.js
index f5f3634b1..a9ef9ac09 100644
--- a/src/main.js
+++ b/src/main.js
@@ -32,6 +32,10 @@ import store from "@/js/store";
import util from "@js/util";
// import Cookies from "js-cookie";
import getQueryPara from "dai-js/modules/getQueryPara";
+import tiandi2qq from "@/utils/tiandi2qq";
+
+// 天地图转qq模式
+tiandi2qq();
// 兼容token传参登录
if (getQueryPara("token")) {
diff --git a/src/utils/tiandi2qq.js b/src/utils/tiandi2qq.js
new file mode 100644
index 000000000..92756cc05
--- /dev/null
+++ b/src/utils/tiandi2qq.js
@@ -0,0 +1,20 @@
+/**
+ * 邮箱
+ * @param {*} s
+ */
+export default function init() {
+ window.TMap = {
+ Map: T.Map,
+ service: {
+ Search: T.LocalSearch,
+ Geocoder: T.Geocoder,
+ },
+ MultiMarker() {},
+ LatLng(lat, lng) {
+ return {
+ lat,
+ lng,
+ };
+ },
+ };
+}
diff --git a/src/views/modules/cpts/base/cpts/edit.vue b/src/views/modules/cpts/base/cpts/edit.vue
index f3989e228..eeee6da0d 100644
--- a/src/views/modules/cpts/base/cpts/edit.vue
+++ b/src/views/modules/cpts/base/cpts/edit.vue
@@ -640,20 +640,20 @@ export default {
rotation: 45, // 设置地图旋转角度
});
- search = new window.TMap.service.Search({ pageSize: 10 });
- // 新建一个地点搜索类
- markers = new TMap.MultiMarker({
- map: map,
- geometries: [],
- });
- infoWindowList = Array(10);
+ // search = new window.TMap.service.Search({ pageSize: 10 });
+ // // 新建一个地点搜索类
+ // markers = new TMap.MultiMarker({
+ // map: map,
+ // geometries: [],
+ // });
+ // infoWindowList = Array(10);
- geocoder = new TMap.service.Geocoder(); // 新建一个正逆地址解析类
+ // geocoder = new TMap.service.Geocoder(); // 新建一个正逆地址解析类
- // 监听地图平移结束
- map.on("panend", (e) => {
- this.handleMoveCenter(item, e);
- });
+ // // 监听地图平移结束
+ // map.on("panend", (e) => {
+ // this.handleMoveCenter(item, e);
+ // });
// this.handleMoveCenter(item);
},