| @@ -286,7 +286,8 @@ export default { | |||||
| timeConfig:'', | timeConfig:'', | ||||
| biddinglistInformationLength:0, | biddinglistInformationLength:0, | ||||
| biddingTimeType:0, | biddingTimeType:0, | ||||
| isFirst:'' | |||||
| isFirst:'', | |||||
| timer:null | |||||
| }; | }; | ||||
| }, | }, | ||||
| computed: { | computed: { | ||||
| @@ -509,8 +510,7 @@ export default { | |||||
| }) | }) | ||||
| }) | }) | ||||
| setInterval(function () { | |||||
| console.log('qweasd') | |||||
| this.timer = setInterval(function () { | |||||
| getBiddingList(that.id).then(response =>{ | getBiddingList(that.id).then(response =>{ | ||||
| that.biddinglistInformation = response.rows | that.biddinglistInformation = response.rows | ||||
| if((response.rows.length != that.biddinglistInformationLength) && that.detail.ladderPrice){ | if((response.rows.length != that.biddinglistInformationLength) && that.detail.ladderPrice){ | ||||
| @@ -839,6 +839,19 @@ export default { | |||||
| } | } | ||||
| } | } | ||||
| }, | |||||
| destroyed () { | |||||
| console.log('bbbbbbbbbb') | |||||
| clearInterval(this.timer); | |||||
| }, | |||||
| beforeDestory() { | |||||
| clearInterval(this.timer) | |||||
| }, | |||||
| //离开页面清除定时器失效问题 | |||||
| beforeRouteLeave (to, from, next) { | |||||
| console.log("我离开了") | |||||
| clearInterval(this.timer) | |||||
| next() | |||||
| } | } | ||||
| }; | }; | ||||
| </script> | </script> | ||||