修正天气因为变量导致的错误

This commit is contained in:
1099438829 2021-03-03 17:15:29 +08:00
parent 39177fb9ea
commit fd0e40fd70
2 changed files with 16 additions and 16 deletions

View File

@ -793,24 +793,24 @@ window.Win10 = {
renderCommand: function(today = null) {
let active = $("#win10_command_center .command-body.today").hasClass('active');
if (!active) {
let todayHtml = '';
if (!today) {
let lunarDate = Win10.getLunarObj();
let today = '<div class="command-body-calendar">' +
'<div class="command-body-calendar-date normal-date">' + lunarDate.month + '月' + lunarDate.day + '日 ' +
lunarDate.week + '</div>' +
'<div class="command-body-calendar-date lunar-date">' + lunarDate.ganzhi + '年' + lunarDate.lunarmonth +
lunarDate.lunarday + '</div>' +
'</div>';
today += '<div class="notice">' +
'<div class="notice-header">' +
'<span class="notice-header-icon"><img src="./img/icon/weather.png" class="notice-header-icon-img" /></span>' +
'<span class="notice-header-title">天气</span>' +
'</div>' +
'<div class="notice-body">' +
'<iframe scrolling="no" src="https://tianqiapi.com/api.php?style=tw&skin=pitaya" frameborder="0" width="280" height="500" allowtransparency="true"></iframe>' +
'</div></div>';
todayHtml += '<div class="command-body-calendar">\n' +
' <div class="command-body-calendar-date normal-date">' + lunarDate.month + '月' + lunarDate.day + '日 \n' +lunarDate.week + '</div>\n' +
' <div class="command-body-calendar-date lunar-date">' + lunarDate.ganzhi + '年' + lunarDate.lunarmonth + lunarDate.lunarday + '</div>\n' +
'</div>\n' +
'<div class="notice">' +
' <div class="notice-header">' +
' <span class="notice-header-icon"><img src="./img/icon/weather.png" class="notice-header-icon-img" /></span>\n' +
' <span class="notice-header-title">天气</span>\n' +
' </div>\n' +
' <div class="notice-body">\n' +
' <iframe scrolling="no" src="https://tianqiapi.com/api.php?style=tw&skin=pitaya" frameborder="0" width="280" height="500" allowtransparency="true"></iframe>\n' +
' </div>\n' +
'</div>\n';
}
$("#win10_command_center .command-body.today").html(today).addClass('active');
$("#win10_command_center .command-body.today").html(todayHtml).addClass('active');
}
},
menuOpen: function() {

2
js/mac.min.js vendored

File diff suppressed because one or more lines are too long