xdd il y a 2 mois
Parent
commit
ea2c084ecd
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9 0
      src/views/company/companyRecharge/doRecharge.vue

+ 9 - 0
src/views/company/companyRecharge/doRecharge.vue

@@ -111,7 +111,16 @@ export default {
       this.money = response.data.money;
     });
   },
+  beforeDestroy() {
+    this.clearTimer();
+  },
   methods: {
+    clearTimer() {
+      if (this.timer) {
+        clearInterval(this.timer);
+        this.timer = null;
+      }
+    },
     /**
      * 创建二维码
      * @param {string} url - 二维码内容URL