|
|
|
@ -3,11 +3,19 @@ import { getBackTime } from '@/http/api' |
|
|
|
import { useRouter } from 'vue-router' |
|
|
|
import { useStatistics } from '@/composables/useStatistics' |
|
|
|
import { useStore } from '@/store/root' |
|
|
|
|
|
|
|
const DEVICE = { |
|
|
|
WINDOWS: 'windows', |
|
|
|
ANDROID: 'android' |
|
|
|
} |
|
|
|
export const useHandleScreen = (callback, screenSaveCallback) => { |
|
|
|
const router = useRouter() |
|
|
|
const store = useStore() |
|
|
|
const { nativeMethods, mapStatus } = toRefs(store) |
|
|
|
const { currentFloor: device, mapStatus } = toRefs(store) |
|
|
|
|
|
|
|
const nativeMethods = computed(() => { |
|
|
|
return !device.value ? {} : device.value.label === DEVICE.ANDROID ? window.android : window.chrome.webview.hostObjects.sync.csobj |
|
|
|
}) |
|
|
|
|
|
|
|
const state = reactive({ |
|
|
|
isWall: false, //当前是回到首页还是回到屏保
|
|
|
|
messageWS: null, |
|
|
|
|