283 lines
11 KiB
PHP
283 lines
11 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="vi">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Tra Cứu Lượt Click & Hoa Hồng - Shopee Affiliate</title>
|
|
<!-- Fonts & Icons -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.min.css">
|
|
|
|
<style>
|
|
:root {
|
|
--bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
|
|
--accent-primary: #8b5cf6;
|
|
--accent-secondary: #ec4899;
|
|
--glass-bg: rgba(255, 255, 255, 0.03);
|
|
--glass-border: rgba(255, 255, 255, 0.08);
|
|
--text-main: #f8fafc;
|
|
--text-muted: #94a3b8;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Inter', sans-serif;
|
|
background: var(--bg-gradient);
|
|
min-height: 100vh;
|
|
color: var(--text-main);
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
overflow-x: hidden;
|
|
position: relative;
|
|
padding: 40px 0;
|
|
}
|
|
|
|
.blur-sphere-1 {
|
|
position: absolute;
|
|
width: 400px;
|
|
height: 400px;
|
|
background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(0,0,0,0) 70%);
|
|
top: -100px;
|
|
left: -100px;
|
|
z-index: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.blur-sphere-2 {
|
|
position: absolute;
|
|
width: 450px;
|
|
height: 450px;
|
|
background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, rgba(0,0,0,0) 70%);
|
|
bottom: -150px;
|
|
right: -100px;
|
|
z-index: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.container {
|
|
position: relative;
|
|
z-index: 10;
|
|
max-width: 800px;
|
|
}
|
|
|
|
.brand-logo {
|
|
text-align: center;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.brand-logo i {
|
|
font-size: 2.5rem;
|
|
background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
display: inline-block;
|
|
margin-bottom: 0.5rem;
|
|
filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
|
|
}
|
|
|
|
.brand-title {
|
|
font-size: 1.85rem;
|
|
font-weight: 800;
|
|
letter-spacing: -0.025em;
|
|
background: linear-gradient(to right, #ffffff, #c084fc);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
.glass-card {
|
|
background: var(--glass-bg);
|
|
backdrop-filter: blur(16px);
|
|
-webkit-backdrop-filter: blur(16px);
|
|
border: 1px solid var(--glass-border);
|
|
border-radius: 24px;
|
|
padding: 2.5rem;
|
|
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
|
|
width: 100%;
|
|
}
|
|
|
|
.form-control-custom {
|
|
background: rgba(15, 23, 42, 0.6);
|
|
border: 1px solid var(--glass-border);
|
|
border-radius: 14px;
|
|
color: var(--text-main);
|
|
padding: 0.85rem 1.25rem;
|
|
font-size: 1rem;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.form-control-custom:focus {
|
|
background: rgba(15, 23, 42, 0.8);
|
|
border-color: var(--accent-primary);
|
|
box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.btn-custom {
|
|
background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
|
|
border: none;
|
|
border-radius: 14px;
|
|
color: #ffffff;
|
|
font-weight: 600;
|
|
padding: 0.85rem 1.5rem;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.btn-custom:hover {
|
|
transform: translateY(-1px);
|
|
background: linear-gradient(135deg, #9333ea, #6d28d9);
|
|
}
|
|
|
|
.stat-card {
|
|
background: rgba(255, 255, 255, 0.02);
|
|
border: 1px solid var(--glass-border);
|
|
border-radius: 16px;
|
|
padding: 1.25rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-val {
|
|
font-size: 1.5rem;
|
|
font-weight: 800;
|
|
color: #34d399;
|
|
}
|
|
|
|
.table-custom {
|
|
color: var(--text-main);
|
|
border-color: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.table-custom th {
|
|
color: var(--text-muted);
|
|
font-weight: 600;
|
|
font-size: 0.85rem;
|
|
text-transform: uppercase;
|
|
border-bottom-width: 2px;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.table-custom td {
|
|
padding: 1rem;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
footer {
|
|
margin-top: 3rem;
|
|
color: #4b5563;
|
|
font-size: 0.85rem;
|
|
text-align: center;
|
|
z-index: 10;
|
|
}
|
|
|
|
footer a {
|
|
color: var(--text-muted);
|
|
text-decoration: none;
|
|
}
|
|
|
|
footer a:hover {
|
|
color: #ffffff;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="blur-sphere-1"></div>
|
|
<div class="blur-sphere-2"></div>
|
|
|
|
<div class="container">
|
|
<div class="brand-logo">
|
|
<i class="bi bi-person-badge-fill"></i>
|
|
<h1 class="brand-title">Tra Cứu Kết Quả Affiliate</h1>
|
|
<p class="text-muted small">Nhập số điện thoại để theo dõi hiệu suất lượt click & hoa hồng ước tính</p>
|
|
</div>
|
|
|
|
<div class="glass-card">
|
|
<!-- Search Form -->
|
|
<form action="{{ route('customer_lookup.search') }}" method="GET" class="mb-4">
|
|
<div class="d-flex flex-column flex-sm-row gap-3">
|
|
<input type="text" name="phone" class="form-control form-control-custom flex-grow-1"
|
|
placeholder="Nhập số điện thoại đăng ký (ví dụ: 0987654321)"
|
|
value="{{ $phone ?? '' }}" required autocomplete="off">
|
|
<button type="submit" class="btn btn-custom"><i class="bi bi-search me-1"></i> Tra cứu</button>
|
|
</div>
|
|
</form>
|
|
|
|
@if(isset($searched) && $searched)
|
|
<hr style="border-color: rgba(255, 255, 255, 0.1);" class="my-4">
|
|
|
|
<!-- Summary Stats -->
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-6 col-md-4">
|
|
<div class="stat-card">
|
|
<div class="text-muted small mb-1">Số link đã tạo</div>
|
|
<div class="stat-val text-white">{{ $histories->count() }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-4">
|
|
<div class="stat-card">
|
|
<div class="text-muted small mb-1">Tổng lượt click</div>
|
|
<div class="stat-val text-info">{{ number_format($histories->sum('clicks')) }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-md-4">
|
|
<div class="stat-card">
|
|
<div class="text-muted small mb-1">Hoa hồng ước tính</div>
|
|
<div class="stat-val">~{{ number_format($histories->sum('estimated_commission')) }}đ</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Warning disclaimer -->
|
|
<div class="alert alert-warning border-0 bg-warning bg-opacity-10 text-warning rounded-4 px-4 py-3 mb-4 small" role="alert">
|
|
<i class="bi bi-info-circle-fill me-2"></i>
|
|
<strong>Lưu ý:</strong> Hoa hồng trên đây chỉ là **ước tính tham khảo** dựa trên giá sản phẩm. Số tiền thực tế nhận được phụ thuộc vào đơn hàng mua thành công hợp lệ được Shopee đối soát duyệt chi trả.
|
|
</div>
|
|
|
|
<!-- Result Table -->
|
|
<div class="table-responsive">
|
|
<table class="table table-custom align-middle">
|
|
<thead>
|
|
<tr>
|
|
<th>Thời gian</th>
|
|
<th>Sản phẩm</th>
|
|
<th>Giá bán</th>
|
|
<th>Lượt click</th>
|
|
<th>Hoa hồng ước tính</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($histories as $history)
|
|
<tr>
|
|
<td class="text-nowrap small text-muted">{{ $history->created_at->format('H:i d/m/Y') }}</td>
|
|
<td class="text-truncate fw-semibold" style="max-width: 250px;" title="{{ $history->product_title ?? 'Sản phẩm Shopee' }}">
|
|
{{ $history->product_title ?? 'Sản phẩm Shopee' }}
|
|
</td>
|
|
<td class="text-nowrap">{{ $history->product_price > 0 ? number_format($history->product_price) . 'đ' : '-' }}</td>
|
|
<td class="text-center text-nowrap fw-bold text-info">{{ number_format($history->clicks) }}</td>
|
|
<td class="text-nowrap fw-bold text-success">{{ $history->estimated_commission > 0 ? '~' . number_format($history->estimated_commission) . 'đ' : '-' }}</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="5" class="text-center py-4 text-muted">Không tìm thấy lịch sử tạo link nào cho số điện thoại này.</td>
|
|
</tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="text-center mt-4">
|
|
<a href="{{ route('public_convert.index') }}" class="btn btn-link text-decoration-none small text-muted"><i class="bi bi-arrow-left me-1"></i> Quay lại trang tạo link</a>
|
|
</div>
|
|
</div>
|
|
|
|
<footer>
|
|
© 2026 - Rút Gọn Link Shopee Affiliate.
|
|
</footer>
|
|
</div>
|
|
</body>
|
|
</html>
|