Commit 457a8a92 by 孙贺洋

初始提交

parents
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="FacetManager">
<facet type="django" name="Django">
<configuration>
<option name="rootFolder" value="$MODULE_DIR$" />
<option name="settingsModule" value="TYUT_Lost_Found/settings.py" />
<option name="manageScript" value="$MODULE_DIR$/manage.py" />
<option name="environment" value="&lt;map/&gt;" />
<option name="doNotUseTestRunner" value="false" />
<option name="trackFilePattern" value="migrations" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/Lost_Found/templates" />
</list>
</option>
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/TYUT_Lost_Found.iml" filepath="$PROJECT_DIR$/.idea/TYUT_Lost_Found.iml" />
</modules>
</component>
</project>
\ No newline at end of file
from django.contrib import admin
from .models import Users,Object_hunting,Recruitment
# Register your models here.
admin.site.register(Users)
admin.site.register(Object_hunting)
admin.site.register(Recruitment)
\ No newline at end of file
from django.apps import AppConfig
class LostFoundConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'Lost_Found'
# Generated by Django 3.2.12 on 2022-02-22 16:05
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Users',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('user_name', models.CharField(max_length=45)),
('user_id', models.CharField(max_length=20)),
('user_tel', models.CharField(default='', max_length=25)),
('user_password', models.CharField(max_length=100)),
('user_toxiang', models.ImageField(default='', upload_to='img')),
],
),
migrations.CreateModel(
name='Recruitment',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('r_name', models.CharField(max_length=50)),
('r_classification', models.CharField(max_length=20)),
('r_detail', models.CharField(default='主人没有留下哦!', max_length=300)),
('r_date', models.IntegerField(default=0)),
('r_place', models.CharField(default='主人没有留下哦!', max_length=200)),
('r_contact_details', models.CharField(max_length=50)),
('r_publish_time', models.DateTimeField(auto_now_add=True)),
('o_piicture', models.ImageField(default='https://tse4-mm.cn.bing.net/th/ id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1', height_field=400, upload_to='img', width_field=400)),
('users', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Lost_Found.users')),
],
),
migrations.CreateModel(
name='Object_hunting',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('o_name', models.CharField(max_length=50)),
('o_classification', models.CharField(max_length=20)),
('o_detail', models.CharField(default='主人没有留下哦!', max_length=300)),
('o_date', models.CharField(default='', max_length=25)),
('o_place', models.CharField(default='主人没有留下哦!', max_length=200)),
('o_contact_details', models.CharField(max_length=50)),
('o_publish_time', models.DateTimeField(auto_now_add=True)),
('o_piicture', models.ImageField(default='https://tse4-mm.cn.bing.net/th/ id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1', height_field=400, upload_to='img', width_field=400)),
('users', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Lost_Found.users')),
],
),
]
# Generated by Django 3.2.12 on 2022-02-22 16:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Lost_Found', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='object_hunting',
name='o_piicture',
field=models.ImageField(default='https://tse4-mm.cn.bing.net/th/ id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1', upload_to='img'),
),
migrations.AlterField(
model_name='recruitment',
name='o_piicture',
field=models.ImageField(default='https://tse4-mm.cn.bing.net/th/ id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1', upload_to='img'),
),
migrations.AlterField(
model_name='recruitment',
name='r_date',
field=models.CharField(default='', max_length=25),
),
]
# Generated by Django 3.2.12 on 2022-02-24 00:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('Lost_Found', '0002_auto_20220222_1619'),
]
operations = [
migrations.RenameField(
model_name='object_hunting',
old_name='o_piicture',
new_name='o_picture',
),
migrations.RenameField(
model_name='recruitment',
old_name='o_piicture',
new_name='r_picture',
),
]
# Generated by Django 3.2.12 on 2022-02-27 06:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Lost_Found', '0003_auto_20220224_0026'),
]
operations = [
migrations.CreateModel(
name='shijian',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('classification', models.CharField(max_length=32, null=True)),
('start_time', models.IntegerField(null=True)),
('end_time', models.IntegerField(null=True)),
('keyword', models.CharField(max_length=100, null=True)),
],
),
]
from distutils.command.upload import upload
from email.policy import default
from django.db import models
from django.forms import ImageField
# Create your models here.
#用户信息
class Users(models.Model): #my
user_name = models.CharField(max_length=45) #用户名
user_id = models.CharField(max_length=20) #用户账号(ID)
user_tel = models.CharField(max_length=25, default="") #用户tel
user_password = models.CharField(max_length=100) #用户密码
user_toxiang = models.ImageField(default="",upload_to='img') #用户头像
# content = {'user_name':user_name,'user_id':user_id,'user_password':user_password}
# def __str__(self):
# return self.content
#寻物
class Object_hunting(models.Model):
o_name = models.CharField(max_length=50) #物品名称,字符串类型,最大长度为50/3
o_classification = models.CharField(max_length=20) #物品分类 ,字符串类型,最大长度为20/3
o_detail = models.CharField(max_length=300,default='主人没有留下哦!') #物品详情,字符串类型,最大长度为300/3
o_date = models.CharField(max_length=25,default="") #日期2022年2月1日 存入数据库示例:20220201 长整型
o_place = models.CharField(max_length=200,default='主人没有留下哦!') #地点 字符串类型, 最大长度为200/3
o_contact_details = models.CharField(max_length=50) #联系方式 字符串类型, 最大长度为50/3
o_publish_time = models.DateTimeField(auto_now_add=True) #发布时间 字符串类型,自动记录电脑或手机当前时间
o_picture = models.ImageField(default="https://tse4-mm.cn.bing.net/th/\
id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1",upload_to='img') #物品图片
users = models.ForeignKey(Users,on_delete=models.CASCADE) #外键,将每个用户与他发布的贴子关联 老师-->学生
# content = {'o_name':o_name,'o_classificatio':o_classification,'o_detail':o_detail,'o_date':o_date,'o_place':o_place,
# 'o_contact_details':o_contact_details,'o_publish_time':o_publish_time}
# def __str__(self):
# return self.content
#招领
class Recruitment(models.Model):
r_name = models.CharField(max_length=50) #物品名称,字符串类型,最大长度为50/3
r_classification = models.CharField(max_length=20) #物品分类,字符串类型,最大长度为20/3
r_detail = models.CharField(max_length=300,default='主人没有留下哦!') #物品详情,字符串类型,最大长度为300/3
r_date = models.CharField(max_length=25,default="") #日期2022年2月1日 存入数据库示例:20220201 长整型
r_place = models.CharField(max_length=200,default='主人没有留下哦!') #地点 字符串类型, 最大长度为200/3
r_contact_details = models.CharField(max_length=50) #联系方式 字符串类型, 最大长度为50/3
r_publish_time = models.DateTimeField(auto_now_add=True) #发布时间 字符串类型,自动记录电脑或手机当前时间
r_picture = models.ImageField(default="https://tse4-mm.cn.bing.net/th/\
id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1",upload_to='img') #物品图片
users = models.ForeignKey(Users,on_delete=models.CASCADE) #外键,将每个用户与他发布的贴子关联 老师-->学生
# content = {'r_name':r_name,'r_classificatio':r_classification,'r_detail':r_detail,'r_date':r_date,'r_place':r_place,
# 'r_contact_details':r_contact_details,'r_publish_time':r_publish_time}
# def __str__(self):
# return self.content
#搜索功能
class shijian(models.Model):
classification = models.CharField(max_length=32,null=True)
start_time = models.IntegerField(null=True)
end_time = models.IntegerField(null=True)
keyword = models.CharField(max_length=100,null=True)
\ No newline at end of file
p {
line-height: 35px;
margin-left: 300px;
margin-right: 300px;
}
h1 {
margin-left: 300px;
margin-right: 300px;
font-size: x-large;
}
h2 {
line-height: 35px;
margin-left: 300px;
margin-right: 300px;
}
ul {
line-height: 35px;
margin-left: 300px;
margin-right: 300px;
}
div {
width: 100px;
height: 30px;
border: 1px solid;
border-radius: 20px;
background-color: black;
}
span {
color: white;
/* margin-top: 0px; */
margin-left: 18px;
line-height: 30px;
}
* {
margin: 0;
padding: 0;
}
/* :root根伪类 --为自定义属性 方便我们重复使用同一个属性 自定义属性使用var(--white);进行调用 */
:root {
/* 颜色 */
--white: #e9e9e9;
--gray: #333;
--blue: #0367a6;
--lightblue: #008997;
/* 外边框圆角属性 */
--button-radius: 0.7rem;
/* 最大宽、高 的值*/
--max-width: 758px;
--max-height: 420px;
/* 字体样式 */
font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
body .container .container_form {
height: 100%;
position: absolute;
top: 0;
left: 0;
transition: all 0.6s ease-in-out;
transform: translateX(0);
width: 50%;
}
body .container .container_form .form {
background-color: var(--white);
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
height: 100%;
padding: 0 3rem;
text-align: center;
}
body .container .container_form .form .form_title {
font-weight: 300;
margin: 14px 0 1.25rem;
}
body .container .container_form .form .input {
background-color: #fff;
border: none;
padding: 0.9rem 0.9rem;
margin: 0.3rem 0;
width: 100%;
}
body .container .container_form .form .btn {
margin-top: 1.5rem;
}
body .container .container_signin {
z-index: 3;
}
body .container .container_signin .link {
color: var(--gray);
font-size: 0.9rem;
margin: 1.5rem 0;
text-decoration: none;
}
body .container .container_signup {
z-index: 2;
}
body .container .btn {
background-color: var(--blue);
background-image: linear-gradient(
90deg,
var(--blue) 0%,
var(--lightblue) 74%
);
border-radius: 20px;
border: 1px solid var(--blue);
color: var(--white);
cursor: pointer;
font-size: 0.8rem;
font-weight: bold;
letter-spacing: 0.1rem;
padding: 0.9rem 4rem;
text-transform: uppercase;
transition: all 0.6s ease-in-out;
margin-bottom: 20px;
}
body .container .button{
position: absolute;
margin-bottom: 25px;
margin-left: 190px;
border: #bbbbbb solid 1px;
color: silver;
}
body .container .button:hover{
border: #0367a6 solid 1px;
color: #0367a6;
background: yellowgreen;
}
body .container .btn:active {
transform: scale(0.95);
}
body .container .btn:focus {
outline: none;
}
body .container .overlay_panel {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
height: 100%;
width: 50%;
position: absolute;
right: 0;
transition: all 0.6s ease-in-out;
transform: translateX(0);
}
body .container .overlay_left {
z-index: 2;
transition: all 0.6s ease-in-out;
}
body .container .overlay_right {
z-index: 3;
transition: all 0.6s ease-in-out;
}
body .right_panel_active .container_form {
transform: translateX(100%);
}
body .right_panel_active .container_signup {
z-index: 3;
}
body .right_panel_active .container_signin {
z-index: 2;
}
body .right_panel_active .overlay_panel {
transform: translateX(-100%);
}
body .right_panel_active .overlay_left {
z-index: 3;
}
body .right_panel_active .overlay_right {
z-index: 2;
}
.Logo {
position: relative;
float: none;
height: 60px;
width: 60px;
margin-bottom: -22px;
}
* {
margin: 0;
padding: 0;
}
/* :root根伪类 --为自定义属性 方便我们重复使用同一个属性 自定义属性使用var(--white);进行调用 */
:root {
/* 颜色 */
--white: #e9e9e9;
--gray: #333;
--blue: #0367a6;
--lightblue: #008997;
/* 外边框圆角属性 */
--button-radius: 0.7rem;
/* 最大宽、高 的值*/
--max-width: 758px;
--max-height: 420px;
/* 字体样式 */
font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
/*无关变量————————————————————————————————————————————————————————————————————————————————————*/
body .container .container_form {
height: 100%;
position: absolute;
top: 0;
left: 0;
transition: all 0.6s ease-in-out;
transform: translateX(0);
width: 50%;
margin-left: 210px;
}
body .container .container_form .form {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
height: 100%;
padding: 0 3rem;
text-align: center;
color: #ffffff;
}
body .container .container_form .form .form_title {
font-weight: 300;
margin: 14px 0 1.25rem;
}
body .container .container_form .form .input {
/*background-color: #fff;*/
border: none;
padding: 0.9rem 0.9rem;
margin: 0.3rem 0;
width: 100%;
background:rgba(0,0,0,0.5); filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7F000000,endcolorstr=#7F000000);
}
body .container .container_form .form .btn {
margin-top: 1.5rem;
}
body .container .container_signin {
z-index: 3;
}
body .container .container_signin .link {
color: var(--gray);
font-size: 0.9rem;
margin: 1.5rem 0;
text-decoration: none;
}
body .container .container_signup {
z-index: 2;
}
body .container .btn {
background-color: var(--blue);
background-image: linear-gradient(
90deg,
var(--blue) 0%,
var(--lightblue) 74%
);
border-radius: 20px;
border: 1px solid var(--blue);
color: var(--white);
cursor: pointer;
font-size: 0.8rem;
font-weight: bold;
letter-spacing: 0.1rem;
padding: 0.9rem 4rem;
text-transform: uppercase;
transition: all 0.6s ease-in-out;
margin-bottom: 20px;
}
body .container .button{
position: absolute;
margin-bottom: 25px;
margin-left: 190px;
border: #bbbbbb solid 1px;
color: silver;
margin-top: 165px;
background:rgba(0,0,0,0.1); filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7F000000,endcolorstr=#7F000000);
}
body .container .button_x{
position: absolute;
filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7F000000,endcolorstr=#7F000000);
background: var(--blue) linear-gradient(
90deg,
var(--blue) 0%,
var(--lightblue) 74%
);
border-radius: 20px;
border: 1px solid var(--blue);
color: var(--white);
cursor: pointer;
font-size: 0.8rem;
font-weight: bold;
letter-spacing: 0.1rem;
padding: 0.9rem 0.7rem;
text-transform: uppercase;
transition: all 0.6s ease-in-out;
margin-top: 290px;
margin-left: 280px;
text-decoration: none;
}
body .container .button:hover{
border: #0367a6 solid 1px;
color: #0367a6;
background: yellowgreen;
}
body .container .btn:active {
transform: scale(0.95);
}
body .container .btn:focus {
outline: none;
}
body .container .overlay_panel {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
height: 100%;
width: 50%;
position: absolute;
right: 0;
transition: all 0.6s ease-in-out;
transform: translateX(0);
}
body .container .overlay_left {
z-index: 2;
transition: all 0.6s ease-in-out;
}
body .container .overlay_right {
z-index: 3;
transition: all 0.6s ease-in-out;
}
body .right_panel_active .container_form {
transform: translateX(100%);
}
body .right_panel_active .container_signup {
z-index: 3;
}
body .right_panel_active .container_signin {
z-index: 2;
}
body .right_panel_active .overlay_panel {
transform: translateX(-100%);
}
body .right_panel_active .overlay_left {
z-index: 3;
}
body .right_panel_active .overlay_right {
z-index: 2;
}
.Logo {
position: relative;
float: none;
height: 60px;
width: 60px;
/*margin-bottom: -22px;*/
margin-top: 110px;
}
body {
background-color: #e6e0da;
margin:0;
padding:0;
display: flex;
}
.navigation {
width: 100%;
height: 50px;
background-color: rgb(0,0,0,0.82);
/*display: flex;*/
/*justify-content: center;*/
position: fixed;
z-index: 10;
}
.navigation div {
height: 100%;
width: 120px;
border-right: 1px solid white;
border-left: 1px solid white;
}
.navigation a {
width: 100px;
text-decoration: none;
font-size: initial;
line-height: 50px;
color: white;
text-align: center;
border-left: 1px solid;;
}
.navigation .logo{
position: absolute;
margin-left: -1400px;
height: 50px;
}
.last {
border-right: 1px solid;
float: right;
}
.before{
float: left;
border-right: 1px solid;
}
.navigation a:hover {
background-color: rgb(230,224,218,0.7);
color: #000000;
}
.per_center {
width: 160px;
height: 300px;
margin-left: 60px;
margin-top: 130px;
border-radius: 20px;
box-shadow:-10px -5px 25px -5px;
border: outset;
}
.content p{
margin-left: 20px;
margin-right: 10px;
margin-top: 25px;
font-size: large;
font-family: fangsong;
border-style: outset;
}
.per_center img {
width: 80px;
height: 80px;
border-radius: 60px;
margin-left: 40px;
margin-top: 25px;
z-index: 0;
}
.typ {
}
@keyframes scaleDraw { /*定义关键帧、scaleDrew是需要绑定到选择器的关键帧名称*/
0%{
transform: scale(1); /*开始为原始大小*/
}
25%{
transform: scale(1.1); /*放大1.1倍*/
}
50%{
transform: scale(1);
}
75%{
transform: scale(1.1);
}
}
.per_center{
-webkit-animation-name: scaleDraw; /*关键帧名称*/
-webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
-webkit-animation-iteration-count: infinite; /*动画播放的次数*/
-webkit-animation-duration: 5s; /*动画所花费的时间*/
}
.release {
width: 900px;
border-top: 50px solid rgb(0,0,0,0.82);
margin-left: 50px;
margin-top: 131px;
box-shadow:-10px -5px 25px -5px;
}
.box{
width: 100%;
height: 123px;
border: 1px solid black;
}
/*按钮区——————————————————————————————————————————————————————————————————*/
.box{
display: flex;
}
.release .box .pictures{
height: 120px;
width: 120px;
}
.release .box .pictures:hover{
border: yellowgreen 2px solid;
}
.public_container{
width: 1200px;
margin: 100px auto;
}
.out_load{
width: 200px;
height: 70px;
border-radius: 25px;
background: linear-gradient(to bottom right, #000 , #cfd2db , #000); /* 标准的语法 */
font-size: 25px;
margin: 25px 400px;
border: 0;
}
.out_load:hover{
/*margin-top: 28px;*/
box-shadow: 0 10px 25px #000;
}
.Logo {
width: 40px;
position: relative;
left: 31%;
}
body {
margin:0;
padding:0;
background-color: #e6e0da;
margin-bottom: 50px;
}
.navigation {
width: 100%;
height: 50px;
background-color: rgb(0,0,0,0.82);
/*display: flex;*/
/*justify-content: center;*/
position: fixed;
z-index: 3333;
}
.navigation div {
height: 100%;
width: 120px;
border-right: 1px solid white;
border-left: 1px solid white;
z-index: 333;
}
.navigation a {
width: 100px;
text-decoration: none;
font-size: initial;
line-height: 50px;
color: white;
text-align: center;
border-left: 1px solid;
font-family: fantasy;
}
.last {
border-right: 1px solid;
float: right;
text-align: end;
}
.before{
float: left;
border-right: 1px solid;
}
.navigation a:hover {
background-color: rgb(230,224,218,0.7);
color: #000000;
}
.Logo {
width: 40px;
position: relative;
left: 27.7%;
margin-top: 5px;
}
.first {
width: 900px;
height: 1300px;
margin: auto;
border: 2px solid #e6e0da;
}
.box {
width: 100%;
border: 2px solid black;
margin-top: 100px;
border-top: 60px solid;
background-color: white;
}
.box1 {
width: 100%;
height: 100px;
border-bottom: 2px solid black;
}
.must {
display: block;
margin-top: 15px;
color: #000000;
font-family: fangsong;
font-size: larger;
margin-left: 15px;
}
.box1 select{
margin-left: 400px;
margin-top: -10px;
width: 125px;
height: 33px;
}
.box2 {
width: 100%;
border-bottom: 2px solid black;
}
.box2 select {
margin-left: 150px;
width: 100px;
height: 30px;
}
.box2 p,
span{
display: inline;
}
.name {
margin-top: 15px;
}
.box2 p {
margin-left: 45px;
font-size: 25px;
font-family: cursive;
}
.input {
margin: 0 auto;
border: 0;
background: none;
width: 680px;
height: 23px;
font-size: 20px;
font-weight: 300;
color: black;
outline: 0;
border-bottom: 1px solid #c5c0aa;
font-family: YouYuan;
}
.box2 div {
line-height: 70px;
margin-left: 45px;
}
.box2 span {
font-size: 25px;
font-family: cursive;
}
textarea {
width: 500px;
height: 120px;
border: outset;
resize: none;
outline: none;
font-size: 20px;
font-weight: 300;
font-family: YouYuan;
}
.box3 {
width: 100%;
border-bottom: 2px solid black;
}
.box3 div{
height: 75px;
margin-left: 45px;
font-size: 25px;
font-family: cursive;
}
.box3 label {
font-size: large;
}
.input1 {
margin: 0 auto;
border: 0;
background: none;
width: 607px;
height: 23px;
font-size: 20px;
font-weight: 300;
color: black;
outline: 0;
border-bottom: 1px solid #c5c0aa;
font-family: YouYuan;
}
.input2 {
border: outset;
font-family: YouYuan;
outline: none;
}
.box4 {
width: 100%;
height: 200px;
border-bottom: 2px solid black;
display: flex;
}
.box4 p {
font-size: x-large;
margin-left: 15px;
font-family: fangsong;
}
.box4 div {
width: 150px;
height: 150px;
margin-top: 35px;
margin-left: 25px;;
}
.box5 {
height: 150px;
}
.box5 button{
width: 130px;
height: 50px;
margin-left: 385px;
margin-top: 50px;
font-family: auto;
font-size: 25px;
}
\ No newline at end of file
body {
margin:0;
padding:0;
background-color: #e6e0da;
margin-bottom: 50px;
}
.navigation {
width: 100%;
height: 50px;
background-color: rgb(0,0,0,0.82);
/*display: flex;*/
/*justify-content: center;*/
position: fixed;
z-index: 10;
}
.navigation div {
height: 100%;
width: 120px;
border-right: 1px solid white;
border-left: 1px solid white;
}
.navigation a {
width: 100px;
text-decoration: none;
font-size: initial;
line-height: 50px;
color: white;
text-align: center;
border-left: 1px solid;;
}
.last {
border-right: 1px solid;
float: right;
}
.before{
float: left;
border-right: 1px solid;
}
.navigation a:hover {
background-color: rgb(230,224,218,0.7);
color: #000000;
}
.first {
width: 1300px;
height: 1544px;
display: flex;
margin: auto;
}
.box {
box-shadow: -10px -5px 25px -5px;
border: 4px;
border-style: inset;
width: 59%;
margin: auto;
margin-top: 119px;
margin-bottom: 50px;
background-color: white;
}
.picture {
width: 100%;
height: 500px;
border-bottom: 2px solid #0a0a0a;
}
.banner{
position: relative;/*相对定位 给绝对定位位置参考*/
width: 100%;
height: 300px;
float: left;
}
.banner .item{
display: none;
position: absolute;
width: 100%;
height: 300px;
top: 0;
left: 0;
margin-left: 180px;
}
ul{
list-style-type: none;/*清除默认列表样式 ....*/
margin: 0;
padding: 0;/*内外编剧清除*/
}
.lunbo{
width: 80%;
height: 371px;
margin-top: 59px;
margin-left: -90px;
}
/*左右按钮的属性设置*/
.lr-tab .btn{
position: absolute;
top: 120px;
width: 41px;
height: 69px;
}
.lr-tab .left{
left: 0px;
background-position-x: -83px;
}
.lr-tab .right{
right: 0px;
background-position-x: -125px;
}
/*左右按钮触碰事件*/
.lr-tab .left:hover{
background-position-x: 0px;
}
.lr-tab .right:hover{
background-position-x: -41px;
}
/*圆形按钮属性设定*/
.tab-btn{
position: absolute;
right: 40px;
bottom: 20px;
width: 120px;
height: 30px;
top: 270px;
margin-top: 110px;
margin-right: 45px;
}
.tab-btn .btn{
float: left;
width: 6px;
height: 6px;
background: #868686;
border: 2px solid #c3c3c3;/*边框*/
margin-left: 10px;
border-radius: 60px;
}
/*圆形按钮触碰事件*/
.tab-btn .btn:hover{
background: #e4e4e4;
border-color:#7f7f7f;
}
.tab-btn .active{
background: #e4e4e4;
border-color:#7f7f7f;
}
.information {
width: 100%;
border-bottom: 1px solid #000;
}
.information b {
margin-left: 10px;
font-family: cursive;
}
.information p {
font-size: 25px;
font-family: cursive;
margin-left: 80px;
margin-right: 50px;
}
.information p span {
font-size: 20px;
font-family: cursive;
}
.recevice {
height: 140px;
}
/* .recevice a{
text-decoration: none;
text-align: center;
font-size: xxx-large;
color: #000000;
margin-left: 52px;
position: relative;
left:200px ;
} */
.recevice button {
width: 200px;
margin: auto;
margin-top: 50px;
height: 70px;
border-radius: 25px;
background: -webkit-linear-gradient(left top, #000 , #d2dcff , #000); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(bottom right, #000 , #d2dcff , #000); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(bottom right, #000 , #8b8fa0 , #000); /* Firefox 3.6 - 15 */
background: linear-gradient(to bottom right, #000 , #8b8fa0 , #000); /* 标准的语法 */
position: relative;
left: 280px;
font-size: 30px;
}
.top {
box-shadow:-10px -5px 25px -5px;
width: 101%;
height: 80px;
margin-top: -84px;
margin-left: -3px;
background: -webkit-linear-gradient(left top, #000 , #0b247d , #000); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(bottom right, #000 , #0b247d , #000); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(bottom right, #000 , #0b247d , #000); /* Firefox 3.6 - 15 */
background: linear-gradient(to bottom right, #000 , #0b247d , #000); /* 标准的语法 */
}
.other {
box-shadow:-10px -5px 25px -5px;
border: 2px solid #0b247d;
border: outset;
width: 13.3%;
height: 300px;
margin-top: 116px;
margin-right: -100px;
margin-left: 15px;
border-radius: 20px;
/* background-image: url(img/b13066835024473.jpg); */
}
.other h1 {
margin-left: 10px;
margin-top: -2px;
}
.other img {
height: 85px;
width: 85px;
border-radius: 60px;
/* margin: auto; */
margin-left: 35px;
margin-top: -15px;
position: relative;
left: 15px;
}
.other p {
margin-left: 20px;
margin-right: 10px;
margin-top: 25px;
font-size: large;
font-family: fangsong;
border-style: outset;
}
.person {
box-shadow:-10px -5px 25px 0px;
border: 2px solid #0b247d;
border: outset;
/* border-top: 6px solid ; */
width: 13.3%;
height: 350px;
margin-top: 116px;
margin-left: -100px;
margin-right: 30px;
border-radius: 20px;
}
button:hover{
margin-top: 47px;
box-shadow: 0 10px 25px #000;
}
.Logo {
width: 40px;
position: relative;
left: 31%;
}
body {
margin:0;
padding:0;
background-color: #e6e0da;
margin-bottom: 50px;
}
.navigation {
width: 100%;
height: 50px;
background-color: rgb(0,0,0,0.82);
/*display: flex;*/
/*justify-content: center;*/
position: fixed;
z-index: 3333;
}
.navigation div {
height: 100%;
width: 120px;
border-right: 1px solid white;
border-left: 1px solid white;
z-index: 333;
}
.navigation a {
width: 100px;
text-decoration: none;
font-size: initial;
line-height: 50px;
color: white;
text-align: center;
border-left: 1px solid;
font-family: fantasy;
}
.last {
border-right: 1px solid;
float: right;
text-align: end;
}
.before{
float: left;
border-right: 1px solid;
}
.navigation a:hover {
background-color: rgb(230,224,218,0.7);
color: #000000;
}
/* 搜索栏 */
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Consolas, serif;
}
.search-box{
position: relative;
width: 65px;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
transition: 0.5s;
margin: 0 auto;
top:90px;
}
.search-box:hover{
width: 800px;
}
.search-box::before{
content: '';
position: absolute;
top: 0;
left: 0;
width: 10px;
height: 100%;
background: linear-gradient(#ffffff,#ffffff,#e3e3e3);
z-index: 1;
filter: blur(1px);
}
.search-box::after{
content: '';
position: absolute;
top: 0;
right: -1px;
width: 10px;
height: 100%;
background: #9d9d9d;
z-index: 1;
filter: blur(1px);
}
.shadow{
position: absolute;
top: 0;
left: -50px;
width: calc(100% + 50px);
height: 300px;
background: linear-gradient(180deg,rgba(0,0,0,0.1),transparent,transparent);
transform-origin: top;
transform: skew(45deg);
pointer-events: none;
}
.shadow::before{
content: '';
position: absolute;
width: 50px;
height: 50px;
background: #e6e0da;/*小三角*/
z-index: 1;
}
.search-box input{
position: relative;
width: 100%;
height: 100%;
border: none;
padding: 10px 25px;
outline: none;
font-size: 1.1em;
color: #555555;
background: linear-gradient(#dbdae1,#a3aaba);
box-shadow: 5px 5px 5px rgba(0,0,0,0.1),
15px 15px 15px rgba(0,0,0,0.1),
20px 20px 15px rgba(0,0,0,0.1),
30px 30px 15px rgba(0,0,0,0.1);
/* inset: 1px 1px 2px #fff; */
}
.search-box input::placeholder,
.search-box input
{
color: transparent;
}
.search-box:hover input::placeholder,
.search-box:hover input
{
color: #555555;
}
ion-icon{
position: absolute;
right: 20px;
color: #555555;
font-size: 1.5em;
cursor: pointer;
z-index: 1;
}
/* 轮播图 */
.picture {
width: 1200px;
height: 600px;
margin: auto;
margin-top: 120px;
}
.banner{
position: relative;/*相对定位 给绝对定位位置参考*/
width: 100%;
height: 440px;
float: left;
}
.banner .item{
display: none;
position: absolute;
width: 100%;
height: 300px;
top: 0;
left: 0;
margin-left: 180px;
}
ul{
list-style-type: none;/*清除默认列表样式 ....*/
margin: 0;
padding: 0;/*内外编剧清除*/
}
.lunbo{
width: 100%;
height: 600px;
margin-top: 0px;
margin-left: -180px;
}
/*左右按钮的属性设置*/
.lr-tab .btn{
position: absolute;
top: 120px;
width: 41px;
height: 69px;
}
.lr-tab .left{
left: 0px;
background-position-x: -83px;
}
.lr-tab .right{
right: 0px;
background-position-x: -125px;
}
/*左右按钮触碰事件*/
.lr-tab .left:hover{
background-position-x: 0px;
}
.lr-tab .right:hover{
background-position-x: -41px;
}
/*圆形按钮属性设定*/
.tab-btn{
position: absolute;
right: 40px;
bottom: 20px;
width: 120px;
height: 30px;
top: 430px;
margin-top: 110px;
margin-right: 45px;
}
.tab-btn .btn{
float: left;
width: 23px;
height: 8px;
background: #868686;
border: 2px solid #c3c3c3;/*边框*/
margin-left: 10px;
border-radius: 60px;
}
/*圆形按钮触碰事件*/
.tab-btn .btn:hover{
background: #e4e4e4;
border-color:#7f7f7f;
}
.tab-btn .active{
background: #e4e4e4;
border-color:#7f7f7f;
}
.navbar {
width: 1200px;
height: 50px;
background: #333333;
box-shadow: 0 -20px 20px #000000;
margin: auto;
margin-top: 50px;
display: flex;
justify-content: space-between;
}
.navbar div {
height: 100%;
width: 400px;
z-index: 333;
}
.navbar ul{
list-style: none;
}
.navbar ul li{
float: left;
width: 150px;
height: 48px;
background: #222222;
font-size: 14px;
margin-left: -4px;
margin-top: 0px;
}
.navbar ul li:hover{
color: #ffffff;
background: #222222;
z-index: 333;
}
.navbar ul li a{
text-decoration: none;
color: #ffffff;
display: block;
text-align: center;
line-height: 50px;
font-weight: bold;
text-transform: uppercase;
z-index: 333;
}
.navbar ul li ul li{
display: none;
width: 150px;
height: 50px;
float: initial;
background: rgb(141 141 141 / 75%);
font-size: 14px;
margin-left: 0;
margin-top: 0;
}
.navbar ul li ul li a{
z-index: 3;
}
.navbar ul li:hover ul li{
display: block;
border-top: 1px solid #8d8d8d;
z-index: 333;
}
.date {
margin-top: 14px;
color: #333333;
}
.button_c {
margin-top: 50px;
text-decoration: none;
background: #333333;
color: #ffffff;
font-size: 14px;
border: outset 3px silver;
width: 20px;
height: 35px;
}
.key {
/*margin-left: 205px;*/
margin-top: 8px;
height: 30px;
width: 175px;
background: #333333;
color: gray;
float: right;
margin-right: 15px;
}
.key:hover{
background: #ffffff;
border: #7f7f7f 1px solid;
}
.container{
width: 1200px;
margin: 50px auto auto;
columns: 4;
column-gap: 40px;
z-index: 1;
}
.container div {
width: 100%;
margin: 0 0 20px;
padding: 10px;
background: #ffffff;
overflow: hidden;
break-inside: avoid;
user-select:none;
}
.container img {
width: 248px;
}
.container p {
line-height: 45px;
height: 45px;
font-size: medium;
}
.container span {
display: block;
margin-left: 184px;
margin-top: 60px;
font-size: small;
color: #7f7f7f;
font-weight: 600;
font-family: cursive;
}
.container div:hover {
box-shadow: 0 20px 25px #adadad;
margin-bottom: 20px;
z-index: 2;
}
.Logo {
width: 40px;
position: relative;
left: 28.5%;
margin-top: 5px;
}
This image diff could not be displayed because it is too large. You can view the blob instead.
const container = document.getElementsByClassName("container")[0];
const signInBtn = document.getElementById("signIn");
const signUpBtn = document.getElementById("signUp");
signUpBtn.addEventListener("click", () => {
container.classList.add("right_panel_active");
});
signInBtn.addEventListener("click", () => {
container.classList.remove("right_panel_active");
});
function login() {}
function sign() {}
var index2 = 0;
$(".tab-btn .btn").click(function () {
index2 = $(this).index();
$(this).addClass("active").siblings().removeClass("active");
$(".item").eq(index2).fadeIn().siblings().fadeOut();
});
$(".lr-tab .right").click(function () {
index2 ++;
if (index2 >4){ index2 = 0;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
});
$(".lr-tab .left").click(function () {
index2 --;
if(index2 < 0){index2 = 4;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
});
var time2 = setInterval(function () {
index2 ++;
if (index2 >4){ index2 = 0;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
},3000);
var index2 = 0;
$(".tab-btn .btn").click(function () {
index2 = $(this).index();
$(this).addClass("active").siblings().removeClass("active");
$(".item").eq(index2).fadeIn().siblings().fadeOut();
});
$(".lr-tab .right").click(function () {
index2 ++;
if (index2 >4){ index2 = 0;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
});
$(".lr-tab .left").click(function () {
index2 --;
if(index2 < 0){index2 = 4;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
});
var time2 = setInterval(function () {
index2 ++;
if (index2 >4){ index2 = 0;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
},3000);
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="{% static 'css/about.css' %}"/>
<title>Title</title>
</head>
<body>
<div onclick="window.open('{% url 'start_views' %}','_self')">
<span>返回首页</span>
</div>
<h1>“失物招领系统”用户服务协议</h1>
<h2>导言</h2>
<p>为使用"失物招领系统"(以下简称本系统)及服务,请您在开始使用"失物招领"系统及相关服务之前,认真阅读并充分理解**《失物招领系统用户服务协议》**(以下简称本协议),请你务必审慎阅读、充分理解各条款内容,特别是免除或者限制责任的条款,并选择接受或不接受。**限制、免责条款可能以加粗等形式提示你注意**。**除非您已阅读并接受本协议所有条款,否则您无权使用本系统及相关服务。您的登录,使用等行为即视为你已阅读并同意上述协议的约束。**</p>
<p>如果您未满18周岁,请在法定监护人的陪同下阅读并充分理解本协议,并争得法定监护人同意后使用"失物招领"系统及相关服务。</p>
<h2>1.产品介绍及用户指南</h2>
<p> "失物招领"系统是"云霄项目组"成员(隶属于"云顶书院")开发的面向用户免费使用的系统。由于各种条件的限制,本系统不提供定期更新。如果您在使用中遇到什么问题,请联系邮箱:2910711781@qq.com 或拨打维护人员的电话:17635811519</p>
<p>本系统的功能大致分为"拾物"和"招领"两部分,您可以通过手机号注册ID,使用本系统。</p>
<p>拾物功能:用户若丢失物品可以在拾物页面上传所丢失物品的相关信息,以及自己的联系方式。</p>
<p>招领功能:用户若拾取相关物品可以在招领页面上上传所拾取物品的相关信息,,以及自己的联系方式。</p>
<h2>2.用户个人信息保护</h2>
<p>保护用户个人信息是云顶书院的一项基本原则,云顶书院将会采取合理的措施保护用户的个人信息。除法律法规规定的情形外,未经用户许可云顶书院不会向第三方公开、透露用户个人信息但法律规定的除外。若国家法律法规或政策有特殊规定的,你需要提供真实的身份信息。若你提供的信息不完整,则无法使用本服务或在使用过程中受到限制。</p>
<h2>3.关于账号</h2>
<p>3.1 "失物招领"系统及相关服务为您提供了注册通道,您有权选择合法的字符组合作为自己的账号,并自行设置符合安全要求的密码。用户的账号,密码是用户用以登录,并以注册用户身份使用"失物招领"系统及相关服务的凭证。</p>
<p>3.2 账号注销</p>
<p>在需要终止使用"失物招领"系统账号服务是,符合以下条件,您可以申请注销您的"失物招领"系统的账号:</p>
<p>3.2.1 您仅能注销您本人的账号,并按照"失物招领的"流程注销;</p>
<p>3.2.2 您仍能应对您在注销帐号前且使用"失物招领系统"服务期间的行为承担相应责任;</p>
<p>3.2.3 注销成功后,账号记录,功能等将无法恢复或提供。</p>
<p>3.3 用户有责任妥善保管注册帐户信息及帐户密码的安全,用户需要对注册帐以及密码下的行为承担法律责任。用户同意在任何情况下不向他人透露帐户及密码信息,否则责任自负。</p>
<p>3.4 如无云顶书院书面说明或者许可,前述帐号的所有权亦归云顶书院所有,用户完成创建或注册操作后,仅获得该帐号的使用权,且该使用权同样仅属于初始申请注册人,初始申请注册人不得赠与、借用、租用、转让或售卖该帐号或者以其他方式许可非初始申请注册人使用该帐号,非初始申请注册人不得通过受赠、继承、承租、受让或者其他任何方式使用该帐号。</p>
<p>3.5 用户注册或创建帐号或功能帐号后如果长期不登录该帐号,云顶书院有权回收该帐号,以免造成资源浪费,由此带来的任何损失均由用户自行承担。</p>
<p>3.6 您理解并承诺,您所设置账号不得违反国家法律法规,不得恶意注册本系统账号(包括但不限于频繁注册,批量注册账号等行为)。</p>
<h2>4.用户行为规范</h2>
<p>4.1 您应对您使用"失物招领"系统及相关服务的行为负责,除非法律允许或经云顶书院实现书面许可,您使用"失物招领系统"及相关服务不得具有下列行为:</p>
<p>4.1.1 使用未经云顶书院授权获许可的任何插件,外挂,系统或第三方工具对"失物招领"系统及相关服务的正常运行进行干扰,破坏,修改或施加其它影响。</p>
<p>4.1.2 利用或针对"失物招领"系统及相关服务进行任何危害计算机网络安全的行为,包括但不限于</p>
<ul>
<li>未经我们书面许可,自行或协助第三方非法获取平台或客户端的信息。“非法获取”是指采用包括但不限于“蜘蛛”(spider)程序、爬虫程序、拟人程序等非真实用户或避开、破坏技术措施等非正常浏览的手段、方式,读取、复制、转存、获得数据和信息内容的行为。</li>
<li>自行或协助第三方以任何方式干扰或企图干扰平台、客户端的功能的正常运行,或者制作、发布、传播具有上述效果的工具、方法等。</li>
<li>在未获得我们书面许可的情况下,在应用中以任何方式使用平台或客户端的商标、标识、产品外观、网址。</li>
<li>以任何方式删除、隐匿平台在应用中设置并展示的标识、信息、说明、介绍、权利声明等。</li>
<li>以任何方式误导、诱导用户点击跳转链接、下载软件、发布信息等。</li>
<li>擅自以平台或客户端的名义向用户发送商业广告信息,或利用平台服务向用户发布垃圾信息。</li>
<li>以任何方式干扰客户端服务,造成客户端在软件系统、应用程序商店等必要的使用环境或下载渠道中发生下架、阻断、不兼容等情况。</li>
<li>其他可能对平台或客户端的正常经营、管理秩序产生干扰的行为。</li>
</ul>
<p>4.1.3 你理解并同意,平台一直致力于提供文明健康、规范有序的网络环境,上述内容应符合法律法规、社会主义制度、国家利益、公民合法权益、社会公共秩序、道德风尚和信息真实性等“七条底线”要求。你不得自行或参与制作或发布违法、违规或低质内容。</p>
<p>你不得自行或协助用户制作、复制、发布、传播以下违法、违规内容,亦应当严格禁止以下内容在应用内的发布和传播:</p>
<ul>
<li>反对宪法确定的基本原则的;</li>
<li>危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的</li>
<li>损害国家荣誉和利益的;</li>
<li>歪曲、丑化、亵渎、否定英雄烈士事迹和精神,以侮辱、诽谤或者其他方式侵害英雄烈士的姓名、肖像、名誉、荣誉的</li>
<li>宣扬恐怖主义、极端主义或者煽动实施恐怖活动、极端主义活动的;</li>
<li>宣扬民族仇恨、民族歧视,破坏民族团结的;</li>
<li>破坏国家宗教政策,宣扬邪教和封建迷信的;</li>
<li>编造、散布谣言、虚假信息,扰乱经济秩序和社会秩序、破坏社会稳定的;</li>
<li>散布、传播淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;</li>
<li>侮辱或者诽谤他人,侵害他人名誉、隐私和其他合法权益的;</li>
<li>法律、行政法规禁止的其他内容。</li>
</ul>
<p>如你发现平台中存在上述内容,你可按照向我们发起投诉,我们将及时受理和处理你的投诉举报,以更好的维护用户的权益,共同营造风清气朗的网络空间。</p>
<p>如果我们有理由认为你的行为违反或可能违反上述约定的,我们可独立进行判断并处理。在此情况下,我们有权在不事先通知的情况下终止向你提供服务,并依法追究相关责任</p>
<h2>5.免责声明</h2>
<p>5.1您理解并同意,“失物招领”系统及相关服务可能会受多种因素的影响或干扰,公司不保证(包括但不限于):</p>
<p>5.1.2"失物招领"系统及相关服务不受干扰,及时、安全、可靠或不出现错误;用户经由本系统取得的任何软件、服务或其他材料符合用户的期望</p>
<p>5.1.3"失物招领"系统及相关服务中任何错误都将能得到更正。</p>
<p>5.2您理解并同意,在使用"失物招领"系统及相关服务过程中,可能遇到不可抗力等因素(不可抗力是指不能预见、不能克服并不能避免的客观事件),出现不可抗力情况时,公司将努力在第一时间及时修复,</p>
<p>5.2.1您理解并同意:关于"失物招领"系统及相关服务,云顶书院不提供任何种类的明示或暗示担保或条件,包括但不限于商业适售性、特定用途适用性等。您对"失物招领"系统及相关服务的使用行为应自行承担相应风险</p>
<p>5.2.2 您理解并同意,本协议旨在保障遵守国家法律法规、维护公序良俗,保护用户和他人合法权益,云顶书院在能力范围内尽最大的努力按照相关法律法规进行判断,但并不保证公司判断完全与司法机关、行政机关的判断一致,如因此产生的后果您已经理解并同意自行承担。</p>
<p>5.2.3 在任何情况下,云顶书院均不对任何间接性、后果性、惩罚性、偶然性、特殊性或刑罚性的损害,包括因您使用"失物招领"系统及相关服务而遭受的利润损失,承担责任。</p>
<p>5.3 请您理解并同意,由于本系统非商业用途,安全性无法得到确切的保障,请您注意好防范个人信息,警惕上当受骗,如遭受个人损失或伤害,云顶书院概不负责。</p>
<h1>6.其它</h1>
<p>6.1 如果您对本协议有任何异议,请立即停止登录或使用"失物招领"系统及相关服务。若您继续登录或使用"失物招领"系统及相关服务,即视为您认可并接受协议内容。</p>
<p>6.2 本协议的标题仅为方便阅读而设,并不影响本协议中任何规定的含义或解释。</p>
<p>6.3 公司依据本协议约定获得处理违法违规内容的权利,该权利不构成公司的义务或承诺,公司不能保证及时发现违法行为或进行相应处理。</p>
<p>6.4 本协议的成立、生效、履行、解释及纠纷解决,适用中华人民共和国大陆地区法律(不包括冲突法) </p>
<p>6.5本协议所定的任何条款的部分或全部无效者,不影响其它条款的效力 </p>
<p>6.6 本协议的一切解释权与修改权归 云顶书院所有。</p>
</body>
</html>
\ No newline at end of file
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>注册页面</title>
<style type="text/css">
body {
background: var(--white) url("{% static 'img/cug.JPG' %}") no-repeat center fixed;
background-size: cover;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}body .container {
background: var(--lightblue) url("{% static 'img/cug.JPG' %}") no-repeat center fixed;
background-size: cover;
border-radius: var(--button-radius);
box-shadow: 0 0.9rem 1.7rem rgba(0, 0, 0.25), 0 0.7rem 0.7rem rgba(0, 0, 0.22);
height: var(--max-height);
max-width: var(--max-width);
overflow: hidden;
width: 100%;
position: relative;
}
</style>
<link href="{% static 'css/login.css' %}" rel="stylesheet">
</head>
<body>
<main class="container">
<!-- 注册 -->
<div class="container_form container_signup">
<form action="/registers/" class="form" id="form1" method="post">
{% csrf_token %}
<h2 class="form_title">注册{{ error1 }}</h2>
<input autocomplete="off" type="text" placeholder="用户名" class="input" id="sign_user" name="name" value="{{ name }}"/>
<input autocomplete="off" type="tel" placeholder="手机号" class="input" id="sign_email" name="tel" value="{{ tel }}"/>
<input autocomplete="off" type="text" placeholder="验证码" class="input" id="Verification_code" name="code" {{ code }}/>
<button class="button" name="submit" value="get_code">点此获取验证码</button>
<input autocomplete="off" type="password" placeholder="密码(区分大小写)" class="input" id="sign_password" name="password" value="{{ password }}"/>
<input autocomplete="off" type="password" placeholder="确认密码(区分大小写)" class="input" id="sign_password_x" name="password_ag" value="{{ password_ag }}"/>
<button class="btn" onclick="sign()" name="submit" value="rst">点击注册</button>
</form>
</div>
<!-- 登录 -->
<div class="container_form container_signin">
<form action="/login/" class="form" id="form2" method="post">
{% csrf_token %}
<h2 class="form_title">
<img src="{% static 'img/云霄Logo.png' %}" class="Logo">
登录{{ error }}
</h2>
<input autocomplete="off" type="text" placeholder="电话号" class="input" id="login_user" name="tel" value="{{ old_tel }}"/>
<input autocomplete="off" type="password" placeholder="密码" class="input" id="login_password" name="password" />
<a href="{% url 'lose_password' %}" class="link">忘记密码?</a>
<button name="submit" class="btn" onclick="login()">登录</button>
</form>
</div>
<div class="overlay_panel overlay_left">
<button class="btn" id="signIn">已有账号,直接登录</button>
<a href="{% url 'start_views' %}" class="btn" id="signIn" style="text-decoration: none">返回首页</a>
</div>
<div class="overlay_panel overlay_right">
<button class="btn" id="signUp">没有账号,点击注册</button>
<a href="{% url 'start_views' %}" class="btn" id="signUp" style="text-decoration: none">返回首页</a>
</div>
</main>
</body>
<script src="{% static 'js/login.js' %}"></script>
<script src="https://unpkg.com/spacingjs" defer></script>
</html>
\ No newline at end of file
{#<body>#}
{# <form action="/lose_password/" method="post">#}
{# {% csrf_token %}#}
{# <div><span>手机号:</span>#}
{# <input type="text" name="tel" placeholder="请输入您手机号" value="{{ tel }}" \><br>{{ tel_error }}#}
{# </div>#}
{# <div><span>新密码:</span>#}
{# <input type="password" name="password" value="{{ password }}" \>#}
{# </div>#}
{# <div><span>确认密码:</span>#}
{# <input type="password" name="password_ag" value="{{ password_ag }}" \><br>{{ error }}#}
{# </div>#}
{# <div>#}
{# <input type="text" name="code" placeholder="请输入验证码" value="{{ code }}" \>#}
{# <button name="submit" class="btn btn-info" value="get_code" >获取验证码</button><br>{{ code_error }}#}
{# </div>#}
{# <button name="submit" class="btn btn-info" value="confirm">确认</button>#}
{#</form>#}
{#<div> {{ mes_error }} </div>#}
{#</body>#}
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="{% static 'css/lose_password.css'%}" rel="stylesheet">
<title>forget_code</title>
<style>
body {
background: var(--white) url("{% static 'img/cug.JPG' %}") no-repeat center fixed;
background-size: cover;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
body .container {
background: var(--lightblue) url("{% static 'img/cug.JPG' %}") no-repeat center fixed;
background-size: cover;
border-radius: var(--button-radius);
box-shadow: 0 0.9rem 1.7rem rgba(0, 0, 0.25), 0 0.7rem 0.7rem rgba(0, 0, 0.22);
height: var(--max-height);
max-width: var(--max-width);
overflow: hidden;
width: 100%;
position: relative;
background:rgba(0,0,0,0.5); filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7F000000,endcolorstr=#7F000000);}
</style>
</head>
<body>
<main class="container">
<div class="container_form container_signup">
<form action="/lose_password/" class="form" id="form1" method="post">
{% csrf_token %}
<h2 class="form_title">忘记密码{{ error }}</h2>
<input autocomplete="off" type="tel" placeholder="输入绑定的手机号" class="input" name="tel" value="{{ tel }}"/>
<input autocomplete="off" type="text" placeholder="输入新的密码" class="input" name="password" value="{{ password }}"/>
<input autocomplete="off" type="text" placeholder="确认密码" class="input" name="password_ag" value="{{ password_ag }}"/>
<!-- <input autocomplete="off" type="email" placeholder="输入绑定的邮箱" class="input" id="sign_email"/>-->
<input autocomplete="off" type="text" placeholder="验证码" class="input" id="Verification_code" name="code" value="{{ code }}"/>
<button class="button" name="submit" value="get_code">点此获取验证码</button>
<button class="btn" id="signIn" name="submit" value="confirm">提交信息</button>
<a class="button_x" href="{% url 'login' %}" >返回</a>
</form>
</div>
</main>
</body>
</html>
\ No newline at end of file
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="{% static 'css/per_center.css' %}"/>
<title>个人中心</title>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="" class="before">失物招领</a>
<a href="{% url 'publish' %}" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
<a href="{% url 'per_center' %}" class="last">个人中心</a>
</div>
<div class="per_center">
<img src="{% static 'img/1_1645788470.jpg' %}" alt="头像">
<div class="content">
<p>昵称:{{ user.user_name }}</p>
<p>id:{{ user.user_id }}</p>
</div>
</div>
<div class="release public_container">
<h2 class="typ">寻物启示:</h2>
{% for o_object in o_objects %}
<div class="box" onclick="window.open('start_views_details?id={{ o_object.id }}','_self')">
<img src="img/img-1.jpg" alt="图片" class="pictures">
<ul>
<li>物品名称:{{ o_object.o_name }}</li>
<li>物品详情:{{ o_object.o_detail }}</li>
</ul>
</div>
{% endfor %}
<h2 class="typ">失物招领:</h2>
{% for r_object in r_objects %}
<div class="box" onclick="window.open('second_views_details?id={{ r_object.id }}','_self')">
<img src="img/img-1.jpg" alt="图片" class="pictures">
<ul>
<li>物品名称:{{ r_object.r_name }}</li>
<li>物品详情:{{ r_object.r_detail }}</li>
</ul>
</div>
{% endfor %}
<form action="/per_center/login_out/" method="post">
{% csrf_token %}
<button class="out_load" name="sumbit">退出登录</button>
</form>>
</div>
</body>
</html>
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="{% static 'css/publish.css' %}"/>
<title></title>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo" alt="logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="{% url 'second_views/' %}" class="before">失物招领</a>
<a href="" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
<a href="{% url 'per_center' %}" class="last">个人中心</a>
</div>
<form action="{% url 'publish' %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="first">
<div class="box">
<div class="box1">
<h2 class="must">●必选</h2>
<select name="release_type">
<option >发布类型</option>
<option value="寻物">寻物</option>
<option value="招领">招领</option>
</select>
</div>
<div class="box2">
<h2 class="must">●必填信息</h2><br>
<p>物品分类:</p>
<select name="classification">
<option value="other">物品分类</option>
<option value ="live">生活用品</option>
<option value="ele">电子产品</option>
<option value ="study">学习用品</option>
<option value ="bag">包具</option>
<option value ="one_card">一卡通</option>
<option value ="card">证件</option>
<option value ="makeup">化妆用品</option>
<option value ="other">其它</option>
</select>
<div class="name">
<span>物品名称:</span>
<input type="text" name="name" class="input" maxlength="15" placeholder="例:水杯" />
</div>
<div>
<span>物品详情:</span><br>
<textarea rows="" cols="" maxlength="100" name="detail" placeholder="为了保护您的隐私安全,请勿在此栏填写联系方式!"></textarea>
</div>
</div>
<div class="box3">
<h2 class="must">●选填信息</h2>
<div>
<span>丢失/拾取时间:</span>
<input type="date" name="date">
<input type="radio" id="one" name="detail" checked>
<label for="one">上午</label>
<input type="radio" id="two" name="detail" >
<label for="two">下午</label>
</div>
<div>
<span>丢失/拾取地点:</span>
<input type="text" name="place" class="input1" maxlength="60" placeholder="详细地址(例):太理明向校区东餐二楼" />
</div>
<div>
<span>联系方式:</span>
<select name="contact_type">
<option value ="qq">QQ</option>
<option value ="vx">VX</option>
<option value="tel">Tel</option>
</select>
<input type="text" name="contact" class="input2" maxlength="20" />
</div>
</div>
<div class="box4">
<p>添加图片:</p>
<div>
<label for="img1"><img src="{% static 'img/添加图片.png' %}" ></label>
<input type="file" name="img1" id="img1" hidden/>
</div>
<div>
<label for="img2"><img src="{% static 'img/添加图片.png' %}" ></label>
<input type="file" name="img2" id="img2" hidden/>
</div>
<div>
<label for="img3"><img src="{% static 'img/添加图片.png' %}" ></label>
<input type="file" name="img3" id="img3" hidden/>
</div>
</div>
<div class="box5">
<button name="submit" class="btn btn-info">发布</button>
</div>
</div>
</div>
</form>
</body>
</html>
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="{% static 'css/start_views.css' %}"/>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
<title></title>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="{% url 'second_views/' %}" class="before">失物招领</a>
<a href="{% url 'publish' %}" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
{% if requests.session.is_login == True %}
<a href="{% url 'per_center' %}" class="last">个人中心</a>
{% else %}
<a href="{% url 'login' %}" class="last">登录 . 注册</a>
{% endif %}
</div>
<div class="search-box">
<div class="shadow"></div>
<input type="text" placeholder="请输入遗失物品名称:水杯">
<ion-icon name="search"></ion-icon>
</div>
<script src="https://unpkg.com/ionicons@4.5.10-0/dist/ionicons.js"></script>
<div class="picture">
<div class="banner" >
<div class="img-wrap">
<ul>
<li class="item" style="display: block">
<a href="#"><img src="{% static 'img/海报.jpg' %}" alt="" class="lunbo"></a>
</li>
<li class="item">
<a href="#"><img src="{% static 'img/海报2.jpg' %}" alt="" class="lunbo"></a>
</li>
<li class="item">
<a href="#"><img src="{% static 'img/HAIBAO1.jpg' %}" alt=""class="lunbo"></a>
</li>
</ul>
</div>
<div class="lr-tab">
<div class="left btn"></div>
<div class="right btn"></div>
</div>
<div class="tab-btn">
<ul>
<li class="btn"></li>
<li class="btn"></li>
<li class="btn"></li>
</ul>
</div>
</div>
</div>
<div class="navbar">
<div>
<ul>
<li><a href="#">物品分类</a>
<ul>
<li><a href="search_classification1?classification=live">生活用品</a></li>
<li><a href="search_classification1?classification=study">学习用品</a></li>
<li><a href="search_classification1?classification=ele">电子设备</a></li>
<li><a href="search_classification1?classification=makeup">化妆用品</a></li>
<li><a href="search_classification1?classification=bag">包具</a></li>
<li><a href="search_classification1?classification=one_card">一卡通</a></li>
<li><a href="search_classification1?classification=card">证件</a></li>
<li><a href="search_classification1?classification=other">其它</a></li>
</ul>
</li>
</ul>
</div>
<form action="/search_second_time1/" method="post">
{% csrf_token %}
<div class="date">
丢失时间
<label>
<input type="date" name="before_time" class="时间1">
<input type="date" name="late_time" class="时间2">
</label>
</div>
<button class="button_c">提交</button>
</form>
<div>
<form action="/search_keyword1/" method="post">
{% csrf_token %}
<label>
<input type="text" class="key" name="key" placeholder="关键字搜索:红色"/>
</label>
</form>
</div>
</div>
<div class="container">
{% for information in informations %}
<div onclick="window.open('second_views_details?id={{ information.id }}','_self')">
<img src="/media/{{ information.r_picture }}" alt="img">
<p>物品名称:{{ information.r_name }}</p>
<p>拾取地点:{{ information.r_place }}</p>
<p>物品详情:{{ information.r_detail }}</p>
<span>2022/2/25</span>
</div>
{% endfor %}
</div>
</body>
<script type="text/javascript" src="{% static 'js/start_view.js' %}"></script>
</html>
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="{% static 'css/second_views_details.css' %}"/>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo" alt="logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="{% url 'second_views/' %}" class="before">失物招领</a>
<a href="{% url 'publish' %}" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
{% if requests.session.is_login == True %}
<a href="{% url 'per_center' %}" class="last">个人中心</a>
{% else %}
<a href="{% url 'login' %}" class="last">登录 . 注册</a>
{% endif %}
</div>
<div class="first">
<div class="other">
<h1>
<b></b>
</h1>
<img src="img/25xt-711061-AbstractSharpBackgroundsz7.png" >
<p>昵称:<span>{{ data.users.user_name }}</span></p>
<p>ID:<span>{{ data.users.user_id }}</span></p>
</div>
<div class="box">
<div class="picture">
<div class="banner" >
<div class="img-wrap">
<ul>
<li class="item" style="display: block">
<a href="#"><img src="/media/{{ data.r_picture }}" alt="" class="lunbo"></a>
</li>
{# <li class="item">#}
{# <a href="#"><img src="img/R-C(1).jpg" alt="" class="lunbo"></a>#}
{# </li>#}
{# <li class="item">#}
{# <a href="#"><img src="img/R-C.jpg" alt=""class="lunbo"></a>#}
{# </li>#}
</ul>
</div>
<div class="lr-tab">
<div class="left btn"></div>
<div class="right btn"></div>
</div>
<div class="tab-btn">
<ul>
<li class="btn"></li>
<li class="btn"></li>
<li class="btn"></li>
</ul>
</div>
</div>
</div>
<div class="information">
<h1><b>●物品信息</b></h1>
<p>物品名称:
<span >{{ data.r_name }}</span>
</p>
<p>物品分类:
<span >{{ data.r_classification }}</span>
</p>
<p>物品详情:
<span>{{ data.r_detail }}</span>
</p>
</div>
<div class="information">
<h1><b>●相关信息</b></h1>
<p>拾取时间:
<span>{{ data.r_date }}</span>
</p>
<p>拾取地点:
<span>{{ data.r_place }}</span>
</p>
</div>
<div class="information">
<h1><b>●联系方式</b></h1>
<p>Tel/QQ/VX:
<span>{{ data.r_contact_details }}</span>
</p>
</div>
<div class="recevice">
<div class="btn">
<!-- <a href="#">领取</a> -->
<button>领取</button>
</div>
</div>
</div>
<div class="person">
</div>
</div>
</body>
<script type="text/javascript" src="{% static 'js/second_views_details.js' %}"></script>
<!-- <script type="text/javascript">
window.addEventListener("scroll",function (){
let header=document.querySelector("header");
header.classList.toggle("sticky",window.scrollY > 0);
})
</script> -->
</html>
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="{% static 'css/start_views.css' %}"/>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
<title></title>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="{% url 'second_views/' %}" class="before">失物招领</a>
<a href="{% url 'publish' %}" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
{% if requests.session.is_login == True %}
<a href="{% url 'per_center' %}" class="last">个人中心</a>
{% else %}
<a href="{% url 'login' %}" class="last">登录 . 注册</a>
{% endif %}
</div>
<div class="search-box">
<div class="shadow"></div>
<input type="text" placeholder="请输入遗失物品名称:水杯">
<ion-icon name="search"></ion-icon>
</div>
<script src="https://unpkg.com/ionicons@4.5.10-0/dist/ionicons.js"></script>
<div class="picture">
<div class="banner" >
<div class="img-wrap">
<ul>
<li class="item" style="display: block">
<a href="#"><img src="{% static 'img/海报.jpg' %}" alt="" class="lunbo"></a>
</li>
<li class="item">
<a href="#"><img src="{% static 'img/海报2.jpg' %}" alt="" class="lunbo"></a>
</li>
<li class="item">
<a href="#"><img src="{% static 'img/HAIBAO1.jpg' %}" alt=""class="lunbo"></a>
</li>
</ul>
</div>
<div class="lr-tab">
<div class="left btn"></div>
<div class="right btn"></div>
</div>
<div class="tab-btn">
<ul>
<li class="btn"></li>
<li class="btn"></li>
<li class="btn"></li>
</ul>
</div>
</div>
</div>
<div class="navbar">
<div>
<ul>
<li><a href="#">物品分类</a>
<ul>
<li><a href="search_classification?classification=live">生活用品</a></li>
<li><a href="search_classification?classification=study">学习用品</a></li>
<li><a href="search_classification?classification=ele">电子设备</a></li>
<li><a href="search_classification?classification=makeup">化妆用品</a></li>
<li><a href="search_classification?classification=bag">包具</a></li>
<li><a href="search_classification?classification=one_card">一卡通</a></li>
<li><a href="search_classification?classification=card">证件</a></li>
<li><a href="search_classification?classification=other">其它</a></li>
</ul>
</li>
</ul>
</div>
<form action="/search_start_time/" method="post">
{% csrf_token %}
<div class="date">
丢失时间
<label>
<input type="date" name="before_time" class="时间1">
<input type="date" name="late_time" class="时间2">
</label>
</div>
<button class="button_c">提交</button>
</form>
<div>
<form action="/search_keyword/" method="post">
{% csrf_token %}
<label>
<input type="text" class="key" name="key" placeholder="关键字搜索:红色"/>
</label>
</form>
</div>
</div>
<div class="container">
{% for information in informations %}
<div onclick="window.open('start_views_details?id={{ information.id }}','_self')">
<img src="/media/{{ information.o_picture }}" alt="img">
<p>物品名称:{{ information.o_name }}</p>
<p>丢失地点:{{ information.o_place }}</p>
<p>物品详情:{{ information.o_detail }}</p>
<span>{{ information.o_date }}</span>
</div>
{% endfor %}
</div>
</body>
<script type="text/javascript" src="{% static 'js/start_view.js' %}"></script>
</html>
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="{% static 'css/second_views_details.css' %}"/>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo" alt="logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="{% url 'second_views/' %}" class="before">失物招领</a>
<a href="{% url 'publish' %}" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
{% if requests.session.is_login == True %}
<a href="{% url 'per_center' %}" class="last">个人中心</a>
{% else %}
<a href="{% url 'login' %}" class="last">登录 . 注册</a>
{% endif %}
</div>
<div class="first">
<div class="other">
<h1>
<b></b>
</h1>
<img src="img/25xt-711061-AbstractSharpBackgroundsz7.png" >
<p>昵称:<span>{{ data.users.user_name }}</span></p>
<p>ID:<span>{{ data.users.user_id }}</span></p>
</div>
<div class="box">
<div class="picture">
<div class="banner" >
<div class="img-wrap">
<ul>
<li class="item" style="display: block">
<a href="#"><img src="/media/{{ data.o_picture }}" alt="" class="lunbo"></a>
</li>
{# <li class="item">#}
{# <a href="#"><img src="img/R-C(1).jpg" alt="" class="lunbo"></a>#}
{# </li>#}
{# <li class="item">#}
{# <a href="#"><img src="img/R-C.jpg" alt=""class="lunbo"></a>#}
{# </li>#}
</ul>
</div>
<div class="lr-tab">
<div class="left btn"></div>
<div class="right btn"></div>
</div>
<div class="tab-btn">
<ul>
<li class="btn"></li>
<li class="btn"></li>
<li class="btn"></li>
</ul>
</div>
</div>
</div>
<div class="information">
<h1><b>●物品信息</b></h1>
<p>物品名称:
<span >{{ data.o_name }}</span>
</p>
<p>物品分类:
<span >{{ data.o_classification }}</span>
</p>
<p>物品详情:
<span>{{ data.o_detail }}</span>
</p>
</div>
<div class="information">
<h1><b>●相关信息</b></h1>
<p>丢失时间:
<span>{{ data.o_date }}</span>
</p>
<p>丢失地点:
<span>{{ data.o_place }}</span>
</p>
</div>
<div class="information">
<h1><b>●联系方式</b></h1>
<p>Tel/QQ/VX:
<span>{{ data.o_contact_details }}</span>
</p>
</div>
<div class="recevice">
<div class="btn">
<!-- <a href="#">领取</a> -->
<button>领取</button>
</div>
</div>
</div>
<div class="person">
</div>
</div>
</body>
<script type="text/javascript" src="{% static 'js/second_views_details.js' %}"></script>
<!-- <script type="text/javascript">
window.addEventListener("scroll",function (){
let header=document.querySelector("header");
header.classList.toggle("sticky",window.scrollY > 0);
})
</script> -->
</html>
from django.test import TestCase
# Create your tests here.
import time
from django.db.models import Q
from django.http import HttpResponse, JsonResponse
from django.shortcuts import render, redirect
#导入Django自带的哈希加密解密
from django.contrib.auth.hashers import make_password, check_password
#导入随机模块用来生成随机账号
import random
#导入models中的类对数据库进行操作
import requests
from Lost_Found import models
'''
@def Random_password,registers,login
@function 注册登录
@author yinzhecheng
@date 2022/2/14
'''
#生成一个随机ID,账号由两个大写字母两个小写字母和四个数字组成
def Random_password():
String = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
string = ['a','b','c','d','e','f','g','h','i','j','k','l','n','n','o','p','q','r','s','t','u','v','w','x','y','z']
num = ['0','1','2','3','4','5','6','7','8','9']
user_id = ''
# while(1):
for item in range(2):
number = random.randint(0,25)
user_id = user_id + String[number]
for item in range(2):
number = random.randint(0,25)
user_id = user_id + string[number]
for item in range(4):
number = random.randint(0,9)
user_id = user_id + num[number]
return user_id
# qq_code = ''
#
# def send_qq_code(request):
# """
# 发送邮箱验证码
# :param to_mail: 发到这个邮箱
# :return: 成功:0 失败 -1
# """
# # 生成邮箱验证码
# qq_code = '%04d' % random.randint(0, 9999)
# email = '2318247512@qq.com'
# email_title = '邮箱激活'
# email_body = "您的邮箱注册验证码为:{0}, 该验证码有效时间为两分钟,请及时进行验证。".format(qq_code)
# send_status = send_mail(subject=email_title, message=email_body, from_email=EMAIL_HOST_USER, recipient_list=[email])
# return JsonResponse({'code':qq_code})
#注册账号
def registers(request):
if request.method != 'POST': #如果不是POST,抛出表单,否则提交表单
return render(request,'login.html')
elif request.POST.get("submit") == "get_code" :
name = request.POST.get("name")
password = request.POST.get("password")
password_ag = request.POST.get("password_ag")
tel = request.POST.get("tel")
tel_list = models.Users.objects.filter(user_tel=tel)
if tel_list :
error1 = ".号码已注册"
return render(request, 'login.html', {'name': name, 'password': password, 'password_ag': password_ag,
"error1": error1})
if request.POST.get("tel") == "" or len(request.POST.get("tel")) != 11:
error1 = ".请填写正确号码"
return render(request, 'login.html',{'name': name, 'password': password, 'password_ag': password_ag,
"error1":error1})
tel_code = '%04d' % random.randint(0, 9999)
request.session["code"] = tel_code
header = {
"Authorization": "APPCODE de9c1b122840409cb40daa14c385d084",
}
body = {
"content": f'code:{ tel_code }',
"phone_number": f'{tel}',
"template_id": "TPL_0000",
}
url = 'https://dfsns.market.alicloudapi.com/data/send_sms'
response = requests.post(url=url, data=body, headers=header)
print(tel_code)
return render(request,'login.html',{'name':name,'password':password,'password_ag':password_ag,'tel':tel})
else: #提交表单并验证输入的信息
name = request.POST.get("name")
password = request.POST.get("password")
password_ag = request.POST.get("password_ag")
tel = request.POST.get("tel")
code = request.POST.get("code")
if not name or not password or not password_ag or not tel:
error1 = '.请填写完整信息'
return render(request, 'login.html',
{ 'error1':error1, 'name': name, 'password': password, 'password_ag': password_ag,
'tel':tel, 'code': code})
id = Random_password()
#filter返回一个列表,匹配数据库中的user_name是否有name,下同
user_list = models.Users.objects.filter(user_name=name)
#用来判断该账号是否唯一,如若存在则进行提示
if user_list:
error1 = '.用户名已存在'
return render(request,'login.html',{'error1':error1,'name':name,'password':password,'password_ag':
password_ag,'tel':tel,'code':code})
#用来判断两次密码是否一致,如若不一致则做出提示
if password != password_ag:
error1 = '.两次密码不一致'
return render(request,'login.html',{'error1':error1,"name":name,'password':password,'password_ag':
password_ag,'tel':tel,'code':code})
#用来判断验证码是否正确
if code != request.session['code'] :
error1 = '.验证码有误'
return render(request,'login.html',{'error1':error1,"name":name,'password':password,
'password_ag':password_ag,'tel':tel,'code':code})
else:
user_list1 = models.Users.objects.filter(user_id=id)
#用来判断随机生成的ID是否唯一,如若存在则重新生成一个直到生成的ID为唯一的
while(1):
if user_list1:
id = Random_password()
user_list1 = models.Users.objects.filter(user_id=id)
else:break
xiha_password = make_password(password,None,'pbkdf2_sha256')
user = models.Users.objects.create(user_name=name, user_password=xiha_password, user_id=id, user_tel=tel)
user.save()
return render(request,'login.html')
#账号登录
def login(request):
if request.method != 'POST':
return render(request,'login.html')
else:
tel = request.POST.get("tel")
password = request.POST.get("password")
#判断用户是否存在,如果不存在静默失败,提示用户
try:
user_tel = models.Users.objects.get(user_tel=tel)
except:
error = '.用户不存在'
return render(request,'login.html',{'error':error})
Info_user = models.Users.objects.get(user_tel = tel)
XIHA_password = Info_user.__dict__['user_password']
#通过check_password检测密码是否正确
if check_password(password,XIHA_password):
user_id = models.Users.objects.get(user_tel=tel).user_id
request.session["user_id"] = user_id
request.session["is_login"] = True
return redirect('start_views')
else:
#如果密码错误,刷新页面时用户名仍然存在
old_tel = tel
error = '.密码错误'
return render(request,'login.html',{'error':error,'old_tel':old_tel})
#忘记密码
def lose_password(request):
if request.method != "POST":
return render(request,"lose_password.html")
elif request.POST.get("submit") == "get_code":
tel = request.POST.get("tel")
password = request.POST.get("password")
password_ag = request.POST.get("password_ag")
if request.POST.get("tel") == "" or len(request.POST.get("tel")) != 11:
error = ".请填写正确号码"
return render(request, 'lose_password.html', {'tel': tel, 'password': password, 'password_ag': password_ag,
"error": error})
tel_code = '%04d' % random.randint(0, 9999)
request.session["code"] = tel_code
header = {
"Authorization": "APPCODE de9c1b122840409cb40daa14c385d084",
}
body = {
"content": f'code:{tel_code}',
"phone_number": f'{tel}',
"template_id": "TPL_0000",
}
url = 'https://dfsns.market.alicloudapi.com/data/send_sms'
response = requests.post(url=url, data=body, headers=header)
return render(request,'lose_password.html',{'tel':tel,'password':password,'password_ag':password_ag})
else:
tel = request.POST.get("tel")
password = request.POST.get("password")
password_ag = request.POST.get("password_ag")
code = request.POST.get("code")
if not tel or not password or not password_ag or not code:
error = '.请填写完整信息'
return render(request, 'lose_password.html',
{ 'error':error, 'tel':tel , 'password': password, 'password_ag': password_ag,
'code': code})
user_tel = models.Users.objects.filter(user_tel=tel)
if not user_tel:
tel_error = '.账号不存在'
return render(request,'lose_password.html',{'tel_error ':tel_error ,'tel':tel,'password':password,'password_ag'
:password_ag,'code':code})
#用来判断两次密码是否一致,如若不一致则做出提示
if password != password_ag:
error = '两次密码不一致'
return render(request,'lose_password.html',{'error':error,'password':password,'password_ag':password_ag,'tel':
tel,'code':code})
#用来判断验证码是否正确
if code != request.session['code'] :
error = '.验证码有误!'
return render(request,'lose_password.html',{'error':error,'password':password,'password_ag':
password_ag,'tel':tel,'code':code})
else:
xiha_password = make_password(password, None, 'pbkdf2_sha256')
models.Users.objects.filter(user_tel=tel).update(user_password=xiha_password)
return render(request,'login.html')
#招领物品详情页面
def second_views_details(request):
id = request.GET.getlist('id')
list1 = list(map(str, id))
id1 = int(list1[0])
ob_info = models.Recruitment.objects.filter(id=id1)
information = ob_info.first()
return render(request,'second_views_details.html',{'data':information})
#寻物物品详情页面
def start_views_details(request):
id = request.GET.getlist('id')
list1 = list(map(str, id))
id1 = int(list1[0])
ob_info = models.Object_hunting.objects.filter(id=id1)
information = ob_info.first()
return render(request,'start_views_details.html',{'data':information})
def publish(request):
if not 'user_id' in request.session:
return redirect("/login/")
if request.method == 'GET':
return render(request, 'publish.html')
else:
release_type = request.POST['release_type']
name = request.POST['name']
classification = request.POST['classification']
detail = request.POST['detail']
date = request.POST['date']
place = request.POST['place']
contact_details = request.POST['contact']
user_id = 1
file_obj = request.FILES.get('img1')
# print(username,password,phone,e_mail)
file_name = 'img/' + str(user_id) + '_' + str(int(time.time())) + '.' + file_obj.name.split('.')[-1]
# if file_obj.type.split('.')[-1] not in ['jpeg', 'jpg', 'png']:
# return HttpResponse('输入文件有误')
if release_type == '寻物':
try:
hunting = models.Object_hunting()
hunting.o_name = name
hunting.o_classification = classification
hunting.o_detail = detail
hunting.o_date = date
hunting.o_place = place
hunting.o_contact_details = contact_details
hunting.users_id = user_id
hunting.o_picture = file_name
hunting.save()
f = open(f'media/{file_name}', mode='wb')
for chunk in file_obj.chunks():
f.write(chunk)
f.close()
except Exception as e:
print(e)
return redirect('start_views')
if release_type == '招领':
try:
recruitment = models.Recruitment()
recruitment.r_name = name
recruitment.r_classification = classification
recruitment.r_detail = detail
recruitment.r_date = date
recruitment.r_place = place
recruitment.r_contact_details = contact_details
recruitment.users_id = user_id
recruitment.r_picture = file_name
recruitment.save()
f = open(f'media/{file_name}', mode='wb')
for chunk in file_obj.chunks():
f.write(chunk)
f.close()
except Exception as e:
print(e)
return redirect('second_views/')
#寻物的初始化搜索结果
def start_views(requests):
count = models.Object_hunting.objects.count()#数据库中总数
informations=models.Object_hunting.objects.order_by('-o_publish_time')[0:count]#随机打散数据排序,取出数据
return render(requests,'start_views.html',locals())
# return HttpResponse('ok')
#招领的初始化搜索结果
def second_views(requests):
count = models.Recruitment.objects.count()#数据库中总数
print(count)
informations=models.Recruitment.objects.order_by('-r_publish_time')[0:count]#随机打散数据排序,取出所有数据库数据
for information in informations:#令每个数据独立出来
print('标题:',information.r_name,'发布日期:',information.r_publish_time)
return render(requests,'second_views.html',locals())
#用户注销
def login_out(request):
try:
del request.session["user_id"]
except:
pass
try:
del request.session["is_login"]
except:
pass
request.session.clear()
request.session.flush()
return redirect('start_views')
#用户中心
def per_center(request):
user_id = request.session['user_id']
user = models.Users.objects.filter(user_id=user_id).first()
o_objects = models.Object_hunting.objects.filter(users_id=user.id)
r_objects = models.Recruitment.objects.filter(users_id=user.id)
return render(request,'per_center.html',{'user':user,'o_objects':o_objects,'r_objects':r_objects})
#其它
def about(request):
return render(request,'about.html')
#寻物物品分类筛选
def search_classification(request):
class1 = request.GET.getlist('classification')
results = models.Object_hunting.objects.filter(o_classification=class1[0]).order_by('-o_publish_time')
return render(request,'start_views.html',{'informations':results})
#寻物时间筛选
def search_start_time(request):
start_time = request.POST.get('before_time')
end_time = request.POST.get('late_time')
result2 = models.Object_hunting.objects.filter(Q(o_date__gte=start_time) & Q(o_date__lte=end_time))
# results2 = models.Object_hunting.objects.filter(o_publish_time__range =(start_time,end_time)).order_by('-o_publish_time')
return render(request,'start_views.html',{'informations':result2})
#关键字
def search_keyword(request):
keyword = request.POST.get('key')
results = models.Object_hunting.objects.filter(
Q(o_name__icontains=keyword)|Q(o_detail__icontains=keyword)|Q(o_place__icontains=keyword)|Q(
o_contact_details__icontains=keyword))
return render(request,"start_views.html",{'informations':results})
#寻物物品分类筛选
def search_classification1(request):
class1 = request.GET.getlist('classification')
results = models.Recruitment.objects.filter(r_classification=class1[0]).order_by('-r_publish_time')
return render(request,'second_views.html',{'informations':results})
#寻物时间筛选
def search_second_time1(request):
start_time = request.POST.get('before_time')
end_time = request.POST.get('late_time')
result2 = models.Recruitment.objects.filter(Q(r_date__gte=start_time) & Q(r_date__lte=end_time))
# results2 = models.Object_hunting.objects.filter(o_publish_time__range =(start_time,end_time)).order_by('-o_publish_time')
return render(request,'second_views.html',{'informations':result2})
#关键字
def search_keyword1(request):
keyword = request.POST.get('key')
results = models.Recruitment.objects.filter(
Q(r_name__icontains=keyword)|Q(r_detail__icontains=keyword)|Q(r_place__icontains=keyword)|Q(
r_contact_details__icontains=keyword))
return render(request,"second_views.html",{'informations':results})
"""
ASGI config for TYUT_Lost_Found project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'TYUT_Lost_Found.settings')
application = get_asgi_application()
"""
Django settings for TYUT_Lost_Found project.
Generated by 'django-admin startproject' using Django 4.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
import os
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-)6r$hunze49q=92+-yxk^l6i=^8n1k!4zq3x^*8dzysejcmrh6'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ["*"]
# Application definition
INSTALLED_APPS = [
'Lost_Found.apps.LostFoundConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'TYUT_Lost_Found.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'TYUT_Lost_Found.wsgi.application'
# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'yunxiao',
'USER': 'root',
'PASSWORD': 'yzc200212*+-.',
'HOST': 'localhost',
'POST': '3306',
}
}
# Password validation
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/4.0/topics/i18n/
LANGUAGE_CODE = 'zh-Hans'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_TZ = False
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.0/howto/static-files/
STATIC_URL = 'static/'
# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
#配置发送邮件
# EMAIL_HOST = 'smtp.qq.com'
# EMAIL_PORT = 25 #发件箱的smtp服务器端口
# EMAIL_HOST_USER = '2910711781@qq.com' # 你的 QQ 账号
# EMAIL_HOST_PASSWORD = 'eoxzhkscnfqgdfea'
# EMAIL_USE_TLS = True # 这里必须是 True,否则发送不成功
MEDIA_ROOT=os.path.join(BASE_DIR,'media').replace("\\","/")
MEDIA_URL='/media/'
"""TYUT_Lost_Found URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/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.urls import path, re_path
from django.conf import settings
from django.conf.urls.static import static
app_name = 'Lost_Found'
from Lost_Found import views
urlpatterns = [
#注册
path('registers/', views.registers, name='registers'),
#登录.注册
path('login/', views.login, name='login'),
#找回密码
path('lose_password/',views.lose_password,name='lose_password'),
#招领详情页面
re_path(r'^second_views/second_views_details',views.second_views_details,name="second_views_details"),
#寻物详情页面
re_path(r'^start_views/start_views_details',views.start_views_details,name="start_views_details"),
#个人中心招领详情页面
re_path(r'^per_center/second_views_details/', views.second_views_details, name="second_views_details"),
#个人中心寻物详情页面
re_path(r'^per_center/start_views_details', views.start_views_details, name="start_views_details"),
#寻物
path('start_views/',views.start_views,name='start_views'),
path('search_start_time/start_views_details/',views.start_views),
path('search_keyword/start_views_details/',views.start_views),
path('search_second_time1/second_views_details/', views.second_views_details),
path('search_keyword1/second_views_details/', views.second_views_details),
#招领
path('second_views/',views.second_views,name='second_views/'),
#发布
path('publish/',views.publish,name='publish'),
#注销
path('per_center/login_out/',views.login_out),
#个人中心
path('per_center/',views.per_center,name='per_center'),
#其它
path('about/',views.about,name="about"),
#物品分类筛选
re_path(r'^start_views/search_classification',views.search_classification),
#时间筛选
path('search_start_time/',views.search_start_time),
#关键字筛选
path('search_keyword/',views.search_keyword),
#
re_path(r'^second_views/search_classification1', views.search_classification1),
#时间筛选
path('search_second_time1/',views.search_second_time1),
#关键字筛选
path('search_keyword1/',views.search_keyword1),
]+static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
"""
WSGI config for TYUT_Lost_Found project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'TYUT_Lost_Found.settings')
application = get_wsgi_application()
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'TYUT_Lost_Found.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment