|
|
@@ -130,7 +130,7 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
// import { SearchOutlined } from '@ant-design/icons-vue';
|
|
|
- import { ref, onMounted, watch, computed, watchEffect } from 'vue';
|
|
|
+ import { ref, onMounted, watch, computed, watchEffect, h } from 'vue';
|
|
|
import {
|
|
|
GoogleMap,
|
|
|
AdvancedMarker,
|
|
|
@@ -150,12 +150,14 @@
|
|
|
import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard';
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import shareImage from '/@/assets/images/share.png';
|
|
|
+ import Ping from 'ping.js';
|
|
|
+
|
|
|
const { t } = useI18n();
|
|
|
const router = useRouter();
|
|
|
import { useLocaleStore } from '/@/store/modules/locale';
|
|
|
const googleKey = computed(() => import.meta.env.VITE_GOOGLE_KEY);
|
|
|
const center = { lat: 35.717, lng: 139.731 };
|
|
|
- const { createMessage } = useMessage();
|
|
|
+ const { createMessage, createConfirm } = useMessage();
|
|
|
// const options = ref([]);
|
|
|
// const pinOptions = { background: '#FBBC04' };
|
|
|
const shareOpen = ref(false);
|
|
|
@@ -209,6 +211,22 @@
|
|
|
);
|
|
|
|
|
|
onMounted(async () => {
|
|
|
+ var p = new Ping();
|
|
|
+ p.ping('http://google.com', function (err, _) {
|
|
|
+ // Also display error if err is returned.
|
|
|
+ if (err) {
|
|
|
+ console.error('error loading resource');
|
|
|
+ createConfirm({
|
|
|
+ iconType: 'warning',
|
|
|
+ title: () => h('span', t('sys.app.logoutTip')),
|
|
|
+ content: () => h('span', t('layout.map.mapOfflineService')),
|
|
|
+ onOk: async () => {},
|
|
|
+ });
|
|
|
+ // data = data + ' ' + err;
|
|
|
+ }
|
|
|
+ // document.getElementById('ping-google').innerHTML = data;
|
|
|
+ });
|
|
|
+
|
|
|
watchEffect(() => {
|
|
|
console.log(projectId.value);
|
|
|
if (projectId.value) {
|