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.

319 lines
11 KiB

6 months ago
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>{% block title %}首页{% endblock %}</title>
<meta content="" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="/static/img/favicon.png" rel="icon">
<link href="/static/img/apple-touch-icon.png" rel="apple-touch-icon">
<link href="/static/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="/static/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="/static/vendor/quill/quill.snow.css" rel="stylesheet">
<link href="/static/vendor/quill/quill.bubble.css" rel="stylesheet">
<link href="/static/vendor/remixicon/remixicon.css" rel="stylesheet">
<link href="/static/vendor/simple-datatables/style.css" rel="stylesheet">
<link href="/static/css/style.css" rel="stylesheet">
</head>
<body>
<!-- ======= Header ======= -->
<header id="header" class="header fixed-top d-flex align-items-center">
<div class="d-flex align-items-center justify-content-between">
<a href="{% url 'index' %}" class="logo d-flex align-items-center">
<img src="/static/img/logo.png" alt="">
<span class="d-none d-lg-block">ShineShe旅游系统</span>
</a>
<i class="bi bi-list toggle-sidebar-btn"></i>
</div><!-- End Logo -->
<nav class="header-nav ms-auto">
<ul class="d-flex align-items-center">
<li class="nav-item dropdown pe-3">
<a class="nav-link nav-profile d-flex align-items-center pe-0" href="#" data-bs-toggle="dropdown">
<img src="/media/{{ userInfo.avatar }}" alt="Profile" class="rounded-circle"><!-- 修改头像 -->
<span class="d-none d-md-block dropdown-toggle ps-2">{{ userInfo.username }}</span>
</a><!-- End Profile Iamge Icon -->
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow profile">
<li class="dropdown-header">
<h6>{{ userInfo.username }}</h6>
<span>{{ userInfo.textarea }}</span>
</li>
<li>
<hr class="dropdown-divider">
</li>
<li>
<a class="dropdown-item d-flex align-items-center" href="#">
<i class="bi bi-person"></i>
<span>个人简介</span>
</a>
</li>
<li>
<a class="dropdown-item d-flex align-items-center" href="{% url 'logOut' %}">
<i class="bi bi-box-arrow-right"></i>
<span>注销账户</span>
</a>
</li>
</ul><!-- End Profile Dropdown Items -->
</li><!-- End Profile Nav -->
</ul>
</nav><!-- End Icons Navigation -->
</header><!-- End Header -->
<!-- ======= Sidebar ======= -->
{% block sidebar %}
<aside id="sidebar" class="sidebar">
<ul class="sidebar-nav" id="sidebar-nav">
<li class="nav-item">
<a class="nav-link " href="{% url 'index' %}">
<span>首页</span>
</a>
</li>
<li class="nav-heading">个人中心</li>
<li class="nav-item">
<a class="nav-link collapsed" href="{% url 'changeSelfInfo' %}">
<span>修改信息</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link collapsed" href="{% url 'changePassword' %}">
<span>修改密码</span>
</a>
</li>
<li class="nav-heading">购票中心</li>
<li class="nav-item">
<a class="nav-link collapsed" href="{% url 'saleTicket' %}">
<span>购票</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link collapsed" href="{% url 'saleTicketInfo' %}">
<span>购票详情</span>
</a>
</li>
</ul>
</aside>
{% endblock sidebar %}
<!-- End Sidebar-->
<main id="main" class="main">
{% block content %}
<div class="pagetitle" style="display:flex;align-items:center">
<div style="margin-right:auto">
<h1>首页</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'index' %}">首页</a></li>
<li class="breadcrumb-item active">首页</li>
</ol>
</nav>
</div>
<h5>
{{ nowTime.year}}-{{ nowTime.mon}}-{{ nowTime.day}}
</h5>
</div><!-- End Page Title -->
<section class="section dashboard">
<div class="row">
<div class="col-lg-8">
<div class="row">
<!-- 5A级景点的个数 -->
<div class="col-xxl-4 col-md-6">
<div class="card info-card sales-card">
<div class="card-body">
<h5 class="card-title">5A级景点的个数</h5>
<div class="d-flex align-items-center">
<div class="ps-3">
<h6>{{ A5Len }}</h6>
</div>
</div>
</div>
</div>
</div><!-- End Sales Card -->
<!-- 评论最多的景区 -->
<div class="col-xxl-4 col-md-6">
<div class="card info-card revenue-card">
<div class="card-body">
<h5 class="card-title">评论最多的景区</span></h5>
<div class="d-flex align-items-center">
<div class="ps-3">
<h6>{{ commentsLenTitle }}</h6>
</div>
</div>
</div>
</div>
</div><!-- End Revenue Card -->
<!-- 景点最多的地方 -->
<div class="col-xxl-4 col-xl-12">
<div class="card info-card customers-card">
<div class="card-body">
<h5 class="card-title">景点最多的地方</h5>
<div class="d-flex align-items-center">
<div class="ps-3">
<h6>{{ provienceDicSort }}</h6>
</div>
</div>
</div>
</div>
</div><!-- End Customers Card -->
<!-- 销量前十 -->
<div class="col-12">
<div class="card recent-sales overflow-auto">
<div class="card-body">
<h5 class="card-title">销量前十 <span>| 景点</span></h5>
<table class="table table-borderless">
<thead>
<tr>
<th scope="col">id</th>
<th scope="col">景区名称</th>
<th scope="col">景区等级</th>
<th scope="col">景区地点</th>
<th scope="col">景区评分</th>
<th scope="col">价格</th>
<th scope="col">月销量</th>
<th scope="col">图片</th>
</tr>
</thead>
<tbody>
{% for i in saleCountTop10 %}
<tr>
<th scope="row"><a href="#">{{ i.id }}</a></th>
<td>{{ i.title }}</td>
<td><a href="#" class="text-primary">{{ i.level }}</a></td>
<td><a href="#" class="text-dark">{{ i.province }}</a></td>
<td><span class="badge bg-success">{{ i.score }}分</span></td>
<td><span class="text-danger">{{ i.price }}</span></td>
<td><span class="text-primary">{{ i.saleCount }}</span></td>
<td>
<a href="{{ i.detailUrl }}"></a>
<a href="{% url 'saleTicket' %}"><img style="width:100%;height:120px;" src="{{ i.cover }}" /></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div><!-- End Recent Sales -->
</div>
</div><!-- End Left side columns -->
<!-- -->
<div class="col-lg-4">
<!-- start评分排名前十 -->
<div class="card">
<div class="card-body">
<h5 class="card-title">评分排名前十<span>| 景点</span></h5>
<div class="activity">
{% for travel in scoreTop10Data %}
<div class="activity-item d-flex" style="margin-bottom:5px;">
<a href="{% url 'saleTicket' %}">
<img style="width:120px;height:96.5px;object-fit:cover;margin-right:5px;" src="{{ travel.cover }}" alt="">
</a>
<div class="activite-label">
{{ travel.title }}
</div>
<i class='bi bi-circle-fill activity-badge text-danger align-self-start'></i>
<div class="activity-content">
{{ travel.detailAddress }} <a href="#" style="margin-left:5px;color:orange!important;" class="fw-bold text-dark">评分:{{ travel.score }}</a>
</div>
</div><!-- 运用一个循环显示10条数据 -->
{% endfor %}
</div>
</div>
</div><!-- End 评分排名前十 -->
</div>
</div>
</section>
{% endblock %}
</main><!-- End #main -->
<!-- ======= Footer ======= -->
<footer id="footer" class="footer">
<div class="copyright">
Shineshe旅游推荐系统
</div>
</footer><!-- End Footer -->
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
<script src="/static/china.js"></script>
<script src="/static/echarts.min.js"></script>
{% block echarts%}
<script>
</script>
{% endblock %}
<script src="/static/vendor/apexcharts/apexcharts.min.js"></script>
<script src="/static/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/static/vendor/chart.js/chart.min.js"></script>
<script src="/static/vendor/echarts/echarts.min.js"></script>
<script src="/static/vendor/quill/quill.min.js"></script>
<script src="/static/vendor/simple-datatables/simple-datatables.js"></script>
<script src="/static/vendor/tinymce/tinymce.min.js"></script>
<script src="/static/vendor/php-email-form/validate.js"></script>
<script src="/static/js/main.js"></script>
</body>
</html>