Pārlūkot izejas kodu

业主购买2月10号

guojing 5 gadi atpakaļ
vecāks
revīzija
7ad4516793

+ 29 - 45
whepi-ui/templates/home/buy.ftl

@@ -25,32 +25,16 @@
         </div>
         <div class="weui-form-preview"
              id="buyListGroup">
-            <div class="weui-form-preview__label" style="display:flex; flex-direction: row; justify-content: space-between">
-                <label style="box-sizing:border-box; border-radius: 5px; height: 5vh; width: 25%; text-align: center;">标题</label>
+            <div class="weui-form-preview__label"
+                 style="display:flex; flex-direction: row; justify-content: space-between">
+                <label onclick="a()"
+                       style="box-sizing:border-box; border-radius: 5px; height: 5vh; width: 25%; text-align: center;">标题</label>
                 <label style="box-sizing:border-box; border-radius: 5px; height: 5vh; width: 25%; text-align: center;">已团</label>
                 <label style="box-sizing:border-box; border-radius: 5px; height: 5vh; width: 25%; text-align: center;">截止时间</label>
                 <label style="box-sizing:border-box; border-radius: 5px; height: 5vh; width: 25%; text-align: center;">状态</label>
             </div>
             <div id="buyAll"></div>
         </div>
-
-    <#--业委会的套餐-->
-        <div id="details">
-            <div id="myyw">
-
-            </div>
-        <#--团购详情页面的展示-->
-            <div class="weui-btn-area">
-                <br>
-                <div style="text-align: center;size: 20px">
-                    我的团购
-                </div>
-            <#--居民自己填写的-->
-                <div id="client">
-            <#include "/home/buyClient.ftl"/>
-                </div>
-            </div>
-        </div>
     </div>
 
     <script>
@@ -58,43 +42,43 @@
         function buyGroup() {
             $('#buy_nav1')[0].style.display = '';
             $('#buyListGroup')[0].style.display = '';
-            $('#details')[0].style.display = '';
+            $('#buy_nav2')[0].style.display = 'none';
+            /*  $.ajax({
+                  url: '',
+                  type: 'get',
+                  data: {},
+                  success: function (data) {
+                      if (data.success) {
+                          if (data.data.length > 0) {
+                              hasData = true;
+                              data.data.forEach(function (v) {
+                                  buyList(v);
+                              });
+                          }
+                          else {
+                          }
 
-            $.ajax({
-                url: '',
-                type: 'get',
-                data: {},
-                success: function (data) {
-                    if (data.success) {
-                        if (data.data.length > 0) {
-                            hasData = true;
-                            data.data.forEach(function (v) {
-                                buyList(v);
-                            });
-                        }
-                        else {
-                        }
-
-                    }
-                },
-            });
+                      }
+                  },
+              });*/
         }
 
         function buyList(v) {
         }
 
-        /*我的团购数量的填写*/
-        function myBuy() {
-
-        }
-
 
         //点击我的团购按钮
         function buyGroup2() {
             $('#buy_nav1')[0].style.display = 'none';
             $('#buyListGroup')[0].style.display = 'none';
-            $('#details')[0].style.display = 'none';
+            //$('#details')[0].style.display = 'none';
             $('#buy_nav2')[0].style.display = '';
 
         }
+
+        /*居民求助信息*/
+        function a() {
+            window.location.href = "/home/buytc.html?userId="+$('#userId').val();
+        }
+
     </script>

+ 1 - 3
whepi-ui/templates/home/buyClient.ftl

@@ -49,13 +49,11 @@
 
 </div>
 
-
-
 <script>
 
     <#--返回-->
     function buyBack() {
-        $('#details')[0].style.display = 'none';
+        window.location.href = "/user/homeIndex.html?userId=" + $('#buyuserId').val()+ "&userType=" + 1 + '#tab3';
     }
 
     //提交

+ 28 - 0
whepi-ui/templates/home/buytc.ftl

@@ -0,0 +1,28 @@
+<#assign title="居民团购详情"/>
+<#include "/home/frag.head.ftl" />
+
+<div class="weui-tab__panel">
+    <input id="buyuserId" type="text" hidden="hidden" value=${userId}>
+    <div style="text-align: center ">
+        团购信息
+    </div>
+
+<#--业委会的套餐-->
+    <div id="details">
+        <div id="myyw">
+
+        </div>
+    <#--团购详情页面的展示-->
+        <div class="weui-btn-area">
+            <br>
+            <div style="text-align: center;size: 20px">
+                我的团购
+            </div>
+        <#--居民自己填写的-->
+            <div id="client">
+            <#include "/home/buyClient.ftl"/>
+            </div>
+        </div>
+    </div>
+</div>
+<#include "/home/frag.foot.ftl"/>

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

@@ -6,7 +6,7 @@ function shValue(v) {
   $('#qzHS').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">'+v.nickName+'</p>\n' +
+    '                        <p class="weui-media-box__desc">' + v.nickName + '</p>\n' +
     '                        <p class="weui-media-box__desc">' + timestampToTime(v.timeUpdate) + '</p>\n' +
     '                    </div>\n' +
     '                    <div class="weui-cell ">\n' +

+ 9 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/BuyController.java

@@ -3,9 +3,12 @@ package com.bofeng.wx.controller;
 import com.bofeng.entity.Buy;
 import com.bofeng.service.BuyService;
 import com.yvan.ModelOps;
+import com.yvan.mvc.Pd;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
 
 @RestController
 public class BuyController {
@@ -17,4 +20,10 @@ public class BuyController {
   public ModelOps buyGroup(Buy buy) {
     return ModelOps.newSuccess(buyService.buyGroup(buy));
   }
+
+  @GetMapping("/home/buytc.html")
+  public ModelAndView buytc(@Pd(name = "userId") Long userId, ModelMap model) {
+    model.put("userId", userId);
+    return new ModelAndView("/home/buytc.ftl", model);
+  }
 }