@@ -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