From cbedd597431fcec8e4c192adb5ac6fa62ce61bae Mon Sep 17 00:00:00 2001 From: duanliang <540489889@qq.com> Date: Tue, 20 Jan 2026 15:07:30 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=B8=B8=E5=AE=A2=E6=80=BB=E6=95=B0?= =?UTF-8?q?=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home.js | 8 ++ src/views/home/components/box-2.vue | 142 +++++++++++++++++++++++++++- 2 files changed, 146 insertions(+), 4 deletions(-) diff --git a/src/api/home.js b/src/api/home.js index b613728..0d6174d 100644 --- a/src/api/home.js +++ b/src/api/home.js @@ -131,4 +131,12 @@ export function getVideCollectCateSort(data) { method: 'post', data }) +} +//今年游客总数 +export function getSpotVisitor(data) { + return request({ + url: '/fjtcc-api/api/largeScreen/spot/spotVisitor', + method: 'get', + data + }) } \ No newline at end of file diff --git a/src/views/home/components/box-2.vue b/src/views/home/components/box-2.vue index e8f7467..a279c26 100644 --- a/src/views/home/components/box-2.vue +++ b/src/views/home/components/box-2.vue @@ -3,7 +3,9 @@
-
+
今年总游客数
@@ -117,6 +119,26 @@
+ +
+
+ +
+
景区
+
今年游客数
+ +
+
+
+
{{item.name}}
+
{{item.value}}
+ + +
+
+
+
+
@@ -125,7 +147,7 @@ import { Vue3SeamlessScroll } from 'vue3-seamless-scroll' import ScrollNumber from '@/components/ScrollNumber/index.vue' - import { getSpotListApi, getBaiduMapApi, getBaiduMapCrowdedApi } from '@/api/home' + import { getSpotListApi, getBaiduMapApi, getBaiduMapCrowdedApi,getSpotVisitor } from '@/api/home' import icon8 from '@/assets/images/icon-8.png' import icon9 from '@/assets/images/icon-9.png' @@ -147,6 +169,20 @@ emit('switch-spot', e) // map.value.centerAndZoom(new BMapGL.Point('108.704166', '30.94776'), 16) } + const dialogTableVisible = ref(false) + const visitorList = ref([]) + const scenicOrder = ['白帝城·瞿塘峡', '三峡之巅', '龙桥河']; + const orderedScenicData = computed(() => { + return scenicOrder.map(name => ({ + name: name, // 景点名(键) + value: visitorList.value[name] // 对应数值(值) + })); + }); + const getSpotVisitorList = async () => { + let res = await getSpotVisitor() + visitorList.value = res.data + console.log(res,'getSpotVisitor') + } const getSpotList = async () => { let res = await getSpotListApi() spotList.value = res.data @@ -364,10 +400,108 @@ onMounted(() => { getSpotList() - + getSpotVisitorList() }) - +