Browse Source

增加金控广告

Administrator 7 years ago
parent
commit
f033f22ca3

+ 21 - 6
src/main/webapp/WEB-INF/views/normal/index.html

@@ -212,6 +212,7 @@
 		<div class="container">
 			<div class="img">
 				<span class="qcrode_close close">×</span>
+                <span class="close time">5s</span>
 				<img src="static/img/jinkong/xiaoren.png" id="img_xiaoren">
 				<img src="static/img/jinkong/qrcode.png">
 			</div>
@@ -293,16 +294,30 @@
 <script type="text/javascript">
 	// 金控广告动画设置
 	$(function() {
-	    $('.qcrode_close').click(function() {
-	        var display = $('.jinkong_bottom').css('display')
-	        if (display === 'none') {
-	            $('.jinkong').fadeOut(500)
-			} else {
+        var closeClick = function () {
+            var display = $('.jinkong_bottom').css('display')
+            if (display === 'none') {
+                $('.jinkong').fadeOut(500)
+            } else {
                 $('.jinkong_bottom').fadeOut(500)
                 $('.jinkong .img').addClass('img_stater')
                 $('#img_xiaoren').addClass('animation_xr')
-			}
+            }
+        }
+        var count  = 6
+        var getLoc = function () {
+            count--;
+            $('.time').html(count + 's');
+            if (count <= 0) {
+                $('.time').hide()
+                clearInterval(timeOut)
+                closeClick()
+            }
+        }
+	    $('.qcrode_close').click(function() {
+            closeClick()
 		})
+        var timeOut = setInterval(getLoc,1000);
 	})
 
 	$(function(){

+ 6 - 0
src/main/webapp/resources/css/index.css

@@ -4852,6 +4852,12 @@ a.order-detail {
 	right:-25px;
 	top:0;
 }
+.jinkong .img .time{
+    position:absolute;
+    right:-50px;
+    top:0;
+    color:#333;
+}
 .jinkong .img .qcrode_close:hover{
     background: #666;
     color:#fff;