|
@@ -62,7 +62,18 @@ export default {
|
|
|
this.token = this.$route.query.token;
|
|
|
this.gameRentNoCodeInfo()
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ document.addEventListener('visibilitychange', this.handleVisiable)
|
|
|
+ },
|
|
|
+ destroyed() {
|
|
|
+ document.removeEventListener('visibilitychange', this.handleVisiable)
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ handleVisiable(e) {
|
|
|
+ if (e.target.visibilityState === 'visible') {
|
|
|
+ this.gameRentNoCodeInfo();
|
|
|
+ }
|
|
|
+ },
|
|
|
async gameRentNoCodeInfo() {
|
|
|
try {
|
|
|
const res = await this.$axios.$get('/activity/game/rentNo/gameRentNoCodeInfo', { headers: { Authorization: this.token } });
|