Ver código fonte

我的发布

yf_zd 5 anos atrás
pai
commit
c284224c3e

+ 19 - 21
templates/backstageNet/infoList/myPub.html

@@ -153,12 +153,12 @@
                             <div class="layui-input-inline">
                             <div class="layui-input-inline">
                                 <select name="type" id="selectType" lay-verify="required" lay-filter="type">
                                 <select name="type" id="selectType" lay-verify="required" lay-filter="type">
                                     <option value="">全部</option>
                                     <option value="">全部</option>
-                                    <option value="">新闻资讯</option>
-                                    <option value="">视频资讯</option>
-                                    <option value="">产品展厅</option>
-                                    <option value="">四季采摘</option>
-                                    <option value="">民宿导览</option>
-                                    <option value="">旅游景点</option>
+                                    <option value="5">新闻资讯</option>
+                                    <option value="6">视频资讯</option>
+                                    <option value="7">产品展厅</option>
+                                    <option value="8">四季采摘</option>
+                                    <option value="9">民宿导览</option>
+                                    <option value="10">旅游景点</option>
                                 </select> 
                                 </select> 
                             </div>
                             </div>
                             
                             
@@ -172,10 +172,8 @@
                     <table class="layui-table" id="dataTable">
                     <table class="layui-table" id="dataTable">
                         <thead>
                         <thead>
                             <tr>
                             <tr>
-                                <th>文章标题</th>
-                                <th>文章简介</th>
-                                <!-- <th>内容</th> -->
-                                <th>作者</th>
+                                <th>标题</th>
+                                <th>类型</th>
                                 <th>发布日期</th>
                                 <th>发布日期</th>
                                 <th>操作</th>
                                 <th>操作</th>
                             </tr>
                             </tr>
@@ -212,11 +210,12 @@
             });
             });
 
 
             //第一个实例
             //第一个实例
-            getData('art_list', 1, 0) //url,page,信息类型
+            getData('my_pub_list', 1,0, '') //url,page,信息类型
 
 
             form.on('select(type)', function(data){
             form.on('select(type)', function(data){
+                console.log(data)
                 var hidden = $('.permission button.active').data('type');
                 var hidden = $('.permission button.active').data('type');
-                getData('art_list', 1, hidden) //url,page,信息类型
+                getData('my_pub_list', 1, hidden,data.value) //url,page,信息类型
 
 
             }); 
             }); 
             //监听提交
             //监听提交
@@ -228,13 +227,14 @@
 
 
         });
         });
 
 
-        function getData(url, page, hidden) {
+        function getData(url, page, hidden,curtype) {
             $.ajax({
             $.ajax({
                 url: url,
                 url: url,
                 type: 'get',
                 type: 'get',
                 data: {
                 data: {
                     page: page,
                     page: page,
-                    hidden: hidden
+                    hidden: hidden,
+                    type:curtype
                 },
                 },
                 dataType: 'html',
                 dataType: 'html',
                 success: function (data) {
                 success: function (data) {
@@ -248,14 +248,12 @@
                         , jump: function (obj, first) {
                         , jump: function (obj, first) {
                             if (!first) {
                             if (!first) {
                                 $.ajax({
                                 $.ajax({
-                                    url: 'news_check_list',
+                                    url: 'my_pub_list',
                                     type: 'get',
                                     type: 'get',
-                                    data: { page: obj.curr ,hidden: hidden},
+                                    data: { page: obj.curr ,hidden: hidden,type:curtype},
                                     dataType: 'html',
                                     dataType: 'html',
                                     success: function (data) {
                                     success: function (data) {
-                                        console.log(data);
                                         $('#dataTable').children('tbody').html(data);
                                         $('#dataTable').children('tbody').html(data);
-                                        console.log($('#totalPage').val());
                                     },
                                     },
                                     error: function (type) {
                                     error: function (type) {
                                         console.log(type)
                                         console.log(type)
@@ -274,7 +272,7 @@
         // 编辑
         // 编辑
         function editFun(id) {
         function editFun(id) {
             $.ajax({
             $.ajax({
-                url: 'news_check_list',
+                url: 'my_pub_list',
                 type: 'post',
                 type: 'post',
                 data: {
                 data: {
                     id: id,
                     id: id,
@@ -312,7 +310,7 @@
         function passFun(id) {
         function passFun(id) {
             layer.confirm('是否通过此信息',{title:'通过'}, function (index) {
             layer.confirm('是否通过此信息',{title:'通过'}, function (index) {
                 $.ajax({
                 $.ajax({
-                    url: 'news_check_list',
+                    url: 'my_pub_list',
                     type: 'post',
                     type: 'post',
                     data: {
                     data: {
                         req: 'check',
                         req: 'check',
@@ -422,7 +420,7 @@
                 $(this).addClass('active');
                 $(this).addClass('active');
                 $('#selectType').val('');
                 $('#selectType').val('');
                 form.render('select');
                 form.render('select');
-                getData('art_list', 1, type)
+                getData('my_pub_list', 1, type)
             }
             }
         })
         })
 
 

+ 33 - 12
templates/backstageNet/infoList/myPubList.html

@@ -1,25 +1,46 @@
-{% if art|length %} {% for msg in art %}
+{% if art_list|length %} {% for msg in art_list %}
 <tr>
 <tr>
     <td>{{ msg.title }}</td>
     <td>{{ msg.title }}</td>
-    <td>{{ msg.intro }}</td>
-    <!-- <td>{{ msg.content|safe }}</td> -->
-    <td>{{ msg.writer }}</td>
+    {% if msg.art_type == '5' %}
+        <td>新闻资讯</td>
+    {% elif msg.art_type == '6' %}
+        <td>视频资讯</td>
+    {% elif msg.art_type == '7' %}
+        <td>产品展厅</td>
+    {% elif msg.art_type == '8' %}
+        <td>四季采摘</td>
+    {% elif msg.art_type == '9' %}
+        <td>民宿导览</td>
+    {% elif msg.art_type == '10' %}
+        <td>旅游景点</td>
+    {% else %}
+        <td>{{msg.art_type}}</td>
+    {% endif %} 
     <td>{{ msg.upl_time }}</td>
     <td>{{ msg.upl_time }}</td>
     <td>
     <td>
-        {% if msg.hidden == 0%}
-        <a href="JavaScript:;" class="editBtn" onclick="editFun('{{msg.id}}')">编辑</a>
-        |
-        <a href="JavaScript:;" class="passBtn"  onclick="passFun('{{msg.id}}')">通过</a>
-        |
-        {% endif %} 
         <a href="JavaScript:;" class="delBtn" onclick="delFun('{{msg.id}}')">删除</a>
         <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}}')">查看</a> -->
+    {% if msg.art_type == '5' %}
+        <a href="news_view?id={{msg.id}}" target="_blank" class="lokBtn">查看</a>
+    {% elif msg.art_type == '6' %}
+        <a href="video_detail?id={{msg.id}}" target="_blank" class="lokBtn">查看</a>
+    {% elif msg.art_type == '7' %}
+        <a href="equip_show_detail?id={{msg.id}}" target="_blank" class="lokBtn">查看</a>
+    {% elif msg.art_type == '8' %}
+        <a href="garden_intro?id={{msg.id}}" target="_blank" class="lokBtn">查看</a>
+    {% elif msg.art_type == '9' %}
+        <a href="dorm_detail?id={{msg.id}}" target="_blank" class="lokBtn">查看</a>
+    {% elif msg.art_type == '10' %}
+        <a href="tourist?id={{msg.id}}" target="_blank" class="lokBtn">查看</a>
+    {% else %}
+        <td> </td>
+    {% endif %} 
     </td>
     </td>
 </tr>
 </tr>
 {% endfor %} {% else %}
 {% endfor %} {% else %}
 <tr>
 <tr>
-    <td colspan="5" style="text-align:center;">暂无数据</td>
+    <td colspan="4" style="text-align:center;">暂无数据</td>
 </tr>
 </tr>
 {% endif %}
 {% endif %}
 <input type="hidden" value="{{nums}}" id="totalPage">
 <input type="hidden" value="{{nums}}" id="totalPage">