2021-05-12 16:19:41 +08:00
|
|
|
<template>
|
2021-06-01 15:20:26 +08:00
|
|
|
<div v-if="!licValidate && licStatus !== 'no_record'" class="lic">
|
2021-05-18 16:17:07 +08:00
|
|
|
<strong>{{ $t(licMsg) }}</strong>
|
2021-05-12 16:19:41 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'Licbar',
|
|
|
|
components: {
|
|
|
|
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
lic: true,
|
|
|
|
msg: 'Cannot run program "/usr/local/bin/validator_darwin_amd64": error=2, No such file or directory'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
2021-09-02 14:28:15 +08:00
|
|
|
/* theme() {
|
2021-05-12 16:19:41 +08:00
|
|
|
return this.$store.state.settings.theme
|
2021-09-02 14:28:15 +08:00
|
|
|
}, */
|
2021-06-01 15:20:26 +08:00
|
|
|
licValidate() {
|
2021-05-12 16:19:41 +08:00
|
|
|
return this.$store.state.lic.validate
|
2021-05-18 14:33:48 +08:00
|
|
|
},
|
2021-06-01 15:20:26 +08:00
|
|
|
licStatus() {
|
|
|
|
return this.$store.state.lic.licStatus || ''
|
|
|
|
},
|
2021-05-18 14:33:48 +08:00
|
|
|
licMsg() {
|
2021-05-18 16:17:07 +08:00
|
|
|
return this.$store.state.lic.licMsg ? ('license.' + this.$store.state.lic.licMsg) : null
|
2021-05-12 16:19:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
// this.validate()
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
// validate() {
|
|
|
|
// validateLic().then(res => {
|
|
|
|
// this.lic = true
|
|
|
|
// this.$store.dispatch('lic/setValidate', true)
|
|
|
|
// }).catch((e) => {
|
|
|
|
// this.msg = e.response.data.message
|
|
|
|
// this.lic = false
|
|
|
|
// this.$store.dispatch('lic/setValidate', false)
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
|
|
.lic {
|
|
|
|
height: 24px;
|
|
|
|
background-color: #c92100;
|
|
|
|
color: #fff;
|
|
|
|
text-align: center;
|
2021-05-18 12:23:21 +08:00
|
|
|
/* padding: 6px 11px; */
|
|
|
|
position: fixed;
|
|
|
|
z-index: 1002;
|
|
|
|
top: 0;
|
|
|
|
width: 100%;
|
2021-05-12 16:19:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|