parent
102477a6d6
commit
9be343739d
6 changed files with 281 additions and 48 deletions
@ -0,0 +1,23 @@ |
||||
""" |
||||
URL configuration for myshop_back project. |
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see: |
||||
https://docs.djangoproject.com/en/4.2/topics/http/urls/ |
||||
Examples: |
||||
Function views |
||||
1. Add an import: from my_app import views |
||||
2. Add a URL to urlpatterns: path('', views.home, name='home') |
||||
Class-based views |
||||
1. Add an import: from other_app.views import Home |
||||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') |
||||
Including another URLconf |
||||
1. Import the include() function: from django.urls import include, path |
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) |
||||
""" |
||||
from django.contrib import admin |
||||
from django.urls import path, re_path, include |
||||
from apps.basic import views |
||||
|
||||
urlpatterns = [ |
||||
path('index/', views.index), |
||||
] |
@ -1,3 +1,7 @@ |
||||
from django.shortcuts import render |
||||
|
||||
|
||||
# Create your views here. |
||||
|
||||
def index(request): |
||||
return render(request, 'shop/index.html') |
||||
|
@ -0,0 +1,120 @@ |
||||
{% extends 'shop/base.html' %} |
||||
{% load static %} |
||||
{% block ext_css %} |
||||
{% endblock %} |
||||
{% block content %} |
||||
<div class="content-wrapper"> |
||||
<div class="content-header"> |
||||
<div class="container-fluid"> |
||||
<div class="row mb-2"> |
||||
<div class="col-sm-6"> |
||||
<h1 class="m-0">商城信息</h1> |
||||
<div class="col-sm-6"></div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<section class="content"> |
||||
<div class="container-fluid"> |
||||
<div class="row"> |
||||
<div class="col-lg-4 col-6"> |
||||
<div class="small-box bg-info"> |
||||
<div class="inner"> |
||||
<h3>150</h3> |
||||
<p>新订单</p> |
||||
</div> |
||||
<div class="icon"> |
||||
<i class="ion ion-bag"></i> |
||||
</div> |
||||
<a href="#" class="small-box-footer">更多 <i class="fas fa-arrow-circle-right"></i></a> |
||||
</div> |
||||
</div> |
||||
<div class="col-lg-4 col-6"> |
||||
<div class="small-box bg-success"> |
||||
<div class="inner"> |
||||
<h3>53</h3> |
||||
<p>会员</p> |
||||
</div> |
||||
<div class="icon"> |
||||
<i class="ion ion-stats-bars"></i> |
||||
</div> |
||||
<a href="#" class="small-box-footer">更多 <i class="fas fa-arrow-circle-right"></i></a> |
||||
</div> |
||||
</div> |
||||
<div class="col-lg-4 col-6"> |
||||
<div class="small-box bg-warning"> |
||||
<div class="inner"> |
||||
<h3>44</h3> |
||||
<p>商品数量</p> |
||||
</div> |
||||
<div class="icon"> |
||||
<i class="ion ion-person-add"></i> |
||||
</div> |
||||
<a href="#" class="small-box-footer">更多 <i class="fas fa-arrow-circle-right"></i></a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="row"> |
||||
<section class="col-lg-7 connectedSortable"> |
||||
<div class="card"> |
||||
<div class="card-header"> |
||||
<h3 class="card-title"> |
||||
<i class="fas fa-chart-pie mr-1"></i> |
||||
Sales |
||||
</h3> |
||||
<div class="card-tools"> |
||||
<ul class="nav nav-pills ml-auto"> |
||||
<li class="nav-item"> |
||||
<a class="nav-link active" href="#revenue-chart" |
||||
data-toggle="tab">Area</a> |
||||
</li> |
||||
<li class="nav-item"> |
||||
<a class="nav-link" href="#sales-chart" data-toggle="tab">Donut</a> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="tab-content p-0"> |
||||
<div class="chart tab-pane active" id="revenue-chart" |
||||
style="position: relative; height: 300px;"> |
||||
<canvas id="revenue-chart-canvas" height="300" |
||||
style="height: 300px;"></canvas> |
||||
</div> |
||||
<div class="chart tab-pane" id="sales-chart" |
||||
style="position: relative; height: 300px;"> |
||||
<canvas id="sales-chart-canvas" height="300" |
||||
style="height: 300px;"></canvas> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</section> |
||||
<section class="col-lg-5 connectedSortable"> |
||||
<div class="card bg-gradient-info"> |
||||
<div class="card-header border-0"> |
||||
<h3 class="card-title"> |
||||
<i class="fas fa-th mr-1"></i> |
||||
Sales Graph |
||||
</h3> |
||||
<div class="card-tools"> |
||||
<button type="button" class="btn bg-info btn-sm" data-card-widget="collapse"> |
||||
<i class="fas fa-minus"></i> |
||||
</button> |
||||
<button type="button" class="btn bg-info btn-sm" data-card-widget="remove"> |
||||
<i class="fas fa-times"></i> |
||||
</button> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<canvas class="chart" id="line-chart" |
||||
style="min-height: 250px; height: 250px; max-height: 250px; max-width: 100%;"></canvas> |
||||
</div> |
||||
</div> |
||||
</section> |
||||
</div> |
||||
</div> |
||||
</section> |
||||
</div> |
||||
</div> |
||||
|
||||
{% endblock %} |
Loading…
Reference in new issue