huanggang 7 سال پیش
والد
کامیت
f03f67354e

+ 45 - 1
data/resource/mobile/bargain/css/main.css

@@ -550,7 +550,7 @@ ul,li {
     background-size: 100% 100%;
 }
 
-.input_pop {
+.input_pop,.over_pop,.affirm_pop {
     position: fixed;
     top: 0;
     left: 0;
@@ -559,6 +559,50 @@ ul,li {
     background: rgba(0,0,0,0.7);
     z-index: 999;
 }
+.bargain_over_bg {
+    position: absolute;
+    top: 134px;
+    left: 139px;
+    width: 464px;
+    height: 489px;
+    background: url("../images/bargain_over_bg.png") no-repeat;
+    background-size: 100% 100%;
+}
+.affirm_box {
+    position: absolute;
+    top: 148px;
+    left: 70px;
+    width: 596px;
+    height: 755px;
+    background: url("../images/affirm_bg.png") no-repeat;
+    background-size: 100% 100%;
+}
+.affirm_box .affirm_btn {
+    position: absolute;
+    top: 591px;
+    left: 110px;
+    width: 375px;
+    height: 69px;
+    background: url("../images/affirm_btn.jpg") no-repeat;
+    background-size: 100% 100%;
+}
+.affirm_box .affirm_close_btn {
+    position: absolute;
+    top: -20px;
+    right: -20px;
+    width: 72px;
+    height: 72px;
+    background: url("../images/close_btn2.png") no-repeat;
+    background-size: 100% 100%;
+}
+.start_bargain_btn {
+    position: absolute;
+    top: 662px;
+    left: 184px;
+    width: 375px;
+    height: 70px;
+    background: url("../images/join_btn3.png") no-repeat;
+}
 
 .answer_comments {
     position: absolute;

BIN
data/resource/mobile/bargain/images/affirm_bg.png


BIN
data/resource/mobile/bargain/images/affirm_btn.jpg


BIN
data/resource/mobile/bargain/images/bargain_over_bg.png


BIN
data/resource/mobile/bargain/images/close_btn2.png


BIN
data/resource/mobile/bargain/images/join_btn3.png


+ 11 - 1
data/resource/mobile/comm/websocket.js

@@ -97,6 +97,15 @@ var WebsocketConnect = function(wshost,fAutoConnect,fAutojoin,callbacks,room_msg
         socket.send(JSON.stringify(jsonobject));
     };
 
+    var bargain_over = function () {
+        var jsonobject = {
+            op:"bargain_over",
+            room:room_msgs.room,
+            room_key:room_msgs.roomkey
+        };
+        socket.send(JSON.stringify(jsonobject));
+    };
+
     var Close = function(){
         socket.close();
     };
@@ -170,6 +179,7 @@ var WebsocketConnect = function(wshost,fAutoConnect,fAutojoin,callbacks,room_msg
         setMeId:function(id){
             meId = id;
         },
-        bargain:bargain
+        bargain:bargain,
+        bargain_over:bargain_over
     }
 };

+ 41 - 13
mobile/templates/default/bargain/bargain.php

@@ -74,6 +74,19 @@
     </div>
 </div>
 
+<div class="affirm_pop hide">
+    <div class="affirm_box scale">
+        <span class="affirm_btn"></span>
+        <span class="affirm_close_btn"></span>
+    </div>
+</div>
+
+<div class="over_pop hide">
+    <div class="bargain_over_bg"></div>
+    <span class="start_bargain_btn"></span>
+</div>
+
+
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js?<?php echo bonus_version(); ?>"></script>
 <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/wx_share.js?<?php echo bonus_version(); ?>"></script>
 <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/shake/js/zepto.min.js"></script>
@@ -84,7 +97,6 @@
 <script type="text/javascript" src="http://qzonestyle.gtimg.cn/qzone/qzact/common/share/share.js?<?php echo bonus_version(); ?>"></script>
 
 <script type="text/javascript">
-
     var url         = "<?php echo $output['tpl']->share_url(); ?>";
     var title       = "<?php echo $output['tpl']->share_title(); ?>";
     var img_url     = "<?php echo $output['tpl']->share_image(); ?>";
@@ -322,22 +334,23 @@
     $('.join_btn').on('click',function()
     {
         if(from_app){
-            var jsonobject = {
-                action:"share_page",
-                params: {
-                    title:title,
-                    sub_title:sub_title,
-                    img_url:img_url,
-                    url:url
-                }
-            };
-            bridge.call_native_handler('on_native_click',JSON.stringify(jsonobject));
+            window.location.href = 'xmmz://'+location.host+'/block/special?title=56CN5Lu35ZuiCg==&special_id=1181';
+        }
+        else {
+            download_app();
+        }
+    });
+
+    $('.start_bargain_btn').on('click',function(){
+        if(from_app){
+           alert('schema跳转,地址不清楚');
         }
         else {
             download_app();
         }
     });
 
+
     var room    =  <?php echo $output['room']['room']; ?>;
     var roomkey = "<?php echo $output['room']['room_key']; ?>";
     var addr    = "<?php echo $output['room']['addr']; ?>";
@@ -397,8 +410,10 @@
                     msg: msg
                 }).send();
             }
-            else {
-
+            else if(msg_type == 'bargain_close') {
+                count_down_time = -1;
+                $('#bargain_btn').addClass('hide');
+                $('#join_btn').removeClass('hide');
             }
         }
         catch (e) {
@@ -439,6 +454,19 @@
     $('.close_btn').on('click',function(){
         $('.input_pop').addClass('hide');
     });
+
+    $('#just_buy').on('click',function(){
+        $('.affirm_pop').removeClass('hide');
+    });
+
+    $('.affirm_btn').on('click',function(){
+        websocket.bargain_over();
+        alert('结束成功!请在APP中查收您的红包购买砍价所得商品');
+    });
+
+    $('.affirm_close_btn').on('click',function(){
+        $('.affirm_pop').addClass('hide');
+    });
 </script>
 </body>
 </html>