Compare commits

...

4 Commits

@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:replace="adminCommon::common-header"></head>
<body class="sb-nav-fixed">
<nav th:replace="adminCommon::common-navbar"></nav>
<div id="layoutSidenav">
<div th:replace="adminCommon::common-sidenav"></div>
<div id="layoutSidenav_content">
<main>
<div class="container-fluid px-4">
<h1 class="mt-4">管理员主页</h1>
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item active">主页</li>
</ol>
<div class="row">
<div class="col-xl-3 col-md-6">
<div class="card bg-primary text-white mb-4">
<div class="card-body">健身房总人数</div>
<div class="card-footer d-flex align-items-center justify-content-between">
<span class="small text-white" th:text="${humanTotal} + '人'"></span>
</div>
</div>
</div>
<div class="col-xl-3 col-md-6">
<div class="card bg-success text-white mb-4">
<div class="card-body">用户人数</div>
<div class="card-footer d-flex align-items-center justify-content-between">
<span class="small text-white" th:text="${memberTotal} + '人'"></span>
</div>
</div>
</div>
<div class="col-xl-3 col-md-6">
<div class="card bg-danger text-white mb-4">
<div class="card-body">器材数量</div>
<div class="card-footer d-flex align-items-center justify-content-between">
<span class="small text-white" th:text="${equipmentTotal} + '件'"></span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xl-6">
<div class="card mb-4">
<div class="card-header">
<i class="fas fa-chart-area me-1"></i>
Area Chart Example
</div>
<div class="card-body">
<canvas id="myAreaChart" width="100%" height="40"></canvas>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card mb-4">
<div class="card-header">
<i class="fas fa-chart-bar me-1"></i>
Bar Chart Example
</div>
<div class="card-body">
<canvas id="myBarChart" width="100%" height="40"></canvas>
</div>
</div>
</div>
</div>
</div>
</main>
<footer th:replace="adminCommon::common-footer"></footer>
</div>
</div>
<div th:include="adminCommon::common-scripts"></div>
</body>
</html>

@ -0,0 +1,96 @@
<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:replace="userCommon::common-header"></head>
<body class="sb-nav-fixed">
<nav th:replace="userCommon::common-navbar"></nav>
<div id="layoutSidenav">
<div th:replace="userCommon::common-sidenav"></div>
<div id="layoutSidenav_content">
<main>
<div class="container-fluid px-4">
<h1 class="mt-4">编辑个人信息</h1>
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item"><a th:href="@{/toUserMain}">主页</a></li>
<li class="breadcrumb-item"><a th:href="@{/user/toUserInfo}">个人信息</a></li>
<li class="breadcrumb-item active">编辑个人信息</li>
</ol>
<div class="card mb-4">
<form th:action="@{/user/updateInfo}" method="post" name="updateForm"
onsubmit="return beforeSubmit(this)">
<table class="table table-hover">
<tr>
<td text-align="center">用户账号:</td>
<td><input type="text" class="form-control" readonly="readonly"
th:value="${member.memberAccount}" name="memberAccount">
</td>
</tr>
<tr>
<td text-align="center">姓名:</td>
<td><input type="text" class="form-control" th:value="${member.memberName}"
name="memberName"></td>
</tr>
<tr>
<td text-align="center">密码:</td>
<td><input type="text" class="form-control" th:value="${member.memberPassword}"
name="memberPassword">
</td>
</tr>
<tr>
<td text-align="center">性别:</td>
<td><input type="text" class="form-control" th:value="${member.memberGender}"
name="memberGender">
</td>
</tr>
<tr>
<td text-align="center">年龄:</td>
<td><input type="text" class="form-control" th:value="${member.memberAge}"
name="memberAge">
</td>
</tr>
<tr>
<td text-align="center">联系方式:</td>
<td><input type="text" class="form-control" th:value="${member.memberPhone}"
name="memberPhone">
</td>
</tr>
<tr>
<td text-align="center">身高cm</td>
<td><input type="text" class="form-control" th:value="${member.memberHeight}"
name="memberHeight">
</td>
</tr>
<tr>
<td text-align="center">体重kg</td>
<td><input type="text" class="form-control" th:value="${member.memberWeight}"
name="memberWeight">
</td>
</tr>
</table>
<div style="text-align:center;margin-bottom:15px">
<input type="submit" class="btn btn-outline-success" value="确认修改">
</div>
</form>
</div>
</div>
</main>
<footer th:replace="userCommon::common-footer"></footer>
</div>
</div>
<div th:include="userCommon::common-scripts"></div>
<script type="text/javascript">
function beforeSubmit(updateForm) {
let phone = /^[1][3,4,5,7,8,9][0-9]{9}$/;//设置手机号正则表达式
if (!phone.test(updateForm.memberPhone.value)) {
alert("手机号码错误!");
return false;
}
return true;
}
</script>
</body>
</html>

@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:replace="userCommon::common-header"></head>
<body class="sb-nav-fixed">
<nav th:replace="userCommon::common-navbar"></nav>
<div id="layoutSidenav">
<div th:replace="userCommon::common-sidenav"></div>
<div id="layoutSidenav_content">
<main>
<div class="container-fluid px-4">
<h1 class="mt-4">预约记录</h1>
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item"><a th:href="@{/toUserMain}">主页</a></li>
<li class="breadcrumb-item"><a th:href="@{/user/toUserBook}">预约信息</a></li>
<li class="breadcrumb-item active">预约记录</li>
</ol>
<div class="card mb-4">
<div class="card-header">
<i class="fas fa-table me-1"></i>
预约记录
</div>
<div class="card-body">
<table id="datatablesSimple">
<thead>
<tr>
<th>预约时间</th>
<th>预约号</th>
<th>器材</th>
<th>时间</th>
<th>地点</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr th:each="rec:${recordList}">
<td th:text="${rec.date}">编号</td>
<td th:text="${rec.recordId}">预约号</td>
<td th:text="${rec.recordName}">器材</td>
<td th:text="${rec.recordBegin}">时间</td>
<td th:text="${rec.Location}">地点</td>
<td>
<a th:href="@{/user/delUserRecord(recordId=${rec.recordId})}"
style="text-decoration: none">
<input type="button" class="btn btn-sm btn-outline-danger"
onclick="return del()" value="删除">
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</main>
<footer th:replace="userCommon::common-footer"></footer>
</div>
</div>
<div th:include="userCommon::common-scripts"></div>
<script>
function del() {
let msg = "确定要删除吗?";
if (confirm(msg) == true) {
return true;
} else {
return false;
}
}
</script>
</body>
</html>
Loading…
Cancel
Save