|
@@ -1,10 +1,10 @@
|
|
|
<script setup lang="ts">
|
|
|
-import {reactive} from "vue";
|
|
|
+import {onMounted, reactive} from "vue";
|
|
|
+import * as $api from "@/api/order/index";
|
|
|
|
|
|
defineOptions({
|
|
|
name: "Welcome"
|
|
|
});
|
|
|
-
|
|
|
const data = reactive({
|
|
|
today: {
|
|
|
// 数量
|
|
@@ -76,6 +76,21 @@ const data = reactive({
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+onMounted(() => {
|
|
|
+ total();
|
|
|
+ setInterval(function(){
|
|
|
+ total();
|
|
|
+ }, 30000);
|
|
|
+
|
|
|
+});
|
|
|
+const total = () => {
|
|
|
+ $api.total().then((res: any) => {
|
|
|
+ data.today = res.result.today;
|
|
|
+ data.yesterday = res.result.yesterday;
|
|
|
+ data.lastWeek = res.result.lastWeek;
|
|
|
+ data.lastMonth = res.result.lastMonth;
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -90,7 +105,10 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{ data.today.quantity.valid }}</span>
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
+ data.today.quantity.valid
|
|
|
+ }}</span>
|
|
|
/ {{ data.today.quantity.total }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -106,7 +124,11 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{ data.today.amount.valid }}</span> /
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
+ data.today.amount.valid
|
|
|
+ }}</span>
|
|
|
+ /
|
|
|
{{ data.today.amount.total }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -122,7 +144,10 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{ data.today.earnings.valid }}</span>
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
+ data.today.earnings.valid
|
|
|
+ }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -139,9 +164,11 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
data.yesterday.quantity.valid
|
|
|
- }}</span> / {{ data.yesterday.quantity.total }}
|
|
|
+ }}</span>
|
|
|
+ / {{ data.yesterday.quantity.total }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -156,9 +183,11 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
data.yesterday.amount.valid
|
|
|
- }}</span> / {{ data.yesterday.amount.total }}
|
|
|
+ }}</span>
|
|
|
+ / {{ data.yesterday.amount.total }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -173,9 +202,11 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
data.yesterday.earnings.valid
|
|
|
- }}</span></div>
|
|
|
+ }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -191,9 +222,11 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
data.lastWeek.quantity.valid
|
|
|
- }}</span> / {{ data.lastWeek.quantity.total }}
|
|
|
+ }}</span>
|
|
|
+ / {{ data.lastWeek.quantity.total }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -208,7 +241,10 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{ data.lastWeek.amount.valid }}</span>
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
+ data.lastWeek.amount.valid
|
|
|
+ }}</span>
|
|
|
/ {{ data.lastWeek.amount.total }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -224,9 +260,11 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
data.lastWeek.earnings.valid
|
|
|
- }}</span></div>
|
|
|
+ }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -242,9 +280,11 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
data.lastMonth.quantity.valid
|
|
|
- }}</span> / {{ data.lastMonth.quantity.total }}
|
|
|
+ }}</span>
|
|
|
+ / {{ data.lastMonth.quantity.total }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -259,9 +299,11 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
data.lastMonth.amount.valid
|
|
|
- }}</span> / {{ data.lastMonth.amount.total }}
|
|
|
+ }}</span>
|
|
|
+ / {{ data.lastMonth.amount.total }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -276,9 +318,11 @@ const data = reactive({
|
|
|
<div class="ep-bg-purple">
|
|
|
<div class="text">
|
|
|
<div class="text-center h-[40px]">
|
|
|
- <div class="text-xl font-bold"><span class="text-red-700 text-2xl">{{
|
|
|
+ <div class="text-xl font-bold">
|
|
|
+ <span class="text-red-700 text-2xl">{{
|
|
|
data.lastMonth.earnings.valid
|
|
|
- }}</span></div>
|
|
|
+ }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|