xdd 2 月之前
父節點
當前提交
ea2c084ecd
共有 1 個文件被更改,包括 9 次插入0 次删除
  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