|
@@ -53,16 +53,34 @@ import {
|
|
|
scenes,
|
|
|
} from "@/store";
|
|
|
import router, { currentLayout, RoutesName } from "./router";
|
|
|
-import { loadPack, needMounts } from "@/utils";
|
|
|
+import { asyncTimeout, loadPack, needMounts } from "@/utils";
|
|
|
import { ConfigProvider } from "ant-design-vue";
|
|
|
import PwdModel from "@/layout/pwd.vue";
|
|
|
import { config } from "./config";
|
|
|
import { sdk, sdkLoaded } from "./sdk";
|
|
|
// https://192.168.0.13:7173/index.html?caseId=509&sign=vGxCu4X5321fkWpZN6HnqYBiE6iI71DDWzdgjEaUKIh7vDWo3o5yhqHdHhGr4Z3W#/show
|
|
|
+
|
|
|
const isStandard = ref(true);
|
|
|
watchEffect(() => {
|
|
|
if (sdkLoaded.value && !params.testMap) {
|
|
|
- sdk.switchMapType(isStandard.value ? "satellite" : "standard");
|
|
|
+ const checkUrl = `https://www.google.com/maps/vt/pb=!1m5!1m4!1i11!2i3339!3i1787!4i128!2m2!1e1!3i998!3m9!2szh-CN!3s!5e1105!12m1!1e4!12m1!1e47!12m1!1e3!4e0!5m1!1e0!23i1368782!23i1368785!23i4861626!23i10211310!23i4897086!23i47054629!23i72385654!23i72458815!23i10211069!23i94243289!23i94255677!23i10210500!23i94222679!23i72860224!23i10211515!23i94260020`;
|
|
|
+ Promise.race([
|
|
|
+ fetch(checkUrl).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.status !== 200) {
|
|
|
+ throw "谷歌访问不了";
|
|
|
+ } else {
|
|
|
+ return res.status;
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ new Promise((r, j) => setTimeout(j, 3000)),
|
|
|
+ ])
|
|
|
+ .then(() => {
|
|
|
+ sdk.switchMapType(isStandard.value ? "satellite" : "standard", "amap");
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ sdk.switchMapType(isStandard.value ? "satellite" : "standard", "gmap");
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -158,6 +176,7 @@ const layoutStyles = computed(() => {
|
|
|
var(--editor-menu-left) + var(--editor-menu-width) - var(--left-pano-width)
|
|
|
) !important;
|
|
|
}
|
|
|
+
|
|
|
.edit-mode {
|
|
|
--editor-menu-left: calc(-1 * var(--editor-menu-width));
|
|
|
}
|