浏览代码

add to local

stanley-king 7 年之前
父节点
当前提交
42932ebd53

+ 2 - 1
admin/control/mb_special.php

@@ -88,7 +88,8 @@ class mb_specialControl extends SystemControl
         }
         elseif(!empty($special_desc)) {
             $cond = array("special_desc" => array('like', "%{$special_desc}%"));
-        } else {
+        }
+        else {
             $cond = [];
         }
         $cond['from_user'] = 0;

+ 34 - 37
data/resource/mobile/invite_friend/css/main.css

@@ -98,7 +98,7 @@ html {
     min-height: 100%;
     background: #fff;
     font-family: "PingFang SC";
-    color: #fff;
+    color: #000;
 }
 .container {
     width: 750px;
@@ -108,8 +108,8 @@ html {
 }
 .top {
     position: relative;
-    height: 547px;
-    background: url("../images/top_bg.jpg?v=7") no-repeat;
+    height: 1618px;
+    background: url("../images/top_bg.jpg?v=8") no-repeat;
     background-size: 100%;
 }
 .top .label {
@@ -134,21 +134,17 @@ html {
 .top .label .num {
     color: #ec354e;
 }
-.rules span {
-    width: 60px;
-    display: block;
-    margin-right: 35px;
-}
+
 
 .bonus_content {
     width: 750px;
     margin: 0 auto;
     padding-bottom: 20px;
-    background: url("../images/center_bg.png?v=6") center 0 #fffaf5 no-repeat;
+    background: url("../images/center_bg.jpg?v=8") center 0 #fffaf5 no-repeat;
 }
 .user_msg {
-    width: 718px;
-    height: 226px;
+    width: 724px;
+    height: 257px;
     margin-left: 18px;
     text-align: center;
 }
@@ -186,8 +182,8 @@ html {
     display: block;
 }
 .user_msg .user .user_img img {
-    width: 73px;
-    height: 73px;
+    width: 88px;
+    height: 88px;
     border-radius: 50px;
 }
 .user_msg .user .user_name {
@@ -208,15 +204,14 @@ html {
     font-size: 36px;
     margin-top: 60px;
     margin-bottom: 37px;
-    color: #f7dd92;
+    color: #fc5762;
 }
 .total .price {
     display: inline-block;
-    font-size: 48px;
-    padding-left: 20px;
+    font-size: 83px;
+    padding-left: 70px;
     padding-right: 3px;
     position: relative;
-    top: 3px;
 }
 .bonus_label {
     font-size: 25px;
@@ -387,29 +382,18 @@ html {
     white-space: nowrap;
     overflow: hidden;
 }
-.bag_icon {
-    display: inline-block;
-    width: 36px;
-    height: 39px;
-    background: url("../images/bag.png?v=3") no-repeat;
-    background-size: 100%;
-    position: relative;
-    top: 4px;
-}
+
 .rules {
-    display: -webkit-box;
-    -webkit-box-align: center;
-    -webkit-box-pack: center;
     position: absolute;
-    width: 152px;
-    height: 152px;
-    font-size: 29px;
-    right: -63px;
-    top: 290px;
-    background: url("../images/rules_bg.png?v=5") no-repeat;
+    width: 414px;
+    height: 31px;
+    left: 50%;
+    bottom: 67px;
+    background: url("../images/rule_btn.png?v=8") no-repeat;
     background-size: 100%;
     z-index: 99;
     -webkit-tap-highlight-color: rgba(0,0,0,0);
+    -webkit-transform: translateX(-50%);
 }
 .pop {
     position: fixed;
@@ -462,7 +446,7 @@ html {
     display: inline-block;
     width: 40px;
     height: 40px;
-    background: url("../images/arrow.png?v=4") no-repeat;
+    background: url("../images/arrow.png?v=8") no-repeat;
     background-size: 100%;
 }
 .invite_msg {
@@ -559,6 +543,7 @@ html {
     -webkit-box-align: center;
     background: rgba(51,51,51,0.9);
     z-index: 999;
+    color: #ffffff;
 }
 .fixed_close {
     display: block;
@@ -647,6 +632,18 @@ html {
     width: 668px;
     height: 62px;
     margin: 47px auto 30px auto;
-    background: url("../images/advert.png") no-repeat;
+    background: url("../images/advert.png?v=8") no-repeat;
     background-size: 100% 100%;
 }
+.share_btn {
+    position: absolute;
+    width: 596px;
+    height: 98px;
+    left: 50%;
+    bottom: 116px;
+    background: url("../images/share_btn.png?v=8") no-repeat;
+    background-size: 100%;
+    z-index: 99;
+    -webkit-tap-highlight-color: rgba(0,0,0,0);
+    -webkit-transform: translateX(-50%);
+}

二进制
data/resource/mobile/invite_friend/images/center_bg.jpg


二进制
data/resource/mobile/invite_friend/images/rule_btn.png


二进制
data/resource/mobile/invite_friend/images/share_btn.png


二进制
data/resource/mobile/invite_friend/images/top_bg.jpg


+ 1 - 1
helper/model/member_info.php

@@ -118,7 +118,7 @@ class member_info
         return intval($this->member_info['invitees']);
     }
     public function reward_amount() {
-        return $this->member_info['reward_amount'];
+        return intval($this->member_info['reward_amount'] * 100 + 0.5) / 100;
     }
     public function filter()
     {

+ 2 - 2
mobile/control/control.php

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

+ 12 - 12
mobile/control/invite_friend.php

@@ -41,11 +41,12 @@ class invite_friendControl extends mobileControl
             }
         }
 
-        if(session_helper::logined()) {
-            $type_sn = "";
-        } else {
-            $type_sn = account_helper::invite_bonus($user);
-        }
+//        if(session_helper::logined()) {
+//            $type_sn = "";
+//        } else {
+//            $type_sn = account_helper::invite_bonus($user);
+//        }
+        $type_sn = account_helper::invite_bonus($user);
 
         if($user > 0) {
             return self::outsuccess(['tpl' => new tpl_invite_friend($user,$type_sn)],"invite_friend/invite",'wap');
@@ -161,9 +162,9 @@ class tpl_invite_friend
     public function show()
     {
         $this->show_relay();
-        if(!empty($this->mTypesn)) {
-            $this->show_bonus();
-        }
+//        if(!empty($this->mTypesn)) {
+//            $this->show_bonus();
+//        }
         $rewared = $this->show_rewared();
         $rewarding = $this->show_rewarding();
         if($rewared == false && $rewarding == false) {
@@ -201,8 +202,7 @@ class tpl_invite_friend
 
         $str =     "</div>
                     <div class=\"get_bonus\">
-                        <div class=\"total\"><span class=\"bag_icon\"></span><span class=\"price\">{$minfo->reward_amount()}</span>元</div>
-                        <div class=\"bonus_label\">累计获得100%红包</div>
+                        <div class=\"total\"><span class=\"price\">{$minfo->reward_amount()}</span></div>
                     </div>
                 </div>";
         echo $str;
@@ -346,12 +346,12 @@ class tpl_invite_friend
     }
 
     public function bonus_url() {
-        $url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=grab&client_type=wap&type_sn={$this->mTypesn}";
+        $url = BASE_SITE_URL . "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn={$this->mTypesn}";
         return $url;
     }
     public function share_url()
     {
-        return url_helper::inviter_url();
+        return $this->bonus_url();//url_helper::inviter_url();
     }
     public function share_title()
     {

+ 23 - 11
mobile/templates/default/invite_friend/invite.php

@@ -11,13 +11,8 @@
 <body>
 <div class="container">
     <div class="top">
-        <div class="rules" id="rules">
-            <span>查看规则</span>
-        </div>
-        <span class="label label_1">邀请好友得<span class="num">10</span>元红包</span>
-        <span class="label label_2">好友邀请他人你也得<span class="num">1</span>元红包</span>
-        <span class="label label_3">好友每下一单得<span class="num">3</span>元红包</span>
-        <span class="label label_4">以此类推,多邀多赚</span>
+        <div class="share_btn" id="share_btn"></div>
+        <div class="rules" id="rules"></div>
     </div>
     <div class="bonus_content">
         <?php $output['tpl']->show(); ?>
@@ -28,7 +23,7 @@
             <div class="rules_list" id="rules_list">
                 <p>
                     (1).通过您发出邀请链接,好友微信授权、注
-                    册下载APP、登录后,您将获得5元100%红包,
+                    册下载APP、登录后,您将获得10元100%红包,
                     累计叠加,上不封顶。好友邀请的好友以此递推,
                     按层级关系您也会获得1元,0.5元等红包。
                 </p>
@@ -165,7 +160,7 @@
     }
 
     var url         = "<?php echo $output['tpl']->share_url(); ?>";
-    var title = "<?php echo $output['tpl']->share_title(); ?>";
+    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点击领取";
 
@@ -176,7 +171,24 @@
         imgUrl:img_url
     });
 
-    var jsonobject = {
+    document.querySelector('#share_btn').addEventListener('click',function(e)
+    {
+        e.preventDefault();
+        var jsonobject = {
+            action:"share_page",
+            params: {
+                can_invite:true, //为兼容之前版本,保留
+                can_share:true,
+                title:title,
+                sub_title:sub_title,
+                img_url:img_url,
+                url:url
+            }
+        };
+        call_native_handler('on_native_click',JSON.stringify(jsonobject));
+    });
+
+    var jsInit = {
         action:"view_init",
         params: {
             can_invite:true, //为兼容之前版本,保留
@@ -187,7 +199,7 @@
             url:url
         }
     };
-    call_native_handler('on_native_click',JSON.stringify(jsonobject));
+    call_native_handler('on_native_click',JSON.stringify(jsInit));
 </script>
 </body>
 </html>