stanley-king 8 роки тому
батько
коміт
db43bd3422

+ 6 - 6
helper/util_helper.php

@@ -9,6 +9,9 @@
 
 class util
 {
+    const min_memno = 500;
+    const max_memno = 2000;
+
     public static function member_avatar($path)
     {
         if (is_null($path) || empty($path)) {
@@ -62,13 +65,10 @@ class util
     }
     public static function mem_no()
     {
-        $min_number = 500;
-        $max_number = 2000;
-
-        $number = self::mb_incr('member_no',1,$min_number);
-        if($number > $max_number) {
+        $number = self::mb_incr('member_no',1,self::min_memno);
+        if($number > self::max_memno) {
             self::mb_del_incr('member_no');
-            $start_number = mt_rand($min_number,2 * $min_number);
+            $start_number = mt_rand(self::min_memno,2 * self::min_memno);
             $number = self::mb_incr('member_no',1,$start_number);
         }
 

+ 1 - 0
mobile/control/member_bonus.php

@@ -174,6 +174,7 @@ class member_bonusControl extends mbMemberControl
     public function invite_pageOp()
     {
         $mem_no = $this->member_no();
+
         return self::outsuccess(array('member_no' => $mem_no),"bonus/invite",'wap');
     }
 

+ 1 - 2
mobile/templates/default/bonus/bind.php

@@ -79,8 +79,7 @@
     }
     href();
 
-    var url_host=window.location.hostname;
-    var url = "http://" + url_host + "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=" + "<?php echo($output['type_info']['type_sn']); ?>";
+    var url = "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=" + "<?php echo($output['type_info']['type_sn']); ?>";
 
     var bonus_title = "<?php echo share_title($output); ?>";
     var img_url     = "<?php echo share_image($output); ?>";

+ 2 - 2
mobile/templates/default/bonus/content.php

@@ -59,8 +59,8 @@
     }
     href();
 
-    var url_host=window.location.hostname;
-    var url = "http://" + url_host + "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=" + "<?php echo($output['type_info']['type_sn']); ?>";
+    //var url_host=window.location.hostname;//"http://" + url_host +
+    var url = "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=" + "<?php echo($output['type_info']['type_sn']); ?>";
 
     var bonus_title = "<?php echo share_title($output); ?>";
     var img_url     = "<?php echo share_image($output); ?>";

+ 2 - 2
mobile/templates/default/bonus/detail.php

@@ -60,8 +60,8 @@
     }
     href();
 
-    var url_host=window.location.hostname;
-    var url = "http://" + url_host + "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=" + "<?php echo($output['type_info']['type_sn']); ?>";
+    //var url_host=window.location.hostname;//"http://" + url_host +
+    var url = "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=" + "<?php echo($output['type_info']['type_sn']); ?>";
 
     var bonus_title = "<?php echo share_title($output); ?>";
     var img_url     = "<?php echo share_image($output); ?>";

+ 1 - 3
mobile/templates/default/bonus/open.php

@@ -67,9 +67,7 @@
     <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js?<?php echo bonus_version(); ?>"></script>
     <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/wx_share.js?<?php echo bonus_version(); ?>"></script>
     <script>
-        var url_host=window.location.hostname;
-        var url = "http://" + url_host + "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=" + "<?php echo($output['type_info']['type_sn']); ?>";
-
+        var url = "/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=" + "<?php echo($output['type_info']['type_sn']); ?>";
         var bonus_title = "<?php echo share_title($output); ?>";
         var img_url     = "<?php echo share_image($output); ?>";
         var sub_title   = "<?php echo share_subtitle($output); ?>";

+ 4 - 4
mobile/templates/default/bonus/ranklist.php

@@ -174,9 +174,9 @@
                 })
             },
             ajax:function(data){
-                var url_host=window.location.hostname;
+                //var url_host=window.location.hostname; 'http://' + url_host +
                 $.ajax({
-                    url:'http://' + url_host + '/mobile/index.php?act=rank_list&op=support&client_type=wap',
+                    url:'/mobile/index.php?act=rank_list&op=support&client_type=wap',
                     dataType:'jsonp',
                     jsonp:'callback',
                     data:{
@@ -197,8 +197,8 @@
 <script>
     var list_sn = $('#list_sn').val();
     var rank_title = $('#rank_title').val();
-    var url_host=window.location.hostname;
-    var url = "http://" + url_host + "/mobile/index.php?act=rank_list&op=index&client_type=wap&list_sn=" + list_sn;
+    var url_host=window.location.hostname;//"http://" + url_host +
+    var url = "/mobile/index.php?act=rank_list&op=index&client_type=wap&list_sn=" + list_sn;
     var img_url = "http://" + url_host + "/panda.png";
 
     weiXinShare.init({