Просмотр исходного кода

信息审核查看内容为富文本编辑器

yf_zd 5 лет назад
Родитель
Сommit
efb912c25c

+ 17 - 17
apps/Equipment/urls.py

@@ -166,7 +166,7 @@ urlpatterns = [
     url(r'^video_upload$', Video_Upload.as_view(), name='video_upload'),
     url(r'^video_photo$', Video_Photo.as_view(), name='video_photo'),
 
-    # url(r'^news_photo/(?P<path>.*)', serve, {'document_root': 'G:\\YFWLW\\second\\news_photo'}),# 本地
+    # url(r'^news_photo/(?P<path>.*)', serve, {'document_root': 'F:\\YFWLW\\second\\news_photo'}),# 本地
 
     # 产品图片上传接口
     url(r'^product_photo$', Product_Photo.as_view(), name='product_photo'),
@@ -227,24 +227,24 @@ urlpatterns = [
     url(r'^test_photo$', Test_Photo.as_view(), name='test_photo'),
 
     # 配置文件夹路由:
-    # url(r'^hotel_photo/(?P<path>.*)', serve, {'document_root': 'G:\YFWLW\second\hotel_photo'}), #本地
-    # url(r'^hotel_photos/(?P<path>.*)', serve, {'document_root': 'G:\YFWLW\second\hotel_photos'}), #本地
-    # url(r'^hvideos/(?P<path>.*)', serve, {'document_root': 'G:\YFWLW\second\hvideos'}), #本地
-    # url(r'^hnews_photo/(?P<path>.*)', serve, {'document_root': 'G:\YFWLW\second\hnews_photo'}), #本地
-    # url(r'^hvideo_photo/(?P<path>.*)', serve, {'document_root': 'G:\YFWLW\second\hvideo_photo'}), #本地
-    # url(r'^product_photo/(?P<path>.*)', serve, {'document_root': 'G:\YFWLW\second\product_photo'}), #本地
-    # url(r'^garden_photo/(?P<path>.*)', serve, {'document_root': 'G:\YFWLW\second\garden_photo'}), #本地
-    # url(r'^guser_photo/(?P<path>.*)', serve, {'document_root': 'G:\YFWLW\second\guser_photo'}), #本地
+    url(r'^hotel_photo/(?P<path>.*)', serve, {'document_root': 'F:\YFWLW\second\hotel_photo'}), #本地
+    url(r'^hotel_photos/(?P<path>.*)', serve, {'document_root': 'F:\YFWLW\second\hotel_photos'}), #本地
+    url(r'^hvideos/(?P<path>.*)', serve, {'document_root': 'F:\YFWLW\second\hvideos'}), #本地
+    url(r'^hnews_photo/(?P<path>.*)', serve, {'document_root': 'F:\YFWLW\second\hnews_photo'}), #本地
+    url(r'^hvideo_photo/(?P<path>.*)', serve, {'document_root': 'F:\YFWLW\second\hvideo_photo'}), #本地
+    url(r'^product_photo/(?P<path>.*)', serve, {'document_root': 'F:\YFWLW\second\product_photo'}), #本地
+    url(r'^garden_photo/(?P<path>.*)', serve, {'document_root': 'F:\YFWLW\second\garden_photo'}), #本地
+    url(r'^guser_photo/(?P<path>.*)', serve, {'document_root': 'F:\YFWLW\second\guser_photo'}), #本地
     
 
-    url(r'^hotel_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/hotel_photo'}), #本地
-    url(r'^hotel_photos/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/hotel_photos'}), #本地
-    url(r'^hvideos/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/hvideos'}), #本地
-    url(r'^hnews_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/hnews_photo'}), #本地
-    url(r'^hvideo_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/hvideo_photo'}), #本地
-    url(r'^product_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/product_photo'}), #本地
-    url(r'^garden_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/garden_photo'}), #本地
-    url(r'^guser_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/garden_photo'}), #本地
+    # url(r'^hotel_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/hotel_photo'}), #本地
+    # url(r'^hotel_photos/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/hotel_photos'}), #本地
+    # url(r'^hvideos/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/hvideos'}), #本地
+    # url(r'^hnews_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/hnews_photo'}), #本地
+    # url(r'^hvideo_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/hvideo_photo'}), #本地
+    # url(r'^product_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/product_photo'}), #本地
+    # url(r'^garden_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/garden_photo'}), #本地
+    # url(r'^guser_photo/(?P<path>.*)', serve, {'document_root': '/home/web/second/second/garden_photo'}), #本地
 
 
 ]

+ 44 - 37
templates/backstageNet/infoManage/dormManage.html

@@ -110,6 +110,14 @@
             height: 20px;
             display: inline-block;
         }
+        .layui-table{
+            table-layout: fixed;
+        }
+        .layui-table td{
+            white-space:nowrap;
+            overflow:hidden;
+            text-overflow: ellipsis;
+        }
     </style>
 </head>
 
@@ -147,9 +155,9 @@
                                 <th>民宿价格</th>
                                 <th>民宿简介</th>
                                 <th>民宿地址</th>
-                                <th>经纬度</th>
-                                <th>法人代表</th>
-                                <th>民宿封面</th>
+                                <!-- <th>经纬度</th> -->
+                                <!-- <th>法人代表</th> -->
+                                <!-- <th>民宿封面</th> -->
                                 <th>联系方式</th>
                                 <th>操作</th>
                             </tr>
@@ -261,12 +269,10 @@
                                 $.ajax({
                                     url: 'dorm_check_list',
                                     type: 'get',
-                                    data: { page: obj.curr },
+                                    data: { page: obj.curr ,hidden: hidden},
                                     dataType: 'html',
                                     success: function (data) {
-                                        console.log(data);
                                         $('#dataTable').children('tbody').html(data);
-                                        console.log($('#totalPage').val());
                                     },
                                     error: function (type) {
                                         console.log(type)
@@ -391,18 +397,18 @@
                 anim: -1,
                 content: '<div class="table"></div>',
                 success: function(layero, index) {
-                    var colsList = [
-                        [
-                            { field: 'name', title: '民宿名字' },
-                            { field: 'price', title: '民宿价格' },
-                            { field: 'intro', title: '民宿简介' },
-                            { field: 'addr', title: '民宿地址' },
-                            { field: 'location', title: '经纬度' },
-                            { field: 'person', title: '法人代表' },
-                            { field: 'img', title: '民宿封面' },
-                            { field: 'hotel_tel', title: '联系方式' },
-                        ]
-                    ];
+                    // var colsList = [
+                    //     [
+                    //         { field: 'name', title: '民宿名字' },
+                    //         { field: 'price', title: '民宿价格' },
+                    //         { field: 'intro', title: '民宿简介' },
+                    //         { field: 'addr', title: '民宿地址' },
+                    //         { field: 'location', title: '经纬度' },
+                    //         { field: 'person', title: '法人代表' },
+                    //         { field: 'img', title: '民宿封面' },
+                    //         { field: 'hotel_tel', title: '联系方式' },
+                    //     ]
+                    // ];
                     $.ajax({
                         url: 'dorm_check',
                         type: 'post',
@@ -413,27 +419,28 @@
                         dataType: 'json',
                         success: function (data) {
                             window.data = data[0]
+                            layero.find('.table').html(window.data.content)
                         }
                     })
-                    var Datas = [];
-                    console.log(Datas)
-                    Datas.push({
-                        name: window.data.name,
-                        price: window.data.price,
-                        intro: window.data.intro ,
-                        addr: window.data.addr ,
-                        location: window.data.location ,
-                        person: window.data.person ,
-                        img: window.data.img ,
-                        hotel_tel: window.data.hotel_tel ,
-                    });
-                    table.render({
-                        elem: layero.find('.table'),
-                        id: 'Message',
-                        data: Datas,
-                        cols: colsList,
-                        limit: 8,
-                    });
+                    // var Datas = [];
+                    // console.log(Datas)
+                    // Datas.push({
+                    //     name: window.data.name,
+                    //     price: window.data.price,
+                    //     intro: window.data.intro ,
+                    //     addr: window.data.addr ,
+                    //     location: window.data.location ,
+                    //     person: window.data.person ,
+                    //     img: window.data.img ,
+                    //     hotel_tel: window.data.hotel_tel ,
+                    // });
+                    // table.render({
+                    //     elem: layero.find('.table'),
+                    //     id: 'Message',
+                    //     data: Datas,
+                    //     cols: colsList,
+                    //     limit: 8,
+                    // });
                     return false
                 }
             });

+ 3 - 3
templates/backstageNet/infoManage/dormManageList.html

@@ -4,9 +4,9 @@
     <td>{{ msg.price }}</td>
     <td>{{ msg.intro }}</td>
     <td>{{ msg.addr }}</td>
-    <td>{{ msg.location }}</td>
-    <td>{{ msg.person }}</td>
-    <td>{{ msg.hotel_img }}</td>
+    <!-- <td>{{ msg.location }}</td> -->
+    <!-- <td>{{ msg.person }}</td> -->
+    <!-- <td>{{ msg.hotel_img }}</td> -->
     <td>{{ msg.hotel_tel }}</td>
     <td>
         {% if msg.hidden == 0%}

+ 18 - 10
templates/backstageNet/infoManage/newsManage.html

@@ -110,6 +110,14 @@
             height: 20px;
             display: inline-block;
         }
+        .layui-table{
+            table-layout: fixed;
+        }
+        .layui-table td{
+            white-space:nowrap;
+            overflow:hidden;
+            text-overflow: ellipsis;
+        }
     </style>
 </head>
 
@@ -144,7 +152,7 @@
                             <tr>
                                 <th>文章标题</th>
                                 <th>文章简介</th>
-                                <th>内容</th>
+                                <!-- <th>内容</th> -->
                                 <th>作者</th>
                                 <th>发布日期</th>
                                 <th>操作</th>
@@ -215,7 +223,7 @@
                                 $.ajax({
                                     url: 'news_check_list',
                                     type: 'get',
-                                    data: { page: obj.curr },
+                                    data: { page: obj.curr ,hidden: hidden},
                                     dataType: 'html',
                                     success: function (data) {
                                         console.log(data);
@@ -360,7 +368,7 @@
                         }
                     })
                     var Datas = [];
-                    console.log(Datas)
+                    console.log(layero.find('.table').html(window.data.content))
                     Datas.push({
                         title: window.data.title,
                         intro: window.data.intro,
@@ -368,13 +376,13 @@
                         writer: window.data.writer ,
                         time: window.data.time ,
                     });
-                    table.render({
-                        elem: layero.find('.table'),
-                        id: 'Message',
-                        data: Datas,
-                        cols: colsList,
-                        limit: 8,
-                    });
+                    // table.render({
+                    //     elem: layero.find('.table'),
+                    //     id: 'Message',
+                    //     data: Datas,
+                    //     cols: colsList,
+                    //     limit: 8,
+                    // });
                 }
             });
         }

+ 4 - 8
templates/backstageNet/infoManage/newsManageList.html

@@ -1,12 +1,8 @@
 {% if art|length %} {% for msg in art %}
 <tr>
-    <td>
-        {{ msg.title }}
-    </td>
-    <td>
-        {{ msg.intro }}
-    </td>
-    <td>{{ msg.content|safe }}</td>
+    <td>{{ msg.title }}</td>
+    <td>{{ msg.intro }}</td>
+    <!-- <td>{{ msg.content|safe }}</td> -->
     <td>{{ msg.writer }}</td>
     <td>{{ msg.upl_time }}</td>
     <td>
@@ -23,7 +19,7 @@
 </tr>
 {% endfor %} {% else %}
 <tr>
-    <td colspan="10" style="text-align:center;">暂无数据</td>
+    <td colspan="5" style="text-align:center;">暂无数据</td>
 </tr>
 {% endif %}
 <input type="hidden" value="{{nums}}" id="totalPage">

+ 10 - 25
templates/backstageNet/infoManage/pickManage.html

@@ -111,6 +111,14 @@
             height: 20px;
             display: inline-block;
         }
+        .layui-table{
+            table-layout: fixed;
+        }
+        .layui-table td{
+            white-space:nowrap;
+            overflow:hidden;
+            text-overflow: ellipsis;
+        }
     </style>
 </head>
 
@@ -215,12 +223,10 @@
                                 $.ajax({
                                     url: 'garden_check_list',
                                     type: 'get',
-                                    data: { page: obj.curr },
+                                    data: { page: obj.curr,hidden: hidden },
                                     dataType: 'html',
                                     success: function (data) {
-                                        console.log(data);
                                         $('#dataTable').children('tbody').html(data);
-                                        console.log($('#totalPage').val());
                                     },
                                     error: function (type) {
                                         console.log(type)
@@ -326,14 +332,6 @@
                 anim: -1,
                 content: '<div class="table"></div>',
                 success: function(layero, index) {
-                    var colsList = [
-                        [
-                            { field: 'name', title: '采摘名称' },
-                            { field: 'company', title: '采摘企业' },
-                            { field: 'pick_img', title: '农场图片' },
-                            { field: 'upl_time', title: '采摘时间' },
-                        ]
-                    ];
                     $.ajax({
                         url: 'garden_check',
                         type: 'post',
@@ -344,22 +342,9 @@
                         dataType: 'json',
                         success: function (data) {
                             window.data = data[0]
+                            layero.find('.table').html(window.data.content)
                         }
                     })
-                    var Datas = [];
-                    Datas.push({
-                        name: window.data.name,
-                        company: window.data.company,
-                        pick_img: window.data.img ,
-                        upl_time: window.data.time ,
-                    });
-                    table.render({
-                        elem: layero.find('.table'),
-                        id: 'Message',
-                        data: Datas,
-                        cols: colsList,
-                        limit: 8,
-                    });
                 }
             });
         }

+ 1 - 1
templates/backstageNet/infoManage/pickManageList.html

@@ -23,7 +23,7 @@
 </tr>
 {% endfor %} {% else %}
 <tr>
-    <td colspan="10" style="text-align:center;">暂无数据</td>
+    <td colspan="5" style="text-align:center;">暂无数据</td>
 </tr>
 {% endif %}
 <input type="hidden" value="{{nums}}" id="totalPage">

+ 10 - 26
templates/backstageNet/infoManage/productManage.html

@@ -111,6 +111,14 @@
             height: 20px;
             display: inline-block;
         }
+        .layui-table{
+            table-layout: fixed;
+        }
+        .layui-table td{
+            white-space:nowrap;
+            overflow:hidden;
+            text-overflow: ellipsis;
+        }
     </style>
 </head>
 
@@ -147,7 +155,7 @@
                                 <th>产品标题</th>
                                 <th >生产企业</th>
                                 <th>照片路径</th>
-                                <th>正文</th>
+                                <!-- <th>正文</th> -->
                                 <th>联系方式</th>
                                 <th>操作</th>
                             </tr>
@@ -375,15 +383,6 @@
                 anim: -1,
                 content: '<div class="table"></div>',
                 success: function(layero, index) {
-                    var colsList = [
-                        [
-                            { field: 'title', title: '产品标题' },
-                            { field: 'intro', title: '生产企业' },
-                            { field: 'head_img', title: '照片路径' },
-                            { field: 'content', title: '正文' },
-                            { field: 'time', title: '联系方式' }
-                        ]
-                    ];
                     $.ajax({
                         url: 'equip_check',
                         type: 'post',
@@ -394,24 +393,9 @@
                         dataType: 'json',
                         success: function (data) {
                             window.data = data[0]
+                            layero.find('.table').html(window.data.content)
                         }
                     })
-                    var Datas = [];
-                    console.log(Datas)
-                    Datas.push({
-                        title: window.data.title,
-                        intro: window.data.intro,
-                        content: window.data.content ,
-                        head_img: window.data.head_img ,
-                        time: window.data.time ,
-                    });
-                    table.render({
-                        elem: layero.find('.table'),
-                        id: 'Message',
-                        data: Datas,
-                        cols: colsList,
-                        limit: 8,
-                    });
                 }
             });
         }

+ 1 - 1
templates/backstageNet/infoManage/productManageList.html

@@ -5,7 +5,7 @@
         {{ msg.intro }}
     </td>
     <td>{{ msg.head_img }}</td>
-    <td>{{ msg.content|safe }}</td>
+    <!-- <td>{{ msg.content|safe }}</td> -->
     <td>{{ msg.mobile }}</td>
     <td>
         {% if msg.hidden == 0%}

+ 20 - 43
templates/backstageNet/infoManage/videoManage.html

@@ -111,6 +111,14 @@
             height: 20px;
             display: inline-block;
         }
+        .layui-table{
+            table-layout: fixed;
+        }
+        .layui-table td{
+            white-space:nowrap;
+            overflow:hidden;
+            text-overflow: ellipsis;
+        }
     </style>
 </head>
 
@@ -146,8 +154,8 @@
                             <tr>
                                 <th>视频标题</th>
                                 <th>视频简介</th>
-                                <th >上传文件</th>
-                                <th>视频封面</th>
+                                <!-- <th >上传文件</th> -->
+                                <!-- <th>视频封面</th> -->
                                 <th>视频作者</th>
                                 <th>发布时间</th>
                                 <th>操作</th>
@@ -260,7 +268,7 @@
                                 $.ajax({
                                     url: 'video_check_list',
                                     type: 'get',
-                                    data: { page: obj.curr },
+                                    data: { page: obj.curr,hidden: hidden },
                                     dataType: 'html',
                                     success: function (data) {
                                         console.log(data);
@@ -364,7 +372,7 @@
 
 
         //查看
-        function lokFun(id) {
+        function lokFun(id,videoUrl) {
             var index =  layer.open({
                 type: 0,
                 id: 'Layer',
@@ -374,45 +382,14 @@
                 anim: -1,
                 content: '<div class="table"></div>',
                 success: function(layero, index) {
-                    var colsList = [
-                        [
-                            { field: 'title', title: '视频标题' },
-                            { field: 'intro', title: '视频简介' },
-                            { field: 'video_url', title: '上传文件' },
-                            { field: 'video_img', title: '视频封面' },
-                            { field: 'author', title: '视频作者' },
-                            { field: 'time', title: '发布时间' }
-                        ]
-                    ];
-                    $.ajax({
-                        url: 'video_check',
-                        type: 'post',
-                        async: false,
-                        data: {
-                            ids: id,
-                        },
-                        dataType: 'json',
-                        success: function (data) {
-                            window.data = data[0]
-                        }
-                    })
-                    var Datas = [];
-                    console.log(Datas)
-                    Datas.push({
-                        title: window.data.title,
-                        intro: window.data.intro,
-                        video_url: window.data.video_url ,
-                        video_img: window.data.video_img ,
-                        author: window.data.author ,
-                        time: window.data.time ,
-                    });
-                    table.render({
-                        elem: layero.find('.table'),
-                        id: 'Message',
-                        data: Datas,
-                        cols: colsList,
-                        limit: 8,
-                    });
+                    var html = '<video id="my-video" class="video-js" controls width="100%" height="349" autoplay="autoplay" poster="{{video.video_img}}" data-setup="{}">'+
+                                '<source src="http://127.0.0.1:8000/'+videoUrl+'" type="video/mp4">'+
+                                '<source src="http://127.0.0.1:8000/'+videoUrl+'" type="video/webm">'+
+                                '<source src="http://127.0.0.1:8000/'+videoUrl+'}" type="video/ogg">'+
+                                '<p class="vjs-no-js">要查看此视频,请启用JavaScript,并考虑升级到一个web浏览器'+
+                                    '<a href="http://videojs.com/html5-video-support/" target="_blank">支持HTML5视频</a>'+
+                                '</p></video>';
+                    layero.find('.table').html(html);
                 }  
             });
         }

+ 4 - 4
templates/backstageNet/infoManage/videoManageList.html

@@ -4,8 +4,8 @@
     <td>
         {{ msg.intro }}
     </td>
-    <td>{{ msg.video_url }}</td>
-    <td>{{ msg.video_img }}</td>
+    <!-- <td>{{ msg.video_url }}</td> -->
+    <!-- <td>{{ msg.video_img }}</td> -->
     <td>{{ msg.author }}</td>
     <td>{{ msg.publish_date }}</td>
     <td>
@@ -17,12 +17,12 @@
         {% endif %}
         <a href="JavaScript:;" class="delBtn" onclick="delFun('{{msg.id}}')">删除</a>
         |
-        <a href="JavaScript:;" class="lokBtn" onclick="lokFun('{{msg.id}}')">查看</a>
+        <a href="JavaScript:;" class="lokBtn" onclick="lokFun('{{msg.id}}','{{ msg.video_url }}')">查看</a>
     </td>
 </tr>
 {% endfor %} {% else %}
 <tr>
-    <td colspan="10" style="text-align:center;">暂无数据</td>
+    <td colspan="5" style="text-align:center;">暂无数据</td>
 </tr>
 {% endif %}
 <input type="hidden" value="{{nums}}" id="totalPage">