init: 微信支付 Native 页面 (Express + JSON 存储)
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>订单记录</title>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>📋 订单记录</h1>
|
||||
<div class="orders-card">
|
||||
<% if (orders.length === 0) { %>
|
||||
<p class="empty">暂无订单</p>
|
||||
<% } else { %>
|
||||
<table class="orders-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>订单号</th>
|
||||
<th>商品</th>
|
||||
<th>金额</th>
|
||||
<th>状态</th>
|
||||
<th>时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% orders.forEach(order => { %>
|
||||
<tr>
|
||||
<td class="order-id" title="<%= order.orderId %>"><%= order.orderId.substring(0, 12) %>...</td>
|
||||
<td><%= order.productName %></td>
|
||||
<td>¥ <%= (order.totalFee / 100).toFixed(2) %></td>
|
||||
<td>
|
||||
<% const statusMap = { CREATING: '创建中', PENDING: '待支付', SUCCESS: '已支付', FAILED: '失败' }; %>
|
||||
<span class="badge badge-<%= order.status.toLowerCase() %>"><%= statusMap[order.status] || order.status %></span>
|
||||
</td>
|
||||
<td><%= new Date(order.createdAt).toLocaleString() %></td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% } %>
|
||||
</div>
|
||||
<a href="/" class="btn nav-btn">← 返回首页</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user