浏览代码

debug bargain

huanggang 7 年之前
父节点
当前提交
e804a711c6

+ 7 - 11
data/resource/mobile/bargain/css/main.css

@@ -27,7 +27,6 @@ ul,li {
     bottom: 80px;
     left: 0;
     width: 750px;
-    max-height: 100%;
     overflow: hidden;
     background: #e93d4a;
 }
@@ -123,7 +122,7 @@ ul,li {
     margin-top: 25px;
     margin-bottom: 33px;
 }
-.bargain_btn {
+.bargain_btn{
     display: inline-block;
     height: 101px;
     width: 718px;
@@ -134,15 +133,12 @@ ul,li {
 }
 .join_btn {
     display: inline-block;
-    height: 137px;
-    width: 750px;
+    height: 101px;
+    width: 718px;
     box-sizing: border-box;
     color: #ffffff;
     background: url("../images/join_btn.png?1") no-repeat;
     background-size: 100% 100%;
-    line-height: 90px;
-    text-align: center;
-    padding-left: 50px;
 }
 .avatar {
     width: 56px;
@@ -206,7 +202,7 @@ ul,li {
     background: url("../images/wallet.png") no-repeat;
     background-size: 100% 100%;
     vertical-align: middle;
-    margin-right: 20px;
+    margin-right: 5px;
 }
 .rules {
     width: 718px;
@@ -488,7 +484,7 @@ ul,li {
     z-index: 999;
 }
 .pop .bargain_pop {
-    position: absolute;
+    position: fixed;
     top: 148px;
     left: 77px;
     width: 596px;
@@ -551,8 +547,8 @@ ul,li {
     margin: 0 auto; }
 .answer_comments .comments_box .comments {
     display: block;
-    width: 650px;
-    height: 240px;
+    width: 590px;
+    height: 160px;
     font-size: 26px;
     padding: 50px 30px;
     resize: none;

二进制
data/resource/mobile/bargain/images/join_btn.png


+ 1 - 1
mobile/control/control.php

@@ -300,7 +300,7 @@ class mbMemberControl extends mobileControl
 
 function bonus_version()
 {
-    return "v=20180130";
+    return "v=2018013002";
 }
 function shop_version()
 {

+ 27 - 5
mobile/templates/default/bargain/bargain.php

@@ -56,12 +56,16 @@
         <div class="send_msg">发送</div>
     </div>
     <div>
-        <button class="download_app" id="download_app">下载app</button>
+        <?php if(session_helper::isapp()) { ?>
+            <button class="join_btn download_app">发起砍价</button>
+        <?php } else {?>
+            <button class="download_app" id="download_app">下载app</button>
+        <?php }?>
     </div>
 </div>
 
 <div class="pop hide">
-    <div class="bargain_pop hide scale">
+    <div class="bargain_pop scale">
         <span class="close_btn"></span>
         <p class="bargain_msg">您已成功帮砍<span class="ret_bargain"></span>元</p>
         <p class="bargain_goods_msg">还差<span class=""></span>元他就可0元拿下心仪商品</p>
@@ -96,6 +100,7 @@
     var title       = "<?php echo $output['tpl']->share_title(); ?>";
     var img_url     = "<?php echo $output['tpl']->share_image(); ?>";
     var sub_title   = "<?php echo $output['tpl']->share_subtitle(); ?>\n\n点击领取";
+    var from_app = <?php $t = session_helper::isapp(); echo $t ? 'true' : 'false'; ?>;
 
     weiXinShare.init({
         title:title,
@@ -111,6 +116,8 @@
         });
     };
 
+
+
     //发送弹幕
     var Barrage = function()
     {
@@ -322,11 +329,25 @@
         download_app();
     });
     $('.join_btn').on('click',function(){
-        download_app();
+        if(from_app){
+            var jsonobject = {
+                action:"share_page",
+                params: {
+                    title:title,
+                    sub_title:sub_title,
+                    img_url:img_url,
+                    url:url
+                }
+            };
+            var bridge = new Bridge();
+            bridge.call_native_handler('on_native_click',JSON.stringify(jsonobject));
+        }
+        else {
+            download_app();
+        }
     });
 
-    //var room    =  <?php //echo $output['room']['room']; ?>;
-    var room    =  null;
+    var room    =  <?php echo $output['room']['room']; ?>;
     var roomkey = "<?php echo $output['room']['room_key']; ?>";
     var addr    = "<?php echo $output['room']['addr']; ?>";
 
@@ -374,6 +395,7 @@
                     $('.bargain_pop').removeClass('hide');
                 };
                 $('.ret_bargain').text(ret_bargain_price);
+                slideMsgs.addChild(datas).play();
             }
             else if(msg_type = 'message') {
                 var msg = datas.content.content;