Explorar el Código

定时排行榜默认开启

林旭祥 hace 1 mes
padre
commit
657534ad6e
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  1. 9 0
      src/App.vue

+ 9 - 0
src/App.vue

@@ -3,6 +3,15 @@
 </template>
 
 <script setup lang="ts">
+//定时排行榜默认开启
+let state1 = localStorage.getItem('rankingSwitch1');
+let state2 = localStorage.getItem('rankingSwitch2');
+if (state1 == undefined) {
+    localStorage.setItem('rankingSwitch1', "1");
+}
+if (state2 == undefined) {
+    localStorage.setItem('rankingSwitch2', "1");
+}
 // import { useWebSocket } from '@/utils/handWs';
 // const { handWs, startDevice, startHand, stateHand } = useWebSocket();