| | |
| | | this.getNohknews(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | this.clearStockTimer(); |
| | | }, |
| | | // beforeDestroy() { |
| | | // this.Klinetype = false; |
| | | // window.clearInterval() |
| | | // }, |
| | | methods: { |
| | | clearStockTimer() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer); |
| | | this.timer = null; |
| | | } |
| | | }, |
| | | async getHknews() { |
| | | await api.queryIndexNews().then((res) => { |
| | | if (res.status === 0) { |
| | |
| | | } |
| | | }, |
| | | handleBackaa() { |
| | | clearInterval(this.timer); |
| | | this.clearStockTimer(); |
| | | window.localStorage.removeItem("kLine"); |
| | | this.$router.go(-1); |
| | | }, |
| | |
| | | }); |
| | | }, |
| | | goBuy(index) { |
| | | clearInterval(this.timer); |
| | | this.clearStockTimer(); |
| | | this.$router.push({ |
| | | path: "/TradingBuy", |
| | | query: { |