zhashaonan 6 years ago
parent
commit
e9c5a31c48

+ 57 - 15
data/resource/mobile/invite_friend/css/main.css

@@ -300,21 +300,21 @@ html {
     display: -webkit-box;
     -webkit-box-align: center;
 }
-.item .call_btn {
-    color: #fff;
-    padding: 2px 10px;
-    background: #FE4F4C;
-    font-size: 24px;
-    position: absolute;
-    top: 50%;
-    right: 0;
-    line-height: 38px;
-    text-align: center;
-    -webkit-transform: translateY(-50%);
-}
-.item .call_btn.called {
-    background: #999999;
-}
+/*.item .call_btn {*/
+    /*color: #fff;*/
+    /*padding: 2px 10px;*/
+    /*background: #FE4F4C;*/
+    /*font-size: 24px;*/
+    /*position: absolute;*/
+    /*top: 50%;*/
+    /*right: 0;*/
+    /*line-height: 38px;*/
+    /*text-align: center;*/
+    /*-webkit-transform: translateY(-50%);*/
+/*}*/
+/*.item .call_btn.called {*/
+    /*background: #999999;*/
+/*}*/
 .item a {
     display: -webkit-box;
     -webkit-box-align: center;
@@ -441,6 +441,48 @@ html {
     font-size: 32px;
     margin-top: 24px;
 }
+/**/
+.rules_content.free_gifts {
+    background: #fff;
+    width: 275px;
+    height: 400px;
+    margin: 40px auto;
+    border-radius: 5px;
+    box-sizing: border-box;
+    padding: 12px 15px;
+    font-size: 12px;
+    color: #333333;
+}
+.rules_content.free_gifts h3 {
+    text-align: center;
+    font-size: 17px;
+    margin-bottom: 15px;
+}
+.rules_content.free_gifts .rules_list {
+    height: 300px;
+    overflow-y: scroll;
+}
+.rules_content.free_gifts p {
+    line-height: 17px;
+}
+.rules_content.free_gifts .close_btn {
+    display: block;
+    width: 100px;
+    height: 30px;
+    line-height: 30px;
+    margin: 0 auto;
+    text-align: center;
+    color: #fff;
+    background: #FF4E4E;
+    border-radius: 8px;
+    cursor: pointer;
+    font-size: 16px;
+    margin-top: 12px;
+    position: relative;
+    top: 0;
+}
+/**/
+
 .arrow {
     display: inline-block;
     width: 40px;

+ 5 - 0
data/resource/mobile/talk/css/free_gifts.css

@@ -174,6 +174,10 @@ a:visited{
     line-height: 16px;
     padding: 5px 10px;
     font-weight: bold;
+    background: #000;
+}
+.gifts_list .weui-cell__ft .weui-btn_mini.called {
+    background: #999;
 }
 .gifts_list .weui-btn {
     color: #fff;
@@ -187,6 +191,7 @@ a:visited{
 .x_line {
     position: relative;
 }
+/*.x_line */
 .weui-cell.x_line::before {
     display: none;
 }

+ 2 - 2
mobile/control/control.php

@@ -325,9 +325,9 @@ class mbMemberControl extends mobileControl
 
 function bonus_version()
 {
-    return "v=2018092004";
+    return "v=2018092005";
 }
 function shop_version()
 {
-    return "v=2018092004";
+    return "v=2018092005";
 }

+ 68 - 57
mobile/control/invite_friend.php

@@ -186,7 +186,7 @@ class tpl_invite_friend
                          <p class=\"f14 col333 lineH1\">{$minfo->nickname()}</p>";
         echo $str;
 
-//        if($inviter_id > 0) {
+        if($inviter_id > 0) {
 //            $url = BASE_SITE_URL . "/mobile/index.php?act=invite_friend&op=index&client_type=wap&curuser={$inviter_id}";
 //            $inviter = new member_info($inviter_id);
 //            $str = "<div class=\"invite_user\">
@@ -195,7 +195,7 @@ class tpl_invite_friend
 //                        </a>
 //                    </div>";
 //            echo $str;
-//        }
+        }
 
         $str =     "</div>
                     <div class=\"right_profit\">
@@ -247,11 +247,8 @@ class tpl_invite_friend
 
     private function show_rewared()
     {
+        $html = "";
 
-//        echo "<div class=\"split_line_header mt20\">";
-//        echo "<div class=\"split_line\"></div>
-//                <span class=\"split_text\">已带来收益的好友(22)</span>
-//            </div>";
         if(empty($this->mMineInfo) && empty($this->mRewardedInvites)) {
             return false;
         }
@@ -262,40 +259,37 @@ class tpl_invite_friend
             $count = count($this->mRewardedInvites);
         }
 
-        echo "<div class=\"split_line_header mt20\">";
-        echo "<div class=\"split_line\"></div>
-                <span class=\"split_text\">已带来收益的好友({$count})</span>
-            </div>";
-
-
-
-
-//        echo "<div class=\"bonus_list\">";
-//        echo "<div class=\"prompt_label\">
-//                    <span class=\"title\">已带来收益的好友<span class=\"invite_num\">({$count})</span></span>
-//              </div>";
-
-
+        $html .="<div class=\"split_line_header mt20\">
+                    <div class=\"split_line\"></div>
+                    <span class=\"split_text\">已带来收益的好友({$count})</span>
+                </div>";
 
+        $mem_html = "";
         if(!empty($this->mMineInfo) && $this->mMineInfo->rewared_inviter()) {
-            $this->show_invitee($this->mMineInfo);
+            $mem_html .= $this->show_invitee($this->mMineInfo);
         }
         foreach ($this->mRewardedInvites as $minfo) {
-            $this->show_invitee($minfo);
+            $mem_html .= $this->show_invitee($minfo);
+        }
+
+
+        if($count > 0) {
+            $mem_html = "<div class=\"gifts_list\">
+                            <div class=\"weui-cells\">"
+                . $mem_html .
+                "</div>
+                        </div>";
         }
-//        echo "</div>";
 
+        $html = $html . $mem_html;
+
+        echo $html;
         return true;
     }
 
     private function show_rewarding()
     {
-//        echo "<div class=\"split_line_header mt20\">";
-//        echo "<div class=\"split_line\"></div>
-//                <span class=\"split_text\">尚未带来收益的好友(111)</span>
-//            </div>";
-
-
+        $html = "";
         if(empty($this->mMineInfo) && empty($this->mRewardingInvites)) {
             return false;
         }
@@ -306,24 +300,31 @@ class tpl_invite_friend
             $count = count($this->mRewardingInvites);
         }
 
-//        echo "<div class=\"bonus_list\">";
-//        echo "<div class=\"prompt_label\">
-//                    <span class=\"title\">尚未带来收益的好友<span class=\"invite_num\">({$count})</span></span>
-//              </div>";
+        $html .="<div class=\"split_line_header mt20\">
+                    <div class=\"split_line\"></div>
+                    <span class=\"split_text\">尚未带来收益的好友({$count})</span>
+                </div>";
 
-        echo "<div class=\"split_line_header mt20\">";
-        echo "<div class=\"split_line\"></div>
-                <span class=\"split_text\">尚未带来收益的好友({$count})</span>
-            </div>";
 
+        $mem_html = "";
         if(!empty($this->mMineInfo) && $this->mMineInfo->rewared_inviter() == false) {
-            $this->show_invitee($this->mMineInfo);
+            $mem_html .=$this->show_invitee($this->mMineInfo);
         }
         foreach ($this->mRewardingInvites as $minfo) {
-            $this->show_invitee($minfo);
+            $mem_html .=$this->show_invitee($minfo);
+        }
+
+        if($count > 0) {
+            $mem_html = "<div class=\"gifts_list\">
+                            <div class=\"weui-cells\">"
+                                . $mem_html .
+                           "</div>
+                        </div>";
         }
-//        echo "</div>";
 
+        $html = $html . $mem_html;
+
+        echo $html;
         return true;
     }
 
@@ -350,33 +351,43 @@ class tpl_invite_friend
         $called = $this->mCaller->called($user);
 
         $url = BASE_SITE_URL . "/mobile/index.php?act=invite_friend&op=index&client_type=wap&curuser={$user}";
-        $str = "<div class=\"item\">
-                        <a href=\"{$url}\">
-                            <div class=\"user_img\">
-                            <img src=\"{$minfo->avatar()}\">
-                            </div>
-                            <div class=\"user_name text-overflow\">
-                              <p class=\"text-overflow\"> {$minfo->nickname()}</p>
-                              <p class=\"invite_msg\">邀请{$minfo->invitees()}人,收益<span class=\"price\">{$minfo->reward_amount()}</span>元</p>
-                            </div>";
+
+        $html = "<div class=\"weui-cell x_line\">
+                <a href=\"{$url}\">
+                    <div class=\"weui-cell__hd\">
+                        <img src=\"{$minfo->avatar()}\">
+                    </div>
+                    <div class=\"weui-cell__bd\">
+                        <p>{$minfo->nickname()}</p>
+                        <p class=\"week_total\">邀请{$minfo->invitees()}人 | 收益{$minfo->reward_amount()}元</p>
+                    </div>
+                ";
+
         if($this->mMine == false)
         {
-            $str        .= "<div class=\"look_btn\">
-                               <span class=\"arrow\"></span>
-                            </div>";
+            $html  .= "<div class=\"look_btn\">
+                           <span class=\"arrow\"></span>
+                       </div>";
         }
-        $str         .= "</a>";
+        $html.= "</a>";
 
         if($this->mMine)
         {
             if($called) {
-                $str .=     "<span class=\"call_btn called\" data-user=\"{$user}\">召唤TA</span>";
+//                $html .= "<span class=\"call_btn called\" data-user=\"{$user}\">召唤TA</span>";
+                $html .="<div class=\"weui-cell__ft\">
+//                        <a href=\"javascript:void(0)\"  class=\"weui-btn weui-btn_mini donate call_btn called\">召唤TA</a>
+//                      </div>";
             } else {
-                $str .=     "<span class=\"call_btn\" data-user=\"{$user}\">召唤TA</span>";
+//                $html .= "<span class=\"call_btn\" data-user=\"{$user}\">召唤TA</span>";
+                $html .= "<div class=\"weui-cell__ft\">
+//                        <a href=\"javascript:void(0)\"  class=\"weui-btn weui-btn_mini donate call_btn\">召唤TA</a>
+//                      </div>";
             }
         }
-        $str .= "</div>";
-        echo $str;
+        $html .= "</div>";
+
+        return $html;
     }
 
     public function show_open()

+ 1 - 27
mobile/templates/default/bonus/free_gifts.php

@@ -50,33 +50,7 @@
                         <p class="week_total">邀请7人 | 收益356.5元</p>
                     </div>
                     <div class="weui-cell__ft">
-                        <a href="javascript:void(0)" data-roomid="118" class="weui-btn weui-btn_mini donate" style="background-color: #000">召唤TA</a>
-                    </div>
-                </div>
-
-                <div class="weui-cell x_line">
-                    <div class="weui-cell__hd">
-                        <img src="http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIsjHhPYTNN81w9d2hkfAedZpERCiaKicXlic3pU6DXvDX4iamH1CMlk0VdEhX6NicCuyzJNS2pMlFHVLw/132">
-                    </div>
-                    <div class="weui-cell__bd">
-                        <p>陈哲远陈哲远</p>
-                        <p class="week_total">邀请7人 | 收益356.5元</p>
-                    </div>
-                    <div class="weui-cell__ft">
-                        <a href="javascript:void(0)" data-roomid="118" class="weui-btn weui-btn_mini donate" style="background-color: #000">召唤TA</a>
-                    </div>
-                </div>
-
-                <div class="weui-cell x_line">
-                    <div class="weui-cell__hd">
-                        <img src="http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIsjHhPYTNN81w9d2hkfAedZpERCiaKicXlic3pU6DXvDX4iamH1CMlk0VdEhX6NicCuyzJNS2pMlFHVLw/132">
-                    </div>
-                    <div class="weui-cell__bd">
-                        <p>陈哲远陈哲远</p>
-                        <p class="week_total">邀请7人 | 收益356.5元</p>
-                    </div>
-                    <div class="weui-cell__ft">
-                        <a href="javascript:void(0)" data-roomid="118" class="weui-btn weui-btn_mini donate" style="background-color: #000">召唤TA</a>
+                        <a href="javascript:void(0)" class="weui-btn weui-btn_mini donate">召唤TA</a>
                     </div>
                 </div>
             </div>

+ 22 - 21
mobile/templates/default/invite_friend/invite.php

@@ -22,7 +22,7 @@
 <div class="">
     <div class="gifts_cover">
         <div class="gifts_cover_bg"></div>
-        <a href="#" class="get_more_gifts">多邀多得  |  更多详情见规则 ></a>
+        <div class="get_more_gifts" id="rules">多邀多得  |  更多详情见规则 ></div>
         <?php $output['tpl']->show(); ?>
     </div>
 <!--    <div class="top">-->
@@ -33,7 +33,7 @@
 
 
     <div class="pop" id="pop">
-        <div class="rules_content" id="rules_content">
+        <div class="rules_content free_gifts" id="rules_content">
             <h3>邀请规则</h3>
             <div class="rules_list" id="rules_list">
                 <p>
@@ -73,9 +73,9 @@
 <script type="text/javascript">
 
     var isapp = <?php echo session_helper::isapp() ? 'true' : 'false'; ?>;
-    if(!isapp) {
-        document.getElementsByClassName('bonus_content')[0].setAttribute('style','padding-bottom:120px');
-    }
+    // if(!isapp) {
+    //     document.getElementsByClassName('bonus_content')[0].setAttribute('style','padding-bottom:120px');
+    // }
 
     window.addEventListener('pageshow', function () {
         if (window.sessionStorage.getItem('Already_received')) {
@@ -92,6 +92,7 @@
             e.preventDefault();
         };
         document.getElementById('rules').addEventListener('click',function(e){
+            console.log(22);
             document.getElementById('pop').style.display = 'block';
             window.addEventListener('touchmove',window_no_scroll);
         });
@@ -181,22 +182,22 @@
         imgUrl:img_url
     });
 
-    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));
-    });
+    // 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",