|
@@ -1,4 +1,7 @@
|
|
|
|
+
|
|
import { AppLauncher } from "@capacitor/app-launcher";
|
|
import { AppLauncher } from "@capacitor/app-launcher";
|
|
|
|
+import { Capacitor } from "@capacitor/core";
|
|
|
|
+
|
|
|
|
|
|
// 打开高德地图 OPEN_GAODE
|
|
// 打开高德地图 OPEN_GAODE
|
|
// dlon: 终点经度
|
|
// dlon: 终点经度
|
|
@@ -13,11 +16,6 @@ export const openGaoDe = async (lat, lng, name) => {
|
|
await AppLauncher.openUrl({ url: scheme });
|
|
await AppLauncher.openUrl({ url: scheme });
|
|
};
|
|
};
|
|
|
|
|
|
-export function listenMessage() {
|
|
|
|
- window.addEventListener("message", (e) => {
|
|
|
|
- if (e?.type && e.type === "OPEN_GAODE") {
|
|
|
|
- const { lat, lng, name } = e.data;
|
|
|
|
- openGaoDe(lat, lng, name);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-}
|
|
|
|
|
|
+export const listenMessage = () => {
|
|
|
|
+ // openGaoDe(31.2304, 121.4737, "上海");
|
|
|
|
+};
|