mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-23 03:17:37 +08:00
Add Dev judgment
This commit is contained in:
parent
c29a3fd6d4
commit
25f7540f86
@ -34,9 +34,15 @@ if ("aqi" in aqi) {
|
|||||||
if (item["defaultLocalAqi"]) {
|
if (item["defaultLocalAqi"]) {
|
||||||
document.getElementById("aqi-data").innerText = "AQI " + item["valueDisplay"] + " " + item["category"]
|
document.getElementById("aqi-data").innerText = "AQI " + item["valueDisplay"] + " " + item["category"]
|
||||||
// 将(255,255,255)这种格式的颜色设置给css
|
// 将(255,255,255)这种格式的颜色设置给css
|
||||||
|
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"] + ")"
|
document.getElementById("aqi-dot").style.backgroundColor = "rgb(" + item["color"] + ")"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("aqi-dot").style.backgroundColor = '#fff'
|
document.getElementById("aqi-dot").style.backgroundColor = '#fff'
|
||||||
|
Loading…
Reference in New Issue
Block a user