add Jo image, add coins with update and add incentives
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-01-03 19:52:51 +01:00
parent 125f6b80d8
commit 0e91cb0ac8
9 changed files with 89 additions and 11 deletions

View File

@@ -6,6 +6,9 @@
<div class="right-menu">
<template v-if="device!=='mobile'">
<span class="coinclass">Münzen: {{ coins }}
</span>
<img src="@/assets/logo/coins.png" class="coinsimg">
<search id="header-search" class="right-menu-item" />
<error-log class="errLog-container right-menu-item hover-effect" />
@@ -45,6 +48,8 @@ import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
import request from '@/utils/request'
export default {
components: {
Breadcrumb,
@@ -54,6 +59,12 @@ export default {
SizeSelect,
Search
},
data() {
return {
coins: 0,
updateInterval: null
}
},
computed: {
...mapGetters([
'sidebar',
@@ -61,6 +72,23 @@ export default {
'device'
])
},
mounted() {
this.updateInterval = setInterval(() => {
request({
url: 'https://joinbot.tk/kvs/coinslukas',
method: 'get',
headers: { 'x-api-key': 'PMl`&xWpZ1vE)M]G;{8qIXx4k!ce|n' }
}).then((result) => {
this.coins = result
}).catch((err) => {
console.log('ThaErr', err)
})
}, 1000)
},
beforeDestroy() {
clearInterval(this.updateInterval)
this.updateInterval = null
},
methods: {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
@@ -74,6 +102,17 @@ export default {
</script>
<style lang="scss" scoped>
.coinclass {
height: 70%;
vertical-align: text-bottom;
font-weight: bolder;
}
.coinsimg{
height: 28px;
margin-bottom: 10px;
padding-right: 10px;
}
.navbar {
height: 50px;
overflow: hidden;