|
@@ -5,7 +5,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import Fly from './components/FlyMoitor.vue'
|
|
import Fly from './components/FlyMoitor.vue'
|
|
|
-import { ref, onUnmounted } from 'vue'
|
|
|
|
|
|
|
+import { ref, onUnmounted , onMounted} from 'vue'
|
|
|
const flydb = ref([ { x: 0, y: 0 }, { x: 0, y: 0 } ])
|
|
const flydb = ref([ { x: 0, y: 0 }, { x: 0, y: 0 } ])
|
|
|
|
|
|
|
|
const randomFlyDb = () => [
|
|
const randomFlyDb = () => [
|
|
@@ -17,6 +17,14 @@ const timer = setInterval(() => {
|
|
|
flydb.value = randomFlyDb()
|
|
flydb.value = randomFlyDb()
|
|
|
}, 1000)
|
|
}, 1000)
|
|
|
|
|
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ const isIOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)
|
|
|
|
|
+ const isAndroid = navigator.userAgent.includes('Android') || navigator.userAgent.includes('Linux') // g
|
|
|
|
|
+ if(isIOS || isAndroid){
|
|
|
|
|
+ alert('建议用电脑打开')
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
|
clearInterval(timer)
|
|
clearInterval(timer)
|
|
|
})
|
|
})
|