From 4b854c29227ef08ea178a3bba527a40ca2f84674 Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Mon, 21 Feb 2022 02:03:17 +0800
Subject: [PATCH] 统计接口对接,列表接口参数对接

---
 src/components/mini/box3-archive.vue |  111 ++++++++++++++++++++++++++++---------------------------
 1 files changed, 56 insertions(+), 55 deletions(-)

diff --git a/src/components/mini/box3-archive.vue b/src/components/mini/box3-archive.vue
index bf6d70b..78c36b7 100644
--- a/src/components/mini/box3-archive.vue
+++ b/src/components/mini/box3-archive.vue
@@ -8,16 +8,16 @@
 		<div class="blog-scroll ">
 			<div v-for="yearData in myData">
 				<router-link to="/tagTime?type=2">
-					<p class="blog-pigeonhole-p">{{yearData.year}}</p>
+					<p class="blog-pigeonhole-p">{{yearData.year}}年</p>
 				</router-link>
 				<div class="blog-pigeonhole-list">
-			
+
 					<div class="blog-pigeonhole-item" v-for="item in yearData.list">
 						<router-link to="/tagTime?type=3">
 							<span>{{item.month}}月</span>
 						</router-link>
 						<span>{{item.count}}篇</span>
-			
+
 					</div>
 				</div>
 			</div>
@@ -27,61 +27,62 @@
 </template>
 
 <script>
+	import {
+		archive
+	} from '../../api/blogStatistics.js'
 	export default {
+		beforeMount() {
+			archive({}).then((res) => {
+				this.myData = res.data;
+			})
+		},
 		data() {
 			return {
-				"myData": [{
-						"year": "2022",
-						"list": [{
-								"month": "12",
-								"count": 10
-							},
-							{
-								"month": "10",
-								"count": 11
-							},
-							{
-								"month": "9",
-								"count": 9
-							}
-						]
-					},
-					{
-						"year": "2021",
-						"list": [{
-								"month": "12",
-								"count": 8
-							},
-							{
-								"month": "10",
-								"count": 7
-							},
-							{
-								"month": "9",
-								"count": 6
-							},
-							{
-								"month": "8",
-								"count": 5
-							},
-							{
-								"month": "7",
-								"count": 4
-							},
-							{
-								"month": "6",
-								"count": 3
-							},
-							{
-								"month": "5",
-								"count": 2
-							},
-							{
-								"month": "4",
-								"count": 1
-							}
-						]
-					}
+				"myData": [
+					// {
+					// 	"year": "2022",
+					// 	"list": [{
+					// 			"month": "12",
+					// 			"count": 10
+					// 		},
+					// 		{
+					// 			"month": "10",
+					// 			"count": 11
+					// 		},
+					// 		{
+					// 			"month": "9",
+					// 			"count": 9
+					// 		}
+					// 	]
+					// },
+					// {
+					// 	"year": "2021",
+					// 	"list": [{
+					// 			"month": "12",
+					// 			"count": 8
+					// 		},
+					// 		{
+					// 			"month": "10",
+					// 			"count": 7
+					// 		},
+					// 		{
+					// 			"month": "7",
+					// 			"count": 4
+					// 		},
+					// 		{
+					// 			"month": "6",
+					// 			"count": 3
+					// 		},
+					// 		{
+					// 			"month": "5",
+					// 			"count": 2
+					// 		},
+					// 		{
+					// 			"month": "4",
+					// 			"count": 1
+					// 		}
+					// 	]
+					// }
 				],
 			}
 		}

--
Gitblit v1.9.1