stanley-king 7 年 前
コミット
a4b32ba4f1

+ 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;

+ 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()
     {

+ 1 - 1
mobile/control/invite_friend.php

@@ -201,7 +201,7 @@ class tpl_invite_friend
 
         $str =     "</div>
                     <div class=\"get_bonus\">
-                        <div class=\"total\"><span class=\"price\">{$minfo->reward_amount()}</span></div>
+                        <div class=\"total\"><span class=\"price\">{$minfo->reward_amount()}</span></div>
                     </div>
                 </div>";
         echo $str;

+ 15 - 1
mobile/templates/default/invite_friend/invite.php

@@ -171,7 +171,8 @@
         imgUrl:img_url
     });
 
-    document.querySelector('#share_btn').addEventListener('click',function(e){
+    document.querySelector('#share_btn').addEventListener('click',function(e)
+    {
         e.preventDefault();
         var jsonobject = {
             action:"share_page",
@@ -186,6 +187,19 @@
         };
         call_native_handler('on_native_click',JSON.stringify(jsonobject));
     });
+
+    var jsInit = {
+        action:"view_init",
+        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(jsInit));
 </script>
 </body>
 </html>