Browse Source

更新

lite
luyisha 3 years ago
parent
commit
2c93761bca
  1. 42
      src/App.vue
  2. 4
      src/views/index.vue
  3. 3
      src/views/ty/index.vue

42
src/App.vue

@ -1,5 +1,5 @@
<template>
<div id="app" class="btgym">
<div id="app" class="btgym" v-on:mousemove="mouseMove">
<!-- 顶部信息 -->
<div class="topnav">
<div class="toptxt">
@ -39,7 +39,10 @@ export default {
mon_num: 0,
year_num: 0,
sumYear_num: 0,
currentPage: 0
currentPage: 0,
polling: null,//
timeCount: 0,//
judgeTimer: null,//
};
},
created() {
@ -61,9 +64,22 @@ export default {
this.getTimespan();
this.getStat();
// this.getWS()
setInterval(() => {
this.autoChange();
}, 10000);
// setInterval(() => {
// this.autoChange();
// }, 10000);
},
watch: {
timeCount: {
handler() {
this.judgeTimer = null;
this.polling = null;
clearTimeout(this.judgeTimer);
clearInterval(this.polling);
this.judgeTimer = setTimeout(() => {
this.play();
}, 200);
},
},
},
methods: {
//
@ -127,7 +143,21 @@ export default {
this.currentPage = 0;
this.$router.push({ path: '/ty'})
}
}
},
mouseMove() {
clearTimeout(this.judgeTimer);
clearInterval(this.polling);
this.timer = null;
this.polling = null;
this.timeCount = ++this.timeCount % 100;
},
play() {
clearInterval(this.polling);
this.polling = setInterval(() => {
//
this.autoChange();
}, 20000);
},
},
};
</script>

4
src/views/index.vue

@ -964,6 +964,8 @@ export default {
.screen-box {
background: none !important;
}
</style>
<style>
.btgym {
width: 100%;
height: 100%;
@ -972,8 +974,6 @@ export default {
background-position: 100% 100%;
background-repeat: no-repeat;
}
</style>
<style>
#index {
width: 100%;
height: 100%;

3
src/views/ty/index.vue

@ -896,6 +896,7 @@ export default {
//
homeApi.homeBarData({groupsId:idArr}).then(res=>{
// console.log(res, '==');
that.groupsData = [];
console.log(res.data.data.groupsData)
res.data.data.groupsData.forEach(item=>{
that.groupsData.push(item);
@ -913,7 +914,7 @@ export default {
that.cgv_2 = that.groupsData[1].noRepeatInNum;
that.cgp_2 = that.groupsData[1].proportion;
that.cgn_3 = that.groupsData[2].groupName;
that.cgv_2 = that.groupsData[1].noRepeatInNum;
that.cgv_3 = that.groupsData[2].noRepeatInNum;
that.cgp_3 = that.groupsData[2]?that.groupsData[2].proportion:'';
});
},

Loading…
Cancel
Save