forked from bot/app
commit
b6871ea13a
@ -94,7 +94,8 @@ async def get_weather_now_card(matcher: Matcher, event: T_MessageEvent, keyword:
|
||||
"weatherHourly": weather_hourly,
|
||||
"aqi" : aqi,
|
||||
"location" : location_data.dump(),
|
||||
"localization" : get_local_data(ulang.lang_code)
|
||||
"localization" : get_local_data(ulang.lang_code),
|
||||
"is_dev": 1 if is_dev else 0
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -34,7 +34,13 @@ if ("aqi" in aqi) {
|
||||
if (item["defaultLocalAqi"]) {
|
||||
document.getElementById("aqi-data").innerText = "AQI " + item["valueDisplay"] + " " + item["category"]
|
||||
// 将(255,255,255)这种格式的颜色设置给css
|
||||
document.getElementById("aqi-dot").style.backgroundColor = "rgb(" + item["color"] + ")"
|
||||
if(is_dev == 1){
|
||||
//开发版
|
||||
document.getElementById("aqi-dot").style.backgroundColor = "rgb(" + item["color"]['red'] + "," + item["color"]['green'] + "," + item["color"]['blue'] + "," + item["color"]['alpha'] + ")"
|
||||
}else{
|
||||
//正式版
|
||||
document.getElementById("aqi-dot").style.backgroundColor = "rgb(" + item["color"] + ")"
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user