浏览代码

首页排除客服

lizhen_gitee 9 月之前
父节点
当前提交
7b512599a0
共有 3 个文件被更改,包括 22 次插入82 次删除
  1. 4 0
      application/admin/controller/Takecash.php
  2. 9 73
      application/api/controller/Index.php
  3. 9 9
      application/extra/site.php

+ 4 - 0
application/admin/controller/Takecash.php

@@ -96,6 +96,10 @@ class Takecash extends Backend
             ];
             Db::startTrans();
             $rs = Db::name('take_cash')->where('id',$id)->update($data);
+            if($rs === false){
+                Db::rollback();
+                $this->error('审核失败');
+            }
 
             if($status == 1){
                 //系统消息

+ 9 - 73
application/api/controller/Index.php

@@ -40,6 +40,13 @@ class Index extends Api
             $where['user.username|nickname'] = ['LILE','%'.$keyworld.'%'];
         }
 
+        //排除客服的
+        $where_kefu = [];
+        $kefu_ids = explode(',',config('site.kefu_user_ids'));
+        if(is_array($kefu_ids) && !empty($kefu_ids)){
+            $where_kefu['user.id'] = ['NOTIN',$kefu_ids];
+        }
+
         //排除黑名单的
         $where_black = [];
         $black_ids = Db::name('user_black')->where(['uid'=>$this->auth->id])->column('black_uid');
@@ -76,6 +83,7 @@ class Index extends Api
             ->join('charm_level charm','user.charm_level = charm.level','LEFT')
             ->where($where)
             ->where($where_black)
+            ->where($where_kefu)
             ->order('user.is_active desc,user.id desc')
             ->autopage()
             ->select();
@@ -99,79 +107,7 @@ class Index extends Api
 
     //新人
     public function xinren(){
-        $keyworld = input('keyworld','');
-
-        $where = [
-            'user.id' => ['neq',$this->auth->id],
-            'user.status' => 1,
-            'user.gender' => ['neq',$this->auth->gender],
-        ];
-
-        //女性强制实名,强制真人
-        if($this->auth->gender == 1 && config('site.index_women_auth_switch') == 1){
-            $where['user.idcard_status'] = 1;
-            $where['user.real_status'] = 1;
-        }
-
-        if(!empty($keyworld)){
-            $where['user.username|nickname'] = ['LILE','%'.$keyworld.'%'];
-        }
-
-        //排除黑名单的
-        $where_black = [];
-        $black_ids = Db::name('user_black')->where(['uid'=>$this->auth->id])->column('black_uid');
-        if(!empty($black_ids)){
-            $where_black['user.id'] = ['NOTIN',$black_ids];
-        }
-
-        $field = [
-            'user.id',
-            'user.username',
-            'user.nickname',
-            'user.avatar',
-            'user.idcard_status',
-            'user.real_status',
-            'user.photo_images',
-            'user.gender',
-            'user.birthday',
-            'user.is_active',
-            'user.bio',
-            'user.wealth_level',
-            'user.charm_level',
-
-            'wallet.vip_endtime',
-            'power.meili',
-            'power.caifu',
-
-            'wealth.image as wealth_image',
-            'charm.image  as charm_image',
-        ];
-        $list = Db::name('user')->alias('user')->field($field)
-            ->join('user_wallet wallet','user.id = wallet.user_id','LEFT')
-            ->join('user_power power','user.id = power.user_id','LEFT')
-            ->join('wealth_level wealth','user.wealth_level = wealth.level','LEFT')
-            ->join('charm_level charm','user.charm_level = charm.level','LEFT')
-            ->where($where)
-            ->where($where_black)
-            ->order('user.is_active desc,user.id desc')
-            ->autopage()
-            ->select();
-        $list = list_domain_image($list,['avatar','photo_images','wealth_image','charm_image']);
-        foreach($list as $key => &$val){
-            $val['age'] = birthtime_to_age($val['birthday']);
-            $val['is_vip'] = $val['vip_endtime'] > time() ? 1 : 0;
-
-            if($val['meili'] == 0){
-                $val['charm_level'] = '';
-                $val['charm_image'] = '';
-            }
-            if($val['caifu'] == 0){
-                $val['wealth_level'] = '';
-                $val['wealth_image'] = '';
-            }
-        }
-
-        $this->success(1,$list);
+        $this->jingxuan();
     }
 
     //首页搜索

+ 9 - 9
application/extra/site.php

@@ -48,7 +48,7 @@ return array (
   ),
   'gift_plat_scale' => '60',
   'invitesite_activeinfo' => '好友充值1000金币可得400金币
-好友提现1000金币可得100金币',
+好友提现1000金币可得200金币',
   'introsite_introrule' => '通过海报分享或者链接分享方式注册用户,或直接通过用户绑定方式进行参与活动',
   'kefu_user_ids' => '6070',
   'android_is_force' => '1',
@@ -94,7 +94,7 @@ return array (
 3、收益提现收取6.5%手续费',
   'tuiguang_rule' => '邀请推广须遵守法律法规,不得出现虚假 宣传、虚构事实、伪造信息、欺诈用户等 行为,否则平台将有权终止邀请推广资格 不予结算邀请推广费用。',
   'invite_recharge_rate' => '40',
-  'invite_takecash_rate' => '10',
+  'invite_takecash_rate' => '20',
   'recharge_b2a_rate' => '35',
   'recharge_c2a_rate' => '35',
   'shouyi_b2a_rate' => '45',
@@ -109,15 +109,15 @@ return array (
 2.不同等级可解锁不同权限',
   'apisite_switch' => '1',
   'apisite_notice' => '全站维护中!!',
-  'man_dashan_times' => '20',
-  'index_match_video_switch' => '1',
-  'index_match_audio_switch' => '1',
-  'man_reg_audio_sec' => '5',
-  'man_reg_video_sec' => '5',
-  'man_reg_typing_times' => '5',
+  'man_dashan_times' => '50',
+  'index_match_video_switch' => '0',
+  'index_match_audio_switch' => '0',
+  'man_reg_audio_sec' => '1',
+  'man_reg_video_sec' => '1',
+  'man_reg_typing_times' => '6',
   'match_bg_music' => '/uploads/20240408/1aa22b2ee9d21cbe84f4e4cbbe6d52af.mp3',
   'usersite_matchinfo_switch' => '1',
   'man_index_dashan_pushtimes' => '3',
   'woman_index_dashan_pushtimes' => '3',
-  'index_women_auth_switch' => '0',
+  'index_women_auth_switch' => '1',
 );