Jelajahi Sumber

外网首页更换

yf_ymm 5 tahun lalu
induk
melakukan
bc2fbd8e93

+ 11 - 2
apps/Equipment/urls.py

@@ -3,10 +3,10 @@ from django.views.static import serve
 
 from apps.Equipment.views import (
     Back_Manage, CKArticle_View, Contrast_View, CropCount, Cropdata,
-    Dorm_Check, Dorm_Check_List, Dorm_Detail, Dorm_Img, Dorm_List, Dorm_Photo,
+    Dorm_Check, Dorm_Check_List, Dorm_Detail, Dorm_Img, Dorm_List, Dorm_Photo,Farm_list,
     Dorm_Pub, Equip_Check, Equip_Check_List, Equip_Photo, Equip_Pub,
     Equip_Show_Detail, Equip_Show_List, Equip_Test, Farm_Choice, Farm_List,
-    Farm_Mark, Garden_Check, Garden_Check_List, Garden_Detail, Garden_List,
+    Farm_Mark, Garden_Check, Garden_Check_List, Garden_Detail,Garden_Intro, Garden_List,Tourist,Tourist_List,
     Garden_Manage_New, Garden_Manage_View, Garden_Pub, 
     Garden_User_New, Garden_User_View, Garden_View, Industry_Data, Info_Manage,
     Info_Pub, JKlist, JKManage_View, Limit, Map_Test, News_Check,
@@ -64,6 +64,12 @@ urlpatterns = [
     url(r'^garden_view$', Garden_View.as_view(), name='garden_view'),
     url(r'^garden_list$', Garden_List.as_view(), name='garden_list'),
     url(r'^garden_detail$', Garden_Detail.as_view(), name='garden_detail'),
+    url(r'^garden_intro$', Garden_Intro.as_view(), name='garden_intro'),
+
+    #旅游导览
+    url(r'^tourist$', Tourist.as_view(), name='tourist'),
+    url(r'^touristList$', Tourist_List.as_view(), name='touristList'),
+
     # 生产管理
     url(r'^garden_manage_view$', Garden_Manage_View.as_view(), name='garden_manage_view'),
     
@@ -90,6 +96,9 @@ urlpatterns = [
     url(r'^dorm_photo$', Dorm_Photo.as_view(), name='dorm_photo'),
     url(r'^dorm_list$', Dorm_List.as_view(), name='dorm_list'),
     url(r'^dorm_detail$', Dorm_Detail.as_view(), name='dorm_detail'),
+    # 农场导览 
+    url(r'^farm_list$', Farm_list.as_view(), name='farm_list'),
+
     # 视频接口
     url(r'^video_list$', Video_List.as_view(), name='video_list'),
     url(r'^video_detail$', Video_Detail.as_view(), name='video_detail'),

+ 32 - 1
apps/Equipment/views.py

@@ -275,6 +275,12 @@ class Garden_View(ListView):
         return render(request, 'outerNet/fourPick.html', context={})
     def post(self,request):
         pass
+# 主页四级采摘进入的介绍页
+class Garden_Intro(ListView):
+    def get(self,request):
+        return render(request, 'outerNet/pickIntro.html', context={})
+    def post(self,request):
+        pass
 
 
 # 四季采摘-园区详情
@@ -295,7 +301,18 @@ class Garden_Detail(ListView):
         data = json.dumps(data)
         return HttpResponse(data)
 
-
+#旅游导览
+class Tourist(ListView):
+    def get(self,request):
+        return render(request, 'outerNet/tourist.html', context={})
+    def post(self,request):
+        pass
+#旅游导览
+class Tourist_List(ListView):
+    def get(self,request):
+        return render(request, 'outerNet/touristList.html', context={})
+    def post(self,request):
+        pass
 
 # 民宿列表
 class Dorm_List(ListView):
@@ -323,6 +340,20 @@ class Dorm_Detail(ListView):
         pass
 
 
+# 农场导览  
+class Farm_list(ListView):
+    def get(self,request):
+        page = int(request.GET.get("page"))
+        con = request.GET.get("condition")
+        hotel_list = Hotel_Info.objects.all()
+        if con:
+            hotel_list = Hotel_Info.objects.filter(name__contains=con)
+        nums = hotel_list.count()
+        hotel = hotel_list[(10*(page-1)):(page*10)]
+        return render(request, 'outerNet/farmList.html', context={"nums":nums,"hotel":hotel,"page":page,"con":con})
+    def post(self,request):
+        pass
+
 # 视频列表
 class Video_List(ListView):
     def get(self,request):

+ 3 - 1
apps/Home/urls.py

@@ -1,14 +1,16 @@
 from django.conf.urls import url
 from django.views.static import serve
-from apps.Home.views import Home_Test,Home,Login_View,Modify_Head ,User_Img,User_News,User_Land,User_Check
+from apps.Home.views import Home_Test,Home,Home2,Login_View,Login2_View,Modify_Head ,User_Img,User_News,User_Land,User_Check
 
 app_name = 'Home'
 
 urlpatterns = [
     url(r'^home_test$', Home_Test.as_view(), name='home_test'),
     url(r'^home$', Home.as_view(), name='home'),
+    url(r'^home2$', Home2.as_view(), name='home2'),
     url(r'^$', Home.as_view(), name='home'),
     url(r'^login$',Login_View.as_view(), name='login'),
+    url(r'^login2$',Login2_View.as_view(), name='login2'),
     url(r'^modify_head$',Modify_Head.as_view(), name='modify_head'),
     url(r'^user_img$',User_Img.as_view(), name='user_img'),
     url(r'^user_news$',User_News.as_view(), name='user_news'),#新建用户

+ 33 - 1
apps/Home/views.py

@@ -110,8 +110,14 @@ class Login_View(View):
                             return render(request, 'outerNet/index2.html')
                         elif returnUrl != "":
                             print("returnUrl is not empty")
-                            return render(request, 'outerNet/index2.html')
+                            return render(request, 'outerNet/index.html')
+# 用户登录2
+class Login2_View(View):
+    def get(self, request):
+        return render(request, 'outerNet/login2.html', context={})
 
+    def post(self, request):
+        pass
 
 # 外网首页
 class Home(View):
@@ -139,6 +145,32 @@ class Home(View):
     def post(self, request):
         pass
 
+# 外网首页2
+class Home2(View):
+    def get(self, request):
+        user_news = CKArticle.objects.filter(art_type=5)[0:10]
+        zero_news = CKArticle.objects.filter(art_type=0)[0:10]
+        one_news = CKArticle.objects.filter(art_type=1)[0:10]
+        two_news = CKArticle.objects.filter(art_type=2)[0:10]
+        video_news = Video_data.objects.all()[0:4]
+        product = Product.objects.all()[0:8]
+        pick = Pick_Pub.objects.all()[0:6]
+        farm = FarmList.objects.all()[0:6]
+        hotel = Hotel_Info.objects.all()[0:5]
+        if request.user.is_authenticated():
+            user_name = request.user.username
+            curr_user = MyUser.objects.get(username=user_name)
+            print('user_name=', user_name)
+            print('user=', curr_user.username)
+        else:
+            curr_user = ""
+        return render(request, 'outerNet/index2.html', context={"user_news": user_news,"zero_news": zero_news, "one_news": one_news,
+                                                               "two_news": two_news, "video_news": video_news,"hotel":hotel,
+                                                               "product": product, "pick": pick, "farm": farm, "curr_user": curr_user})
+
+    def post(self, request):
+        pass
+
 
 # 首页设备显示
 class Home_Equip(View):

+ 1 - 1
second_pro/settings.py

@@ -29,7 +29,7 @@ DEBUG = True
 ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 
                 '120.27.222.26','.yfzhwlw.com','.zgzhwlw.com','iot.hnyfkj.cn',
                 '39.104.94.153', '.yfznscd.com',
-                '192.168.1.2'#手机app开发用端口
+                '192.168.1.7'#手机app开发用端口
                 ]
 
 

+ 26 - 10
templates/backstageNet/info/newsPub.html

@@ -164,19 +164,22 @@
                         <div class="layui-form-item">
                             <label class="layui-form-label">文章标题:</label>
                             <div class="layui-input-inline">
-                                <input type="text" name="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
+                                <input type="text" name="title" required lay-verify="required" placeholder="请输入标题"
+                                    autocomplete="off" class="layui-input">
                             </div>
                         </div>
                         <div class="layui-form-item">
                             <label class="layui-form-label">发布人:</label>
                             <div class="layui-input-inline">
-                                <input type="text" name="writer" required lay-verify="required" placeholder="请填写发布人" autocomplete="off" class="layui-input">
+                                <input type="text" name="writer" required lay-verify="required" placeholder="请填写发布人"
+                                    autocomplete="off" class="layui-input">
                             </div>
                         </div>
                         <div class="layui-form-item">
                             <label class="layui-form-label">文章简介:</label>
                             <div class="layui-input-inline layui-input-textarea">
-                                <textarea name="intro" lay-verify="required" placeholder="请输入内容" class="layui-textarea"></textarea>
+                                <textarea name="intro" lay-verify="required" placeholder="请输入内容"
+                                    class="layui-textarea"></textarea>
                             </div>
                         </div>
                         <div class="layui-form-item">
@@ -203,7 +206,8 @@
                                 <input type="hidden" value="5" name="type">
                                 <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                                 <!-- <button type="reset" class="layui-btn layui-btn-primary">重置</button> -->
-                                <button class="layui-btn layui-btn-primary" type="button" onclick="clearForm()">取消</button>
+                                <button class="layui-btn layui-btn-primary" type="button"
+                                    onclick="clearForm()">取消</button>
                             </div>
                         </div>
                     </form>
@@ -295,7 +299,7 @@
                             } else {
                                 layer.msg("发布成功,等待审核", { icon: 1 });
                             }
-                            
+
                             clearForm()
                         } else {
                             if (window.id !== '') {
@@ -327,7 +331,7 @@
             fuzhi()
             if (window.id !== '') {
                 var index = parent.layer.getFrameIndex(window.name);
-			    parent.layer.close(index);//关闭当前页
+                parent.layer.close(index);//关闭当前页
                 sessionStorage.removeItem('biao')
             }
         }
@@ -335,13 +339,25 @@
         // 示例1:设置工具栏为基本工具栏,高度为70
         var editor1 = CKEDITOR.replace('editor1',
             {
-                filebrowserBrowseUrl: 'test_aaphoto',
+                filebrowserBrowseUrl: 'test_photo',
                 height: 430,
                 toolbar:
                     [
-                        ['Undo', 'Redo'],
-                        ['Styles', 'FontSize', 'Format', 'JustifyLeft ', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
-                        ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Image']
+                        //         ['Undo', 'Redo'],
+                        //         ['Styles', 'FontSize', 'Format', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+                        //         ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Image']
+                        {name: 'document',items: ['Source', '-', 'DocProps', 'Preview', 'Print', '-']},
+                        {name: 'clipboard',items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo']},
+                        {name: 'editing',items: ['Find', 'Replace', '-', 'SelectAll', '-']},
+                        { name: 'basicstyles',items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat']},
+                        '/',
+                        {name: 'paragraph',items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl']},
+                        {name: 'links',items: ['Link', 'Unlink', 'Anchor']},
+                        {name: 'insert',items: ['Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak']},
+                        '/',
+                        { name: 'styles',items: ['Styles', 'Format', 'Font', 'FontSize']},
+                        { name: 'colors',items: ['TextColor', 'BGColor']},
+                        { name: 'tools',items: [ 'ShowBlocks', '-']}
                     ]
             }
         );

+ 0 - 0
templates/home/home.html


+ 373 - 0
templates/outerNet/farmList.html

@@ -0,0 +1,373 @@
+{% load staticfiles %}
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>农场列表页</title>
+    <link rel="stylesheet" href="{% static '/lib/font/fontIcon/iconfont.css' %}">
+    <link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css">
+    <link rel="stylesheet" href="{% static '/lib/css/reset.css' %}">
+    <link rel="stylesheet" href="{% static '/lib/layui/css/layui.css' %}">
+    <link rel="stylesheet" href="{% static '/css/common.css' %}">
+    <link rel="stylesheet" href="{% static '/css/module.css' %}">
+    <!-- <link rel="stylesheet" href="{% static '/css/hotelList.css' %}"> -->
+    <style>
+        /* 内容模块 */
+        .hacienda .haciendaList{
+            display: flex;
+            flex-flow: wrap;
+        }
+        .hacienda .haciendaList{
+            padding: 20px 20px 0 20px;
+        }
+        .hacienda .haciendaItem{
+            display: flex;
+            margin-bottom: 20px;
+        }
+        .hacienda .haciendaImg{
+            width: 195px;
+            height: 165px;
+            position: relative;
+        }
+        .hacienda .haciendaImg .haciendaImg1{
+            width: 100%;
+            height: 100%;
+        }
+        .hacienda .haciendaImg .haciendaImg2{
+            position: absolute;
+            top: 0;
+            left: 10px;
+        }
+        .hacienda .haciendaItem .haciendaTxt{
+            width: 147px;
+            padding: 10px 10px;
+        }
+        .hacienda .haciendaItem .haciendaTxt h2{
+            font-size: 14px;
+            font-weight: bold;
+            line-height: 33px;
+            white-space: nowrap;
+            overflow: hidden;
+            text-overflow: ellipsis;
+        }
+        .hacienda .haciendaItem .haciendaTxt .desc{
+            letter-spacing: 2px;
+            height: 100px;
+            overflow: hidden;
+        }
+        .hacienda .haciendaItem .haciendaTxt button{
+            color: #fff;
+            padding: 5px 6px;
+            border-radius: 5px;
+        }
+        .hacienda .haciendaItem .haciendaTxt button.btn1{
+            background-color: #00aeed;
+        }
+        .hacienda .haciendaItem .haciendaTxt button.btn2{
+            background-color: #3bb852;
+        }
+        /* 弹出观光样式 */
+        .tourismShow{
+            position: relative;
+            z-index: 999;
+            opacity: 0;
+            display: none;
+            position: fixed;
+            top: 25%;
+            left: 50%;
+            margin-left: -300px;
+            width: 600px;
+            min-height: 400px;
+            background-color: #fff;
+            border: 1px solid #f1f1f1;
+            -webkit-box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+            -moz-box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+            -o-box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+            box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+            padding: 20px;
+            border-radius: 12px;
+            z-index: 9;
+            border-top-left-radius: 0;
+            cursor: default;
+            border-top-right-radius: 0;
+            transition: all .5s;
+        }
+        .tourismShow .title{
+            border-left: 3px solid #ff6a28;
+            padding-left: 8px;
+            font-size: 16px;
+        }
+        .tourismShow .line{
+            border-bottom: 1px solid #ddd;
+            margin-top: 10px;
+        }
+        .tourismShow .content{
+            height: 430px;
+            padding-top: 20px;
+        }
+        .tourismShow .tourismShowCloseBtn{
+            position: absolute;
+            right: 15px;
+            top: 11px;
+            border-radius: 50%;
+            border: 2px solid #ddd;
+            width: 25px;
+            height: 25px;
+            line-height: 25px;
+            text-align: center;
+            cursor: pointer;
+        }
+        .tourismShow .content .guideForm>input{
+            width: 40%;
+        }
+        .tourismShow .content .guideForm>button{
+            color: #fff;
+            padding: 5px 6px;
+            border-radius: 5px;
+            vertical-align: middle;
+            margin-left: 10px;
+            background: #1eaeed;
+        }
+        .tourismShow .content .guideForm>button{
+            color: #fff;
+            padding: 5px 6px;
+            border-radius: 5px;
+            vertical-align: middle;
+            margin-left: 10px;
+            background: #1eaeed;
+        }
+        .tourismShow .content #map{
+            height: 373px;
+            margin-top: 10px;
+        }
+        .tourismShow .loadDiv{
+            position: absolute;
+            left: 45%;
+            top: 45%;
+        }
+    </style>
+</head>
+
+<body>
+    <div class="header">
+        <div class="headerTxt">
+            <div class="wrapper">
+                <p class="logoNameCn">休闲农业旅游网</p>
+                <p class="logoNameEn">Leisure agricultural tourism network</p>
+            </div>
+
+        </div>
+        <!-- 广告 -->
+        <div class="bjColor advImg"></div>
+    </div>
+    <!-- 主体部分 -->
+    <div class="content">
+        <div class="wrapper">
+            <div class="newsDiv">
+                <!-- 面包屑导航 -->
+                <div class="breadcrumb">
+                    <span class="layui-breadcrumb">
+                        <a href="home">首页</a>
+                        <a>
+                            <cite>农场导览</cite>
+                        </a>
+                    </span>
+                    <div class="searchDiv">
+                        <input type="text" id="searchTitlt" value="{{con|default:''}}" placeholder="请输入标题" autocomplete="off" class="layui-input" >
+                        <button type="button" onclick="searchCon()" class="layui-btn layui-btn-ms"><i class="layui-icon">&#xe615;</i></button>
+                    </div>
+                </div>
+                <!-- 新闻列表 -->
+                <div class="innerDiv">
+                    <div class="hacienda">
+                        <ul class="haciendaList">
+                            {% if hotel|length %} {% for hotelItem in hotel %}
+                            <li class="haciendaItem">
+                                <div class="haciendaImg">
+                                    <img class="haciendaImg1" src="{% static 'imgs/1.jpg'%}" alt="">
+                                </div>
+                                <div class="haciendaTxt">
+                                    <h2>云飞农场</h2>
+                                    <div class="desc">位于和南沙鞥周三水电费,杀敌欧福布斯后撒粉红色的。阿时候发货萨芬,是大法师。</div>
+                                    <div>
+                                        <button class="btn1">观光路线</button>
+                                        <button class="btn2">导游导览</button>
+                                    </div>
+                                </div>
+                            </li>
+                            {% endfor %} {% else %}
+                                <li class="videoItem" style=" width: 100%;">
+                                    <div style="text-align:center;line-height:200px;font-size:18px">暂无数据</div>
+                                </li>
+                            {% endif %}
+                        </ul>
+                    </div>
+                    
+                    {% if hotel|length %}
+                    <div id="page"></div>
+                    <input type="hidden" value="{{nums}}" id="nums">
+                    <input type="hidden" value="{{page}}" id="currPage">
+                    {% else %}
+                    {% endif %}
+                </div>
+            </div>
+        </div>
+    </div>
+    <!-- 底部版权 -->
+    <div class="footer bjColor">
+        <div class="wrapper">
+            <div class="floatDiv">
+                <div class="copyrightTxt">
+                    <div>休闲农业旅游网</div>
+                    <div>联系人:李四  联系电话:13811111111</div>
+                    <div>地址:河南省郑州市XXXXXXXXXXXXXXXXXXXXXXXXXX</div>
+                </div>
+                <div class="WeChatCode">
+                    <img src="{% static '/imgs/WeChatCode.jpg' %}" alt="">
+                    <p>关注公众号</p>
+                </div>
+            </div>
+            <div class="copyright">
+                版权所有XXXXXXXXXXXXXXXXXXXXXX
+            </div>
+        </div>
+    </div>
+
+    <div class="tourismShow">
+        <div class="title">
+            <span>观光路线</span>
+            <div class="tourismShowCloseBtn"><i class="layui-icon layui-icon-close"></i></div>
+        </div>
+        <div class="line"></div>
+        <div class="content"></div>
+    </div>
+
+    <script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
+    <script src="https://webapi.amap.com/maps?v=1.4.15&key=3939967b919a8003377dd113fc445a3d&plugin=AMap.Driving"></script>
+    <script src="{% static '/lib/layui/layui.js'%}"></script>
+    <script>
+        //注意:导航 依赖 element 模块,否则无法进行功能性操作
+        layui.use(['element', 'laypage'], function () {
+            var element = layui.element;
+
+            //…
+            var laypage = layui.laypage;
+            var currPage = $('#currPage').val();
+            //执行一个laypage实例
+            laypage.render({
+                elem: 'page' //注意,这里的 test1 是 ID,不用加 # 号
+                , count: $('#nums').val() //数据总数,从服务端得到
+                // , limit: 5
+                , curr: currPage
+                , jump: function (obj, first) {
+                    //obj包含了当前分页的所有参数,比如:
+                    console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
+                    console.log(obj.limit); //得到每页显示的条数
+                    var searchTitlt = $('#searchTitlt').val();
+                    //首次不执行
+                    if (!first) {
+                        window.location.href = 'farm_list?page=' + obj.curr + '&condition=' + searchTitlt;
+                    }
+                }
+            });
+        });
+
+
+        $('#searchTitlt').on('keypress', function (e) {
+            if (e && e.keyCode == 13) { // 按 Esc 
+                searchCon()
+            }
+        })
+
+        function searchCon() {
+            var searchTitlt = $('#searchTitlt').val();
+            window.location.href = 'farm_list?page=1' + '&condition=' + searchTitlt;
+        }
+
+        $('.haciendaTxt .btn1').on('click',function(){
+            $('.tourismShow .title span').html('观光路线')
+            $('.tourismShow .content').html('<div style="text-align:center;width:100%;height:100%"><img  style="width:100%;height:100%" src="http://127.0.0.1:8000/static/imgs/banner2.jpg">')
+            $('.tourismShow').show();
+            $('.tourismShow').css('opacity',1)
+        })
+        $('.tourismShowCloseBtn').on('click',function(){
+            $('.tourismShow .content').html('')
+            $('.tourismShow').css('opacity',0)
+            setTimeout(function(){
+                $('.tourismShow').hide();
+            },500)
+        })
+        var map;
+        $('.haciendaTxt .btn2').on('click',function(){
+            $('.tourismShow .title span').html('导游导览');
+            var html = '<div class="">'+
+                        '<div class="guideForm">起始地点:<input type="text" id="startPath"><button onclick="searchWay()">确定</button></div>'+
+                        '<div id="map">地图</div>'+
+                        '</div>'
+            $('.tourismShow .content').html(html);
+            map = new AMap.Map('map', {
+                resizeEnable: true, //是否监控地图容器尺寸变化
+                zoom: 11, //初始化地图层级
+                center: [113.397428, 39.90923] //初始化地图中心点
+            });
+            var startIcon = new AMap.Icon({
+                // 图标尺寸
+                size: new AMap.Size(25, 34),
+                // 图标的取图地址
+                image: '//a.amap.com/jsapi_demos/static/demo-center/icons/dir-marker.png',
+                // 图标所用图片大小
+                imageSize: new AMap.Size(135, 40),
+                // 图标取图偏移量
+                imageOffset: new AMap.Pixel(-9, -3)
+            });
+            var endIcon = new AMap.Icon({
+                size: new AMap.Size(25, 34),
+                image: '//a.amap.com/jsapi_demos/static/demo-center/icons/dir-marker.png',
+                imageSize: new AMap.Size(135, 40),
+                imageOffset: new AMap.Pixel(-95, -3)
+            });
+            var marker = new AMap.Marker({
+                icon:endIcon,
+                position: new AMap.LngLat(113.397428, 39.90923),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+                title: '北京'
+            });
+            map.add(marker); 
+            $('.tourismShow').show();
+            $('.tourismShow').css('opacity',1)
+        })
+        function searchWay() {
+            map.clearMap();
+            var startPath = $("#startPath").val();
+            var endPath = '北京';
+
+            if (!startPath) {
+                $("#startPath").focus();
+                return;
+            }
+            $('.tourismShow .content').append('<div class="loadDiv"><img src="../static/imgs/timg.gif" /></div>')
+            //构造路线导航类
+            var driving = new AMap.Driving({
+                map: map,
+                // panel: "panel"
+            });
+            // 根据起终点名称规划驾车导航路线
+            driving.search([
+                { keyword: startPath, city: '' },
+                { keyword: endPath, city: '' }
+            ], function (status, result) {
+                if (status === 'complete') {
+                    // log.success('绘制驾车路线完成');
+                    $('.loadDiv').remove();
+                } else {
+                    alert('获取驾车数据失败:' + result)
+                    $('.loadDiv').remove();
+                }
+            });
+        }
+    </script>
+</body>
+
+</html>

+ 3 - 0
templates/outerNet/index.html

@@ -42,6 +42,7 @@
     <div class="header">
         <div class="headerTxt">
             <div class="wrapper">
+                <a href="home2" style="float: right;color: #fff;">切换首页</a>
                 <p class="logoNameCn">休闲农业旅游网</p>
                 <p class="logoNameEn">Leisure agricultural tourism network</p>
             </div>
@@ -619,6 +620,8 @@
                     <!-- Swiper -->
                     <div class="swiper-container homestay">
                         <div class="swiper-wrapper">
+                            -------------
+                            {{hotel}}
                             {% if hotel|length %} {% for hotelItem in hotel %}
                             <div class="swiper-slide">
                                 <div class="hotelDetial">

File diff ditekan karena terlalu besar
+ 1009 - 0
templates/outerNet/index2.html


+ 375 - 0
templates/outerNet/login2.html

@@ -0,0 +1,375 @@
+{% load staticfiles %}
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>登录界面</title>
+    <link rel="stylesheet" href="{% static '/lib/css/swiper.min.css' %}">
+    <link rel="stylesheet" href="{% static '/lib/font/fontIcon/iconfont.css' %}">
+    <link rel="stylesheet" href="{% static '/lib/font-awesome/4.5.0/css/font-awesome.css' %}">
+    <!-- <link rel="stylesheet" href="{% static '/lib/css/video-js.min.css' %}"> -->
+    <link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css">
+    <link rel="stylesheet" href="{% static '/lib/css/reset.css' %}">
+    <link rel="stylesheet" href="{% static '/css/common.css' %}">
+    <link rel="stylesheet" href="{% static '/css/header.css' %}">
+    <link rel="stylesheet" href="{% static '/css/login.css' %}">
+</head>
+
+<body>
+    <div class="header">
+        <div class="headerTop wrapper">
+            <!-- <div class="wrapper">
+                <a href="home" style="float: right;color: #fff;">切换首页</a>
+                <p class="logoNameCn">休闲农业旅游网</p>
+                <p class="logoNameEn">Leisure agricultural tourism network</p>
+            </div> -->
+            <div class="logoTxt">
+                <a href="">
+                   <h1>休闲农业旅游网</h1>
+                    <p>www.XXNYLY.CN</p> 
+                </a>
+            </div>
+            <div class="LocateCover">
+                <div class="currCity">
+                    <div class="maskLine"></div>
+                    <i class="fa fa-map-marker" aria-hidden="true"></i>
+                    <span>全国</span>
+                    <i class="fa fa-chevron-down" aria-hidden="true"></i>
+                    <div class="selectCityCover">
+                        <div class="hot_address">
+                            <a href="javascript:void();" onclick="city_change(this,25,'bj')">北京</a>
+                            <a href="javascript:void();" onclick="city_change(this,347,'sh')">上海</a>
+                            <a href="javascript:void();" onclick="city_change(this,375,'tj')">天津</a>
+                            <a href="javascript:void();" onclick="city_change(this,355,'xa')">西安</a>
+                            <a href="javascript:void();" onclick="city_change(this,338,'nj')">南京</a>
+                            <a href="javascript:void();" onclick="city_change(this,389,'wh')">武汉</a>
+                            <a href="javascript:void();" onclick="city_change(this,260,'hz')">杭州</a>
+                        </div>
+                        <div class="hot_address_er">
+                            <div class="left">华北:</div>
+                            <div class="right">
+                                <a href="javascript:void();" onclick="city_change(this,25,'bj')">北京</a>
+                                <a href="javascript:void();" onclick="city_change(this,375,'tj')">天津</a>
+                                <a href="javascript:void();" onclick="city_change(this,356,'sjz')">石家庄</a>
+                                <a href="javascript:void();" onclick="city_change(this,377,'ts')">唐山</a>
+                                <a href="javascript:void();" onclick="city_change(this,365,'qd')">青岛</a>
+                                <a href="javascript:void();" onclick="city_change(this,371,'jn')">济南</a>
+                                <a href="javascript:void();" onclick="city_change(this,379,'ty')">太原</a>
+                                <a href="javascript:void();" onclick="city_change(this,5423,'lf')">廊坊</a>
+                                <a href="javascript:void();" onclick="city_change(this,5738,'wlcb')">乌兰察布</a>
+                            </div>
+                        </div>
+                        <div class="hot_address_er">
+                            <div class="left">东北:</div>
+                            <div class="right">
+                                <a href="javascript:void();" onclick="city_change(this,351,'sy')">沈阳</a>
+                                <a href="javascript:void();" onclick="city_change(this,235,'dl')">大连</a>
+                                <a href="javascript:void();" onclick="city_change(this,218,'cc')">长春</a>
+                                <a href="javascript:void();" onclick="city_change(this,268,'heb')">哈尔滨</a>
+                                <a href="javascript:void();" onclick="city_change(this,5689,'hlbe')">呼伦贝尔</a>
+                            </div>
+                        </div>
+                        <div class="hot_address_er">
+                            <div class="left">华东:</div>
+                            <div class="right">
+                                <a href="javascript:void();" onclick="city_change(this,347,'sh')">上海</a>
+                                <a href="javascript:void();" onclick="city_change(this,338,'nj')">南京</a>
+                                <a href="javascript:void();" onclick="city_change(this,363,'sz')">苏州</a>
+                                <a href="javascript:void();" onclick="city_change(this,260,'hz')">杭州</a>
+                                <a href="javascript:void();" onclick="city_change(this,336,'nb')">宁波</a>
+                                <a href="javascript:void();" onclick="city_change(this,391,'wx')">无锡</a>
+                                <a href="javascript:void();" onclick="city_change(this,298,'nc')">南昌</a>
+                                <a href="javascript:void();" onclick="city_change(this,900,'hf')">合肥</a>
+                                <a href="javascript:void();" onclick="city_change(this,229,'cz')">常州</a>
+                            </div>
+                        </div>
+                        <div class="hot_address_er">
+                            <div class="left">华中:</div>
+                            <div class="right">
+                                <a href="javascript:void();" onclick="city_change(this,217,'zz')">郑州</a>
+                                <a href="javascript:void();" onclick="city_change(this,226,'cs')">长沙</a>
+                                <a href="javascript:void();" onclick="city_change(this,389,'wh')">武汉</a>
+                            </div>
+                        </div>
+                        <div class="hot_address_er">
+                            <div class="left">华南:</div>
+                            <div class="right">
+                                <a href="javascript:void();" onclick="city_change(this,399,'xm')">厦门</a>
+                                <a href="javascript:void();" onclick="city_change(this,254,'hk')">海口</a>
+                                <a href="javascript:void();" onclick="city_change(this,305,'gy')">贵阳</a>
+                                <a href="javascript:void();" onclick="city_change(this,7047,'qs')">宿迁市</a>
+                                <a href="javascript:void();" onclick="city_change(this,340,'nn')">南宁</a>
+                                <a href="javascript:void();" onclick="city_change(this,314,'lj')">丽江</a>
+                                <a href="javascript:void();" onclick="city_change(this,5548,'bs')">保山</a>
+                                <a href="javascript:void();" onclick="city_change(this,5517,'qf')">曲阜</a>
+                                <a href="javascript:void();" onclick="city_change(this,286,'jj')">九江</a>
+                                <a href="javascript:void();" onclick="city_change(this,207,'as')">安顺</a>
+                            </div>
+                        </div>
+                        <div class="hot_address_er">
+                            <div class="left">西南:</div>
+                            <div class="right">
+                                <a href="javascript:void();" onclick="city_change(this,227,'cd')">成都</a>
+                                <a href="javascript:void();" onclick="city_change(this,223,'cq')">重庆</a>
+                            </div>
+                        </div>
+                        <div class="hot_address_er">
+                            <div class="left">西北:</div>
+                            <div class="right">
+                                <a href="javascript:void();" onclick="city_change(this,355,'xa')">西安</a>
+                                <a href="javascript:void();" onclick="city_change(this,5578,'xn')">西宁</a>
+                                <a href="javascript:void();" onclick="city_change(this,5537,'yl')">伊犁</a>
+                                <a href="javascript:void();" onclick="city_change(this,312,'lz')">兰州</a>
+                                <a href="javascript:void();" onclick="city_change(this,296,'ks')">喀什</a>
+                                <a href="javascript:void();" onclick="city_change(this,237,'dh')">敦煌</a>
+                                <a href="javascript:void();" onclick="city_change(this,278,'yc')">银川</a>
+                                <a href="javascript:void();" onclick="city_change(this,5487,'yb')">延边</a>
+                                <a href="javascript:void();" onclick="city_change(this,5581,'zws')">宁夏回族自治区中卫市</a>
+                                <a href="javascript:void();" onclick="city_change(this,380,'wlmq')">乌鲁木齐</a>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="searchCover">
+                <div class="searchBoxBj">
+                    <input type="text" placeholder="请输入农庄名称">
+                    <button>搜索</button>
+                </div>
+            </div>
+            <!-- <div class="not_loginCover">
+                <a href="login2" target="_blank">登录</a>
+                <a href="" target="_blank">注册</a>
+            </div> -->
+            <div class="yet_loginCover">
+               <div class="person">
+                   <div class="userHeadImg">
+                       <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                   </div>
+                   <div class="userCtrl">
+                       <div class="userCtrlTop">
+                           <div class="userInfo">
+                               <div>
+                                   <span>admin</span>
+                               </div>
+                           </div>
+                       </div>
+                       <div class="userCtrlBtm"><a href="back_manage" target="_blank">进入后台管理</a></div>
+                    </div>
+                    <div class="exit">
+                        <a href="">
+                            <i class="fa fa-power-off" aria-hidden="true"></i>
+                        </a>
+                    </div>
+               </div>
+            </div>
+        </div>
+        <!-- 登录内容 -->
+    </div>
+    <!-- 主体部分 -->
+    <div class="content">
+        <!-- 登录框 -->
+        <div class="loginBj">
+            <div class="borderline">
+                <div class="loginBox">
+                    <div class="title">用户登录</div>
+                    <div class="loginInp">
+                        <input type="text" id="username" placeholder="用户名">
+                    </div>
+                    <div class="loginInp">
+                        <input type="password" id="password" placeholder="密码">
+                        <a href="">忘记密码?</a>
+                    </div>
+                    <div class="loginBtnCover">
+                        <button id="loginBtn" onclick="login()">登 录</button>
+                    </div>
+                    <div class="remPswCover">
+                        <div class="remPwdInpBox">
+                            <input type="checkbox" id="remPwdFlag">
+                            <div></div>
+                        </div>
+                        <label for="remPwdFlag">记住密码</label>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="wrapper">
+            <!-- 合作伙伴 -->
+            <div class="partnerCover">
+                <div class="title">
+                    <i class="fa fa-handshake-o" aria-hidden="true"></i>
+                    <span>合作伙伴 </span>
+                </div>
+                <div class="partnerInner">
+                    <ul class="partnerInnerList">
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li class="partnerInnerItem">
+                            <a href="">
+                                <img src="http://www.xbxxnyggw.cn/file/upload/201901/22/230441831.jpg" alt="">
+                            </a>
+                        </li>
+                        <li style="clear: both;"></li>
+                    </ul>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!-- 底部版权 -->
+    <div class="footer bjColor">
+        <div class="wrapper">
+            <div class="floatDiv">
+                <div class="copyrightTxt">
+                    <div>休闲农业旅游网</div>
+                    <div>联系人:李四  联系电话:13811111111</div>
+                    <div>地址:河南省郑州市XXXXXXXXXXXXXXXXXXXXXXXXXX</div>
+                </div>
+                <div class="WeChatCode">
+                    <img src="{% static '/imgs/WeChatCode.jpg' %}" alt="">
+                    <p>关注公众号</p>
+                </div>
+            </div>
+            <div class="copyright">
+                版权所有XXXXXXXXXXXXXXXXXXXXXX
+            </div>
+        </div>
+    </div>
+    <!-- 返回顶部 -->
+    <div id="back2top" class="back2top" style="display: block;">
+        <a href="javascript:void(0);" onclick="goUp()" title="返回顶部">&nbsp;</a>
+    </div>
+
+    <script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
+    <script
+        src="https://webapi.amap.com/maps?v=1.4.15&key=3939967b919a8003377dd113fc445a3d&plugin=AMap.Driving"></script>
+    <!-- <script src="{% static '/lib/layui/layui.js'%}"></script> -->
+    <!-- <script src="{% static '/js/index2.js'%}"></script> -->
+    <script>
+
+        // 登录
+        function login() {
+            var username = $("#username").val();
+            var password = $("#password").val();
+            if (!username) {
+                $("#username").focus();
+                return;
+            }
+            if (!password) {
+                $("#password").focus();
+                return;
+            }
+
+            // $('.notLogin').toggle();
+            // $('.isLogin').toggle();
+            // window.open("back_manage");
+
+            $.ajax({
+                url: 'user_land',
+                data: {
+                    username: username,
+                    password: password
+                },
+                type: 'post',
+                dataType: 'json',
+                success: function (data) {
+                    if (data.code == 1) {
+                        // var hrefstr = 'person_farm?name=' + data.username;
+                        window.location = 'home2'
+                        window.open('back_manage')
+                        // $('.isLogin').toggle();
+                        // $('#person_farm').attr('href', hrefstr)
+                        // $('.userPhoto').attr('src', data.user_img)
+                        // $('.notLogin').hide();
+                        // $('.isLogin').show();
+                    } else if (data == 0) {
+                        $('body').append('<div class="hint">用户不存在</div>')
+                        setTimeout(function () {
+                            $('.hint').remove();
+                        }, 1000)
+                    } else if (data == 2) {
+                        $('body').append('<div class="hint">用户名错误</div>')
+                        setTimeout(function () {
+                            $('.hint').remove();
+                        }, 1000)
+                    } else if (data == 3) {
+                        $('body').append('<div class="hint">密码错误</div>')
+                        setTimeout(function () {
+                            $('.hint').remove();
+                        }, 1000)
+                    } else {
+                        $('body').append('<div class="hint">登录失败</div>')
+                        setTimeout(function () {
+                            $('.hint').remove();
+                        }, 1000)
+                    }
+                },
+                error: function (type) {
+
+                }
+            })
+        }
+    </script>
+</body>
+
+</html>

+ 245 - 0
templates/outerNet/pickIntro.html

@@ -0,0 +1,245 @@
+{% load staticfiles %}
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>四季采摘</title>
+    <link rel="stylesheet" href="{% static '/lib/font/fontIcon/iconfont.css' %}">
+    <link rel="stylesheet" href="{% static '/lib/layui/css/layui.css' %}">
+    <link rel="stylesheet" href="{% static '/lib/css/reset.css' %}">
+    <link rel="stylesheet" href="{% static '/css/common.css' %}">
+    <link rel="stylesheet" href="{% static '/css/module.css' %}">
+    <link rel="stylesheet" href="{% static '/css/pickIntro.css' %}">
+</head>
+
+<body>
+    <div class="header">
+        <div class="headerTxt">
+            <div class="wrapper">
+                <p class="logoNameCn">休闲农业旅游网</p>
+                <p class="logoNameEn">Leisure agricultural tourism network</p>
+            </div>
+
+        </div>
+        <!-- 广告 -->
+        <div class="bjColor advImg"></div>
+    </div>
+    <!-- 主体部分 -->
+    <div class="content">
+        <div class="wrapper">
+            <div class="">
+                <!-- 详情 -->
+                <div class="newsDiv gardenItem">
+                    <!-- 面包屑导航 -->
+                    <div class="breadcrumb">
+                        <span class="layui-breadcrumb">
+                            <a href="home">首页</a>
+                            <a>
+                                <cite>采摘详情</cite>
+                            </a>
+                        </span>
+                    </div>
+                    <!-- 采摘详情 -->
+                    <div class="pickDesc">
+                        <h1 class="caption">红富士</h1>
+                        <div class="sendTime title">2019-11-15</div>
+                        <div class="prodectIntro">
+                            <div class="prodectImg">
+                                <img src="http://www.zhopera.com/uploadfile/2020/0629/thumb_264_150_20200629110152202.jpg" alt="">
+                            </div>
+                            <div class="descTxt">
+                                <div><span>产品名称:</span>红富士</div>
+                                <div><span>种植面积:</span>4亩</div>
+                                <div><span>成熟日期:</span>8月</div>
+                                <div><span>采摘日期:</span>8月-9月</div>
+                                <div><span>所属农场:</span>河南省郑州市金水</div>
+                                <div><span>详细地址:</span>河南省郑州市金水区瀚海北金6020</div>
+                            </div>
+                        </div>
+                        <div class="title">详细介绍</div>
+                        <div></div>
+                    </div>
+                </div>
+            </div>
+
+        </div>
+    </div>
+    <!-- 底部版权 -->
+    <div class="footer bjColor">
+        <div class="wrapper">
+            <div class="floatDiv">
+                <div class="copyrightTxt">
+                    <div>休闲农业旅游网</div>
+                    <div>联系人:李四  联系电话:13811111111</div>
+                    <div>地址:河南省郑州市XXXXXXXXXXXXXXXXXXXXXXXXXX</div>
+                </div>
+                <div class="WeChatCode">
+                    <img src="{% static '/imgs/WeChatCode.jpg' %}" alt="">
+                    <p>关注公众号</p>
+                </div>
+            </div>
+            <div class="copyright">
+                版权所有XXXXXXXXXXXXXXXXXXXXXX
+            </div>
+        </div>
+    </div>
+
+    <script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
+    <script src="{% static '/lib/layui/layui.js'%}"></script>
+    <script>
+        //注意:导航 依赖 element 模块,否则无法进行功能性操作
+        layui.use(['element', 'laypage'], function () {
+            var element = layui.element;
+        });
+        // 请求菜单
+        $.ajax({
+            url: 'garden_list',
+            type: 'post',
+            data: { page: 1 },
+            dataType: 'json',
+            success: function (data) {
+                console.log(data);
+                createLeftMenu(data)
+            },
+            error: function (type) {
+                console.log(type);
+            }
+        })
+        var menuCurrId; //当前id
+        var menuCurrNum = 1; //当前页
+        var menuTotalPage;  //总页
+        // 农场获取
+        function createLeftMenu(data) {
+            menuTotalPage = Math.ceil(data.nums / 10);
+            if (menuTotalPage > 1) {
+                $('.gardenListBtn').show();
+            } else {
+                $('.gardenListBtn').hide();
+            }
+            var html = '';
+            for (var i = 0; i < data.farms.length; i++) {
+                if (i == 0) {
+                    html += '<li class="active" data-id=' + data.farms[i].id + '>' + data.farms[i].name + '</li>';
+                } else {
+                    html += '<li data-id=' + data.farms[i].id + '>' + data.farms[i].name + '</li>';
+                }
+                if (i == data.farms.length - 1) {
+                    $('#gardenListUl').html(html);
+                    $('.menuTotalPage').html(menuTotalPage);
+                    menuCurrId = data.farms[0].id;
+                    getDataList(menuCurrId);
+                    // 菜单切换
+                    $('#gardenListUl').on('click', 'li', function () {
+                        $('#gardenListUl li').removeClass('active');
+                        $(this).addClass('active');
+                        menuCurrId = $(this).data('id');
+                        getDataList(menuCurrId);
+                    });
+                }
+            }
+        }
+        // 分页切换
+        function switchPage(flag) {
+            if (flag == 'jia') {
+                if (menuCurrNum < menuTotalPage) {
+                    menuCurrNum++;
+                }
+            } else if (flag == 'jian') {
+                if (menuCurrNum > 1) {
+                    menuCurrNum--;
+                }
+            } else {
+                menuCurrNum = 1;
+            }
+            $('.menuCurr').html(menuCurrNum);
+            $.ajax({
+                url: 'garden_list',
+                type: 'post',
+                data: { page: menuCurrNum },
+                dataType: 'json',
+                success: function (data) {
+                    console.log(data);
+                    createLeftMenu(data)
+                },
+                error: function (type) {
+                    console.log(type);
+                }
+            })
+        }
+
+        // 请求列表
+        function getDataList(id) {
+            console.log('id:', id)
+            $.ajax({
+                url: 'garden_detail',
+                type: 'post',
+                dataType: 'json',
+                data: { id: id, page: 1 },
+                success: function (data) {
+                    // $('#dataFillDiv').html(data);
+                    setHtml(data.pick);
+                    if (data.nums) {
+                        $('#page').show();
+                        //执行一个laypage实例
+                        layui.use(['laypage'], function () {
+                            var laypage = layui.laypage;
+                            laypage.render({
+                                elem: 'page' //注意,这里的 test1 是 ID,不用加 # 号
+                                , count: data.nums //数据总数,从服务端得到
+                                , limit: 12
+                                // , curr: 8
+                                , jump: function (obj, first) {
+                                    $.ajax({
+                                        url: 'garden_detail',
+                                        type: 'post',
+                                        dataType: 'json',
+                                        data: { id: id, page: obj.curr },
+                                        success: function (data) {
+                                            // $('#dataFillDiv').html(data);
+                                            setHtml(data.pick);
+                                        },
+                                        error: function (type) {
+                                            alert('请求失败')
+                                        }
+                                    })
+                                }
+                            });
+                        });
+                    }else{
+                        $('#page').hide();
+                    }
+
+                },
+                error: function (type) {
+                    alert('请求失败')
+                }
+            })
+
+
+        }
+
+        function setHtml(data) {
+            if (data.length) {
+                var html = '<ul class="productList">';
+                for (var i = 0; i < data.length; i++) {
+                    html += '<li class="productItem"><div class="productImg">' +
+                        '<img src="' + data[i].img + '" alt=""></div>' +
+                        '<div>' + data[i].farm + '</div><div>' + data[i].time + '采摘</div><div>' + data[i].company + '</div></li>';
+                    if (i == data.length - 1) {
+                        html += '</ul>';
+                        $('#dataFillDiv').html(html);
+                    }
+                }
+            } else {
+                $('#dataFillDiv').html('<div style="text-align:center;line-height:200px;font-size:18px">暂无数据</div>');
+            }
+        }
+        // ceshi 
+
+    </script>
+</body>
+
+</html>

+ 268 - 0
templates/outerNet/tourist.html

@@ -0,0 +1,268 @@
+{% load staticfiles %}
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>旅游导览</title>
+    <link rel="stylesheet" href="{% static '/lib/font/fontIcon/iconfont.css' %}">
+    <link rel="stylesheet" href="{% static '/lib/layui/css/layui.css' %}">
+    <link rel="stylesheet" href="{% static '/lib/css/reset.css' %}">
+    <link rel="stylesheet" href="{% static '/css/common.css' %}">
+    <link rel="stylesheet" href="{% static '/css/module.css' %}">
+    <link rel="stylesheet" href="{% static '/css/pickIntro.css' %}">
+    <style>
+        .address{
+            line-height: 22px;
+            margin-left: 70px;
+            text-indent: -69px;
+        }
+        .touristDesc{
+            padding: 10px 20px;
+        }
+        .pickDesc .descTitle{
+            border-left: 3px solid #41b850;
+            padding-left: 10px;
+            font-size: 14px;
+            margin: 10px 0;
+            font-weight: 700;
+        }
+    </style>
+</head>
+
+<body>
+    <div class="header">
+        <div class="headerTxt">
+            <div class="wrapper">
+                <p class="logoNameCn">休闲农业旅游网</p>
+                <p class="logoNameEn">Leisure agricultural tourism network</p>
+            </div>
+
+        </div>
+        <!-- 广告 -->
+        <div class="bjColor advImg"></div>
+    </div>
+    <!-- 主体部分 -->
+    <div class="content">
+        <div class="wrapper">
+            <div class="">
+                <!-- 详情 -->
+                <div class="newsDiv gardenItem">
+                    <!-- 面包屑导航 -->
+                    <div class="breadcrumb">
+                        <span class="layui-breadcrumb">
+                            <a href="home">首页</a>
+                            <a>
+                                <cite>采摘详情</cite>
+                            </a>
+                        </span>
+                    </div>
+                    <!-- 采摘详情 -->
+                    <div class="pickDesc">
+                        <h1 class="caption">大连天门山</h1>
+                        <div class="sendTime title">2019-11-15</div>
+                        <div class="prodectIntro">
+                            <div class="prodectImg">
+                                <img src="https://www.cnnyly.com/upload/goods/20200509/9806f6bba92a29186a82d7851221ec552.jpg" alt="">
+                            </div>
+                            <div class="descTxt">
+                                <div><span>景点名称:</span>大连天门山</div>
+                                <div><span>联系电话:</span>0411-98985555</div>
+                                <div><span>门票价格:</span>70元/人</div>
+                                <div><span>开放时间:</span>7:00~18:00</div>
+                                <div class="address"><span>景点地址:</span>河南省郑州市金水河南省郑州市金水河南省郑州市金水河南省郑州市金水</div>
+                            </div>
+                        </div>
+                        <div class="title">详细介绍</div>
+                        <div class="touristDesc">
+                            <div class="descTitle">介绍</div>
+                            <div>1</div>
+                            <div class="descTitle">景区导览图</div>
+                            <div>
+                                <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597225887915&di=adc05d45d3ab13de6b52ac19f72f6579&imgtype=0&src=http%3A%2F%2Fwww.hengdiantour.com%2Fupload%2Fmhg.jpg" width="100%" alt="">
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+        </div>
+    </div>
+    <!-- 底部版权 -->
+    <div class="footer bjColor">
+        <div class="wrapper">
+            <div class="floatDiv">
+                <div class="copyrightTxt">
+                    <div>休闲农业旅游网</div>
+                    <div>联系人:李四  联系电话:13811111111</div>
+                    <div>地址:河南省郑州市XXXXXXXXXXXXXXXXXXXXXXXXXX</div>
+                </div>
+                <div class="WeChatCode">
+                    <img src="{% static '/imgs/WeChatCode.jpg' %}" alt="">
+                    <p>关注公众号</p>
+                </div>
+            </div>
+            <div class="copyright">
+                版权所有XXXXXXXXXXXXXXXXXXXXXX
+            </div>
+        </div>
+    </div>
+
+    <script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
+    <script src="{% static '/lib/layui/layui.js'%}"></script>
+    <script>
+        //注意:导航 依赖 element 模块,否则无法进行功能性操作
+        layui.use(['element', 'laypage'], function () {
+            var element = layui.element;
+        });
+        // 请求菜单
+        $.ajax({
+            url: 'garden_list',
+            type: 'post',
+            data: { page: 1 },
+            dataType: 'json',
+            success: function (data) {
+                console.log(data);
+                createLeftMenu(data)
+            },
+            error: function (type) {
+                console.log(type);
+            }
+        })
+        var menuCurrId; //当前id
+        var menuCurrNum = 1; //当前页
+        var menuTotalPage;  //总页
+        // 农场获取
+        function createLeftMenu(data) {
+            menuTotalPage = Math.ceil(data.nums / 10);
+            if (menuTotalPage > 1) {
+                $('.gardenListBtn').show();
+            } else {
+                $('.gardenListBtn').hide();
+            }
+            var html = '';
+            for (var i = 0; i < data.farms.length; i++) {
+                if (i == 0) {
+                    html += '<li class="active" data-id=' + data.farms[i].id + '>' + data.farms[i].name + '</li>';
+                } else {
+                    html += '<li data-id=' + data.farms[i].id + '>' + data.farms[i].name + '</li>';
+                }
+                if (i == data.farms.length - 1) {
+                    $('#gardenListUl').html(html);
+                    $('.menuTotalPage').html(menuTotalPage);
+                    menuCurrId = data.farms[0].id;
+                    getDataList(menuCurrId);
+                    // 菜单切换
+                    $('#gardenListUl').on('click', 'li', function () {
+                        $('#gardenListUl li').removeClass('active');
+                        $(this).addClass('active');
+                        menuCurrId = $(this).data('id');
+                        getDataList(menuCurrId);
+                    });
+                }
+            }
+        }
+        // 分页切换
+        function switchPage(flag) {
+            if (flag == 'jia') {
+                if (menuCurrNum < menuTotalPage) {
+                    menuCurrNum++;
+                }
+            } else if (flag == 'jian') {
+                if (menuCurrNum > 1) {
+                    menuCurrNum--;
+                }
+            } else {
+                menuCurrNum = 1;
+            }
+            $('.menuCurr').html(menuCurrNum);
+            $.ajax({
+                url: 'garden_list',
+                type: 'post',
+                data: { page: menuCurrNum },
+                dataType: 'json',
+                success: function (data) {
+                    console.log(data);
+                    createLeftMenu(data)
+                },
+                error: function (type) {
+                    console.log(type);
+                }
+            })
+        }
+
+        // 请求列表
+        function getDataList(id) {
+            console.log('id:', id)
+            $.ajax({
+                url: 'garden_detail',
+                type: 'post',
+                dataType: 'json',
+                data: { id: id, page: 1 },
+                success: function (data) {
+                    // $('#dataFillDiv').html(data);
+                    setHtml(data.pick);
+                    if (data.nums) {
+                        $('#page').show();
+                        //执行一个laypage实例
+                        layui.use(['laypage'], function () {
+                            var laypage = layui.laypage;
+                            laypage.render({
+                                elem: 'page' //注意,这里的 test1 是 ID,不用加 # 号
+                                , count: data.nums //数据总数,从服务端得到
+                                , limit: 12
+                                // , curr: 8
+                                , jump: function (obj, first) {
+                                    $.ajax({
+                                        url: 'garden_detail',
+                                        type: 'post',
+                                        dataType: 'json',
+                                        data: { id: id, page: obj.curr },
+                                        success: function (data) {
+                                            // $('#dataFillDiv').html(data);
+                                            setHtml(data.pick);
+                                        },
+                                        error: function (type) {
+                                            alert('请求失败')
+                                        }
+                                    })
+                                }
+                            });
+                        });
+                    }else{
+                        $('#page').hide();
+                    }
+
+                },
+                error: function (type) {
+                    alert('请求失败')
+                }
+            })
+
+
+        }
+
+        function setHtml(data) {
+            if (data.length) {
+                var html = '<ul class="productList">';
+                for (var i = 0; i < data.length; i++) {
+                    html += '<li class="productItem"><div class="productImg">' +
+                        '<img src="' + data[i].img + '" alt=""></div>' +
+                        '<div>' + data[i].farm + '</div><div>' + data[i].time + '采摘</div><div>' + data[i].company + '</div></li>';
+                    if (i == data.length - 1) {
+                        html += '</ul>';
+                        $('#dataFillDiv').html(html);
+                    }
+                }
+            } else {
+                $('#dataFillDiv').html('<div style="text-align:center;line-height:200px;font-size:18px">暂无数据</div>');
+            }
+        }
+        // ceshi 
+
+    </script>
+</body>
+
+</html>

File diff ditekan karena terlalu besar
+ 165 - 0
templates/outerNet/touristList.html


+ 277 - 0
templates/static/css/header.css

@@ -0,0 +1,277 @@
+/* logo */
+.headerTop{
+    display: flex;
+    padding: 28px 0 21px 0;
+}
+.logoTxt{
+    width: 200px;
+    text-align: center;
+}
+.logoTxt h1{
+    font-size: 22px;
+    color: #fd9907;
+    font-weight: bold;
+}
+.logoTxt p{
+    font-weight: bold;
+    font-size: 12px;
+    color: #38b952;
+    letter-spacing: 2px;
+}
+/* 定位 */
+.LocateCover{
+    width: 155px;
+    position: relative;
+    text-align: center;
+}
+.LocateCover .currCity{
+    display: inline-block;
+    font-size: 14px;
+    margin: 0 auto;
+    margin-top: 5px;
+    min-width: 88px;
+    height: 28px;
+    line-height: 25px;
+    text-align: center;
+    cursor: pointer;
+    background-color: #fdfdfd;
+    color: #61a830;
+    border: 1px solid #f5f5f5;
+}
+.LocateCover .currCity:hover{
+    background-color: #fff;
+    position: relative;
+    z-index: 9999;
+    border-bottom: 0;
+}
+.LocateCover .currCity:hover .selectCityCover{
+    display: block;
+}
+.LocateCover .currCity:hover .maskLine{
+    display: block;
+}
+.LocateCover .currCity .maskLine{
+    display: none;
+    height: 6px;
+    width: 100%;
+    background-color: #fff;
+    z-index: 10;
+    top: 21px;
+    left: 0;
+    position: absolute;
+    background: white;
+}
+
+.LocateCover .currCity i.fa-map-marker{
+    margin-left: 5px;
+    font-size: 14px;
+    color: #61a830;
+}
+.LocateCover .currCity:hover .fa-chevron-down{
+    color: #61a830;
+}
+
+.LocateCover .currCity i.fa-chevron-down{
+    color: #cfcfcf;
+    margin-left: 13px;
+    font-size: 12px;;
+}
+.selectCityCover{
+    position: absolute;
+    z-index: 9;
+    display: none;
+    position: absolute;
+    top: 25px;
+    left: -1px;
+    width: 426px;
+    background-color: #fff;
+    border: 1px solid #f1f1f1;
+    -webkit-box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+    -moz-box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+    -o-box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+    box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+    padding: 20px;
+    border-radius: 12px;
+    z-index: 9;
+    border-top-left-radius: 0;
+    cursor: default;
+}
+.selectCityCover .hot_address{
+    border-bottom: 1px solid #ececec;
+    padding: 0 5px 6px;
+    text-align: left;
+}
+.selectCityCover .hot_address a{
+    color: #fd9907;
+    font-size: 12px;
+    padding-right: 11px;
+}
+.selectCityCover .hot_address_er{
+    padding: 7px 5px 5px;
+    overflow: hidden;
+}
+.selectCityCover .hot_address_er .left{
+    float: left;
+    width: 40px;
+    line-height: 22px;
+    font-size: 12px;
+    font-weight: 700;
+    cursor: default;
+}
+.selectCityCover .hot_address_er .right{
+    overflow: hidden;
+    float: left;
+    width: 332px;
+}
+.selectCityCover .hot_address_er .right a{
+    float: left;
+    margin-right: 16px;
+    line-height: 22px;
+    font-size: 12px;
+}
+/* 搜素 */
+.searchCover{
+    width: 555px;
+}
+.searchCover .searchBoxBj{
+    font-size: 0px;
+    width: 460px;
+    height: 40px;
+    margin: 0 auto;
+    background: #61a830;
+}
+.searchCover .searchBoxBj input{
+    font-size: 14px;
+    width: 357px;
+    height: 36px;
+    outline: none;
+    margin: 2px 0 2px 2px;
+    border: none;
+    border-radius: 0;
+    padding-left: 20px;
+}
+.searchCover .searchBoxBj button{
+    font-size: 14px;
+    width: 101px;
+    height: 40px;
+    border: none;
+    background: #61a830;
+    color: #fff;
+    letter-spacing: 5px;
+    text-align: center;
+    vertical-align: middle;
+}
+.searchCover .searchBoxBj button:active{
+    background: #3c7b10;
+}
+/* 登录 */
+.not_loginCover{
+    flex: 1;
+    text-align: center;
+}
+.not_loginCover a{
+    width: 118px;
+    height: 38px;
+    line-height: 34px;
+    border: 1px solid #f5ae1e;
+    background-color: #fff;
+    margin: 0 8px;
+    display: inline-block;
+}
+.not_loginCover a:active{
+    background-color: #ffe8bb;
+
+}
+.yet_loginCover{
+    flex: 1;
+}
+.yet_loginCover .person{
+    display: flex;
+    align-items: center;
+    float: right;
+}
+.yet_loginCover .person .userHeadImg{
+    width: 40px;
+    height: 40px;
+    overflow: hidden;
+    border-radius: 50%;
+    background: red;
+    margin-right: 10px;
+}
+.yet_loginCover .person .userHeadImg img{
+    width: 100%;
+    height: 100%;
+}
+.userCtrl .userCtrlTop{
+    position: relative;
+}
+.userCtrl .userCtrlTop .userInfo{
+    display: flex;
+    align-items: baseline;
+    cursor: pointer;
+}
+.userCtrlTop .userInfo >div{
+    max-width: 83px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    margin-bottom: 3px;
+}
+
+.userCtrl .userCtrlBtm a{
+    color: #3c7b10;
+}
+.yet_loginCover .person .exit a{
+    font-size: 24px;
+    margin-left: 10px;
+    border-left: 1px solid #d3d3d3;
+    padding-left: 10px;
+    color: #4fa414;
+    cursor: pointer;
+}
+
+/* 内容-合作伙伴 */
+.partnerCover{
+    margin-top: 30px;
+    border: 1px solid #e3e3e3;
+    border-top: 1px solid #327eca;
+}
+.partnerCover .title{
+    line-height: 40px;
+    border-bottom: 1px solid #e3e3e3;
+    font-size: 18px;
+    padding-left: 20px;
+}
+.partnerCover .title i{
+    color: #b0b0b0;
+    font-size: 22px;
+    vertical-align: middle;
+}
+.partnerCover .title span{
+    font-weight: 700;
+    /* margin-left: 10px; */
+}
+.partnerCover .partnerInner{
+    /* padding: 20px;  */
+    height: 112px;
+    overflow: hidden;
+}
+.partnerCover .partnerInner .partnerInnerList{
+    width: 1500px;
+}
+.partnerCover .partnerInner .partnerInnerItem{
+    float: left;
+}
+.partnerCover .partnerInner img{
+    width: 89px;
+    height: 83px;
+    margin: 13px 10px;
+}
+
+
+/* 橘黄标题 */
+.orangTitle{
+    border-left: 3px solid #ff6a28;
+    padding-left: 8px;
+    font-size: 16px;
+}

+ 714 - 0
templates/static/css/index2.css

@@ -0,0 +1,714 @@
+
+/* 轮播 */
+.sliderBox,.banner{
+    height: 470px;
+}
+.slider1{
+    background: url(../imgs/banner1.jpg) no-repeat center;
+    background-size: cover;
+}
+.slider2{
+    background: url(../imgs/banner2.jpg) no-repeat center;
+    background-size: cover;
+}
+.slider3{
+    background: url(../imgs/banner3.jpg) no-repeat center;
+    background-size: cover;
+}
+span.swiper-pagination-bullet{
+    width: 30px;
+    border-radius: 0;
+}
+span.swiper-pagination-bullet-active{
+    background: #3ab851;
+}
+/* 内容标题 */
+.caption{
+    border-bottom: 5px solid #ff6a28;
+    padding: 35px 0 15px;
+    margin-bottom: 20px;
+}
+.caption .chinese{
+    font-size: 24px;
+    font-weight: bold;
+    color: #38b954;
+}
+.caption .english{
+    font-size: 12px;
+    color: #b2b2b2;
+    margin-left: 10px;
+}
+/* 内容-示范区 */
+.content1{
+    height: 476px;
+    display: flex;
+    border: 1px solid #e3e3e3;
+    border-top: none;
+    overflow: hidden;
+}
+.content1 .excellentFarm{
+    width: 880px;
+}
+.farmsTop{
+    display: flex;
+    border-top: 1px solid #e3e3e3;
+    border-bottom: 1px solid #e3e3e3;
+    height: 60px;
+    justify-content: space-between;
+    padding: 0 20px;
+    align-items: center;
+}
+/* .farmsTop .title div{
+    border-left: 3px solid #ff6a28;
+    padding-left: 8px;
+    font-size: 16px;
+} */
+.farmsTop .ctrlBtn{
+    font-size: 0;
+    border: 1px solid #e8e6e7;
+}
+.farmsTop .ctrlBtn button{
+    width: 30px;
+    height: 26px;
+    line-height: 24px;
+    font-size: 14px;
+    background-color: #fff;
+    border: 1px solid #e8e6e7;
+}
+.farmsTop .ctrlBtn button i{
+    color: #b0b0b0;
+}
+.farmsbottom{
+    display: flex;
+}
+.farmsbottom .farmImg{
+    flex: 1;
+    position: relative;
+}
+.farmsbottom .farmImg .hotIcon{
+    position: absolute;
+    right: 13px;
+    top: 0;
+}
+.farmsbottom .farmImg .masking{
+    padding-top: 20px;
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background: rgba(58, 158, 89, 0.89);
+    text-align: center;
+    color: #fff;
+    font-size: 14px;
+    line-height: 30px;
+}
+.farmsbottom .farmIntroduce{
+    width: 600px;
+}
+.farmsSwiper{
+    height: 404px;
+    overflow: hidden;
+    padding: 20px;
+    position: relative;
+}
+.farmsSwiper .farmsUl{
+    position: absolute;
+    top: 0;
+    transition: all 1s ease 0s;
+}
+.farmsUl .farm-item{
+    /* height: 62px; */
+    padding-top: 24px;
+    overflow: hidden;
+}
+.farmsUl .farm-item img{
+    width: 88px;
+    height: 72px;
+    float: left;
+    margin-right: 15px;
+}
+.farmsUl .farm-item .news-item-txt{
+    float: left;
+    width: 456px;
+}
+.farmsUl .farm-item .news-item-txt h1{
+    width: 465px;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    line-height: 28px;
+    font-size: 16px;
+    color: #60a830;
+}
+.farmsUl .farm-item .desc{
+    height: 40px;
+    overflow: hidden;
+    margin-top: 3px;
+    line-height: 20px;
+    font-size: 12px;
+    color: #666;
+}
+.content1 .news{
+    height: 100%;
+    flex: 1;
+    border-left: 1px solid #e3e3e3;
+}
+.content1 .news .newsTitle{
+    display: flex;
+    border-top: 1px solid #e3e3e3;
+    border-bottom: 1px solid #e3e3e3;
+    height: 60px;
+    justify-content: space-between;
+    padding: 0 20px;
+    align-items: center;
+    background: #fbfbfb;
+}
+.content1 .news .newsTitle span{
+    font-size: 16px;
+    color: #000;
+}
+.content1 .news .newsTitle .more{
+    height: 22px;
+    padding: 0 10px;
+    background-color: #fff;
+    border: 1px solid #eaeaea;
+    line-height: 22px;
+    font-size: 12px;
+    color: #666;
+}
+.content1 .news .newsContent{
+    height: 87%;
+    overflow: hidden;
+}
+.content1 .news .newsContent .news-txt-list{
+    padding: 10px 20px;
+}
+.content1 .news .newsContent .news-txt-item{
+    position: relative;
+    /* height: 16px; */
+    overflow: hidden;
+    padding-left: 10px;
+    margin-top: 12px;
+    font-size: 12px;
+    line-height: 21px;
+}
+.content1 .news .newsContent .news-txt-item::after{
+    background-color: #60a830;
+    content: '';
+    position: absolute;
+    left: 0;
+    top: 8px;
+    width: 3px;
+    height: 3px;
+    border-radius: 50%;
+}
+.content1 .news .newsContent .news-txt-item a{
+    white-space: nowrap;
+    display: block;
+    width: 265px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+/* 内容-广告区 */
+.adv{
+    margin-top: 20px;
+}
+/* 内容-四季采摘 */
+.pickCover{
+    display: flex;
+}
+.farmPick{
+    flex: 1;
+    border: 1px solid #e3e3e3;
+}
+.farmPickTop{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    height: 60px;
+    padding: 0 20px;
+    border-bottom: 1px solid #e3e3e3;
+}
+.farmPickTop a{
+    font-size: 14px;
+    color: #41b850;
+}
+.farmPickBottom{
+    display: flex;
+    justify-content: space-between;
+}
+.farmPickBottom .product{
+    width:640px;
+    border-right: 1px solid #e3e3e3;
+}
+.farmPickBottom .pickTitle{
+    background: #f0f0f0;
+    color: #000000;
+    font-size: 14px;
+    font-weight: bold;
+    line-height: 35px;
+    padding: 0 30px;
+    position: relative;
+}
+.farmPickBottom .pickTitle::before{
+    position: absolute;
+    content: '';
+    height: 20px;
+    width: 3px;
+    background: #41b850;
+    top: 7px;
+    left: 20px;
+}
+.farmPickBottom .productList{
+    overflow: hidden;
+}
+.farmPickBottom .productItem{
+    width: 135px;
+    float: left;
+    margin: 10px;
+}
+.farmPickBottom .productItem img{
+    width: 135px;
+    height: 105px;
+}
+.farmPickBottom .productItem P{
+    text-align: center;
+    line-height: 30px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+.farmPickBottom .productItem:hover a{
+    color: #3ab851;
+}
+
+.farmPickBottom .supply{
+    border-left: 1px solid #e3e3e3;
+    width: 260px;
+}
+.supply li{
+    padding: 0 18px;
+    border-top: 1px solid #eaeaea;
+}
+.supply li:nth-child(1){
+    border: none;
+}
+.supply .sort-number {
+    margin-right: 7%;
+    text-align: center;
+    line-height: 8px;
+    margin: 5px 11px 5px 0;
+    padding: 10px;
+    display: inline-block;
+}
+.supply .sort-number-top{
+    background: #009237;
+    color: #FFFFFF;
+}
+.supply li a{
+    white-space: nowrap;
+    overflow: hidden;
+    display: inline-block;
+    width: 80%;
+    text-overflow: ellipsis;
+    vertical-align: middle;
+}
+.supply li a:hover{
+    color: #3ab851;
+}
+.farmPickImg{
+    width: 280px;
+    position: relative;
+}
+.farmPickImg div{
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background: #3a9e598c;
+    color: #fff;
+    text-align: center;
+    line-height: 30px;
+    font-size: 16px;
+    padding: 10px;
+}
+/* 内容-农场导览 */
+.hacienda{
+    border: 1px solid #e3e3e3;
+}
+.hacienda .haciendaTop{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    height: 60px;
+    padding: 0 20px;
+    border-bottom: 1px solid #e3e3e3;
+}
+.hacienda .haciendaTop a{
+    color: #fff;
+    border-radius: 5px;
+    background-color: #ff6a28;
+    padding: 8px 22px;
+}
+.hacienda .haciendaList{
+    display: flex;
+    flex-flow: wrap;
+}
+.hacienda .haciendaList{
+    padding: 20px 20px 0 20px;
+}
+.hacienda .haciendaItem{
+    display: flex;
+    margin-bottom: 20px;
+}
+.hacienda .haciendaImg{
+    width: 205px;
+    height: 175px;
+    position: relative;
+}
+.hacienda .haciendaImg .haciendaImg1{
+    width: 100%;
+    height: 100%;
+}
+.hacienda .haciendaImg .haciendaImg2{
+    position: absolute;
+    top: 0;
+    left: 10px;
+}
+.hacienda .haciendaItem .haciendaTxt{
+    width: 180px;
+    padding: 10px 15px;
+}
+.hacienda .haciendaItem .haciendaTxt h2{
+    font-size: 14px;
+    font-weight: bold;
+    line-height: 33px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+.hacienda .haciendaItem .haciendaTxt .desc{
+    letter-spacing: 2px;
+    height: 100px;
+    overflow: hidden;
+}
+.hacienda .haciendaItem .haciendaTxt button{
+    color: #fff;
+    padding: 5px 10px;
+    border-radius: 5px;
+}
+.hacienda .haciendaItem .haciendaTxt button.btn1{
+    background-color: #00aeed;
+}
+.hacienda .haciendaItem .haciendaTxt button.btn2{
+    background-color: #3bb852;
+}
+/* 内容-旅游导览 */
+.travelCover{
+    display: flex;
+}
+.travelCover .travelLeft{
+    flex: 1;
+}
+.travelLeft .travelList{
+    display: flex;
+    flex-flow: wrap;
+}
+.travelList .travelItem{
+    width: 282px;
+    margin: 10px;
+    background-color: #f8f8f8;
+    cursor: pointer;
+}
+.travelList .travelItem .travelImg{
+    position: relative;
+    width: 270px;
+    height: 155px;
+}
+.travelList .travelItem .travelImg .haciendaImg1{
+    width: 100%;
+    height: 100%;
+}
+.travelList .travelItem .travelImg .haciendaImg2{
+    position: absolute;
+    top: 0;
+    left: 10px;
+}
+.travelList .travelItem .travelTitle{
+    padding: 10px;
+}
+.travelList .travelItem .travelTitle h2{
+    font-size: 14px;
+    font-weight: bold;
+    line-height: 30px;
+}
+.travelList .travelItem:hover .travelTitle h2{
+    color: #3ab851;
+}
+.travelList .travelItem .travelTitle div{
+    height: 40px;
+    overflow: hidden;
+}
+.travelCover .travelRight{
+    width: 280px;
+    padding-right: 20px;
+}
+.travelCover .travelRight .travelGuide{
+    /* width: 285px; */
+    padding: 20px 20px 20px 0;
+    margin-top: 25px;
+}
+.travelCover .travelRight >a{
+}
+.travelRight .travelGuide{
+    display: flex;
+    align-items: center;
+    border: 1px solid #e3e3e3;
+    justify-content: space-around;
+    padding: 20px 10px;
+    box-shadow: 1px 1px 6px 0px #dadada;
+}
+.travelRight .travelGuide1{
+    border-top: 3px solid #34abe3;
+}
+.travelRight .travelGuide1 .guideTag{
+    color: #34abe3;
+}
+.travelRight .travelGuide2{
+    border-top: 3px solid #e4c666;
+}
+.travelRight .travelGuide2 .guideTag{
+    color: #e4c666;
+}
+.travelRight .travelGuide3{
+    border-top: 3px solid #e86f90;
+}
+.travelRight .travelGuide3 .guideTag{
+    color: #e86f90;
+}
+.travelRight .travelGuide4{
+    border-top: 3px solid #7accc0;
+}
+.travelRight .travelGuide4 .guideTag{
+    color: #7accc0;
+}
+.travelRight .travelGuide div .guideTag{
+    font-size: 18px;
+    line-height: 28px;
+    font-weight: 700;
+}
+.travelRight .travelGuide div p{
+    color: #c1c1c1;
+}
+/* 内容-民宿导览 */
+.hotelCover{
+    display: flex;
+    border: 1px solid #e3e3e3;
+}
+.hotelCover .hotHotel{
+    width: 282px;
+    border-right: 1px solid #e3e3e3;
+}
+.hotelCover .hotHotel .title{
+    height: 60px;
+    line-height: 60px;
+    padding: 0 20px;
+    border-bottom: 1px solid #e3e3e3;
+    background: #f8f8f8;
+    font-size: 18px;
+    font-weight: 700;
+}
+.hotelCover .hotHotel .title span{
+    font-size: 12px;
+    color: #797979;
+    font-weight: 100;
+    margin-left: 10px;
+}
+.hotHotelList .hotHotelItem{
+    padding: 16px 16px 16px 20px;
+    border-bottom: 1px solid #e3e3e3;
+    margin-bottom: 0px;
+    overflow: hidden;
+}
+.hotHotelList .hotHotelItem:last-child{
+    border: none;
+}
+.hotHotelList .hotHotelItem img{
+    float: left;
+}
+.hotHotelList .hotHotelItem .desc{
+    margin-left: 110px;
+}
+.hotHotelList .hotHotelItem .desc h3{
+    font-size: 14px;
+    line-height: 30px;
+    font-weight: bold;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+.hotHotelList .hotHotelItem .desc div{
+    height: 41px;
+    overflow: hidden;
+    line-height: 20px;
+    color: #a4a4a4;
+}
+.hotHotelList .hotHotelItem:hover .desc h3{
+   color: #3ab851;
+}
+.recommendHotel{
+    flex: 1;
+}
+.recommendHotel .titel{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    height: 60px;
+    padding: 0 20px;
+    border-bottom: 1px solid #e3e3e3;
+}
+.recommendHotel .titel div{
+    font-size: 18px;
+    font-weight: 700;
+}
+.recommendHotel .titel .more{
+    background: #ff6a28;
+    color: #fff;
+    border-radius: 5px;
+    padding: 8px 22px;
+}
+.recommendHotel .recommendHotelList{
+    display: flex;
+    flex-flow: wrap;
+}
+.recommendHotel .recommendHotelList .recommendHotelItem{
+    width: 305px;
+    padding: 20px;
+}
+.recommendHotelList .recommendHotelItem:hover .recommendHotelImg img{
+    transform:scale(1.2);transform:scale(1.2);
+    -webkit-transform:scale(1.2);transform:scale(1.2);
+}
+.recommendHotelList .recommendHotelItem:hover h1{
+    color: #3ab851;
+}
+.recommendHotelItem .recommendHotelImg{
+    width: 100%;
+    height: 200px;
+    overflow: hidden;
+}
+.recommendHotelItem .recommendHotelImg img{
+    width: 100%;
+    height: 100%;
+    transition:all 0.6s;
+}
+.recommendHotelItem h1{
+    line-height: 30px;
+    padding: 0 20px;
+    font-size: 14px;
+    font-weight: 700;
+}
+.recommendHotelItem .area{
+    line-height: 14px;
+    padding: 0 20px;
+    color: #949494;
+}
+.recommendHotelItem .sortNum{
+    text-align: right;
+    line-height: 14px;
+}
+.recommendHotelItem .sortNum span{
+    padding: 5px 10px;
+    background: #f86928;
+    color: #fff;
+    border-radius: 6px;
+}
+
+
+
+/* 橘黄标题 */
+.orangTitle{
+    border-left: 3px solid #ff6a28;
+    padding-left: 8px;
+    font-size: 16px;
+}
+
+/* 农场导览弹出观光样式 */
+.tourismShow{
+    position: relative;
+    z-index: 999;
+    opacity: 0;
+    display: none;
+    position: fixed;
+    top: 25%;
+    left: 50%;
+    margin-left: -300px;
+    width: 600px;
+    min-height: 400px;
+    background-color: #fff;
+    border: 1px solid #f1f1f1;
+    -webkit-box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+    -moz-box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+    -o-box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+    box-shadow: 2px 4px 10px rgba(0,0,0,.15);
+    padding: 20px;
+    border-radius: 12px;
+    z-index: 9;
+    border-top-left-radius: 0;
+    cursor: default;
+    border-top-right-radius: 0;
+    transition: all .5s;
+}
+.tourismShow .title{
+    border-left: 3px solid #ff6a28;
+    padding-left: 8px;
+    font-size: 16px;
+}
+.tourismShow .line{
+    border-bottom: 1px solid #ddd;
+    margin-top: 10px;
+}
+.tourismShow .content{
+    height: 430px;
+    padding-top: 20px;
+}
+.tourismShow .tourismShowCloseBtn{
+    position: absolute;
+    right: 15px;
+    top: 11px;
+    border-radius: 50%;
+    border: 2px solid #ddd;
+    width: 25px;
+    height: 25px;
+    line-height: 20px;
+    text-align: center;
+    cursor: pointer;
+}
+.tourismShow .content .guideForm>input{
+    width: 40%;
+}
+.tourismShow .content .guideForm>button{
+    color: #fff;
+    padding: 5px 6px;
+    border-radius: 5px;
+    vertical-align: middle;
+    margin-left: 10px;
+    background: #1eaeed;
+}
+.tourismShow .content .guideForm>button{
+    color: #fff;
+    padding: 5px 6px;
+    border-radius: 5px;
+    vertical-align: middle;
+    margin-left: 10px;
+    background: #1eaeed;
+}
+.tourismShow .content #map{
+    height: 373px;
+    margin-top: 10px;
+}
+.tourismShow .loadDiv{
+    position: absolute;
+    left: 45%;
+    top: 45%;
+}

+ 102 - 0
templates/static/css/login.css

@@ -0,0 +1,102 @@
+/* 登录框 */
+.content .loginBj{
+    position: relative;
+    width: 100%;
+    height: 555px;
+    background: url(../imgs/loginBj.png) no-repeat center center;
+}
+.content .loginBj .borderline{
+    position: absolute;
+    right: 15%;
+    top: 65px;
+    width: 455px;
+    height: 425px;
+    border: 2px solid #6dd596;
+    background-color: rgba(186, 244, 206, 0.5);
+    padding: 5px;
+}
+.loginBj .borderline .loginBox{
+    width: 100%;
+    height: 100%;
+    background-color: #fff; 
+    border: 3px solid #61a830;
+    padding: 46px 64px;
+}
+.borderline .loginBox .title{
+    font-size: 22px;
+    color: #60a731;
+    margin-bottom: 30px;
+}
+.borderline .loginBox .loginInp{
+    width: 100%;
+    height: 45px;
+    line-height: 45px;
+    border: 1px solid #d7d7d7;
+    border-radius: 4px;
+    position: relative;
+    margin-bottom: 20px;
+}
+.borderline .loginBox .loginInp input{
+    border: none;
+    height: 90%;
+    vertical-align: initial;
+}
+.borderline .loginBox .loginInp input[type=password]{
+    display: inline-block;
+    width: 75%;
+    padding: .375rem .75rem;
+    line-height: 1.5;
+}
+.borderline .loginBox .loginInp a{
+    color: #60a731;
+    position: absolute;
+    right: 10px;
+    top: 0px;
+}
+.loginBtnCover button{
+    width: 100%;
+    line-height: 48px;
+    border-radius: 6px;
+    color: #ffffff;
+    font-size: 18px;
+    background-color: #61a830;
+    margin-bottom: 20px;
+}
+.loginBtnCover button:active{
+    background-color: #82c753;
+}
+.remPswCover .remPwdInpBox{
+    display: inline-block;
+    width: 17px;
+    height: 17px;
+    position: relative;
+    vertical-align: middle;
+}
+.remPswCover .remPwdInpBox input{
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    opacity: 0;
+    z-index: 1;
+}
+.remPswCover .remPwdInpBox div{
+    width: 100%;
+    height: 100%;
+    background: url(../imgs/checked.png) no-repeat left center;
+}
+.remPswCover .remPwdInpBox input:checked+div{
+    background: url(../imgs/checked.png) no-repeat -19px 0;
+}
+/* 提示层 */
+.hint{
+    border-radius: 5px;
+    position: fixed;
+    z-index: 999;
+    color: white;
+    left: 47%;
+    top: 50%;
+    background: #0000009e;
+    padding: 20px;
+    font-size: 14px;
+    letter-spacing: 2px;
+}

+ 48 - 0
templates/static/css/pickIntro.css

@@ -0,0 +1,48 @@
+/* 头部广告 */
+.advImg{
+    height: 282px;
+    background: url(../imgs/fourseasonsAdv.jpg) no-repeat center;
+    background-size: cover;
+}
+/* 园区采摘详情 */
+.pickDesc{
+    padding: 10px 20px 20px;
+}
+.pickDesc .caption{
+    line-height: 50px;
+    font-size: 16px;
+    color: #000;
+    font-weight: 700;
+    text-align: center;
+}
+.pickDesc .title{
+    text-align: center;
+    line-height: 24px;
+    background-color: #eee;
+    font-size: 14px;
+}
+.pickDesc .prodectIntro{
+    display: flex;
+    align-items: center;
+    width: 62%;
+    margin: 24px auto;
+}
+.prodectIntro .prodectImg{
+    width: 275px;
+    height: 240px;
+}
+.prodectIntro .prodectImg img{
+    width: 100%;
+    height: 100%;
+}
+.prodectIntro .descTxt{
+    line-height: 40px;
+    color: #3f3f3f;
+    margin-left: 50px;
+    font-size: 14px;
+    flex: 1;
+}
+.prodectIntro .descTxt span{
+    color: #000;
+    font-weight: 700;
+}

TEMPAT SAMPAH
templates/static/imgs/1.jpg


TEMPAT SAMPAH
templates/static/imgs/2.png


TEMPAT SAMPAH
templates/static/imgs/22.png


TEMPAT SAMPAH
templates/static/imgs/checked.png


TEMPAT SAMPAH
templates/static/imgs/loginBj.png


TEMPAT SAMPAH
templates/static/imgs/pick.jpg


TEMPAT SAMPAH
templates/static/imgs/pick11.jpg


TEMPAT SAMPAH
templates/static/imgs/travel1.png


TEMPAT SAMPAH
templates/static/imgs/travel2.png


TEMPAT SAMPAH
templates/static/imgs/travel3.png


TEMPAT SAMPAH
templates/static/imgs/travel4.png


+ 416 - 0
templates/static/js/index2.js

@@ -0,0 +1,416 @@
+$(function () {
+    // 轮播
+    var banner = new Swiper('.banner', {
+        autoplay: true,//可选选项,自动滑动
+        loop: true,
+        pagination: {
+            el: '.swiper-pagination',
+            clickable: true,
+        },
+    })
+
+ 
+
+     // 轮播
+    //  var banner = new Swiper('.farmsSwiper', {
+    //     autoplay: true,//可选选项,自动滑动
+    //     loop: true,
+    //     pagination: {
+    //         el: '.swiper-pagination',
+    //         clickable: true,
+    //     },
+    // })
+
+    // 新闻资讯滚动
+
+    function Roll(ele, time, fun) {
+        var obj = document.getElementById(ele);
+        var ul = obj.children;
+        var li = ul[0].children;
+        console.log(li)
+        if (fun) {
+            var fun = fun;
+        } else {
+            var fun = function () { };
+        }
+        var t;
+        if (time) {
+            var time = time;
+        } else {
+            var time = 2500;
+        }
+        t = setInterval(function () {
+            fun()
+            $(li).eq(0).slideUp(function () {
+                $(ul).append($(li).eq(0));
+            });
+            $(li).show();
+        }, time);
+        $(ul).on('mouseenter', 'li', function () {
+            clearInterval(t)
+        })
+        $(ul).on('mouseleave', 'li', function () {
+            t = setInterval(function () {
+                fun()
+                $(li).eq(0).slideUp(function () {
+                    $(ul).append($(li).eq(0));
+                });
+                $(li).show();
+            }, time);
+        })
+    }
+    // Roll('farmBrief', 5000)
+    // Roll('newsListDiv', 2000)
+    // Roll('videoListBox', 5000,function(){
+    //     $('#videoListBox .videoListUl >li').removeClass('active');
+    //     $('#videoListBox .videoListUl >li').eq(1).addClass('active');
+    // })
+    // Roll('gardenMsg', 2000, function(){
+    //     $('#gardenMsg .gardenUl >li').removeClass('active');
+    //     $('#gardenMsg .gardenUl >li').eq(1).addClass('active');
+    //     $('.gardenImg >img').attr('src',$('#gardenMsg .gardenUl >.active').find('.hide_farm_img').val())
+    // })
+    // var stu = new Roll("newsListDiv", 12);
+    // 视频咨询
+    // var myPlayer = videojs('my-video');
+    // videojs("my-video").ready(function () {
+    //     var myPlayer = this;
+    //     myPlayer.play();
+    // });
+
+    // 视频咨询
+    // $('#videoListBox').on('click', '.date', function () {
+    //     $('#videoListBox .videoListUl >li').removeClass('active');
+    //     $(this).parent().addClass('active');
+    //     var myPlayer = videojs('my-video');
+    //     var videoUrl = $(this).find('.hide_video_url').val();
+    //     videojs("my-video", {}, function () {
+    //         window.myPlayer = this;
+    //         $("#mymoda .video-con #my-video source").attr("src", videoUrl);
+    //         myPlayer.src(videoUrl);
+    //         myPlayer.load(videoUrl);
+    //         myPlayer.play();
+    //     });
+    //     // $('.videoBox').html('');
+    //     $(".video_link").click(function () {
+    //         var myPlayer = videojs('my-video');
+    //         var videoUrl = $(this).find('.hide_video_url').val();
+    //         videojs("my-video", {}, function () {
+    //             window.myPlayer = this;
+    //             $("#mymoda .video-con #my-video source").attr("src", videoUrl);
+    //             myPlayer.src(videoUrl);
+    //             myPlayer.load(videoUrl);
+    //             myPlayer.play();
+    //         });
+    //         $(".click-modal").click();
+    //     });
+    //     // 模态窗消失时,关闭视频    
+    //     $('#mymoda').on('hidden.bs.modal', function () {
+    //         myPlayer.pause();
+    //     });
+
+    // })
+
+    // 四季采摘
+    $('#gardenMsg').on('click', '.gardenName', function () {
+        $('#gardenMsg .gardenUl >li').removeClass('active');
+        $(this).parent().addClass('active');
+        // $(this).find('.hide_farm_img').val();
+        $('.gardenImg >img').attr('src', $(this).find('.hide_farm_img').val())
+    })
+
+    // 导游导览
+    // var map = new AMap.Map('map', {
+    //     resizeEnable: true, //是否监控地图容器尺寸变化
+    //     zoom: 11, //初始化地图层级
+    //     center: [113.397428, 39.90923] //初始化地图中心点
+    // });
+    //绘制初始路径
+    // var path = [];
+    // path.push([113.641379, 34.574431]);
+    // path.push([108.877908, 34.389461]);
+    // path.push([108.350564, 22.847832]);
+    // map.plugin("AMap.DragRoute", function () {
+    //     route = new AMap.DragRoute(map, path, AMap.DrivingPolicy.LEAST_FEE); //构造拖拽导航类
+    //     route.search(); //查询导航路径并开启拖拽导航
+    // });
+
+
+
+    // 民宿导览
+    var swiper = new Swiper('.homestay', {
+        slidesPerView: 3,
+        spaceBetween: 30,
+        navigation: {
+            nextEl: '.swiper-button-next',
+            prevEl: '.swiper-button-prev',
+        },
+        autoplay: {
+            delay: 3000
+        },
+    });
+
+})
+
+// 定位
+function city_change(obj){
+    var txt = $(obj).html();
+    alert(txt)
+    $('.currCity span').html(txt);
+}
+
+// 示范区滚动
+var currTop = 0;
+for(var i = 0; i<4;i++){
+    var cloneEle = $('.farmsUl li').eq(i).clone();
+    $('.farmsUl').append(cloneEle)
+}
+var farmsautoplay = setInterval(() => {
+    farmsScroll('+')
+}, 2000);
+$('.farms').mouseover(function(){
+    clearInterval(farmsautoplay)
+});
+$('.farms').mouseout(function(){
+    farmsautoplay = setInterval(() => {
+        farmsScroll('+')
+    }, 2000);
+});
+function handMove(){
+    clearInterval(farmsautoplay)
+}
+function farmsScroll(flag){
+    var allHeight = parseInt($('.farmsUl').height());
+    var oneHeight = parseInt($('.farmsUl li').outerHeight());
+    if(flag == '+'){
+        if(currTop > -(allHeight-oneHeight*4)){
+            currTop = currTop - oneHeight;
+            $('.farmsUl').css('transition','all 1s ease 0s')
+            $('.farmsUl').css('top',currTop);
+    }else{
+            currTop = 0
+            $('.farmsUl').css('top',currTop);
+            $('.farmsUl').css('transition','none')
+        }
+    }else if(flag == '-'){
+        if(currTop >= 0){
+            currTop = -(allHeight-oneHeight*4);
+            $('.farmsUl').css('top',currTop);
+            $('.farmsUl').css('transition','none')
+    }else{
+            currTop = currTop + oneHeight;
+            $('.farmsUl').css('top',currTop);
+            $('.farmsUl').css('transition','all 1s ease 0s')
+        }
+    }
+}
+
+var map = new AMap.Map('map', {
+    resizeEnable: true, //是否监控地图容器尺寸变化
+    zoom: 11, //初始化地图层级
+    center: [113.397428, 39.90923] //初始化地图中心点
+});
+// var geoc = new AMap.Geocoder();
+function searchWay() {
+    clearWay()
+    var startPath = $("#startPath").val();
+    var endPath = $("#endPath").val();
+
+    if (!startPath) {
+        $("#startPath").focus();
+        return;
+    }
+    if (!endPath) {
+        $("#endPath").focus();
+        return;
+    }
+    $('.guideMap').append('<div class="loadDiv"><img src="../static/imgs/timg.gif" /></div>')
+    //构造路线导航类
+    var driving = new AMap.Driving({
+        map: map,
+        panel: "panel"
+    });
+    // 根据起终点名称规划驾车导航路线
+    driving.search([
+        { keyword: startPath, city: '' },
+        { keyword: endPath, city: '' }
+    ], function (status, result) {
+        if (status === 'complete') {
+            // log.success('绘制驾车路线完成');
+            $('.loadDiv').remove();
+        } else {
+            alert('获取驾车数据失败:' + result)
+            $('.loadDiv').remove();
+        }
+    });
+}
+
+function clearWay() {
+    // 清除地图上所有添加的覆盖物
+    map.clearMap();
+    $('#panel').html('');
+}
+
+
+
+
+
+
+// 登录
+function login() {
+    var username = $("#username").val();
+    var password = $("#password").val();
+    if (!username) {
+        $("#username").focus();
+        return;
+    }
+    if (!password) {
+        $("#password").focus();
+        return;
+    }
+
+    // $('.notLogin').toggle();
+    // $('.isLogin').toggle();
+    // window.open("back_manage");
+
+    $.ajax({
+        url: 'user_land',
+        data: {
+            username: username,
+            password: password
+        },
+        type: 'post',
+        dataType:'json',
+        success: function (data) {
+            if (data.code) {
+                var hrefstr = 'person_farm?name=' + data.username;
+                window.location.reload();
+                // $('.isLogin').toggle();
+                // $('#person_farm').attr('href', hrefstr)
+                // $('.userPhoto').attr('src', data.user_img)
+                // $('.notLogin').hide();
+                // $('.isLogin').show();
+            } else if (data.code == 0) {
+                $('body').append('<div class="hint">用户不存在</div>')
+                setTimeout(function () {
+                    $('.hint').remove();
+                }, 1000)
+            } else if (data.code == 2) {
+                $('body').append('<div class="hint">用户名错误</div>')
+                setTimeout(function () {
+                    $('.hint').remove();
+                }, 1000)
+            } else if (data.code == 3) {
+                $('body').append('<div class="hint">密码错误</div>')
+                setTimeout(function () {
+                    $('.hint').remove();
+                }, 1000)
+            } else {
+                $('body').append('<div class="hint">登录失败</div>')
+                setTimeout(function () {
+                    $('.hint').remove();
+                }, 1000)
+            }
+        },
+        error: function (type) {
+
+        }
+    })
+}
+// 返回顶部
+function goUp() {
+    $('body,html').animate({ scrollTop: 0 }, 300)
+}
+
+function show() {
+    $(window).scroll(function () {
+        if ($(window).scrollTop() > 100) {
+            $("#back2top").fadeIn(100);
+        } else {
+            $("#back2top").fadeOut(100);
+        }
+    });
+}
+show();
+
+// 农场导览弹框
+$('.haciendaTxt .btn1').on('click',function(){
+    $('.tourismShow .title span').html('观光路线')
+    $('.tourismShow .content').html('<div style="text-align:center;width:100%;height:100%"><img  style="width:100%;height:100%" src="http://127.0.0.1:8000/static/imgs/banner2.jpg">')
+    $('.tourismShow').show();
+    $('.tourismShow').css('opacity',1)
+})
+$('.tourismShowCloseBtn').on('click',function(){
+    $('.tourismShow .content').html('')
+    $('.tourismShow').css('opacity',0)
+    setTimeout(function(){
+        $('.tourismShow').hide();
+    },500)
+})
+var map;
+$('.haciendaTxt .btn2').on('click',function(){
+    $('.tourismShow .title span').html('导游导览');
+    var html = '<div class="">'+
+                '<div class="guideForm">起始地点:<input type="text" id="startPath"><button onclick="searchWay()">确定</button></div>'+
+                '<div id="map">地图</div>'+
+                '</div>'
+    $('.tourismShow .content').html(html);
+    map = new AMap.Map('map', {
+        resizeEnable: true, //是否监控地图容器尺寸变化
+        zoom: 11, //初始化地图层级
+        center: [113.397428, 39.90923] //初始化地图中心点
+    });
+    var startIcon = new AMap.Icon({
+        // 图标尺寸
+        size: new AMap.Size(25, 34),
+        // 图标的取图地址
+        image: '//a.amap.com/jsapi_demos/static/demo-center/icons/dir-marker.png',
+        // 图标所用图片大小
+        imageSize: new AMap.Size(135, 40),
+        // 图标取图偏移量
+        imageOffset: new AMap.Pixel(-9, -3)
+    });
+    var endIcon = new AMap.Icon({
+        size: new AMap.Size(25, 34),
+        image: '//a.amap.com/jsapi_demos/static/demo-center/icons/dir-marker.png',
+        imageSize: new AMap.Size(135, 40),
+        imageOffset: new AMap.Pixel(-95, -3)
+    });
+    var marker = new AMap.Marker({
+        icon:endIcon,
+        position: new AMap.LngLat(113.397428, 39.90923),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        title: '北京'
+    });
+    map.add(marker); 
+    $('.tourismShow').show();
+    $('.tourismShow').css('opacity',1)
+})
+function searchWay() {
+    map.clearMap();
+    var startPath = $("#startPath").val();
+    var endPath = '北京';
+
+    if (!startPath) {
+        $("#startPath").focus();
+        return;
+    }
+    $('.tourismShow .content').append('<div class="loadDiv"><img src="../static/imgs/timg.gif" /></div>')
+    //构造路线导航类
+    var driving = new AMap.Driving({
+        map: map,
+        // panel: "panel"
+    });
+    // 根据起终点名称规划驾车导航路线
+    driving.search([
+        { keyword: startPath, city: '' },
+        { keyword: endPath, city: '' }
+    ], function (status, result) {
+        if (status === 'complete') {
+            // log.success('绘制驾车路线完成');
+            $('.loadDiv').remove();
+        } else {
+            alert('获取驾车数据失败:' + result)
+            $('.loadDiv').remove();
+        }
+    });
+}

File diff ditekan karena terlalu besar
+ 2 - 2
templates/static/lib/ckeditor/plugins/image/dialogs/image.js


+ 4 - 0
templates/static/lib/css/reset.css

@@ -58,4 +58,8 @@ textarea{
 
 .fr {
     float: right;
+}
+input:-webkit-autofill {
+    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
+    outline:none;
 }