37 lines
533 B
Vue
37 lines
533 B
Vue
|
|
|
||
|
|
<template>
|
||
|
|
<div>
|
||
|
|
<nuxt />
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import { mapActions, mapState } from 'vuex'
|
||
|
|
export default {
|
||
|
|
name: "default",
|
||
|
|
computed: {
|
||
|
|
...mapState({
|
||
|
|
info: state => state.system.info
|
||
|
|
})
|
||
|
|
},
|
||
|
|
created() {
|
||
|
|
this.getViewData()
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
...mapActions('system', ['setInfo']),
|
||
|
|
async getViewData () {
|
||
|
|
if (!this.info) {
|
||
|
|
const { data } = await this.$get('/api/Home/view');
|
||
|
|
this.setInfo(data)
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
|
||
|
|
<style scoped lang="less">
|
||
|
|
|
||
|
|
</style>
|