Browse Source

实名认证的共用方法

lizhen_gitee 11 months ago
parent
commit
6979cdc3ca

+ 4 - 9
application/common/controller/Api.php

@@ -577,18 +577,13 @@ class Api
     //true  不需要实名认证,不受限
     //false 需要实名认证,受限
     protected function user_auth_limit(){
-        $user_auth_switch = config('site.user_auth_switch');
-        if($user_auth_switch != 1){
-            return true;  //没开,不受限
+
+        if($this->auth->idcard_status == 1){
+            return true; //已实名,不受限
         }else{
-            if($this->auth->idcard_status == 1){
-                return true; //已实名,不受限
-            }else{
-                return false;
-            }
+            return false;
         }
 
-        return false;
     }
 
 

+ 0 - 18
application/common/library/Auth.php

@@ -527,8 +527,6 @@ class Auth
         //用户权限
 //        $userinfo['power'] = Db::name('user_power')->where('user_id',$this->id)->find();
 
-        //用户受到实名限制,是否能主动发起聊天
-        //$userinfo['im_auth_limit'] = $this->im_auth_limit() ? 1 : 0;
 
         //追加一个钱包约
         $userinfo['wallet_gold'] = Db::name('user_wallet')->where('user_id',$this->id)->value('gold');
@@ -540,23 +538,7 @@ class Auth
         return $userinfo;
     }
 
-    //实名认证限制功能
-    //true  不需要实名认证,不受限
-    //false 需要实名认证,受限
-    private function im_auth_limit(){
-        $user_auth_switch = config('site.user_auth_switch');
-        if($user_auth_switch != 1){
-            return true;  //没开,不受限
-        }else{
-            if($this->idcard_status == 1){
-                return true; //已实名,不受限
-            }else{
-                return false;
-            }
-        }
 
-        return false;
-    }
 
     /**
      * 获取会员组别规则列表

+ 2 - 3
application/extra/site.php

@@ -47,8 +47,8 @@ return array (
     'custom' => '自定义',
   ),
   'gift_plat_scale' => '60',
-  'invitesite_activeinfo' => '好友充值1000金币可得350金币
-好友收益1000金币可得100金币',
+  'invitesite_activeinfo' => '好友充值1000金币可得400金币
+好友提现1000金币可得100金币',
   'introsite_introrule' => '通过海报分享或者链接分享方式注册用户,或直接通过用户绑定方式进行参与活动',
   'kefu_user_ids' => '536',
   'android_is_force' => '1',
@@ -70,7 +70,6 @@ return array (
 1、青少年模式开启后会立即生效,需要输入密码关闭青少年模式才能继续使用。
 2、青少年模式开启后,每次登录或重启应用均需要输入密码,关闭后才能正常使用APP。',
   'user_audit_switch' => '1',
-  'user_auth_switch' => '0',
   'fangzhapian' => '以下行为一经发现,平台将严肃处理 
 1、以交友/网恋等为由诱导发生任何形式的金钱来往
 2、添加联系方式后,线下要求转账/发红包/代付款等行为