You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
rabbitmq-test/templates/index.html

91 lines
2.2 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>商城主页</title>
<style>
body {
text-align: center;
margin-top: 20px;
}
h1 {
font-size: 24px;
color: #333;
}
form {
margin-top: 20px;
}
input[type="number"] {
padding: 10px;
}
button[type="submit"] {
padding: 10px 20px;
background-color: #007bff;
color: #fff;
border: none;
cursor: pointer;
}
button[type="submit"]:hover {
background-color: #0056b3;
}
table {
width: 80%;
margin: 0 auto;
border-collapse: collapse;
border: 2px solid #000;
}
th, td {
border: 1px solid #000;
padding: 10px;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<center>
<h1>祝您购物愉快</h1>
<form action="/" method="post">
请输入采购的商品数量:<input type="number" name="shop">
<button type="submit">点击下单</button>
</form>
</center>
<br>
<table>
<thead>
<tr>
<th>用户编号</th>
<th>用户名称</th>
<th>商品名称</th>
<th>商品金额</th>
<th>收货地址</th>
</tr>
</thead>
<tbody>
{% if items %}
{% for item in items %}
<tr>
{% for k in item %}
<td>{{ k }}</td>
<td>{{ item[k][0] }}</td>
<td>{{ item[k][1] }}</td>
<td>{{ item[k][2] }}</td>
<td>{{ item[k][3] }}</td>
{% endfor %}
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
</body>
</html>