Просмотр исходного кода

Merge branch 'bonus_rate' of 121.43.114.153:/home/git/repositories/shopnc into bonus_rate

huangdong 6 лет назад
Родитель
Сommit
4cf0bcbe79

+ 3 - 5
core/framework/libraries/sms.php

@@ -95,12 +95,10 @@ class Sms
             self::getbind_code => '59006',
             self::newcomer_code => '92893',
             self::newcomer_bonus_code => '146196',
-//          self::order_sended => '162660',//【熊猫美妆】启奏小主,出身名门贵族正品的宝贝已经投奔您啦,{1}快递单号:{2},请保持手机通畅,方便伙计与您联系哦!
-            self::order_sended => '355420',//【熊猫美妆】尊敬的会员,您的订单已发货,{1}运单号为{2},详细订单信息请登陆APP查看。
-//          self::order_received => '146346',//【熊猫美妆】主银!您确认收货成功,订单奖励红包已到账,届时恭请主公亲自查收,今后还望主公多多提携。
-            self::order_received => '355421',//【熊猫美妆】您已确认收货,订单奖励红包已到账。评价商品还能领更多红包噢~
+            self::order_sended => '355420',     //【熊猫美妆】尊敬的会员,您的订单已发货,{1}运单号为{2},详细订单信息请登陆APP查看。
+            self::order_received => '355421',   //【熊猫美妆】您已确认收货,订单奖励红包已到账。评价商品还能领更多红包噢~
             self::getfcode_code => '166281',
-            self::after_comment => '355423',//【熊猫美妆】感谢您对商品的评价,{1}元红包已到账!您的意见对我们至关重要~
+            self::after_comment => '355423',    //【熊猫美妆】感谢您对商品的评价,{1}元红包已到账!您的意见对我们至关重要~
         ];
 
         if (!array_key_exists($type, $templates)) {

+ 1 - 18
data/model/room.model.php

@@ -168,24 +168,7 @@ class roomModel extends Model
         return $this->table('room_face')->where($cond)->update($data);
     }
 
-    /////////////////////////////////////////////
-    public function applyCnts($cond){
-        return $this->table('room_apply')->where($cond)->count();
-    }
-    public function roomApplys($cond,$field="*",$page=20,$order='apply_id desc')
-    {
-        return $this->table('room_apply')->field($field)->where($cond)->page($page)->order($order)->select();
-    }
-    public function findApply($apply_id){
-        return $this->table('room_apply')->field('*')->where(['apply_id' => $apply_id])->find();
-    }
-    public function addApply($room,$member,$msg,$viewer=0){
-        return $this->table('room_apply')->insert(['room_id' => $room,'member_id' => $member,'msg' => $msg,'viewer'=>$viewer,'add_time'=>time()]);
-    }
-    public function editApply($apply,$viewer,$step){
-        return $this->table('room_apply')->where(['apply_id' => $apply])->update(["viewer"=> $viewer,"step" => $step]);
-    }
-    ////////////////////////////////////////////
+    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     public function roomSteps($cond,$field="*",$page=20,$order='steps_id desc') {
         return $this->table('room_steps')->field($field)->where($cond)->page($page)->order($order)->limit($page)->select();
     }

+ 1 - 1
helper/async/order.php

@@ -329,7 +329,7 @@ class order extends IAsync
                 $bonus_value = $bonus[0]['bonus_value'];
                 $bonus_rate = $bonus[0]['bonus_rate'];
                 push_helper::order_evaluate_bonus($this->user_info->member_id(),$bonus_value,$bonus_rate,$type_sn);
-                sms_helper::send_nostore_message($this->user_info->mobile(),Sms::after_comment,['bonus_rate'=>$bonus_rate]);
+                sms_helper::send_nostore_message($this->user_info->mobile(),Sms::after_comment,['money' => $bonus_value]);
             }
         }
     }

+ 2 - 3
helper/fcgi_server.php

@@ -106,13 +106,12 @@ class fcgi_server
                 Log::record("member_id=" . session_helper::memberid(),Log::DEBUG);
                 if(file_exists($file))
                 {
-                    if(self::is_exclude($file))
-                    {
+                    fcgi_header("Content-Type: text/html; charset=UTF-8");
+                    if(self::is_exclude($file)) {
                         include $file;
                     }
                     else
                     {
-                        fcgi_header("Content-Type: text/html; charset=UTF-8");
                         if(!isset($_GET['act'])) {
                             $_GET['act'] = 'index';
                         }

+ 0 - 8
helper/room/tpl_group_home.php

@@ -371,10 +371,6 @@ class tpl_group_home
         if (!empty($this->room_info) && isset($this->participants[$this->cur_user])) {
             $avartar = $this->room_info->avatar();
             $name = $this->room_info->has_name() ? $this->room_info->name() : "未命名";
-            $notice = empty($this->room_info->notice()) ? "未设置" : "已设置";
-            $desc = empty($this->room_info->room_desc()) ? "未设置" : "已设置";
-            $cnt = $this->mod_room->applyCnts(['room_id'=>$this->room_id,"step"=>0]);
-            $apply = $cnt > 0 ? "待处理" . $cnt : "暂无申请";
 
             $click = false;
             $level = "已认证";
@@ -393,7 +389,6 @@ class tpl_group_home
                 }
             }
 
-
             $html.= "<div class=\"weui-cells\">";
             $html.= $this->room_name_btn($click,$name);
             $html.= $this->room_avatar_btn($avartar);
@@ -403,10 +398,7 @@ class tpl_group_home
 
             if ($this->isManager($this->cur_user)) {
                 $html .= "<div class=\"weui-cells\">";
-//                $html.= $this->room_desc_btn($desc);
-//                $html.= $this->room_notice_btn($notice);
                 $html.= $this->room_cert_btn($click,$level);
-//                $html.= $this->room_apply_btn($apply,$cnt);
                 $html.="</div>";
             }
         }

+ 2 - 11
helper/session_helper.php

@@ -269,21 +269,13 @@ class session_helper
     static public function need_wechat_author()
     {
         wechat_helper::clear_origin_url();
-
-        if (util::from_wechat() == false) {
+        if (util::from_wechat() == false || session_helper::client_type() == session_helper::device_mini) {
             return false;
         }
         else
         {
-            if(session_helper::client_type() == session_helper::device_mini) {
-                return false;
-            }
-
             $relay_id = session_helper::relay_id();
-            if(session_helper::logined()) {
-                return false;
-            }
-            elseif (wechat_helper::has_userinfo())
+            if (wechat_helper::has_userinfo())
             {
                 $user_info = wechat_helper::get_userinfo();
                 if(session_helper::logined())
@@ -319,7 +311,6 @@ class session_helper
                         wechat_helper::set_invite_bonus(); //如果用户从扫二维码来的,需要领红包
                     }
                 }
-
                 account_helper::onLogin(session_helper::memberid());
                 wechat_helper::clear_userinfo();
                 return false;

+ 1 - 1
helper/third_author/wxauthor.php

@@ -70,7 +70,7 @@ class wxauthor
                     'redirect_uri' => $back_url,
                     'response_type' => 'code',
                     'scope' => 'snsapi_userinfo',
-                    'state' => urlencode(BASE_SITE_URL)];
+                    'state' => BASE_SITE_URL];
         $ref_url = util::http_add_params(self::authorize_url,$params);
         $ref_url .= '#wechat_redirect';
 

+ 2 - 2
mobile/control/control.php

@@ -331,9 +331,9 @@ class mbMemberControl extends mobileControl
 
 function bonus_version()
 {
-    return "v=2018100905";
+    return "v=20181016";
 }
 function shop_version()
 {
-    return "v=2018100905";
+    return "v=20181016";
 }

+ 37 - 39
mobile/control/index.php

@@ -92,31 +92,13 @@ class indexControl extends specialControl
     public function room_indexOp()
     {
         $talk_type = trim($_GET['talk_type']);
-        $talk_id = intval($_GET['talk_id']);
+        $talk_id  = intval($_GET['talk_id']);
         $relay_id = intval($_GET['relay_id']);
 
         if($talk_id <= 0) {
             return self::outerr(errcode::ErrParamter);
         }
 
-        $is_app = intval(session_helper::isapp());
-        $from_wechat = util::from_wechat();
-        $user = session_helper::memberid();
-        $param = ["talk_type" => $talk_type, "talk_id"   => $talk_id , "member_id" => $user,"room_name"=>"","room_avatar"=>"","relay_id"=>$relay_id,"is_app"=>$is_app];
-
-        //app内打开请求授权登录
-        if(($is_app || !$from_wechat) && $user<= 0)
-        {
-            if($talk_type == "room") {
-                return self::outsuccess(['tpl' => null,"param" => $param],'talk/homepage_room');
-            }elseif($talk_type == 'chatwo') {
-                return self::outsuccess(['tpl' => null,"param" => $param],'talk/homepage_chatwo');
-            }else {
-
-            }
-        }
-
-        //微信内打开使用授权判断
         if(session_helper::need_wechat_author()) {
             $author = new thrid_author\wxauthor();
             $url = url_helper::room_detail_url($talk_type,$talk_id,$relay_id);
@@ -124,34 +106,50 @@ class indexControl extends specialControl
             return self::outsuccess(['direct_uri' => $url],"redirect");
         }
 
+        $is_app = intval(session_helper::isapp());
+        $user = session_helper::memberid();
+        $param = ["talk_type" => $talk_type, "talk_id"   => $talk_id , "member_id" => $user,"room_name"=>"","room_avatar"=>"","relay_id"=>$relay_id,"is_app"=>$is_app];
 
-        if($talk_type == "room")
+        if(!session_helper::logined())
         {
-            $room_id = $talk_id;
-            try {
-                $tpl = new room\tpl_group_home($user,$talk_id,$relay_id);
-                $param["room_name"] = $tpl->get_room_info()->name();
-                $param["room_avatar"] = $tpl->get_room_info()->avatar();
-                return self::outsuccess(['tpl' => $tpl,"param" => $param],'talk/homepage_room');
-            } catch (Exception $ex) {
-                Log::record("member_talk.room_detail error: room_id={$room_id} user={$user}",Log::ERR);
+            if($talk_type == "room") {
+                return self::outsuccess(['tpl' => null,"param" => $param],'talk/homepage_room');
+            } elseif($talk_type == 'chatwo') {
+                return self::outsuccess(['tpl' => null,"param" => $param],'talk/homepage_chatwo');
+            } else {
                 return self::outerr(errcode::ErrParamter);
             }
         }
-        elseif($talk_type == 'chatwo')
+        else
         {
-            $other = $talk_id;
-            try {
-                $tpl = new room\tpl_chatwo_home($user,$other);
-                return self::outsuccess(['tpl' => $tpl,"param"=>$param],'talk/homepage_chatwo');
-            } catch (Exception $ex) {
-                Log::record("member_talk.room_detail error: other={$other} user={$user}",Log::ERR);
+            if($talk_type == "room")
+            {
+                try {
+                    $room_id = $talk_id;
+                    $tpl = new room\tpl_group_home($user,$talk_id,$relay_id);
+                    $param["room_name"] = $tpl->get_room_info()->name();
+                    $param["room_avatar"] = $tpl->get_room_info()->avatar();
+                    return self::outsuccess(['tpl' => $tpl,"param" => $param],'talk/homepage_room');
+                } catch (Exception $ex) {
+                    Log::record("member_talk.room_detail error: room_id={$room_id} user={$user}",Log::ERR);
+                    return self::outerr(errcode::ErrParamter);
+                }
+            }
+            elseif($talk_type == 'chatwo')
+            {
+                try {
+                    $other = $talk_id;
+                    $tpl = new room\tpl_chatwo_home($user,$other);
+                    return self::outsuccess(['tpl' => $tpl,"param"=>$param],'talk/homepage_chatwo');
+                } catch (Exception $ex) {
+                    Log::record("member_talk.room_detail error: other={$other} user={$user}",Log::ERR);
+                    return self::outerr(errcode::ErrParamter);
+                }
+            }
+            else
+            {
                 return self::outerr(errcode::ErrParamter);
             }
         }
-        else
-        {
-            return self::outerr(errcode::ErrParamter);
-        }
     }
 }

+ 24 - 20
mobile/wxauthor.php

@@ -40,15 +40,18 @@ else
             {
                 $html = "<!DOCTYPE html>
                         <html lang=\"en\">
-                        <head>
-                            <meta charset=\"UTF-8\">
-                            <title>跳转中</title>
-                        </head>
-                        <body>
-                        <script>
-                            window.location.href =\"{$origin_url}\";
-                        </script>
-                        </body>
+                            <head>
+                                <meta charset=\"UTF-8\">
+                                <meta http-equiv=\"Cache-Control\" content=\"no-cache, no-store, must-revalidate\" />
+                                <meta http-equiv=\"Pragma\" content=\"no-cache\" />
+                                <meta http-equiv=\"Expires\" content=\"0\" />
+                                <title>跳转中</title>
+                            </head> 
+                            <body>
+                                <script>
+                                    window.location.href =\"{$origin_url}\";
+                                </script>
+                            </body>
                         </html>";
 
                 echo $html;
@@ -62,18 +65,19 @@ else
         Log::record("redirect url={$url}",Log::DEBUG);
         $html = "<!DOCTYPE html>
                         <html lang=\"en\">
-                        <head>
-                            <meta charset=\"UTF-8\">
-                            <title>跳转中</title>
-                        </head>
-                        <body>
-                        <script>
-                            window.location.href =\"{$url}\";
-                        </script>
-                        </body>
+                            <head>
+                                <meta charset=\"UTF-8\">
+                                <meta http-equiv=\"Cache-Control\" content=\"no-cache, no-store, must-revalidate\" />
+                                <meta http-equiv=\"Pragma\" content=\"no-cache\" />
+                                <meta http-equiv=\"Expires\" content=\"0\" />
+                                <title>跳转中</title>
+                            </head>                        
+                            <body>
+                                <script>
+                                    window.location.href =\"{$url}\";
+                                </script>
+                            </body>
                         </html>";
-
         echo $html;
-
     }
 }