stanley-king 8 tahun lalu
induk
melakukan
c8e409a7cd

+ 1 - 4
data/resource/mobile/bonus/css/content_rem.css

@@ -259,10 +259,7 @@ input,button {
     display: inline-block;
     border-left: 1px solid #e3e3e3;
 }
-#link {
-    display: none;
-    margin-top: 1rem;
-}
+
 @-webkit-keyframes link {
     0%{
         -webkit-transform: translate3d(0,0,0);

+ 79 - 73
data/resource/mobile/bonus/js/tel.js

@@ -87,7 +87,7 @@ $(function(){
             var   dom='<div class="layer_box" id="bomb">'+
                 '<div class="layer" style="padding-bottom: 2px">'+
                 '<div class="top_msg" style="padding: 0 20px;line-height: 126px">'+
-                '<div><textarea id="pass_msg" placeholder="写下你想说的话" style="width:98%;height:50px;font-size: 1.2rem"></textarea></div>'+
+                '<div><textarea id="pass_msg" placeholder="写下你想说的话" style="width:98%;height:50px;font-size: 0.45rem"></textarea></div>'+
                 '</div>'+
                 '<div class="bottom_btn center" style="background: #fff;">'+
                 '<p id="go" class="post_btn" style="float: left;width: 50%;border-top: 1px solid #bfbfbf;color: #000;">取消</p>'+
@@ -172,80 +172,86 @@ $(function(){
                                 code: yanzVal,
                                 bonus_sn:bonus_sn
                             },
-                            success:function(data) {
+                            success:function(data)
+                            {
                                 if (data.code==200) {
-                                    var tel = $("#tel_number").val();
-                                    var alink = $("#url").val();
-                                    var other_html='';
-                                    var html='';
+                                    location.reload();
+                                    // var tel = $("#tel_number").val();
+                                    // var alink = $("#url").val();
+                                    // var other_html='';
+                                    // var html='';
 
-                                    var ser = function binded_info(){
-                                        function   formatDate(now)   {
-                                            //var   year=now.getYear()+1900;
-                                            var   month=now.getMonth()+1;
-                                            var   date=now.getDate();
-                                            var   hour=now.getHours();
-                                            var   minute=now.getMinutes();
-                                            var   second=now.getSeconds();
-                                            return   month+"-"+date+"   "+hour+":"+minute;
-                                        }
-                                        //其他用户的结构
-                                        var other_ser=data.datas.binded_info;
-                                        var king=data.datas.type_info.max_amount;
-                                        var mine_bonus_sn=data.datas.mine_bonus.bonus_sn;
-                                        var mine_bonus_value = data.datas.mine_bonus.bonus_value;
-                                        var comment=data.datas.binded_info;
-                                        //红包金额
-                                        $('.price span').text(mine_bonus_value);
-
-                                        for(var i=0;i<other_ser.length;i++){
-                                            var king_icon='',
-                                                mine ='',
-                                                user_comment='';
-
-                                            if(other_ser[i].bonus_sn==mine_bonus_sn){
-                                                mine = '<a href="javascript:void(0)" id="message" style="color: #1927D1">留言</a>'
-                                            }
-                                            else {
-                                                mine=formatDate(new Date(parseInt(other_ser[i].get_time)*1000));
-                                            }
-                                            if(other_ser[i].binded_over == 1 && other_ser[i].bonus_value==king) {
-                                                king_icon = '<s class="king"></s>手气最佳';
-                                            }
-                                            if(comment[i].user_comment==''){
-                                                user_comment='';
-                                            }
-                                            else {
-                                                user_comment=comment[i].user_comment;
-                                            }
-                                            other_html+='<div class="li">'+
-                                                '<div class="li_left">'+
-                                                '<p class="p">'+other_ser[i].user_name+'</p>'+
-                                                '<p class="prompt" id="my_prompt">'+mine+'</p>'+
-                                                '<p style="color:#9b9b9b">'+user_comment+'</p>'+
-                                                '</div>'+
-                                                '<div class="li_right">'+
-                                                '<p class="p">'+other_ser[i].bonus_value+'元</p>'+
-                                                '<p class="king_box">'+king_icon+'</p>'+
-                                                '</div>'+
-                                                '</div>';
-                                        }
-
-                                        var    binded_num=data.datas.type_info.binded_num,
-                                            total_num=data.datas.type_info.total_num,
-
-                                        //抢购数量
-                                            shtml='<div class="prompt text_left">'+
-                                                '<p class="prompt pro">领取'+binded_num+'/'+total_num+'个</p>'+
-                                                '</div>';
-
-                                        html+=shtml+other_html;
-                                        return html;
-                                    };
-                                    $('.list').html(ser());
-                                    $('#bind_link').hide();
-                                    $('#link').css('display','block').addClass('link_but');
-                                } else {
+                                    // var ser = function binded_info()
+                                    // {
+                                    //     function   formatDate(now)   {
+                                    //         //var   year=now.getYear()+1900;
+                                    //         var   month=now.getMonth()+1;
+                                    //         var   date=now.getDate();
+                                    //         var   hour=now.getHours();
+                                    //         var   minute=now.getMinutes();
+                                    //         var   second=now.getSeconds();
+                                    //         return   month+"-"+date+"   "+hour+":"+minute;
+                                    //     }
+                                    //     //其他用户的结构
+                                    //     var other_ser=data.datas.binded_info;
+                                    //     var king=data.datas.type_info.max_amount;
+                                    //     var mine_bonus_sn=data.datas.mine_bonus.bonus_sn;
+                                    //     var mine_bonus_value = data.datas.mine_bonus.bonus_value;
+                                    //     var comment=data.datas.binded_info;
+                                    //     //红包金额
+                                    //     $('.price span').text(mine_bonus_value);
+                                    //
+                                    //     for(var i=0;i<other_ser.length;i++)
+                                    //     {
+                                    //         var king_icon='',
+                                    //             mine ='',
+                                    //             user_comment='';
+                                    //
+                                    //         if(other_ser[i].bonus_sn==mine_bonus_sn){
+                                    //             mine = '<a href="javascript:void(0)" id="message" style="color: #1927D1">留言</a>'
+                                    //         }
+                                    //         else {
+                                    //             mine=formatDate(new Date(parseInt(other_ser[i].get_time)*1000));
+                                    //         }
+                                    //         if(other_ser[i].binded_over == 1 && other_ser[i].bonus_value==king) {
+                                    //             king_icon = '<s class="king"></s>手气最佳';
+                                    //         }
+                                    //         if(comment[i].user_comment==''){
+                                    //             user_comment='';
+                                    //         }
+                                    //         else {
+                                    //             user_comment=comment[i].user_comment;
+                                    //         }
+                                    //         other_html+='<div class="li">'+
+                                    //             '<div class="li_left">'+
+                                    //             '<p class="p">'+other_ser[i].user_name+'</p>'+
+                                    //             '<p class="prompt" id="my_prompt">'+mine+'</p>'+
+                                    //             '<p style="color:#9b9b9b">'+user_comment+'</p>'+
+                                    //             '</div>'+
+                                    //             '<div class="li_right">'+
+                                    //             '<p class="p">'+other_ser[i].bonus_value+'元</p>'+
+                                    //             '<p class="king_box">'+king_icon+'</p>'+
+                                    //             '</div>'+
+                                    //             '</div>';
+                                    //     }
+                                    //
+                                    //     var binded_num=data.datas.type_info.binded_num,
+                                    //         total_num=data.datas.type_info.total_num,
+                                    //
+                                    //     //抢购数量
+                                    //         shtml='<div class="prompt text_left">'+
+                                    //               '<p class="prompt pro">领取'+binded_num+'/'+total_num+'个</p>'+
+                                    //               '</div>';
+                                    //
+                                    //     html+=shtml+other_html;
+                                    //     return html;
+                                    // };
+                                    //
+                                    // $('.list').html(ser());
+                                    // $('#bind_link').hide();
+                                    // $('#link').css('display','block').addClass('link_but');
+                                }
+                                else {
                                     that.appendDom(that.msg.yanz_err, that.btnname.rewrite);
                                 }
                             }

+ 2 - 1
helper/text_filter.php

@@ -25,7 +25,8 @@ class text_filter
     static public function filter_input($input)
     {
         $input = self::filter_html($input);
-        return DFAFilter::instance()->filter($input);
+        return $input;
+        //return DFAFilter::instance()->filter($input);
     }
 
     //过滤敏感词

+ 7 - 5
mobile/control/bonusex.php

@@ -438,7 +438,6 @@ function bonus_output_grabinfo($output)
 
 function bonus_output_sender_header($output)
 {
-    $avatar = RESOURCE_SITE_URL . '/mobile/defimg/female.png';
     $type_info = $output['type_info'];
     $avatars = $output['avatars'];
 
@@ -448,6 +447,8 @@ function bonus_output_sender_header($output)
         $user_id = $type->sender_id();
         if(array_key_exists($user_id,$avatars)) {
             $avatar = $avatars[$user_id];
+        } else {
+            $avatar = RESOURCE_SITE_URL . '/mobile/defimg/female.png';
         }
     }
     return $avatar;
@@ -530,8 +531,8 @@ function bonus_output_mine($output)
     }
 
     if($show_down) {
-        echo('<div class="link" id="link">');
-        echo('<p><a href="javascript:void(0)"><span class="down_icon"></span>点击下载APP</a></p>');
+        echo('<div class="link">');
+        echo('<p><a href="javascript:void(0)" id="link"><span class="down_icon"></span>点击下载APP</a></p>');
         echo('</div>');
     }
 }
@@ -617,13 +618,14 @@ function bonus_output_bindedinfo($output)
 
     echo '<div class="list">';
 
-    $avatar = RESOURCE_SITE_URL . '/mobile/defimg/female.png';
     foreach($bined_info as $val)
     {
         $bonus = \bonus\user_bonus::create_by_param($val);
         $user_id = $bonus->user_id();
         if(array_key_exists($user_id,$avatars)) {
             $avatar = $avatars[$user_id];
+        } else {
+            $avatar = RESOURCE_SITE_URL . '/mobile/defimg/female.png';
         }
 
         echo('<div class="li">');
@@ -635,7 +637,7 @@ function bonus_output_bindedinfo($output)
         echo('<p class="p">' . $bonus->user_name() .'</p>');
         if(empty($bonus->user_comment()))
         {
-            if($bonus->user_id() == $_SESSION['member_id']) {
+            if($bonus->user_mobile() == $_SESSION['member_mobile']) {
                 echo('<p class="prompt" id="my_prompt"><a href="javascript:void(0)" id="message" style="color: #1927D1;display:inline-block;padding-top: 0.1rem;">留言</a></p>');
                 echo('<p class="prompt">' . $bonus->get_time_format() . '</p>');
             } else {

+ 1 - 0
mobile/control/control.php

@@ -83,6 +83,7 @@ class mobileControl
 
         if (empty($client)) {
             $client = $_POST['client_type'];
+        } else {
             $_SESSION['is_app'] = true;
         }
 

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

@@ -41,10 +41,6 @@
         </div>
     </div>
 
-    <div class="link" id="link">
-        <p><a href="javascript:void(0)"><span class="down_icon"></span>点击下载APP</a></p>
-    </div>
-
     <?php bonus_output_bindedinfo($output); ?>
 </div>
 <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/js/zepto.min.js"></script>
@@ -69,7 +65,7 @@
     }
 
     function href() {
-        $('#href_link').attr('href',app());
+        $('#link').attr('href',app());
     }
     href();
 

+ 38 - 21
mobile/templates/default/bonus/content.php

@@ -3,13 +3,11 @@
 <head>
     <meta charset="UTF-8">
     <title>熊猫美妆红包</title>
-    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
-    <link rel="stylesheet" href="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/css/common.css"/>
-    <link rel="stylesheet" href="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/css/content.css"/>
-    <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/js/zepto.min.js"></script>
-    <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/js/tel.js"></script>
+    <meta name="format-detection" content="telephone=no" />
+    <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
+    <link rel="stylesheet" href="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/css/common_rem.css"/>
+    <link rel="stylesheet" href="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/css/content_rem.css"/>
 </head>
-
 <body>
 <div class="maincontent center">
     <div class="top">
@@ -25,24 +23,43 @@
     <?php bonus_output_bindedinfo($output); ?>
 </div>
 
-<script type="text/javascript">
-    $(function(){
-        function navtodown(){
-            var ua = navigator.userAgent.toLowerCase(),
-                downInstall=$('#links a');
-            if (/iphone|ipad|ipod/.test(ua)) {
-                downInstall.attr('href','http://a.app.qq.com/o/simple.jsp?pkgname=com.lrlz.beautyshop');
-            } else if (/android/.test(ua)) {
-                downInstall.attr('href','http://p.lrlz.com/data/upload/package/xmmz_release.apk');
-            }
-            else {
-                downInstall.attr('href','#');
-            }
+<script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/js/zepto.min.js"></script>
+<script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/js/tel.js"></script>
+<script>
+    function app()
+    {
+        var app=navigator.userAgent.toLowerCase(),//判断设备
+            app_nav=navigator.appVersion.toLowerCase(),
+            href='';
+        if(app_nav.indexOf('iphone')>-1&&app.indexOf('iphone')){
+            href='http://a.app.qq.com/o/simple.jsp?pkgname=com.lrlz.beautyshop';
+        }else if(app.indexOf('micromessenger')>-1 && app_nav.indexOf('android')>-1){
+            href="javascript:void(0)";
         }
-        navtodown();
-    });
+        else {
+            href="<?php echo android_downpath(); ?>";
+        }
+        return href;
+    }
 
+    function href() {
+        $('#link').attr('href',app());
+    }
+    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 bonus_title = "<?php echo share_title($output); ?>";
+    var img_url     = "<?php echo share_image($output); ?>";
+    var sub_title   = "<?php echo share_subtitle($output); ?>";
+
+    weiXinShare.init({
+        title:bonus_title,
+        desc:sub_title,
+        link:url,
+        imgUrl:img_url
+    });
 </script>
 </body>
 </html>

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

@@ -22,7 +22,7 @@
     <?php bonus_output_mine($output); ?>
     <?php bonus_output_bindedinfo($output); ?>
 </div>
-<script type="text/javascript">
+<script>
     function app()
     {
         var app=navigator.userAgent.toLowerCase(),//判断设备
@@ -40,9 +40,23 @@
     }
 
     function href() {
-        $('#href_link').attr('href',app());
+        $('#link').attr('href',app());
     }
     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 bonus_title = "<?php echo share_title($output); ?>";
+    var img_url     = "<?php echo share_image($output); ?>";
+    var sub_title   = "<?php echo share_subtitle($output); ?>";
+
+    weiXinShare.init({
+        title:bonus_title,
+        desc:sub_title,
+        link:url,
+        imgUrl:img_url
+    });
 </script>
 </body>
 </html>

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

@@ -62,11 +62,12 @@
     <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
     <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/wx_share.js"></script>
     <script>
-        var bonus_title = "<?php echo($output['type_info']['sender_name']); ?>" + "的熊猫美妆红包" ;
-        var sub_title = "丽人丽妆公司特权红包,内购正品行货美妆.";
         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 img_url = "http://" + url_host + "/panda.png";
+
+        var bonus_title = "<?php echo share_title($output); ?>";
+        var img_url     = "<?php echo share_image($output); ?>";
+        var sub_title   = "<?php echo share_subtitle($output); ?>";
 
         weiXinShare.init({
             title:bonus_title,