Browse Source

add invite fixed

huanggang 7 years ago
parent
commit
f1252e1e88

+ 26 - 12
data/resource/mobile/invite_friend/css/main.css

@@ -143,7 +143,8 @@ html {
 .bonus_content {
     width: 750px;
     margin: 0 auto;
-    background: url("../images/center_bg.jpg?v=3") center 0 #ec354e no-repeat;
+    padding-bottom: 20px;
+    background: url("../images/center_bg.jpg") center 0 #ec354e no-repeat;
 }
 .user_msg {
     width: 718px;
@@ -434,29 +435,42 @@ html {
     bottom: 0;
     left: 0;
     width: 100%;
-    height: 140px;
+    height: 100px;
     display: -webkit-box;
     -webkit-box-align: center;
-    background: rgba(255,255,255,0.9);
+    background: rgba(51,51,51,0.9);
     z-index: 999;
 }
+.fixed_close {
+    display: block;
+    width: 83px;
+    height: 83px;
+    background: url("../images/fixed_close.png") center no-repeat;
+    background-size: 23px 23px;
+    cursor: pointer;
+}
 .fixed_bottom .logo {
     display: block;
-    width: 285px;
-    height: 75px;
-    background: url("../images/logo_fix.png") no-repeat;
+    width: 72px;
+    height: 72px;
+    background: url("../images/logo.png") no-repeat;
     background-size: 100% 100%;
-    margin: 0 45px;
+    margin-right: 20px;
+}
+.fixed_bottom .label {
+    font-size: 24px;
+    width: 415px;
+    line-height: 30px;
 }
 
 .fixed_bottom a {
     display: block;
     width: 140px;
-    height: 50px;
-    line-height: 50px;
+    height: 56px;
+    line-height: 56px;
     text-align: center;
-    font-size: 30px;
-    background: #FF4E4E;
+    font-size: 24px;
+    background: #FE4F4C;
     color: #fff;
-    margin-right: 42px;
+    border-radius: 5px;
 }

BIN
data/resource/mobile/invite_friend/images/fixed_close.png


BIN
data/resource/mobile/invite_friend/images/logo.png


+ 2 - 2
mobile/control/control.php

@@ -300,9 +300,9 @@ class mbMemberControl extends mobileControl
 
 function bonus_version()
 {
-    return "v=2017111404";
+    return "v=2017111501";
 }
 function shop_version()
 {
-    return "v=2017111404";
+    return "v=2017111501";
 }

+ 8 - 4
mobile/control/invite_friend.php

@@ -152,7 +152,7 @@ class tpl_invite_friend
         echo "<div class=\"bonus_list\">";
         echo "<div class=\"bonus_pro\">已邀请{$this->mUserInfo->invitees()}人</div>";
         if(empty($this->mMineInfo) && empty($this->mInvitees)){
-            echo '<span class=\"invite_null\">抱歉,你暂时没有邀请好友!</span>';
+            echo "<span class=\"invite_null\">抱歉,你暂时没有邀请好友!</span>";
         }
         else
         {
@@ -192,9 +192,13 @@ class tpl_invite_friend
         if(!session_helper::isapp())
         {
             echo "<div class=\"fixed_bottom\">
-                    <span class=\"logo\"></span>
-                    <a href=\"#\" class=\"download_app_btn\" id=\"download_app\">打开APP</a>
-                    <a href=\"#\" class=\"h5_shop_btn\" id=\"h5_mshop\">进入商城</a>
+                        <span class=\"fixed_close\" id=\"fixed_close\"></span>
+                        <span class=\"logo\"></span>
+                        <div class=\"label\">
+                            <p>熊猫美妆</p>
+                            <p>下载APP即可得100%红包</p>
+                        </div>
+                        <a href=\"#\"  class=\"download_app_btn\" id=\"download_app\">打开APP</a>
                   </div>";
         }
     }

+ 12 - 6
mobile/templates/default/invite_friend/invite.php

@@ -68,12 +68,17 @@
 
     var isapp = <?php echo session_helper::isapp() ? 'true' : 'false'; ?>;
     if(!isapp) {
-        document.getElementsByClassName('container')[0].setAttribute('style','padding-bottom:140px');
+        document.getElementsByClassName('bonus_content')[0].setAttribute('style','padding-bottom:120px');
     }
-    if(document.getElementsByClassName('open_bouns_link').length <= 0) {
+
+    if(document.getElementsByClassName('open_bouns_link').length <= 0 && isapp) {
         document.getElementsByClassName('bonus_content')[0].setAttribute('style','background-color:#fff');
     }
 
+    if(document.getElementsByClassName('open_bouns_link').length <= 0 && !isapp) {
+        document.getElementsByClassName('bonus_content')[0].setAttribute('style','background-color:#fff;padding-bottom:120px');
+    }
+
     window.addEventListener('pageshow', function () {
         if (window.sessionStorage.getItem('Already_received')) {
             window.sessionStorage.removeItem('Already_received');
@@ -104,6 +109,11 @@
                 window.location.href=grab_url;
             },300);
         });
+        document.getElementById('fixed_close').addEventListener('touchend',function(e){
+            e.preventDefault();
+            document.getElementsByClassName('fixed_bottom')[0].style.display = 'none';
+            document.getElementsByClassName('container')[0].setAttribute('style','padding-bottom:20px');
+        });
     }
 </script>
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js?<?php echo bonus_version(); ?>"></script>
@@ -112,10 +122,6 @@
 
 <script>
 
-    (function() {
-        $('#h5_mshop').attr('href',document.location.protocol+'//'+document.domain+'/mshop');
-    })();
-    
     if(isMobile.iOS()) {
         init_ios_bridge(function(bridge) { });
         $('#download_app').attr('href','itms-apps://itunes.apple.com/app/id945609424');