1
1
<!DOCTYPE html> < html lang ="en "> < head >
2
- < meta charset ="utf-8 ">
3
- < title > JavascriptTools + Lodash</ title >
4
- < base href ="https://tjt740.github.io/JavaScript-tools-and-Lodash-tools/ ">
5
- < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
6
- < link rel ="icon " type ="image/x-icon " href ="./assets/images/sunshine.png ">
7
- < style > body {font-feature-settings : "tnum" ;font-variant : tabular-nums;font-size : 14px }html {-webkit-tap-highlight-color : transparent}body , html {width : 100% ;height : 100% }* , : after , : before {box-sizing : border-box}html {font-family : sans-serif;line-height : 1.15 ;-webkit-text-size-adjust : 100% ;-ms-text-size-adjust : 100% ;-ms-overflow-style : scrollbar;--antd-wave-shadow-color : # 1890ff ;--scroll-bar : 0 }body {font-family : -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, "Apple Color Emoji" , "Segoe UI Emoji" , Segoe UI Symbol, "Noto Color Emoji" }body {margin : 0 ;color : # 000000d9 ;line-height : 1.5715 ;background-color : # fff ;font-feature-settings : "tnum" }html , body {width : 100% ;height : 100% }* , * : before , * : after {box-sizing : border-box}html {font-family : sans-serif;line-height : 1.15 ;-webkit-text-size-adjust : 100% ;-ms-text-size-adjust : 100% ;-ms-overflow-style : scrollbar;-webkit-tap-highlight-color : rgba (0 , 0 , 0 , 0 )}body {margin : 0 ;color : # 000000d9 ;font-size : 14px ;font-family : -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, "Apple Color Emoji" , "Segoe UI Emoji" , Segoe UI Symbol, "Noto Color Emoji" ;font-variant : tabular-nums;line-height : 1.5715 ;background-color : # fff ;font-feature-settings : "tnum" , "tnum" }html {--antd-wave-shadow-color : # 1890ff ;--scroll-bar : 0 }body {width : 100% ;height : 100% ;overflow : hidden}</ style > < link rel ="stylesheet " href ="styles.ed51d80199c0566f.css " media ="print " onload ="this.media='all' "> < noscript > < link rel ="stylesheet " href ="styles.ed51d80199c0566f.css "> </ noscript > </ head >
8
- < body >
9
- < app-root > </ app-root >
10
- < script src ="runtime.642987ce23b566ee.js " type ="module "> </ script > < script src ="polyfills.38dbb63b27271ca5.js " type ="module "> </ script > < script src ="main.6ca714f51f686b57.js " type ="module "> </ script >
2
+ < meta charset ="utf-8 ">
3
+ < title > 加载中...💤</ title >
4
+ < base href ="">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
6
+
7
+
8
+ < style > body {font-feature-settings : "tnum" ;font-variant : tabular-nums;font-size : 14px }html {-webkit-tap-highlight-color : transparent}body , html {width : 100% ;height : 100% }* , : after , : before {box-sizing : border-box}html {font-family : sans-serif;line-height : 1.15 ;-webkit-text-size-adjust : 100% ;-ms-text-size-adjust : 100% ;-ms-overflow-style : scrollbar;--antd-wave-shadow-color : # 1890ff ;--scroll-bar : 0 }body {font-family : -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, "Apple Color Emoji" , "Segoe UI Emoji" , Segoe UI Symbol, "Noto Color Emoji" }body {margin : 0 ;color : # 000000d9 ;line-height : 1.5715 ;background-color : # fff ;font-feature-settings : "tnum" }html , body {width : 100% ;height : 100% }* , * : before , * : after {box-sizing : border-box}html {font-family : sans-serif;line-height : 1.15 ;-webkit-text-size-adjust : 100% ;-ms-text-size-adjust : 100% ;-ms-overflow-style : scrollbar;-webkit-tap-highlight-color : rgba (0 , 0 , 0 , 0 )}body {margin : 0 ;color : # 000000d9 ;font-size : 14px ;font-family : -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, "Apple Color Emoji" , "Segoe UI Emoji" , Segoe UI Symbol, "Noto Color Emoji" ;font-variant : tabular-nums;line-height : 1.5715 ;background-color : # fff ;font-feature-settings : "tnum" , "tnum" }html {--antd-wave-shadow-color : # 1890ff ;--scroll-bar : 0 }body {width : 100% ;height : 100% ;overflow : hidden}</ style > < link rel ="stylesheet " href ="styles.ed51d80199c0566f.css " media ="print " onload ="this.media='all' "> < noscript > < link rel ="stylesheet " href ="styles.ed51d80199c0566f.css "> </ noscript > </ head >
9
+ < body >
10
+ < app-root > </ app-root >
11
+
12
+ <!-- iconfont -->
13
+ < script src ="//at.alicdn.com/t/c/font_3387028_dir7xkd3aii.js "> </ script >
14
+ < script >
15
+ fetch (
16
+ "https://v0.yiketianqi.com/api?unescape=1&vue=1&version=v63&appid=52872973&appsecret=v7mxBDo8"
17
+ )
18
+ . then ( function ( response ) {
19
+ return response . json ( ) ;
20
+ } )
21
+ . then ( ( res ) => {
22
+ // 当前时间:
23
+ const nowTime = res . update_time . split ( ":" ) . at ( 0 ) ;
24
+ // 日出时间:
25
+ const sunriseTime = res . sunrise . split ( ":" ) . at ( 0 ) ;
26
+ // 日落时间:
27
+ const sunsetTime = res . sunset . split ( ":" ) . at ( 0 ) ;
28
+ // 早晨天气、晚上天气:
29
+ const wea =
30
+ nowTime <= sunsetTime
31
+ ? ( res . wea_day . includes ( "到" ) && res . wea_day . split ( "到" ) . at ( 1 ) ) ||
32
+ res . wea_day
33
+ : ( res . wea_night . includes ( "到" ) &&
34
+ res . wea_night . split ( "到" ) . at ( 1 ) ) ||
35
+ res . wea_night ;
36
+ // 城市:
37
+ const city = res . city ;
38
+ // 星期数
39
+ const weekList = {
40
+ 星期一 : "痛苦星期一😭" ,
41
+ 星期二 : "折磨星期二😒" ,
42
+ 星期三 : "混沌星期三🙃" ,
43
+ 星期四 : "疯狂星期四🍔" ,
44
+ 星期五 : "摸鱼星期五🐠" ,
45
+ 星期六 : "快乐星期六🐘" ,
46
+ 星期日 : "无忧星期天🦖" ,
47
+ } ;
48
+ const week = weekList [ res . week ] ;
49
+
50
+ document . title = `${ wea } ${ res . tem } °C—${ city } —${ week } ` ;
51
+
52
+ // 图标
53
+ const url = `./assets/images/${ wea } .png` ;
54
+
55
+ const link = document . createElement ( "link" ) ;
56
+ link . setAttribute ( "rel" , "icon" ) ;
57
+ link . setAttribute ( "type" , "image/x-icon" ) ;
58
+ link . setAttribute ( "href" , url ) ;
59
+ document . getElementsByTagName ( "head" ) [ 0 ] . appendChild ( link ) ;
60
+ } ) ;
61
+ </ script >
62
+ < script src ="runtime.642987ce23b566ee.js " type ="module "> </ script > < script src ="polyfills.38dbb63b27271ca5.js " type ="module "> </ script > < script src ="main.04cdf23d4893aa6e.js " type ="module "> </ script >
11
63
12
64
</ body > </ html >
0 commit comments