Files
web_hghl_admin/src/App.vue
T
2026-10-26 16:44:04 +08:00

47 lines
952 B
Vue
Executable File

<template>
<div id="app">
<router-view />
</div>
</template>
<script>
import { getSyscfg } from '@/api/system/systemConfig'
import { getToken } from '@/utils/auth' // get token from cookie
export default {
name: 'App',
async created() {
const hasToken = getToken()
if (hasToken) {
await this.getData()
}
},
methods: {
// TODO:请求系统配置列表数据
getData() {
if (getToken()) {
getSyscfg({}).then((res) => {
if (res.code === 200) {
this.form = res.data
this.$store.dispatch('system/setConfig', res.data)
} else {
this.$message.error('请求系统配置失败')
}
}).catch(err => {
console.log(err, 'ss')
})
}
}
}
}
</script>
<style lang="scss">
.el-tooltip__popper {
max-width: 600px;
}
.el-table {
font-size: 12px !important;
color: rgb(56, 51, 51) !important;
}
</style>