Ver código fonte

定时排行榜默认开启

林旭祥 1 mês atrás
pai
commit
657534ad6e
1 arquivos alterados com 9 adições e 0 exclusões
  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();