159 lines
4.2 KiB
HTML
159 lines
4.2 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>支付成功 - USDT商城</title>
|
||
<link rel="stylesheet" href="/css/style.css">
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<div class="success-page">
|
||
<div class="success-icon">
|
||
<div class="checkmark">✓</div>
|
||
</div>
|
||
<h1>支付成功!</h1>
|
||
<p>感谢您的购买,我们已收到您的USDT支付</p>
|
||
|
||
<div class="order-details" id="orderDetails">
|
||
<h3>订单详情</h3>
|
||
<div class="detail-item">
|
||
<span>订单号:</span>
|
||
<span id="orderId">-</span>
|
||
</div>
|
||
<div class="detail-item">
|
||
<span>支付状态:</span>
|
||
<span class="status-success">已完成</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="actions">
|
||
<button onclick="window.location.href='/'" class="btn-primary">继续购物</button>
|
||
<button onclick="checkOrderStatus()" class="btn-secondary">查看订单状态</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
// 获取URL参数
|
||
const urlParams = new URLSearchParams(window.location.search);
|
||
const orderId = urlParams.get('order_id');
|
||
|
||
if (orderId) {
|
||
document.getElementById('orderId').textContent = orderId;
|
||
}
|
||
|
||
function checkOrderStatus() {
|
||
if (orderId) {
|
||
fetch(`/api/orders/${orderId}`)
|
||
.then(response => response.json())
|
||
.then(data => {
|
||
alert(`订单状态:${data.payment_status}`);
|
||
})
|
||
.catch(error => {
|
||
console.error('Error:', error);
|
||
alert('查询失败');
|
||
});
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style>
|
||
.success-page {
|
||
text-align: center;
|
||
max-width: 500px;
|
||
margin: 100px auto;
|
||
padding: 40px;
|
||
background: white;
|
||
border-radius: 15px;
|
||
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
|
||
}
|
||
|
||
.success-icon {
|
||
width: 100px;
|
||
height: 100px;
|
||
margin: 0 auto 30px;
|
||
background: #27ae60;
|
||
border-radius: 50%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.checkmark {
|
||
color: white;
|
||
font-size: 60px;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.success-page h1 {
|
||
color: #27ae60;
|
||
margin-bottom: 15px;
|
||
}
|
||
|
||
.success-page p {
|
||
color: #7f8c8d;
|
||
margin-bottom: 30px;
|
||
}
|
||
|
||
.order-details {
|
||
background: #f8f9fa;
|
||
padding: 20px;
|
||
border-radius: 10px;
|
||
margin-bottom: 30px;
|
||
text-align: left;
|
||
}
|
||
|
||
.order-details h3 {
|
||
margin-bottom: 15px;
|
||
color: #2c3e50;
|
||
}
|
||
|
||
.detail-item {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
margin-bottom: 10px;
|
||
padding: 8px 0;
|
||
border-bottom: 1px solid #e0e6ed;
|
||
}
|
||
|
||
.status-success {
|
||
color: #27ae60;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.actions {
|
||
display: flex;
|
||
gap: 15px;
|
||
justify-content: center;
|
||
}
|
||
|
||
.btn-primary, .btn-secondary {
|
||
padding: 12px 24px;
|
||
border: none;
|
||
border-radius: 8px;
|
||
font-size: 16px;
|
||
cursor: pointer;
|
||
transition: all 0.3s;
|
||
}
|
||
|
||
.btn-primary {
|
||
background: #667eea;
|
||
color: white;
|
||
}
|
||
|
||
.btn-primary:hover {
|
||
background: #5a67d8;
|
||
}
|
||
|
||
.btn-secondary {
|
||
background: #e0e6ed;
|
||
color: #2c3e50;
|
||
}
|
||
|
||
.btn-secondary:hover {
|
||
background: #d1d9e0;
|
||
}
|
||
</style>
|
||
</body>
|
||
</html> |