|
|
@@ -81,7 +81,7 @@ |
|
|
|
<div class="col-md-6 mt-3">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
Dede商业服务
|
|
|
|
Dede商业服务授权
|
|
|
|
</div>
|
|
|
|
<!--/.card-header-->
|
|
|
|
<div class="card-body" id="_systeminfo">
|
|
|
@@ -401,33 +401,79 @@ |
|
|
|
$.get("index_body.php?dopost=system_info", function (data) {
|
|
|
|
let rsp = JSON.parse(data);
|
|
|
|
if (rsp.code === 200) {
|
|
|
|
$("#_systeminfo").html(`
|
|
|
|
<table width="100%" class="table table-borderless">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td class="nline" style="text-align:left"> 运行时间: </td>
|
|
|
|
<td class="nline" style="text-align:left"> ${rsp.result.server_run_time} </td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="nline" style="text-align:left"> 系统: </td>
|
|
|
|
<td class="nline" style="text-align:left"> ${rsp.result.server_goos}(${rsp.result.server_goarch})</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="nline" style="text-align:left"> 版本号: </td>
|
|
|
|
<td class="nline" style="text-align:left"> v${rsp.result.server_version} </td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="nline" style="text-align:left"> 内存使用: </td>
|
|
|
|
<td class="nline" style="text-align:left">
|
|
|
|
<div class="progress-bar bg-success" role="progressbar" style="width: ${rsp.result.server_memory_usage}%;" aria-valuenow="${rsp.result.server_memory_usage}" aria-valuemin="0" aria-valuemax="100">${rsp.result.server_memory_usage}%</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody></table>
|
|
|
|
`);
|
|
|
|
let infoStr = `<table width="100%" class="table table-borderless"><tbody>`;
|
|
|
|
if (typeof rsp.result.domain !== "undefined") {
|
|
|
|
infoStr += `
|
|
|
|
<tr>
|
|
|
|
<td class="nline" style="text-align:left"> 授权域名: </td>
|
|
|
|
<td class="nline" style="text-align:left"> ${rsp.result.domain} <a href="https://www.dedebiz.com/auth/?domain=${rsp.result.domain}"><b>【查看】</b></a> </td>
|
|
|
|
</tr>
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
if (typeof rsp.result.title !== "undefined") {
|
|
|
|
infoStr += `
|
|
|
|
<tr>
|
|
|
|
<td class="nline" style="text-align:left"> 站点名称: </td>
|
|
|
|
<td class="nline" style="text-align:left"> ${rsp.result.title} </td>
|
|
|
|
</tr>
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
if (typeof rsp.result.stype !== "undefined") {
|
|
|
|
infoStr += `
|
|
|
|
<tr>
|
|
|
|
<td class="nline" style="text-align:left"> 站点类型: </td>
|
|
|
|
<td class="nline" style="text-align:left"> ${rsp.result.stype} </td>
|
|
|
|
</tr>
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
if (typeof rsp.result.auth_version !== "undefined") {
|
|
|
|
infoStr += `
|
|
|
|
<tr>
|
|
|
|
<td class="nline" style="text-align:left"> 授权版本: </td>
|
|
|
|
<td class="nline" style="text-align:left"> v${rsp.result.auth_version}.x.x </td>
|
|
|
|
</tr>
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
if (typeof rsp.result.auth_at !== "undefined") {
|
|
|
|
infoStr += `
|
|
|
|
<tr>
|
|
|
|
<td class="nline" style="text-align:left"> 授权时间: </td>
|
|
|
|
<td class="nline" style="text-align:left"> ${rsp.result.auth_at} </td>
|
|
|
|
</tr>
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof rsp.result.server_run_time === "undefined") {
|
|
|
|
// 下面是DedeBIZ Core组件信息
|
|
|
|
infoStr += `
|
|
|
|
<tr>
|
|
|
|
<td class="nline" style="text-align:left"> Dede商业组件: </td>
|
|
|
|
<td class="nline" style="text-align:left"> <a class="btn btn-danger btn-sm" target="_blank" href="https://www.dedebiz.com/start?code=-1008">如何启动组件</a> </td>
|
|
|
|
</tr>
|
|
|
|
`;
|
|
|
|
} else {
|
|
|
|
// 下面是DedeBIZ Core组件信息
|
|
|
|
if (typeof rsp.result.server_run_time !== "undefined") {
|
|
|
|
infoStr += `
|
|
|
|
<tr>
|
|
|
|
<td class="nline" style="text-align:left"> 运行时间: </td>
|
|
|
|
<td class="nline" style="text-align:left"> ${rsp.result.server_run_time} </td>
|
|
|
|
</tr>
|
|
|
|
`;
|
|
|
|
} else {
|
|
|
|
// 商业组件信息
|
|
|
|
}
|
|
|
|
}
|
|
|
|
infoStr += "</tbody></table>";
|
|
|
|
|
|
|
|
$("#_systeminfo").html(infoStr);
|
|
|
|
} else {
|
|
|
|
$("#_systeminfo").html(`尚未启动Dede商业站点服务,<a class="btn btn-danger">去开启</a>`);
|
|
|
|
$("#_systeminfo").html(`
|
|
|
|
<div class="py-1">尚未启动Dede商业站点服务,原因:<b>${rsp.msg}</b></div>
|
|
|
|
<div class="py-1">Dede商业服务可以提升性能、增强安全、支持开源。</div>
|
|
|
|
<div class="py-1"><a class="btn btn-danger" target="_blank" href="https://www.dedebiz.com/start?code=${rsp.code}">开启商业服务</a></div>
|
|
|
|
`);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
@@ -435,7 +481,7 @@ |
|
|
|
LoadServer();
|
|
|
|
setInterval(function () {
|
|
|
|
LoadServer();
|
|
|
|
}, 1000)
|
|
|
|
}, 5000)
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|