Browse Source

详情页返回tab选择到求助那一栏

Longlin 5 years ago
parent
commit
330e09e24f

+ 15 - 2
whepi-ui/templates/yeweihui/home.ftl

@@ -16,11 +16,11 @@
     <#--<h1>页面四</h1> </div>-->
     <#--<h1>页面四</h1> </div>-->
     </div>
     </div>
     <div class="weui-tabbar">
     <div class="weui-tabbar">
-        <a href="#tab1" class="weui-tabbar__item weui-bar__item--on">
+        <a id="tab1a" href="#tab1" class="weui-tabbar__item weui-bar__item--on">
             <div class="weui-tabbar__icon"><img src="/static/images/wx/order.png" alt=""></div>
             <div class="weui-tabbar__icon"><img src="/static/images/wx/order.png" alt=""></div>
             <p class="weui-tabbar__label">每日上报</p>
             <p class="weui-tabbar__label">每日上报</p>
         </a>
         </a>
-        <a href="#tab2" class="weui-tabbar__item">
+        <a id="tab2a" href="#tab2" class="weui-tabbar__item">
             <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
             <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
             <p class="weui-tabbar__label">求助</p>
             <p class="weui-tabbar__label">求助</p>
         </a>
         </a>
@@ -46,6 +46,8 @@
     var taskList = ${taskList!'[]'};
     var taskList = ${taskList!'[]'};
     var statisticsOrderList =${rbList!'[]'};
     var statisticsOrderList =${rbList!'[]'};
 
 
+    var showQZ = ${showQZ!'"-"'};
+
     (function ($) {
     (function ($) {
         $(function () {
         $(function () {
             $('.weui-navbar__item').on('click', function () {
             $('.weui-navbar__item').on('click', function () {
@@ -106,5 +108,16 @@
             }
             }
         });
         });
 
 
+        function selectqiuzhu() {
+            $("#tab1").removeClass('weui-tab__bd-item--active');
+            $("#tab1a").removeClass('weui-bar__item--on');
+            $("#tab2").addClass('weui-tab__bd-item--active');
+            $("#tab2a").addClass('weui-bar__item--on');
+        }
+
+        if (showQZ != '-') {
+            selectqiuzhu();
+        }
+
     })(jQuery);
     })(jQuery);
 </script>
 </script>

+ 2 - 2
whepi-ui/templates/yeweihui/qiuzhuDetail.ftl

@@ -93,7 +93,7 @@
             },
             },
             success: function (data) {
             success: function (data) {
                 $.closePopup();
                 $.closePopup();
-                window.location.href = "/yeweihui/home.html?userId=" + userId;
+                window.location.href = "/yeweihui/home.html?showQZ=true&userId=" + userId;
             },
             },
             error: function () {
             error: function () {
                 $.alert("网络异常");
                 $.alert("网络异常");
@@ -102,7 +102,7 @@
     }
     }
 
 
     function goback() {
     function goback() {
-        window.location.href = "/yeweihui/home.html?userId=" + userId;
+        window.location.href = "/yeweihui/home.html?showQZ=true&userId=" + userId;
     }
     }
 
 
     function getdealdetail() {
     function getdealdetail() {

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

@@ -48,7 +48,7 @@ public class YeWeiHuiController {
     private RbMapper rbMapper;
     private RbMapper rbMapper;
 
 
     @GetMapping("/yeweihui/home.html")
     @GetMapping("/yeweihui/home.html")
-    public ModelAndView yeweihui(ModelMap model,@RequestParam(value = "userId") Long userId) {
+    public ModelAndView yeweihui(ModelMap model,@RequestParam(value = "userId") Long userId, @RequestParam(value = "showQZ", required = false, defaultValue = "-") String showQZ) {
 
 
 //        List<QzTask> taskList = qzTaskService.selectAll(1225321682867105793L);
 //        List<QzTask> taskList = qzTaskService.selectAll(1225321682867105793L);
 //        List<sysUptownUnit> rbList = rbService.selectAll(1225321682867105793L);
 //        List<sysUptownUnit> rbList = rbService.selectAll(1225321682867105793L);
@@ -57,6 +57,7 @@ public class YeWeiHuiController {
         model.put("taskList", YvanUtil.toJsonPretty(taskList));
         model.put("taskList", YvanUtil.toJsonPretty(taskList));
         model.put("rbList", YvanUtil.toJsonPretty(rbList));
         model.put("rbList", YvanUtil.toJsonPretty(rbList));
         model.put("user_id", "\""+userId+"\"");
         model.put("user_id", "\""+userId+"\"");
+        model.put("showQZ", "\""+showQZ+"\"");
 
 
         return new ModelAndView("/yeweihui/home.ftl", model);
         return new ModelAndView("/yeweihui/home.ftl", model);
     }
     }