From d6e731d4e6b8c97707ee1a6cf455d6cc1f9e8e6f Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sun, 13 Apr 2025 08:14:42 +0800
Subject: [PATCH] feat: 使用===个等号
---
src/components/CommonWeather.vue | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/components/CommonWeather.vue b/src/components/CommonWeather.vue
index ac80966..473e729 100644
--- a/src/components/CommonWeather.vue
+++ b/src/components/CommonWeather.vue
@@ -6,7 +6,7 @@
<img src="@/assets/images/home/homeLeft/tq.png" alt="" />
<span class="tq">{{ weather }}</span>
<span class="tq">风速:{{ windVelocity }} </span>
- <span v-if="flylevel > 6" :class="[isFly === '建议飞行' ? 'qk' : isFly === '禁止飞行' ? 'redqk' : 'yellowqk']">{{
+ <span v-if="flylevel >= 5" :class="[isFly === '适合飞行' ? 'qk' : isFly === '禁止飞行' ? 'redqk' : 'yellowqk']">{{
isFly
}}</span>
</div>
@@ -37,7 +37,9 @@
weather.value = res.data.data.weather
isFly.value = res.data.data.flightAdvice
windVelocity.value = res.data.data.windPower
- flylevel.value = res.data.data.adcode.length
+ flylevel.value = res.data.data.adcode.replace(/0+$/, "").length
+
+
})
}
@@ -57,13 +59,14 @@
<style scoped lang="scss">
.time-weather {
margin-left: 45px;
- width: 350px;
+ // width: 350px;
font-size: 14px;
height: 36px;
line-height: 36px;
display: flex;
justify-content: space-between;
align-items: center;
+ color: #e7f5ff;
.line {
border: 1px solid #ffffff;
height: 10px;
@@ -76,7 +79,6 @@
}
.tq {
margin: 0 5px;
- color: #e7f5ff;
}
.qk {
margin-left: 5px;
--
Gitblit v1.9.3