From e24b801217dfc11deac4cc949a092d0189578950 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 08 May 2021 15:03:45 +0800
Subject: [PATCH] 天气

---
 src/page/crumbsL/crumbsL.vue |    2 +-
 public/weather/index.html    |   24 +++++++++++++++++++++---
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/public/weather/index.html b/public/weather/index.html
index 88a4d81..9c8ab03 100644
--- a/public/weather/index.html
+++ b/public/weather/index.html
@@ -11,11 +11,20 @@
     <script type="text/javascript" charset="utf-8"
         src="http://webapi.amap.com/maps?v=1.3&key=xxxxxx&plugin=AMap.Autocomplete,AMap.PlaceSearch"></script>
     <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
+    <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
     <style>
         #weather {
             font-weight: 400;
             opacity: 0.7;
             font-size: 14px;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+        }
+
+        .time {
+            position: relative;
+            top: -6px;
         }
     </style>
 </head>
@@ -26,7 +35,9 @@
             {{nowTime.year}}年{{nowTime.month}}月{{nowTime.day}}日&nbsp;{{nowTime.hour}}:{{nowTime.minute}}:{{nowTime.second}}
         </span>&nbsp;&nbsp;
         <span class="weathers">
-            {{weathers.nowWeather}}&nbsp;{{weathers.highTemperature}}-{{weathers.lowTemperature}}
+            <!-- {{city}}:{{weathers.nowWeather}}&nbsp;{{weathers.highTemperature}}-{{weathers.lowTemperature}} -->
+            <iframe width="235" scrolling="no" height="30" frameborder="0" allowtransparency="true"
+                src="https://i.tianqi.com?c=code&id=34&icon=1&site=12"></iframe>
         </span>
     </div>
     <script>
@@ -70,6 +81,12 @@
                         that.weathers.lowTemperature = nowDay.low.slice(3);
                         that.begin = true;
                     })
+                },
+                getCity() {
+                    var ctiyName = returnCitySN["cname"];
+                    console.log(ctiyName, 4343543);
+                    this.city = '南昌'
+                    this.getWeather();
                 }
             },
             mounted() {
@@ -77,11 +94,12 @@
                 setInterval(() => {
                     this.getNewTime();
                 }, 1000);
-                this.getWeather();
+                // this.getWeather();
+                this.getCity();
             }
         })
     </script>
 
 </body>
 
-</html>
+</html>
\ No newline at end of file
diff --git a/src/page/crumbsL/crumbsL.vue b/src/page/crumbsL/crumbsL.vue
index 427fc69..28603f7 100644
--- a/src/page/crumbsL/crumbsL.vue
+++ b/src/page/crumbsL/crumbsL.vue
@@ -21,7 +21,7 @@
     <div class="weather">
       <iframe
       class="weatherif"
-        width="310"
+        width="480"
         height="30"
         :src="urlData"
         scrolling="no"

--
Gitblit v1.9.3