ソースを参照

下了阳光跑的排行榜

林旭祥 3 週間 前
コミット
e3747da9bd
1 ファイル変更13 行追加13 行削除
  1. 13 13
      src/views/sunshineRun/index.vue

+ 13 - 13
src/views/sunshineRun/index.vue

@@ -78,7 +78,7 @@
         </div>
       </div>
     </div>
-    <RankingWindow ref="rankingWindowRef" @getClose="openRanking"></RankingWindow>
+    <!-- <RankingWindow ref="rankingWindowRef" @getClose="openRanking"></RankingWindow> -->
   </div>
 </template>
 
@@ -88,7 +88,7 @@ const { proxy } = getCurrentInstance() as any;
 const router = useRouter();
 const myInfo: any = localStorage.getItem('userInfo');
 const { sunshineRunWs, startConnect } = useSunshineRunSocket();
-const rankingWindowRef = ref();
+// const rankingWindowRef = ref();
 
 const data = reactive<any>({
   timerManager: {}, //计时器管理
@@ -290,20 +290,20 @@ const initSunshineRun = () => {
 /**
  * 定时打开排行榜
  */
-const openRanking = () => {
-  clearTimeout(timer.value);
-  timer.value = setTimeout(() => {
-    rankingWindowRef.value.open();
-  }, 1000 * 60 * 5);
-};
+// const openRanking = () => {
+//   clearTimeout(timer.value);
+//   timer.value = setTimeout(() => {
+//     rankingWindowRef.value.open();
+//   }, 1000 * 60 * 5);
+// };
 
 /**
  * 关闭排行榜
  */
-const closeRanking = () => {
-  rankingWindowRef.value.close();
-  clearTimeout(timer.value);
-};
+// const closeRanking = () => {
+//   rankingWindowRef.value.close();
+//   clearTimeout(timer.value);
+// };
 
 onBeforeMount(() => {
   //获取当前时间
@@ -343,7 +343,7 @@ onBeforeMount(() => {
 onMounted(() => {});
 
 onBeforeUnmount(() => {
-  closeRanking();
+  // closeRanking();
   getClearTimer();
 });
 </script>