2023-10-24 15:02:42 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
2023-10-24 15:11:37 +08:00
|
|
|
<title>主页面</title>
|
2023-10-24 15:02:42 +08:00
|
|
|
<style>
|
|
|
|
* {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
html,
|
|
|
|
body {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
2023-10-24 15:11:37 +08:00
|
|
|
.container {
|
2023-10-24 15:02:42 +08:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="top">
|
|
|
|
<div id="logo">
|
|
|
|
<img src="/logo.png" height="50px">
|
|
|
|
</div>
|
|
|
|
<div id="user_info"><span id="userName"></span>
|
|
|
|
<span class="logout" onclick="logout()">[登出]</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-10-24 15:11:37 +08:00
|
|
|
<div id="menu">
|
|
|
|
<h3>功能</h3>
|
|
|
|
<a href="green_house_info.html" target="content_frame" class="menu_item">大棚</a>
|
|
|
|
<a href="record_of_operations_history.html" target="content_frame" class="menu_item">历史操作</a>
|
|
|
|
</div>
|
|
|
|
<div class="container">
|
|
|
|
<iframe name="content_frame" id="info-frame" width="100%" height="100%"></iframe>
|
|
|
|
</div>
|
2023-10-24 15:02:42 +08:00
|
|
|
</div>
|
|
|
|
<div id="foot" style="text-align: botton;">
|
|
|
|
<b>版本所有@FLY-NOOB</b>
|
2023-10-24 15:11:37 +08:00
|
|
|
</div>
|
|
|
|
|
2023-10-24 15:02:42 +08:00
|
|
|
</body>
|
2023-10-25 14:04:49 +08:00
|
|
|
<script>
|
|
|
|
window.onload = function () {
|
|
|
|
if (localStorage.getItem("login_user") == null) {
|
|
|
|
open("/login.html", "_self");
|
|
|
|
} else {
|
|
|
|
let login_user_str = localStorage.getItem("login_user");
|
|
|
|
let login_user = JSON.parse(login_user_str);
|
|
|
|
userName.innerText = login_user.nickname;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function logout() {
|
|
|
|
localStorage.clear();
|
|
|
|
open("/login.html", "_self");
|
|
|
|
}
|
|
|
|
</script>
|
2023-10-24 15:02:42 +08:00
|
|
|
|
|
|
|
</html>
|