| | |
| | | ...judgeParams, |
| | | } as any; |
| | | |
| | | // if (!position) { |
| | | // const loadingInstance = ElLoadingService({ |
| | | // text: '获取位置中...', |
| | | // target: '.layout-parent', |
| | | // fullscreen:false, |
| | | // }); |
| | | // position = await getCurrentPosition().finally(() => { |
| | | // loadingInstance.close(); |
| | | // }); |
| | | // } |
| | | if (!position) { |
| | | const loadingInstance = ElLoadingService({ |
| | | text: '获取位置中...', |
| | | target: '.layout-parent', |
| | | fullscreen:false, |
| | | }); |
| | | position = await getCurrentPosition().finally(() => { |
| | | loadingInstance.close(); |
| | | }); |
| | | } |
| | | |
| | | // if (position) { |
| | | // const { latitude, longitude } = position; |
| | | // params.cur_pos = [longitude, latitude].join(','); |
| | | // } |
| | | if (position) { |
| | | const { latitude, longitude } = position; |
| | | params.cur_pos = [longitude, latitude].join(','); |
| | | } |
| | | |
| | | if (activeGroupType.value) { |
| | | params.group_type = activeGroupType.value; |
| | |
| | | import { initBackEndControlRoutes } from './router/backEnd'; |
| | | import '/@/theme/index.scss'; |
| | | import '@amap/amap-jsapi-types'; |
| | | import { autoLogin, getAllData ,pingLogin} from './stores/chatRoom'; |
| | | import { autoLogin, getAllData ,getGlobalPosition,pingLogin} from './stores/chatRoom'; |
| | | import { setTheme } from '/@/utils/theme'; |
| | | import { accessSessionKey } from './utils/request'; |
| | | import { Local } from './utils/storage'; |
| | |
| | | // 获取全局数据 |
| | | getAllData(); |
| | | pingLogin(); |
| | | |
| | | getGlobalPosition(); |
| | |
| | | import emitter from '../utils/mitt'; |
| | | import { gotoRoute } from '../utils/route'; |
| | | import { Local, LocalPlus } from '../utils/storage'; |
| | | import { getCurrentPosition } from '../utils/brower'; |
| | | |
| | | /** |
| | | * Room 关联的一些配置 |
| | |
| | | // 主场景 列表 |
| | | export const sceneGroupList = ref([]); |
| | | // groupType 列表 |
| | | export const groupTypeList = computed(() => |
| | | Array.from(new Set(sceneGroupList.value.map((item) => item.group_type))) |
| | | |
| | | ); |
| | | export const groupTypeList = computed(() => Array.from(new Set(sceneGroupList.value.map((item) => item.group_type)))); |
| | | // 办公/模板 列表 |
| | | export const exampleSceneList = ref([]); |
| | | export const officeList = ref([]); |
| | |
| | | }; |
| | | |
| | | export const currentPosition = ref<Position>(null); |
| | | |
| | | export const getGlobalPosition = () => { |
| | | getCurrentPosition(); |
| | | |
| | | setInterval(() => { |
| | | getCurrentPosition(); |
| | | }, 1000 * 60 * 60); |
| | | }; |