Browse Source

日常开发

林旭祥 1 week ago
parent
commit
75c7088c67
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/views/game/index.vue

+ 4 - 0
src/views/game/index.vue

@@ -299,6 +299,7 @@ const getJump = (data: any) => {
  * 退出
  */
 const getExit = () => {
+  speckCancel();
   // router.go(-1);
   router.push({ path: '/home' });
 };
@@ -318,12 +319,14 @@ const getExitGame = (data: any) => {
     resumeGame.value = false;
     clearInterval(timer.value);
     timer.value = null;
+    speckCancel();
   } else if (data.type == 2) {
     //游戏结束显示下一场
     let myIndex = areaStateList.value.findIndex((item: any) => {
       return item.area == data.area;
     })
     areaStateList.value[myIndex].gameover = true;
+    speckCancel();
   } else {
     //游戏中退出
     proxy?.$modal.confirm("确定退出吗?").then(() => {
@@ -335,6 +338,7 @@ const getExitGame = (data: any) => {
       resumeGame.value = false;
       clearInterval(timer.value);
       timer.value = null;
+      speckCancel();
     }).finally(() => {
     });
   }