|
@@ -42,9 +42,11 @@ import { mapMutations } from 'vuex'
|
|
|
|
|
|
@Component({
|
|
|
name: 'test',
|
|
|
- ...mapMutations({
|
|
|
- clearLibState: 'main/clearMyLibState'
|
|
|
- })
|
|
|
+ methods: {
|
|
|
+ ...mapMutations({
|
|
|
+ clearLibState: 'main/clearMyLibState'
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
export default class extends Vue {
|
|
|
clearLibState: any
|
|
@@ -60,6 +62,13 @@ export default class extends Vue {
|
|
|
currency: 0
|
|
|
}
|
|
|
|
|
|
+ beforeRouteLeave (to, from, next) {
|
|
|
+ if (this.timer) {
|
|
|
+ clearInterval(this.timer)
|
|
|
+ }
|
|
|
+ next()
|
|
|
+ }
|
|
|
+
|
|
|
created () {
|
|
|
this.query = location.href.split('/')[location.href.split('/').length - 1] // 获取num
|
|
|
this.setCountDown()
|
|
@@ -88,12 +97,7 @@ export default class extends Vue {
|
|
|
} else {
|
|
|
clearInterval(this.timer)
|
|
|
this.timer = null
|
|
|
- this.$router.replace({
|
|
|
- name: 'details',
|
|
|
- params: {
|
|
|
- id: this.payinfor.docId
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$router.back()
|
|
|
}
|
|
|
}, 1000)
|
|
|
}
|