|
@ -47,7 +47,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<!-- map --> |
|
|
<!-- map --> |
|
|
<div ref="chart" style="width: 960px; height: 924px; margin:0 .125rem; z-index: 999;" /> |
|
|
|
|
|
|
|
|
<div ref="chart" style="width: 920px; height: 924px; z-index: 999; border:1px solid rgba(0, 0, 0, 0);" /> |
|
|
<div class="map-hx-bg"> |
|
|
<div class="map-hx-bg"> |
|
|
<div class="map-hx-small" /> |
|
|
<div class="map-hx-small" /> |
|
|
<div class="map-hx-big" /> |
|
|
<div class="map-hx-big" /> |
|
@ -131,29 +131,44 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
beforeDestroy() { |
|
|
beforeDestroy() { |
|
|
window.removeEventListener('resize', this.resize) |
|
|
|
|
|
clearTimeout(this.timeTicket) |
|
|
|
|
|
clearInterval(this.rankInterval) |
|
|
|
|
|
clearInterval(this.timer) |
|
|
|
|
|
localStorage.setItem('libIndexItem', this.libIndex) |
|
|
|
|
|
localStorage.setItem('libCurrentItem', this.libCurrent) |
|
|
|
|
|
localStorage.setItem('countItem', this.count) |
|
|
|
|
|
|
|
|
|
|
|
this.rankInterval = null |
|
|
|
|
|
this.timer = null |
|
|
|
|
|
this.timeTicket = null |
|
|
|
|
|
|
|
|
this.destroy() |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.getLibBookTotal() |
|
|
|
|
|
|
|
|
// this.getLibBookTotal() |
|
|
this.getReadRanking() |
|
|
this.getReadRanking() |
|
|
this.getLendingTotal() |
|
|
this.getLendingTotal() |
|
|
}, |
|
|
}, |
|
|
activated() { |
|
|
activated() { |
|
|
this.getLibBookTotal() |
|
|
this.getLibBookTotal() |
|
|
|
|
|
if (this.rankingData.length !== 0) { |
|
|
|
|
|
this.currentHover = -1 |
|
|
|
|
|
this.rankInterval = setInterval(() => { |
|
|
|
|
|
this.currentHover = (this.currentHover + 1) % this.rankingData.length |
|
|
|
|
|
}, 1000) |
|
|
|
|
|
} |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
window.addEventListener('resize', debounce(this.resize, 2000)) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
deactivated() { |
|
|
|
|
|
this.destroy() |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
destroy() { |
|
|
|
|
|
window.removeEventListener('resize', this.resize) |
|
|
|
|
|
clearTimeout(this.timeTicket) |
|
|
|
|
|
clearInterval(this.rankInterval) |
|
|
|
|
|
clearInterval(this.timer) |
|
|
|
|
|
localStorage.setItem('libIndexItem', this.libIndex) |
|
|
|
|
|
localStorage.setItem('libCurrentItem', this.libCurrent) |
|
|
|
|
|
localStorage.setItem('countItem', this.count) |
|
|
|
|
|
|
|
|
|
|
|
this.rankInterval = null |
|
|
|
|
|
this.timer = null |
|
|
|
|
|
this.timeTicket = null |
|
|
|
|
|
}, |
|
|
startScrolling() { |
|
|
startScrolling() { |
|
|
this.timer = setInterval(() => { |
|
|
this.timer = setInterval(() => { |
|
|
this.position -= this.speed |
|
|
this.position -= this.speed |
|
@ -244,7 +259,6 @@ export default { |
|
|
|
|
|
|
|
|
this.getUserTotal() |
|
|
this.getUserTotal() |
|
|
.then(userTotals => { |
|
|
.then(userTotals => { |
|
|
// console.log('userTotals', userTotals) |
|
|
|
|
|
userTotals.forEach(userTotal => { |
|
|
userTotals.forEach(userTotal => { |
|
|
const libCode = Object.keys(userTotal)[0] |
|
|
const libCode = Object.keys(userTotal)[0] |
|
|
const count = userTotal[libCode] |
|
|
const count = userTotal[libCode] |
|
@ -348,7 +362,7 @@ export default { |
|
|
}).sort((a, b) => a.sort - b.sort) |
|
|
}).sort((a, b) => a.sort - b.sort) |
|
|
|
|
|
|
|
|
this.libInfoData = updatedLibraries |
|
|
this.libInfoData = updatedLibraries |
|
|
console.log('this.libInfoData', this.libInfoData) |
|
|
|
|
|
|
|
|
// console.log('this.libInfoData', this.libInfoData) |
|
|
if (localStorage.getItem('countItem')) { |
|
|
if (localStorage.getItem('countItem')) { |
|
|
this.count = parseInt(localStorage.getItem('countItem')) |
|
|
this.count = parseInt(localStorage.getItem('countItem')) |
|
|
} else { |
|
|
} else { |
|
|