检查系统更新提示优化

This commit is contained in:
Devil 2021-07-29 15:05:53 +08:00
parent d9338f56d7
commit b2fce50190

View File

@ -281,40 +281,49 @@ $(function()
{
// html内容处理
// 基础信息
var html = '<p class="upgrade-title">';
html += '<i class="am-icon-info-circle am-icon-md am-text-warning"></i>';
html += '<span class="am-margin-left-xs">'+result.data.title+'</span>';
html += '</p>';
html += '<div class="am-alert upgrade-base">';
html += '<span class="upgrade-ver">更新版本:'+result.data.version_new+'</span>';
html += '<span class="upgrade-date am-margin-left-sm">更新日期:'+result.data.add_time+'</span>';
// 是否带指定链接和链接名称
if((result.data.go_title || null) != null && (result.data.go_url || null) != null)
{
html += '<a href="'+result.data.go_url+'" class="upgrade-go-detail am-margin-left-lg" target="_blank">'+result.data.go_title+'</a>';
}
html += '</div>';
// 提示信息
if((result.data.tips || null) != null)
{
html += '<div class="am-alert am-alert-danger">';
html += '<p class="am-text-danger">'+result.data.tips+'</p>';
html += '</div>';
}
// 更新内容介绍
if((result.data.content || null) != null && result.data.content.length > 0)
{
html += '<div class="am-alert am-alert-secondary upgrade-content-item">';
html += '<ul>';
for(var i in result.data.content)
// 是否存在数据、网络不通将返回空数据
if((result.data || null) != null)
{
var html = '<p class="upgrade-title">';
html += '<i class="am-icon-info-circle am-icon-md am-text-warning"></i>';
html += '<span class="am-margin-left-xs">'+result.data.title+'</span>';
html += '</p>';
html += '<div class="am-alert upgrade-base">';
html += '<span class="upgrade-ver">更新版本:'+result.data.version_new+'</span>';
html += '<span class="upgrade-date am-margin-left-sm">更新日期:'+result.data.add_time+'</span>';
// 是否带指定链接和链接名称
if((result.data.go_title || null) != null && (result.data.go_url || null) != null)
{
html += '<li>'+result.data.content[i]+'</li>';
html += '<a href="'+result.data.go_url+'" class="upgrade-go-detail am-margin-left-lg" target="_blank">'+result.data.go_title+'</a>';
}
html += '</ul>';
html += '</div>';
}
// 提示信息
if((result.data.tips || null) != null)
{
html += '<div class="am-alert am-alert-danger">';
html += '<p class="am-text-danger">'+result.data.tips+'</p>';
html += '</div>';
}
// 更新内容介绍
if((result.data.content || null) != null && result.data.content.length > 0)
{
html += '<div class="am-alert am-alert-secondary upgrade-content-item">';
html += '<ul>';
for(var i in result.data.content)
{
html += '<li>'+result.data.content[i]+'</li>';
}
html += '</ul>';
html += '</div>';
}
} else {
var html = '<p class="upgrade-title am-text-center am-margin-top-xl am-padding-top-xl">';
html += '<i class="am-icon-info-circle am-icon-md am-text-warning"></i>';
html += '<span class="am-margin-left-xs">'+result.msg+'</span>';
html += '</p>';
}
$inspect_upgrade_popup.find('.upgrade-content').html(html);
// 是否支持在线自动更新