cuiyalong 3 жил өмнө
parent
commit
03b14fe546

+ 6 - 6
src/web/staticres/dataExport/css/payment_order.css

@@ -107,36 +107,36 @@ body {
     padding: 20px 30px;
 }
 
-.info.pay-infotitle {
+#pay .inner .infotitle {
     padding-bottom: 18px;
     border-bottom: 1px solid #ccc;
     margin-bottom: 15px;
 }
 
-.info.pay-infotitle span {
+#pay .inner .infotitle span {
     color: #1D1D1D;
     font-size: 16px;
 }
 
-.info.pay-infotitle span i {
+#pay .inner .infotitle span i {
     font-size: 20px;
     color: #2CB7CA;
     margin: 0 2px;
 }
 
-.info.pay-infotitle em {
+#pay .inner .infotitle em {
     font-size: 12px;
     color: #888888;
     margin-left: 20px;
 }
 
-.info.pay-infotitle a {
+#pay .inner .infotitle a {
     color: #2CB7CA;
     margin-left: 20px;
     cursor: pointer;
 }
 
-.info.pay-infotitle a span {
+#pay .inner .infotitle a span {
     color: #2CB7CA;
 }
 

+ 3 - 3
src/web/templates/big-member/pc/page_buy_commit.html

@@ -760,7 +760,7 @@
       }
       return leave
     }
-    // 是否el的一部分在可视区域
+    // 是否el的一部分在可视区域
     function isInViewport (el) {
       if (!el) return
       var offset = el.getBoundingClientRect()
@@ -769,7 +769,7 @@
       var offsetBottom = offset.bottom
 
       // 是否在可视区域
-      var inViewport = offsetTop <= window.innerHeight && offsetBottom >= 0
+      var inViewport = offsetTop <= window.innerHeight && offsetBottom >= x
       return inViewport
     }
     // 必须在$(function () {})中调用
@@ -779,7 +779,7 @@
       var mainFooter = $('.page--big--index .main_footer.basic-sticky')
       var stickyFooter = $('.sticky-footer')
 
-      var show = isDOMLeave(mainFooter[0])
+      var show = !isInViewport(mainFooter[0])
 
       if (show) {
         stickyFooter.show()

+ 2 - 0
src/web/templates/order/pc/paySuccess.html

@@ -98,6 +98,8 @@
                 <a class="check_order" href="/front/aiForecastPack/aiForecastPackDetail?order_code={{.T.orderCode}}">查看订单</a>
             {{else if eq .T.orderType "bidfile"}}
                 <a class="check_order" href="/front/bidfile/bidfileDetail?order_code={{.T.orderCode}}">查看订单</a>
+            {{else if eq .T.orderType "areapack"}}
+                <a class="check_order" href="/areaPack/pc/page/order?order_code={{.T.orderCode}}">查看订单</a>
             {{else if eq .T.orderType "filePack"}}
                 <a class="check_order" href="/front/file/packDetail?order_code={{.T.orderCode}}">查看订单</a>
             {{else if eq .T.orderType "integral"}}

+ 25 - 18
src/web/templates/pc/createOrderPage.html

@@ -1350,6 +1350,19 @@
         }
     }
 
+    // 是否el的一部分在可视区域
+    function isInViewport (el) {
+        if (!el) return
+        var offset = el.getBoundingClientRect()
+        var x = 64 // 头部偏移
+        var offsetTop = offset.top + x
+        var offsetBottom = offset.bottom
+
+        // 是否在可视区域
+        var inViewport = offsetTop <= window.innerHeight && offsetBottom >= x
+        return inViewport
+    }
+
     // 必须在$(function () {})中调用
     function windowScrollFn () {
         // refreshStickyInfo()
@@ -1357,33 +1370,27 @@
         // 判断xx是否处于可视区域
         var mainFooter = $('.info.main_footer')
         var stickyFooter = $('.sticky-footer')
-        var offset = mainFooter[0] && mainFooter[0].getBoundingClientRect()
-        var offsetTop = offset.top + 64
-        var offsetBottom = offset.bottom
-        var offsetHeight = offset.height
-        // 是否在可视区域
-        // window.innerHeight 视口高度
-        var inViewport = offsetTop <= window.innerHeight && offsetBottom >= 0
-        if (inViewport) {
-            // 在可视区域
-            // console.log('in')
-            stickyFooter.hide()
-        } else {
-            // 不在可视区域
-            // console.log('out')
-            stickyFooter.show()
 
+        var show = !isInViewport(mainFooter[0])
+
+        if (show) {
+            stickyFooter.show()
             // 吸底
             // 如果距离底部
             var bottomFooter = $('.j-bottom')
-            var ob = bottomFooter[0] && bottomFooter[0].getBoundingClientRect()
+            var ob = { top: 0 }
+                if (bottomFooter.length) {
+                ob = bottomFooter[0] && bottomFooter[0].getBoundingClientRect()
+            }
             // bottom出现在视口
             var bottom = window.innerHeight - ob.top
-            if (bottom > 0) {
-                stickyFooter.css({ bottom: bottom })
+            if (bottom > 0 && ob.top !== 0) {
+                stickyFooter.css({ bottom: parseInt(bottom) })
             } else {
                 stickyFooter.css({ bottom: 0 })
             }
+        } else {
+            stickyFooter.hide()
         }
     }
     $(window).on('scroll', windowScrollFn)

+ 25 - 19
src/web/templates/pc/dataPack/createOrderForDataPackage.html

@@ -513,40 +513,46 @@
         stickyInfoBox.find('.should_num').text($('.pc-coupon-w1200 .should_pay .text--money').text())
     }
 
+    // 是否el的一部分在可视区域
+    function isInViewport (el) {
+        if (!el) return
+        var offset = el.getBoundingClientRect()
+        var x = 64 // 头部偏移
+        var offsetTop = offset.top + x
+        var offsetBottom = offset.bottom
+
+        // 是否在可视区域
+        var inViewport = offsetTop <= window.innerHeight && offsetBottom >= x
+        return inViewport
+    }
+
     // 必须在$(function () {})中调用
     function windowScrollFn () {
-        // refreshStickyInfo()
         // 购买底部固定
         // 判断xx是否处于可视区域
         var mainFooter = $('.info.main_footer')
         var stickyFooter = $('.sticky-footer')
-        var offset = mainFooter[0] && mainFooter[0].getBoundingClientRect()
-        var offsetTop = offset.top + 64
-        var offsetBottom = offset.bottom
-        var offsetHeight = offset.height
-        // 是否在可视区域
-        // window.innerHeight 视口高度
-        var inViewport = offsetTop <= window.innerHeight && offsetBottom >= 0
-        if (inViewport) {
-            // 在可视区域
-            // console.log('in')
-            stickyFooter.hide()
-        } else {
-            // 不在可视区域
-            // console.log('out')
-            stickyFooter.show()
+        
+        var show = !isInViewport(mainFooter[0])
 
+        if (show) {
+            stickyFooter.show()
             // 吸底
             // 如果距离底部
             var bottomFooter = $('.j-bottom')
-            var ob = bottomFooter[0] && bottomFooter[0].getBoundingClientRect()
+            var ob = { top: 0 }
+                if (bottomFooter.length) {
+                ob = bottomFooter[0] && bottomFooter[0].getBoundingClientRect()
+            }
             // bottom出现在视口
             var bottom = window.innerHeight - ob.top
-            if (bottom > 0) {
-                stickyFooter.css({ bottom: bottom })
+            if (bottom > 0 && ob.top !== 0) {
+                stickyFooter.css({ bottom: parseInt(bottom) })
             } else {
                 stickyFooter.css({ bottom: 0 })
             }
+        } else {
+            stickyFooter.hide()
         }
     }
 </script>