Bladeren bron

feat: 增加天气组件

周玉环 2 dagen geleden
bovenliggende
commit
ae36d307c3

+ 20 - 0
xinkeaboard-admin/src/pages/statistics/bigscreen/components/HeadContent.js

@@ -16,6 +16,26 @@ const HeaderContent = ({ updateTime }) => {
       <div className={styles.headerContentTime}>
         <DateTimeDisplay />
       </div>
+      <div className={styles.weather}>
+        {/* <iframe
+          id="ifra"
+          width="1360"
+          height="140"
+          frameborder="0"
+          allowtransparency="true"
+          scrolling="no"
+          hspace="0"
+          src="https://i.tianqi.com/?c=code&id=34&icon=1&color=%23FFFFFF&py=nanqiaoqu&wind=1&num=6&site=70"
+        /> */}
+        <iframe
+          width="600"
+          scrolling="no"
+          height="60"
+          frameborder="0"
+          allowtransparency="true"
+          src="https://i.tianqi.com?c=code&id=34&color=%23ffffff&icon=1&py=nanjing&site=32&lang=cn"
+        />
+      </div>
     </div>
   );
 };

+ 8 - 0
xinkeaboard-admin/src/pages/statistics/bigscreen/styles/header_content.less

@@ -35,4 +35,12 @@
     top: 5px;
     right: 100px;
   }
+
+  .weather {
+    // width: 500px;
+    height: 100%;
+    position: absolute;
+    left: 100px;
+    top: 20px;
+  }
 }