diff --git a/src/api/home.js b/src/api/home.js
new file mode 100644
index 0000000..f42dcfb
--- /dev/null
+++ b/src/api/home.js
@@ -0,0 +1,9 @@
+import request from './request'
+
+// 彩云天气
+export function getWeatherApi() {
+ return request({
+ url: '/api/largeScreen/source/weather',
+ method: 'get'
+ })
+}
diff --git a/src/components/Header/index.vue b/src/components/Header/index.vue
index c937472..8bff1d1 100644
--- a/src/components/Header/index.vue
+++ b/src/components/Header/index.vue
@@ -27,11 +27,11 @@
- 25˚C-晴
+ {{ weatherData?.temperature }}-{{ weatherData?.skycon }}
|
- 风速:A2-4级
+ 风速:{{ weatherData?.windSpeed }}
|
- 空气质量:A2-优
+ 空气质量:{{ weatherData?.airQuality }}
{{ currentDate }}
@@ -45,6 +45,8 @@
import title2 from '@/assets/images/title-2.png'
import title2Select from '@/assets/images/title-2-select.png'
+ import { getWeatherApi } from '@/api/home'
+
let props = defineProps({
title: {
type: String,
@@ -74,6 +76,7 @@
const emit = defineEmits(['change'])
const router = useRouter()
let currentDate = ref('')
+ let weatherData = ref({})
const name = computed(() => {
if (!props.isSkip && props.navLeft.length > 0) {
@@ -108,7 +111,13 @@
emit('on-change', index)
}
}
+ const getWeather = async () => {
+ let res = await getWeatherApi()
+ weatherData.value = res.data
+ console.log(res, '====')
+ }
onMounted(() => {
+ getWeather()
getCurrentDate()
setInterval(() => {
getCurrentDate()
diff --git a/src/views/home/components/age.vue b/src/views/home/components/age.vue
index 12c9ca6..308a7ce 100644
--- a/src/views/home/components/age.vue
+++ b/src/views/home/components/age.vue
@@ -14,9 +14,9 @@
() => homeData.value?.userPortrait?.ageRate,
() => {
setOption({
- tooltip: {
- trigger: 'item'
- },
+ // tooltip: {
+ // trigger: 'item'
+ // },
legend: {
orient: 'vertical',
left: '60%',
diff --git a/src/views/home/components/box-3.vue b/src/views/home/components/box-3.vue
index 6e2d2cd..1a0afd7 100644
--- a/src/views/home/components/box-3.vue
+++ b/src/views/home/components/box-3.vue
@@ -198,10 +198,16 @@
调度
空余
-
-
{{ item.scenic_area }}
-
{{ item.started_count }}辆
-
{{ item.not_started_count }}辆
+
+
+
{{ item.scenic_area }}
+
{{ item.started_count }}辆
+
{{ item.not_started_count }}辆
+
@@ -218,14 +224,16 @@
调度
空余
-
-
白帝城
-
{{ item.started_count }}辆
-
{{ item.not_started_count }}辆
+
+
+
白帝城
+
{{ item.started_count }}辆
+
{{ item.not_started_count }}辆
+
@@ -244,18 +252,19 @@
@@ -387,7 +396,7 @@
& > div {
position: relative;
flex: 1;
- height: vh(110);
+ height: vh(113);
display: flex;
align-items: center;
background-image: url('@/assets/images/bg-4.png');
@@ -434,6 +443,7 @@
width: vw(200);
height: vh(100);
z-index: 2;
+ background: rgba(0, 150, 255, 0.17);
.header {
display: flex;
height: vh(18);
@@ -447,6 +457,23 @@
color: #52b8ff;
}
}
+ .content {
+ overflow-y: auto;
+ height: vh(82);
+ /* 滚动条整体样式 */
+ &::-webkit-scrollbar {
+ width: vw(4); /* 滚动条的宽度 */
+ }
+ /* 滚动条轨道 */
+ &::-webkit-scrollbar-track {
+ background: 'transparent'; /* 轨道的背景色 */
+ }
+ /* 滚动条滑块 */
+ &::-webkit-scrollbar-thumb {
+ background: rgba(0, 150, 255, 0.63); /* 滑块的背景色 */
+ border-radius: 5px; /* 滑块的圆角 */
+ }
+ }
.cell {
display: flex;
height: vh(27);
@@ -507,13 +534,23 @@
font-size: vw(24);
color: #ffffff;
}
+ .success {
+ color: #02f9fa;
+ }
+ .suffix {
+ margin-top: vh(10);
+ font-weight: bold;
+ font-size: vw(24);
+ color: #02f9fa;
+ color: #02f9fa;
+ }
}
}
& > div:nth-child(2) {
padding-top: vh(10);
- margin-top: vh(8);
+ margin-top: vh(6);
width: vw(360);
- height: vh(140);
+ height: vh(156);
background-image: url('@/assets/images/bg-4.png');
background-size: 100% 100%;
}
@@ -521,7 +558,7 @@
}
.occupancy {
:deep(.title-3) {
- margin-top: vh(10);
+ margin-top: vh(6);
}
}
.title1 {