You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
127 lines
2.2 KiB
127 lines
2.2 KiB
<template>
|
|
<div class="home">
|
|
<h1>Welcome to the Admin Dashboard!</h1>
|
|
<p>Here, you can manage all aspects of your application.</p>
|
|
|
|
<div class="stats-container">
|
|
<div class="stat-card">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-users"></i>
|
|
</div>
|
|
<div class="stat-info">
|
|
<h2>网站今日访问量</h2>
|
|
<p>{{historyInfo.ip_count_today}}</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="stats-container">
|
|
<div class="stat-card">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-users"></i>
|
|
</div>
|
|
<div class="stat-info">
|
|
<h2>网站昨日访问量</h2>
|
|
<p>{{historyInfo.ip_count_yest}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="stat-card">
|
|
<div class="stat-icon">
|
|
<i class="fas fa-shopping-cart"></i>
|
|
</div>
|
|
<div class="stat-info">
|
|
<h2>网站总访问量</h2>
|
|
<p>{{historyInfo.ip_history_count}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
historyInfo: {}
|
|
};
|
|
},
|
|
|
|
computed: {},
|
|
|
|
watch: {},
|
|
|
|
created() {
|
|
this.getHistoryInfo();
|
|
},
|
|
|
|
mounted() {},
|
|
|
|
methods: {
|
|
getHistoryInfo() {
|
|
this.$http.get(this.$constant.baseURL + "/webInfo/getHistoryInfo", {}, true)
|
|
.then((res) => {
|
|
if (!this.$common.isEmpty(res.data)) {
|
|
this.historyInfo = res.data;
|
|
}
|
|
})
|
|
.catch((error) => {
|
|
this.$message({
|
|
message: error.message,
|
|
type: "error"
|
|
});
|
|
});
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
.home {
|
|
text-align: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 32px;
|
|
color: #333;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
p {
|
|
font-size: 18px;
|
|
color: #666;
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
.stats-container {
|
|
display: flex;
|
|
justify-content: space-around;
|
|
}
|
|
|
|
.stat-card {
|
|
background-color: #f2f2f2;
|
|
padding: 20px;
|
|
border-radius: 5px;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.stat-icon {
|
|
font-size: 24px;
|
|
color: #333;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.stat-info h2 {
|
|
font-size: 18px;
|
|
color: #333;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.stat-info p {
|
|
font-size: 14px;
|
|
color: #666;
|
|
}
|
|
</style>
|