guojing 5 years ago
parent
commit
7c070b579f

+ 5 - 30
whepi-ui/templates/home/help.ftl

@@ -1,38 +1,13 @@
-<div class="page__bd">
+<div class="page__bd" xmlns="http://www.w3.org/1999/html">
 
-    <div class="weui-cells__group weui-cells__group_form">
-        <div class="weui-cells weui-cells_radio">
-            <label class="weui-cell weui-cell_active weui-check__label" for="x11">
-                <div class="weui-cell__bd">
-                    <p>已解决</p>
-                </div>
-                <div class="weui-cell__ft">
-                    <input type="radio" class="weui-check" name="radio1" id="x11">
-                    <span class="weui-icon-checked"></span>
-                </div>
-            </label>
-            <label class="weui-cell weui-cell_active weui-check__label" for="x12">
-
-                <div class="weui-cell__bd">
-                    <p>未解决</p>
-                </div>
-                <div class="weui-cell__ft">
-                    <input type="radio" name="radio1" class="weui-check" id="x12" checked="checked">
-                    <span class="weui-icon-checked"></span>
-                </div>
-            </label>
-        </div>
+    <div class="weui-panel weui-panel_access" id="qzHS">
     </div>
 
-    <div>
-        <div>生活必须品求助</div>
+    <div class="button-sp-area">
+    <div class="weui-btn-area">
+        <a id="zqBack_help" class="weui-btn weui-btn_primary" href="javascript:">返回</a>
     </div>
-    <div class="weui-panel weui-panel_access">
-        <div class="weui-panel__bd" id="qzHS">
-        </div>
     </div>
-
-
 </div>
 
 <script>

+ 32 - 1
whepi-ui/templates/home/home.ftl

@@ -64,6 +64,7 @@
         ribao_cancel();
         ribao_commit();
         submit_back();
+        familyClick();
     })(jQuery);
 
 
@@ -104,7 +105,37 @@
     }
 
 function xiaoQuItemClick(v) {
-      debugger
+      /*alert(v.taskId)*/
+    if ($('#titlteZs')[0].style.display == 'none') {
+        $('#notitle').toggle();
+        $('#titlteZs')[0].style.display = '';
+        $('#qzHS').empty();//清除节点
+        //详情页面的展示
+        $.ajax({
+            url: '/home/home/taskQuery',
+            data: {taskId:v.taskId},
+            type: 'GET',
+            success: function (data) {
+                console.log(data);
+                if (data.data.length > 0) {
+                    hasData = true;
+                    $('#qzHS').append($('<div>'+data.data[0].taskTitle+'</div>'))
+                    data.data.forEach(function (v) {
+                        shValue(v);
+                    });
+                } else {
+
+                }
+            },
+            error: function () {
+            }
+        });
+        /*$('#qzHS').*/
+
+    } else {
+        $('#notitle')[0].style.display = '';
+        $('#titlteZs')[0].style.display = 'none';
+    }
 }
 
 

+ 37 - 1
whepi-ui/templates/home/qiuzhu.ftl

@@ -280,7 +280,43 @@
     }
 
     function myItemClick(v) {
-        debugger
+        $("#notPlay").toggle();
+        $('#qz_nav2').empty();
+        $.ajax({
+            url: '/home/home/taskQuery',
+            data: {taskId:v.taskId},
+            type: 'GET',
+            success: function (data) {
+                console.log(data);
+                if (data.data.length > 0) {
+                    hasData = true;
+                    $('#qz_nav2').append($('<div>'+data.data[0].taskTitle+'</div>'))
+                    data.data.forEach(function (v) {
+                        shValuenat2(v);
+                    });
+                } else {
+
+                }
+            },
+            error: function () {
+            }
+        });
+    }
+    function shValuenat2(v) {
+        $('#qz_nav2').append($('<a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">\n' +
+                '                <div class="weui-media-box__bd">\n' +
+                '                    <div style="display: flex; flex-direction: row; justify-content: space-between;">\n' +
+                '                        <p class="weui-media-box__desc">业主1号</p>\n' +
+                '                        <p class="weui-media-box__desc">' + timestampToTime(v.timeUpdate) + '</p>\n' +
+                '                    </div>\n' +
+                '                    <div class="weui-cell ">\n' +
+                '                        <div class="weui-cell__bd">\n' +
+                '                            <textarea class="weui-textarea" rows="1" readonly >' + v.replyContent + '</textarea>\n' +
+                '                            <div class="weui-textarea-counter"></div>\n' +
+                '                        </div>\n' +
+                '                    </div>\n' +
+                '                </div>\n' +
+                '            </a>\n<br />'));
     }
 
 </script>

+ 1 - 23
whepi-ui/templates/home/qiuzhu.js

@@ -8,32 +8,10 @@ function qiuzhu_init() {
 }
 
 function help() {
-  $('#qz_nav1').on('click', function () {
+  $('#zqBack_help').on('click', function () {
     if ($('#titlteZs')[0].style.display == 'none') {
       $('#notitle').toggle();
       $('#titlteZs')[0].style.display = '';
-      $('#qzHS').empty();//清除节点
-      //详情页面的展示
-      $.ajax({
-        url: '/home/home/taskQuery',
-        data: {},
-        type: 'GET',
-        success: function (data) {
-          console.log(data);
-          if (data.data.length > 0) {
-            hasData = true;
-            data.data.forEach(function (v) {
-              shValue(v);
-            });
-          } else {
-
-          }
-        },
-        error: function () {
-        }
-      });
-      /*$('#qzHS').*/
-
     } else {
       $('#notitle')[0].style.display = '';
       $('#titlteZs')[0].style.display = 'none';

+ 2 - 1
whepi-web/src/main/java/com/bofeng/dao/QzTaskReplyDao.java

@@ -3,6 +3,7 @@ package com.bofeng.dao;
 import com.baomidou.mybatisplus.mapper.BaseMapper;
 import com.bofeng.entity.QzTaskReply;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
@@ -11,6 +12,6 @@ import java.util.List;
 @Repository
 public interface QzTaskReplyDao extends BaseMapper<QzTaskReply> {
 
-  List<QzTaskReply> taskQuery();
+  List<QzTaskReply> taskQuery(@Param("taskId")Long taskId);
 
 }

+ 2 - 0
whepi-web/src/main/java/com/bofeng/entity/QzTaskReply.java

@@ -48,5 +48,7 @@ public class QzTaskReply implements Serializable {
      */
     private Date timeUpdate;
 
+    private String taskTitle;
+
     private static final long serialVersionUID = 1L;
 }

+ 2 - 2
whepi-web/src/main/java/com/bofeng/service/QzTaskReplyService.java

@@ -21,8 +21,8 @@ public class QzTaskReplyService {
     @Autowired
     private QzTaskDao qzTaskDao;
 
-    public List<QzTaskReply> taskQuery() {
-        return qzTaskReplyDao.taskQuery();
+    public List<QzTaskReply> taskQuery(Long taskId) {
+        return qzTaskReplyDao.taskQuery(taskId);
 
     }
 

+ 2 - 2
whepi-web/src/main/java/com/bofeng/wx/controller/HomeController.java

@@ -62,7 +62,7 @@ public class HomeController {
 
   //小区求助的查看
   @GetMapping("/home/home/taskQuery")
-  public Model<List<QzTaskReply>> taskQuery(){
-    return Model.newSuccess(qzTaskReplyService.taskQuery());
+  public Model<List<QzTaskReply>> taskQuery(@Pd(name = "taskId")Long taskId){
+    return Model.newSuccess(qzTaskReplyService.taskQuery(taskId));
   }
 }

+ 3 - 1
whepi-web/src/main/resources/mapper/QzTaskReplyDao.xml

@@ -4,6 +4,8 @@
 
 
     <select id="taskQuery" resultType="com.bofeng.entity.QzTaskReply">
-      select * from qz_task_reply
+     select * from qz_task a
+     INNER JOIN qz_task_reply b on a.task_id=b.task_id
+     where a.task_id=#{taskId}
     </select>
 </mapper>