xdd hai 2 meses
pai
achega
ea2c084ecd
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  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