2023-10-27 10:51:01 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<meta name="author" content="flykhan" />
|
|
|
|
<meta name="keywords" content="green house" />
|
|
|
|
<title>首页</title>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
html,
|
2023-10-27 19:58:27 +08:00
|
|
|
body {
|
2023-10-27 10:51:01 +08:00
|
|
|
height: 100%;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
2023-10-27 19:58:27 +08:00
|
|
|
body {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
2023-10-27 10:51:01 +08:00
|
|
|
#top {
|
|
|
|
height: 60px;
|
|
|
|
background-color: rgb(150, 177, 186);
|
|
|
|
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: space-between;
|
|
|
|
justify-items: center;
|
|
|
|
align-items: center;
|
|
|
|
padding: 5px;
|
|
|
|
border-bottom: 1px solid lightgray;
|
|
|
|
}
|
|
|
|
|
|
|
|
#main {
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
2023-10-27 19:58:27 +08:00
|
|
|
/* background-color: lightgoldenrodyellow; */
|
2023-10-27 10:51:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#foot {
|
|
|
|
height: 40px;
|
|
|
|
background-color: lightblue;
|
2023-10-27 19:58:27 +08:00
|
|
|
border-top: 1px solid lightgray;
|
|
|
|
padding: 10px 0;
|
2023-10-27 10:51:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#logo>img {
|
2023-10-27 19:58:27 +08:00
|
|
|
width: 50px;
|
2023-10-27 10:51:01 +08:00
|
|
|
height: 50px;
|
|
|
|
/* width: 5%; */
|
|
|
|
/* height: 5%; */
|
|
|
|
}
|
2023-10-27 19:58:27 +08:00
|
|
|
|
|
|
|
#menu {
|
|
|
|
width: 200px;
|
|
|
|
border-right: 5px solid lightgray;
|
|
|
|
padding: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.menu_item {
|
|
|
|
margin: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
#menu>a {
|
|
|
|
display: block;
|
|
|
|
text-decoration: none;
|
|
|
|
color: rgb(174, 255, 0);
|
|
|
|
padding: 10px 5px;
|
|
|
|
width: 80%;
|
|
|
|
border-radius: 30px;
|
|
|
|
background-color: cornflowerblue;
|
|
|
|
border: 1px solid cornflowerblue;
|
|
|
|
font-size: larger;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
#menu>a:hover {
|
|
|
|
background-color: blue;
|
|
|
|
color: white;
|
|
|
|
font-size: larger;
|
|
|
|
border-radius: 30px;
|
|
|
|
/* border-top-left-radius: 30px; */
|
|
|
|
/* border-top-right-radius: 20px; */
|
|
|
|
/* border-bottom-right-radius: 20px; */
|
|
|
|
width: 80%;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.logout_btn {
|
|
|
|
background-color: cornflowerblue;
|
|
|
|
border: 1px solid cornflowerblue;
|
|
|
|
border-radius: 30px;
|
|
|
|
width: 80px;
|
|
|
|
height: 30px;
|
|
|
|
font-size: larger;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.logout_btn:hover {
|
|
|
|
background-color: blue;
|
|
|
|
color: white;
|
|
|
|
font-size: larger;
|
|
|
|
border-radius: 30px;
|
|
|
|
/* border-top-left-radius: 30px; */
|
|
|
|
/* border-top-right-radius: 20px; */
|
|
|
|
/* border-bottom-right-radius: 20px; */
|
|
|
|
width: 80px;
|
|
|
|
height: 30px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
span {
|
|
|
|
font-size: larger;
|
|
|
|
padding-right: 30px;
|
|
|
|
color: rebeccapurple;
|
|
|
|
}
|
2023-10-27 10:51:01 +08:00
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="top">
|
|
|
|
<div id="logo">
|
|
|
|
<img src="./logo.png" alt="logo" />
|
|
|
|
</div>
|
|
|
|
<div id="user_info">
|
2023-10-27 19:58:27 +08:00
|
|
|
<!-- <span>登录用户</span> -->
|
2023-10-27 10:51:01 +08:00
|
|
|
<span id="userName"></span>
|
|
|
|
<!-- <span class="logout" onclick="logout()">登出</span> -->
|
2023-10-27 19:58:27 +08:00
|
|
|
<input class="logout_btn" type="button" value="登出" onclick="logout()" />
|
2023-10-27 10:51:01 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="main">
|
|
|
|
<div id="menu">
|
2023-10-27 19:58:27 +08:00
|
|
|
<a href="./green_house_info_show.html" target="content_frame" class="menu_item">大棚温湿度</a>
|
|
|
|
<a href="./green_house_settings.html" target="content_frame" class="menu_item">大棚控制</a>
|
|
|
|
<a href="./record_of_operations_history.html" target="content_frame" class="menu_item">历史操作</a>
|
|
|
|
</div>
|
|
|
|
<div id="content" style="width:100%;">
|
|
|
|
<iframe name="content_frame" width="100%" height="100%" scrolling="auto"></iframe>
|
2023-10-27 10:51:01 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="foot" style="text-align: center; ">
|
|
|
|
<b>版本所有@FLY-NOOB</b>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
window.onload = function () {
|
|
|
|
if (localStorage.getItem("login_user") == null) {
|
|
|
|
open("./login.html", "_self");
|
2023-10-27 19:58:27 +08:00
|
|
|
} else {
|
2023-10-27 10:51:01 +08:00
|
|
|
let login_user_str = localStorage.getItem("login_user");
|
|
|
|
let login_user = JSON.parse(login_user_str);
|
|
|
|
userName.innerText = login_user.login_user_name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function logout() {
|
|
|
|
localStorage.clear();
|
|
|
|
open("./login.html", "_self");
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|