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

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

2
js/mac.min.js vendored

File diff suppressed because one or more lines are too long