Bladeren bron

Merge branch 'talksec' of 121.43.114.153:/home/git/repositories/shopnc into talksec

huangdong 6 jaren geleden
bovenliggende
commit
7090565421

+ 76 - 2
data/resource/mobile/festival/freeCollection/css/style.css

@@ -31,7 +31,7 @@ img {
     position: relative;
     max-width: 750px;
     margin: auto;
-    height: 2284px;
+    height: 3050px;
     background: url('../image/bg.jpg') no-repeat center;
     background-size: 100% 100%;
 }
@@ -72,8 +72,25 @@ img {
     background: url('../image/goods_lz.jpg') no-repeat center;
     background-size: 100% 100%;
 }
+.eggs {
+    position: relative;
+    z-index: 9;
+    margin: 42px 0 0 130px;
+    width: 568px;
+    height: 704px;
+    background: url('../image/eggs.png') no-repeat center;
+    background-size: 100% 100%;
+}
+.eggs-btn {
+    position: absolute;
+    z-index: 22;
+    left: 0;
+    bottom: 0;
+    width: 100%;
+    height: 300px;
+}
 .rules {
-    margin: 20px 18px 0;
+    margin: 48px 18px 0;
     padding: 12px 52px 24px 70px;
     border: 1px dashed #fff;
     color: #fff;
@@ -172,4 +189,61 @@ img {
     height: 174px;
     background: url('../image/over.png') no-repeat center;
     background-size: 100% 100%;
+}
+.detail-popup {
+    display: none;
+    position: fixed;
+    z-index: 99;
+    left: 0;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    background: rgba(255,255,255,.6);
+}
+.refresh-btn {
+    display: none;
+    position: fixed;
+    z-index: 100;
+    left: 100px;
+    right: 100px;
+    padding: 30px;
+    top: 50%;
+    margin-top: -20px;
+    font-size: 34px;
+    color: #fff;
+    text-align: center;
+    background: #2b2b2b;
+    border-radius: 8px;
+}
+.mysterious-popup {
+    display: none;
+    position: fixed;
+    z-index: 101;
+    left: 0;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    background: rgba(0,0,0,.6);
+}
+.mysterious {
+    display: none;
+    position: fixed;
+    z-index: 102;
+    left: 50%;
+    top: 50%;
+    margin-left: -297px;
+    margin-top: -460px;
+    width: 594px;
+    height: 920px;
+    background: url('../image/mysterious.png') no-repeat center;
+    background-size: 100% 100%;
+}
+.mysterious .close {
+    position: absolute;
+    z-index: 3;
+    right: -2px;
+    top: 54px;
+    width: 110px;
+    height: 110px;
+    background: url('../image/close.png') no-repeat right top;
 }

BIN
data/resource/mobile/festival/freeCollection/image/bg.jpg


BIN
data/resource/mobile/festival/freeCollection/image/close.png


BIN
data/resource/mobile/festival/freeCollection/image/eggs.png


BIN
data/resource/mobile/festival/freeCollection/image/mysterious.png


+ 36 - 7
data/resource/mobile/festival/freeCollection/js/freeCollection.js

@@ -1,6 +1,10 @@
 function PageInit(url,session_id,bridge) {
     this.url = url;
     this.goodsItems = $('.goods-list .goods-item');
+    this.refreshBtn = $('.refresh-btn');
+    this.detailPopup = $('.detail-popup');
+    this.eggsBtn = $('.eggs-btn');
+    this.close = $('.close');
     this.goodsList = [];
     this.session_id = session_id;
     this.bridge = bridge;
@@ -10,7 +14,23 @@ function PageInit(url,session_id,bridge) {
     this.goodsItems.on('click', function () {
         self.result($(this));
     });
-    this.init();
+    this.refreshBtn.on('click', function () {
+        self.hidePopup();
+        self.refresh();
+    });
+    this.detailPopup.on('touchmove', function (e) {
+        e.preventDefault();
+    });
+    this.eggsBtn.on('click', function () {
+        $('.mysterious-popup, .mysterious').fadeIn();
+    });
+    this.close.on('click', function () {
+        $('.mysterious-popup, .mysterious').fadeOut();
+    });
+    $('.mysterious-popup, .mysterious').on('touchmove', function (e) {
+        e.preventDefault();
+    });
+
 
 }
 
@@ -26,7 +46,6 @@ PageInit.prototype = {
             data: {
                 act: "festval",
                 op: "ajax_freeCollection",
-                // HPHPSESSID: self.session_id,
                 client_type: "ajax"
             },
             success: function (res) {
@@ -49,7 +68,6 @@ PageInit.prototype = {
             data: {
                 act: "member_bonus",
                 op: "mine_bonus",
-                // HPHPSESSID: self.session_id,
                 client_type: "ajax"
             },
             success: function (res) {
@@ -86,18 +104,29 @@ PageInit.prototype = {
     },
     result: function (target) {
         if (!this.goodsList.length)return;
+        var self = this;
         var state = target.attr('data-state');
         if (state == 2) {
             var id = target.attr('data-id');
-            window.location.replace('xmmz://p.lrlz.com/goods/goods?goodsId=' + id);
-            this.bridge.call_native_handler('on_native_click', '{"action":"back"}', function (data) {});
+            window.location.href = 'xmmz://p.lrlz.com/goods/goods?goodsId=' + id;
+            setTimeout(function() {
+                self.showPopup();
+            }, 10);
             return;
 
         }
         else if (state == 3) {
-            window.location.replace('xmmz://p.lrlz.com/invite/invite');
-            this.bridge.call_native_handler('on_native_click', '{"action":"back"}', function (data) {});
+            window.location.href = 'xmmz://p.lrlz.com/invite/invite';
             return;
         }
+    },
+    showPopup: function () {
+        $('.detail-popup, .refresh-btn').fadeIn();
+    },
+    hidePopup: function () {
+        $('.detail-popup, .refresh-btn').fadeOut('fast');
+    },
+    refresh: function() {
+        this.init();
     }
 }

+ 2 - 2
mobile/control/control.php

@@ -331,9 +331,9 @@ class mbMemberControl extends mobileControl
 
 function bonus_version()
 {
-    return "v=2018120707";
+    return "v=2018121101";
 }
 function shop_version()
 {
-    return "v=2018120707";
+    return "v=2018121101";
 }

+ 25 - 5
mobile/templates/default/festival/freeCollection/index.php

@@ -34,6 +34,9 @@
                 </div>
             </li>
         </ul>
+        <div class="eggs">
+            <div class="eggs-btn"></div>
+        </div>
         <div class="rules">
             <div class="title">活动规则:</div>
             <ul class="rules-list">
@@ -44,7 +47,7 @@
                 </li>
                 <li class="rules-item">
                     <span class="rule-num">2</span>
-                    <p>红包不足时,每邀请一个好友可获得50元</p>
+                    <p>红包不足时,每邀请一个好友可获得50元红包奖励</p>
                 </li>
                 <li class="rules-item">
                     <span class="rule-num">3</span>
@@ -52,7 +55,7 @@
                 </li>
                 <li class="rules-item">
                     <span class="rule-num">4</span>
-                    <p>活动结束后7天内统一发货</p>
+                    <p>活动结束后5天内统一发货</p>
                 </li>
             </ul>
         </div>
@@ -61,6 +64,14 @@
     </div>
 </div>
 
+<div class="detail-popup"></div>
+<div class="refresh-btn">请点击刷新页面,获取最新内容!</div>
+
+<div class="mysterious-popup"></div>
+<div class="mysterious">
+    <div class="close"></div>
+</div>
+
 <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/jquery-1.11.0.min.js?<?php echo bonus_version(); ?>"></script>
 <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/new_bridge.js"></script>
 <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/festival/freeCollection/js/freeCollection.js?<?php echo bonus_version(); ?>"></script>
@@ -69,9 +80,12 @@
         var bridge = new Bridge();
         var member_id = <?php echo session_helper::memberid(); ?>;
         var session_id = '<?php echo session_helper::session_id(); ?>';
-//        var url = "<?php //echo BASE_SITE_URL; ?>///mobile/index.php";
+        var url = "<?php echo BASE_SITE_URL; ?>/mobile/index.php";
+        if (url.indexOf('a.lrlz.com') != -1) {
+            url = "http://a.lrlz.com/mobile/index.php";
+        }
 
-        var url = "http://a.lrlz.com/mobile/index.php";
+        var pageInit = new PageInit(url,session_id, bridge);
         var checkLogin = function () {
             if (member_id <=0 || !session_id) {
                 bridge.call_native_handler('on_native_click', '{"action":"login"}', function (data) {
@@ -86,8 +100,14 @@
                 });
             }
             else {
+                if (pageInit) {
+                    pageInit.init();
+                }
+                else {
+                    new PageInit(url,session_id, bridge);
+                }
+
 
-                new PageInit(url,session_id, bridge);
             }
 
         };