Browse Source

删除无用的字段和方法

lizhen_gitee 3 months ago
parent
commit
6be6ca4f0e

+ 3 - 3
application/admin/lang/zh-cn/agent/user.php

@@ -31,8 +31,8 @@ return [
     'Idcard_status 0'     => '待审核',
     'Idcard_status 1'     => '审核通过',
     'Idcard_status 2'     => '审核驳回',
-    'Successions'         => '连续登录天数',
-    'Maxsuccessions'      => '最大连续登录天数',
+//    'Successions'         => '连续登录天数',
+//    'Maxsuccessions'      => '最大连续登录天数',
     'Prevtime'            => '上次登录时间',
     'Logintime'           => '登录时间',
     'Loginip'             => '登录IP',
@@ -46,7 +46,7 @@ return [
     'Status 1'            => '正常',
     'Status 0'            => '禁用',
     'Status -1'           => '注销',
-    'Verification'        => '验证',
+//    'Verification'        => '验证',
     'Longitude'           => '经度',
     'Latitude'            => '纬度',
     'Cityname'            => '即时城市名',

+ 20 - 20
application/admin/lang/zh-cn/ghuser.php

@@ -30,8 +30,8 @@ return [
     'Idcard_status 0'       => '待审核',
     'Idcard_status 1'       => '审核通过',
     'Idcard_status 2'       => '审核驳回',
-    'Successions'           => '连续登录天数',
-    'Maxsuccessions'        => '最大连续登录天数',
+//    'Successions'           => '连续登录天数',
+//    'Maxsuccessions'        => '最大连续登录天数',
     'Prevtime'              => '上次登录时间',
     'Logintime'             => '登录时间',
     'Loginip'               => '登录IP',
@@ -45,7 +45,7 @@ return [
     'Status 1'              => '正常',
     'Status 0'              => '禁用',
     'Status -1'             => '注销',
-    'Verification'          => '验证',
+//    'Verification'          => '验证',
     'Longitude'             => '经度',
     'Latitude'              => '纬度',
     'Cityname'              => '即时城市名',
@@ -78,34 +78,34 @@ return [
     'Hide_is_finishinfo'    => '是否完善资料',
     'Hide_is_finishinfo 1'  => '是',
     'Hide_is_finishinfo 0'  => '否',
-    'Guild_id'              => '语聊公会id',
+   /* 'Guild_id'              => '语聊公会id',
     'Is_guild'              => '公会认证是否通过',
     'Is_guild 1'            => '待审核',
     'Is_guild 0'            => '未申请',
     'Is_guild -1'           => '未通过',
     'Is_guild 2'            => '已通过',
-    'Is_guild 3'            => '已开通',
-    'Noble'                 => '贵族等级',
-    'Level'                 => '等级',
-    'Is_online'             => '是否在线',
-    'Is_online 1'           => '在线',
-    'Is_online 0'           => '离线',
-    'Onlinetime'            => '最近一次上线时间',
-    'Is_livebc'             => '是否在直播',
-    'Is_livebc 1'           => '是',
-    'Is_livebc 0'           => '否',
+    'Is_guild 3'            => '已开通',*/
+//    'Noble'                 => '贵族等级',
+//    'Level'                 => '等级',
+//    'Is_online'             => '是否在线',
+//    'Is_online 1'           => '在线',
+//    'Is_online 0'           => '离线',
+//    'Onlinetime'            => '最近一次上线时间',
+//    'Is_livebc'             => '是否在直播',
+//    'Is_livebc 1'           => '是',
+//    'Is_livebc 0'           => '否',
     'Wechat_openid'         => '微信openid',
     'Register_from'         => '注册来源',
     'Is_active'             => '是否活跃',
     'Is_active 1'           => '是',
     'Is_active 0'           => '否',
     'Active_time'           => '最新活跃时间',
-    'Wechat_account'        => '微信账号',
-    'Secretvideo_status'    => '私密视频审核状态',
-    'Secretvideo_status -1' => '未申请',
-    'Secretvideo_status 0'  => '待审核',
-    'Secretvideo_status 1'  => '审核通过',
-    'Secretvideo_status 2'  => '审核驳回',
+//    'Wechat_account'        => '微信账号',
+//    'Secretvideo_status'    => '私密视频审核状态',
+//    'Secretvideo_status -1' => '未申请',
+//    'Secretvideo_status 0'  => '待审核',
+//    'Secretvideo_status 1'  => '审核通过',
+//    'Secretvideo_status 2'  => '审核驳回',
     'Gonghui.name'          => '公会名称',
     'revenue_today'         => '今日总收益',
     'revenue_yesterday'     => '昨日总收益',

+ 3 - 3
application/admin/lang/zh-cn/user/user.php

@@ -31,8 +31,8 @@ return [
     'Idcard_status 0'     => '待审核',
     'Idcard_status 1'     => '审核通过',
     'Idcard_status 2'     => '审核驳回',
-    'Successions'         => '连续登录天数',
-    'Maxsuccessions'      => '最大连续登录天数',
+//    'Successions'         => '连续登录天数',
+//    'Maxsuccessions'      => '最大连续登录天数',
     'Prevtime'            => '上次登录时间',
     'Logintime'           => '登录时间',
     'Loginip'             => '登录IP',
@@ -47,7 +47,7 @@ return [
     'Status 0'            => '禁用',
     'Status -1'           => '注销',
     'Status 2'            => '隐藏',
-    'Verification'        => '验证',
+//    'Verification'        => '验证',
     'Longitude'           => '经度',
     'Latitude'            => '纬度',
     'Cityname'            => '即时城市名',

+ 15 - 15
application/admin/model/Ghuser.php

@@ -39,13 +39,13 @@ class Ghuser extends Model
         'free_audio_text',
         'free_typing_text',
         'hide_is_finishinfo_text',
-        'is_guild_text',
-        'is_online_text',
-        'onlinetime_text',
-        'is_livebc_text',
+//        'is_guild_text',
+//        'is_online_text',
+//        'onlinetime_text',
+//        'is_livebc_text',
         'is_active_text',
         'active_time_text',
-        'secretvideo_status_text'
+//        'secretvideo_status_text'
     ];
     
 
@@ -115,20 +115,20 @@ class Ghuser extends Model
         return ['1' => __('Is_online 1'), '0' => __('Is_online 0')];
     }
 
-    public function getIsLivebcList()
+    /*public function getIsLivebcList()
     {
         return ['1' => __('Is_livebc 1'), '0' => __('Is_livebc 0')];
-    }
+    }*/
 
     public function getIsActiveList()
     {
         return ['1' => __('Is_active 1'), '0' => __('Is_active 0')];
     }
 
-    public function getSecretvideoStatusList()
+   /* public function getSecretvideoStatusList()
     {
         return ['-1' => __('Secretvideo_status -1'), '0' => __('Secretvideo_status 0'), '1' => __('Secretvideo_status 1'), '2' => __('Secretvideo_status 2')];
-    }
+    }*/
 
 
     public function getRealStatusTextAttr($value, $data)
@@ -256,19 +256,19 @@ class Ghuser extends Model
     }
 
 
-    public function getOnlinetimeTextAttr($value, $data)
+    /*public function getOnlinetimeTextAttr($value, $data)
     {
         $value = $value ? $value : (isset($data['onlinetime']) ? $data['onlinetime'] : '');
         return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
-    }
+    }*/
 
 
-    public function getIsLivebcTextAttr($value, $data)
+    /*public function getIsLivebcTextAttr($value, $data)
     {
         $value = $value ? $value : (isset($data['is_livebc']) ? $data['is_livebc'] : '');
         $list = $this->getIsLivebcList();
         return isset($list[$value]) ? $list[$value] : '';
-    }
+    }*/
 
 
     public function getIsActiveTextAttr($value, $data)
@@ -286,12 +286,12 @@ class Ghuser extends Model
     }
 
 
-    public function getSecretvideoStatusTextAttr($value, $data)
+   /* public function getSecretvideoStatusTextAttr($value, $data)
     {
         $value = $value ? $value : (isset($data['secretvideo_status']) ? $data['secretvideo_status'] : '');
         $list = $this->getSecretvideoStatusList();
         return isset($list[$value]) ? $list[$value] : '';
-    }
+    }*/
 
     protected function setPrevtimeAttr($value)
     {

+ 0 - 51
application/api/controller/Index.php

@@ -45,7 +45,6 @@ class Index extends Api
 //            'user.cityname' => $this->auth->cityname,
 //            'user.longitude' => ['between',[$this->auth->longitude - 0.1,$this->auth->longitude + 0.1]],
 //            'user.latitude' => ['between',[$this->auth->latitude - 0.1,$this->auth->latitude + 0.1]],
-//            'user.is_online|user.is_livebc' => 1, //完全不考虑直播与语聊的权重,只用活跃做排序
         ];
 
         //排序
@@ -342,56 +341,6 @@ class Index extends Api
 
 
 
-    /**
-     * 首页搜索
-     */
-    public function searchUsers() {
-        $search = $this->request->request("search"); //关键词筛选
-        if(!$search) {
-            $this->error("请输入搜索内容!");
-        }
-        // 搜索派对
-        global $whereOr;
-        $where = [];
-        $whereOr["party_id"] = $search;
-        $whereOr["party_name"] = ["like","%$search%"];
-        $where["room_type"] = 1;
-        $partyList = \app\common\model\Party::field("id,party_logo,party_id,party_name")
-            ->where($where)
-            ->where(function ($query) {
-                global $whereOr;
-                $query->whereOr($whereOr);
-            })->order("party_hot","desc")->select();
-
-
-        // 搜索直播间
-        global $whereOrlive;
-        $where = [];
-        $whereOrlive["party_id"] = $search;
-        $whereOrlive["party_name"] = ["like","%$search%"];
-        $where["room_type"] = 2;
-        $liveList = \app\common\model\Party::field("id,party_logo,party_id,party_name")
-            ->where($where)
-            ->where(function ($query) {
-                global $whereOrlive;
-                $query->whereOr($whereOrlive);
-            })
-            ->order("party_hot","desc")->select();
-        // 相关用户
-        $where = [];
-        $where["a.nickname"] = ["like","%$search%"];
-        $where["a.u_id"] = $search;
-        $userList = \app\common\model\User::alias("a")->field("id,avatar,nickname,u_id,f.fans")
-            ->join("hx_view_fans f","f.user_id = a.id","left")
-            ->order("a.is_online,a.noble,a.level")
-            ->whereOr($where)->select();
-        $res = [];
-        $res["partylist"] = $partyList;
-        $res["livelist"] = $liveList;
-        $res["userlist"] = $userList;
-
-        $this->success("获取成功!",$res);
-    }
 
     /**
      * 获取下载二维码和邀请码

+ 13 - 216
application/api/controller/Tenim.php

@@ -460,117 +460,9 @@ exit;
     }
 
 
-    /**
-     * 强制下麦
-     */
-    public function updateSiteInfo() {
-        $user_id = $this->request->request("user_id");// 用户ID
-        if(!$user_id) $this->error("参数缺失!");
-
-        // 更新用户在线状态为离线
-        \app\common\model\User::update(["is_online"=>0],["id"=>$user_id]);
-//        \app\common\model\User::update(["is_live"=>0],["id"=>$user_id]);
-        \app\common\model\Party::update(["is_online"=>0],["user_id"=>$user_id]);
-
-        // 获取用户所在群信息
-        $groupids = $this->getJoindGroupList($user_id);
-
-        if($groupids["ErrorCode"] == 0) {
-            $grouplist = $groupids["GroupIdList"];
-            $groupsites = [];
-            if($grouplist) foreach($grouplist as $k => $v) {
-                // 获取群组消息
-                $groupInfo = $this->getGroupInfo($v["GroupId"]);
-
-                if($groupInfo["ErrorCode"] == 0) $groupsites[] = $groupInfo["GroupInfo"][0];
-
-                // 踢出用户在线组
-                RedisUtil::getInstance('online',$v["GroupId"])->HDel($user_id);
-            }
-            // 强制下麦
-            $this->downSite($user_id,$groupsites);
-        }
-
-        $this->success("状态更新成功!");
-
-    }
-
-    /**
-     * 更新麦位前四
-     */
-    public function updatePosition($user_id,$party_id) {
-        // 获取用户头像
-        $userInfo = \app\common\model\User::field("avatar")->where(["id"=>$user_id])->find();
-        $userAvatar = isset($userInfo["avatar"])?$userInfo["avatar"]:"";
-
-        $redisData = RedisUtil::getInstance('party',$party_id)->get();
-        if(!$redisData) {
-            return true;
-        }
-        $partyInfo = json_decode($redisData,true);
-
-        // 遍历已有头像
-        $partyuser = isset($partyInfo["party_user"])?$partyInfo["party_user"]:"";
-        if(is_array($partyuser)) foreach($partyuser as $k => $v) if($v === $userAvatar) unset($partyInfo["party_user"][$k]);
-
-        RedisUtil::getInstance('party',$party_id)->set(json_encode($partyInfo));
-    }
-
 
-    /**
-     * 取消排麦
-     */
-    public function cancelLineUp($user_id,$party_id) {
-        if (!$party_id || !$user_id) {
-            return false;
-        }
-        $data=unserialize(RedisUtil::getInstance('party_lineup')->hGet($party_id));
-        // 更改红点排麦数量
-        $num = 0;
-        $send = false;
-        if($data) foreach($data as $k => $v) {
-            if($v["user_id"] == $user_id) {
-                $send = true;
-                unset($data[$k]);
-                break;
-            }
-        }
-        RedisUtil::getInstance('party_lineup')->hSet($party_id,serialize($data));
-
-        if($send) {
-            is_array($data) &&  $num = count($data);
-
-            $random = rand(10000000,99999999);
-            $usersig = $this->usersig("administrator");
-            // 获取配置信息
-            $config = config("tencent_im");
-            $url = "https://console.tim.qq.com/v4/group_open_http_svc/send_group_msg";
-            $url .= "?sdkappid=".$config["sdkappid"];
-            $url .= "&identifier=administrator";
-            $url .= "&usersig=".$usersig;
-            $url .= "&random=".$random;
-            $url .= "&contenttype=json";
-            $tencentObj = new tencentim($url);
 
-            $data = [];
-            $data["GroupId"] = $party_id;
-            $data["Random"] = rand(1000000,9999999);
-            $message = [
-                "message" => json_encode(["type"=>23,"content"=>$num]),
-                "version" => "1.0",
-                "action" => 301,
-                "command" => ""
-            ];
-            $data["MsgBody"][] = [
-                "MsgType" => "TIMCustomElem",
-                "MsgContent" => [
-                    "Data"=> json_encode($message)
-                ],
-            ];
-            $tencentObj->toSend($data);
-        }
 
-    }
 
     //trtc_callback,直播callback
     //https://cloud.tencent.com/document/product/647/51586#eventId
@@ -661,28 +553,7 @@ exit;
                 // 记录在线用户在房间情况
                 RedisUtil::getInstance('livingUser')->hSet($userId,$roomId);
 
-                // 更新房间在线状态
-                $partyInfo = $redis->get("party_" . $roomId);
-                if ($partyInfo) {
-                    $partyInfo = json_decode($partyInfo, true);
-                    if ($partyInfo["is_online"] != 1) {
-                        $partyInfo["is_online"] = 1;
-                        $redis->set("party_" . $roomId, json_encode($partyInfo));
-                        \app\common\model\Party::update(["is_online" => 1], ["id" => $roomId]);
-                    }
-                }
 
-                // 更新房间在线状态
-                $liveInfo = $redis->get("livebc_" . $roomId);
-                if ($liveInfo) {
-                    $liveInfo = json_decode($liveInfo, true);
-                    if ($input['EventInfo']['Role'] == 20) {
-                        $liveInfo["is_online"] = 1;
-                        $redis->set("livebc_" . $roomId, json_encode($liveInfo));
-                        \app\common\model\Party::update(["is_online" => 1], ["id" => $roomId]);
-                        $rs_user = Db::name('user')->where('id',$userId)->update(['is_livebc'=>1]);
-                    }
-                }
 
             }elseif($input['EventType'] == 104){
                 //退出房间,主播role=20 观众role=21
@@ -692,28 +563,7 @@ exit;
                 // 扣除在线用户在房间情况
                 RedisUtil::getInstance('livingUser')->hDel($userId);
 
-                // 更新房间在线状态
-                $partyInfo = RedisUtil::getInstance('party',$roomId)->get();
-                if ($partyInfo) {
-                    $partyInfo = json_decode($partyInfo, true);
-                    $memCount = count(RedisUtil::getInstance('online',$roomId)->hGetAll());
-                    if ($memCount <= 0) {
-                        $partyInfo["is_online"] = 0;
-                        RedisUtil::getInstance('party',$roomId)->set(json_encode($partyInfo));
-                        \app\common\model\Party::update(["is_online" => 0], ["id" => $roomId]);
-                    }
-                }
-                //
-                $liveInfo = RedisUtil::getInstance('livebc',$roomId)->get();
-                if ($liveInfo) {
-                    $liveInfo = json_decode($liveInfo, true);
-                    if($input['EventInfo']['Role'] == 20){
-                        $liveInfo["is_online"] = 0;
-                        RedisUtil::getInstance('livebc',$roomId)->set(json_encode($liveInfo));
-                        \app\common\model\Party::update(["is_online" => 0], ["id" => $roomId]);
-                        $rs_user = Db::name('user')->where('id',$userId)->update(['is_livebc'=>0]);
-                    }
-                }
+
 
             }
         }elseif($input['EventGroupId'] == 2){
@@ -738,12 +588,12 @@ exit;
             case 'State.StateChange': // 用户在线状态变更
                 $info = $input["Info"];
                 if($info["Action"] == "Login") { // 用户登录
-                    $loginToday = Db::name('user')->where('id',$info["To_Account"])->whereTime('onlinetime', 'today')->find();
+                    /*$loginToday = Db::name('user')->where('id',$info["To_Account"])->whereTime('onlinetime', 'today')->find();
                     if ($loginToday){
                         \app\common\model\User::update(["is_online"=>1,"onlinetime"=>time()],["id"=>$info["To_Account"]]);
                     }else{
                         \app\common\model\User::update(["is_online"=>1,"onlinetime"=>time()],["id"=>$info["To_Account"]]);
-                    }
+                    }*/
 
                     $res = [];
                     $res["ActionStatus"] = "OK";
@@ -752,73 +602,20 @@ exit;
                     echo json_encode($res);exit;
                 } elseif($info["Action"] == "Logout" || $info["Action"] == "Disconnect") { // 用户退出 不需要管什么原因
                     // 更新用户在线状态为离线
-                    $updateData['is_online'] = 0;
-                    $user = Db::name('user')->where('id',$info["To_Account"])->find();
-                    if (!empty($user)) {
-                        // 客户觉得实时判断导致在线用户数量过少,此处,不再根据IM处理用户在线状态,已在API父类中做接口访问频率处理用户在线状态
-                        // if ($user['gender'] == 1) {
-                        //     $updateData['is_active'] = 0;
-                        // }
-                    }
-                    \app\common\model\User::update($updateData,["id"=>$info["To_Account"]]);
+//                    $updateData['is_online'] = 0;
+//                    $user = Db::name('user')->where('id',$info["To_Account"])->find();
+//                    if (!empty($user)) {
+//                        // 客户觉得实时判断导致在线用户数量过少,此处,不再根据IM处理用户在线状态,已在API父类中做接口访问频率处理用户在线状态
+//                        // if ($user['gender'] == 1) {
+//                        //     $updateData['is_active'] = 0;
+//                        // }
+//                    }
+//                    \app\common\model\User::update($updateData,["id"=>$info["To_Account"]]);
                     //\app\common\model\User::update(["is_live"=>0],["id"=>$info["To_Account"]]);
 
-                    // 获取用户在派对直播间情况信息
-                    $livingUserPartyId = RedisUtil::getInstance('livingUser')->hGet($info["To_Account"]);
-                    if ($livingUserPartyId) {
-                        // 扣除在线用户在房间情况
-                        RedisUtil::getInstance('livingUser')->hDel( $info["To_Account"]);
-                        RedisUtil::getInstance('online',$livingUserPartyId)->HDel($info["To_Account"]);
-                    }
 
-                    // 获取用户所在群信息
-                    $groupids = $this->getJoindGroupList($info["To_Account"]);
-//                    \app\common\model\Test::update(["content"=>json_encode($groupids)],["id"=>1]);
-                    if($groupids["ErrorCode"] == 0) {
-                        $grouplist = $groupids["GroupIdList"];
-                        $groupsites = [];
-                        if($grouplist) foreach($grouplist as $k => $v) {
-                            // 获取群组消息
-                            $groupInfo = $this->getGroupInfo($v["GroupId"]);
-
-                            if($groupInfo["ErrorCode"] == 0) $groupsites[] = $groupInfo["GroupInfo"][0];
-
-                            // 踢出用户在线组
-                            RedisUtil::getInstance('online',$v["GroupId"])->HDel($info["To_Account"]);
-
-                            // 更新麦位前四
-                            $this->updatePosition($info["To_Account"],$v["GroupId"]);
-
-                            // 取消排麦
-                            $this->cancelLineup($info["To_Account"],$v["GroupId"]);
-
-                            // 房间状态变更
-                            $partyInfo = RedisUtil::getInstance('party',$v["GroupId"])->get();
-                            if($partyInfo) {
-                                $partyInfo = json_decode($partyInfo,true);
-                                $memCount = count(RedisUtil::getInstance('online',$v["GroupId"])->hGetAll());
-                                if($memCount <= 0) {
-                                    $partyInfo["is_online"] = 0;
-                                    RedisUtil::getInstance('party',$v["GroupId"])->set(json_encode($partyInfo));
-                                    \app\common\model\Party::update(["is_online"=>0],["id"=>$v["GroupId"]]);
-                                }
-                            }
-
-                            $liveInfo = RedisUtil::getInstance('live',$v["GroupId"])->get();
-                            if($liveInfo) {
-                                $liveInfo = json_decode($liveInfo,true);
-                                $memCount = count(RedisUtil::getInstance('online',$v["GroupId"])->hGetAll());
-                                if($memCount <= 0) {
-                                    $liveInfo["is_online"] = 0;
-                                    RedisUtil::getInstance('live',$v["GroupId"])->set(json_encode($liveInfo));
-                                    \app\common\model\Party::update(["is_online"=>0],["id"=>$v["GroupId"]]);
-                                }
-                            }
-                        }
-                        // 强制下麦
-                        print_r($this->downSite($info["To_Account"],$groupsites));
 
-                    }
+
 
                 }
                 break;

+ 36 - 32
application/api/controller/User.php

@@ -206,6 +206,17 @@ class User extends Api
         }
     }
 
+
+    //用户详细资料
+    public function userInfo($type = 1){
+        $info = $this->auth->getUserinfo();
+        if($type == 'return'){
+            return $info;
+        }
+        $this->success(__('success'),$info);
+    }
+
+
     /**
      * 修改会员个人信息
      *
@@ -217,7 +228,7 @@ class User extends Api
      */
     public function profile()
     {
-        $field_array = ['nickname','introcode','gender','birthday','height','weight','bio','audio_bio','avatar','photo_images','education','hobby','job','marital','tag','wages','hometown_cityid','hide_is_finishinfo','wechat_account','character','constellation','stature','is_appointment', 'greet_voice', 'greet_chat', 'is_cohabit', 'live', 'is_house', 'car', 'chest', 'waist'];
+        $field_array = ['nickname','introcode','gender','birthday','height','weight','bio','audio_bio','avatar','photo_images','education','hobby','job','marital','tag','wages','hometown_cityid','hide_is_finishinfo',/*'wechat_account',*/'character','constellation','stature','is_appointment', 'greet_voice', 'greet_chat', 'is_cohabit', 'live', 'is_house', 'car', 'chest', 'waist'];
 
         $data = [];
         foreach($field_array as $key => $field){
@@ -359,6 +370,28 @@ class User extends Api
 
 
     /**
+     * 退出登录
+     * @ApiMethod (POST)
+     */
+    public function logout()
+    {
+        if (!$this->request->isPost()) {
+            $this->error(__('Invalid parameters'));
+        }
+        //退出im
+        $tenIm = new Tenim();
+        $tenIm->loginoutim($this->auth->id);
+
+        //修改用户活跃0
+        Db::name('user')->where('id',$this->auth->id)->update(['is_active' => 0]);
+
+        $this->auth->logout();
+        $this->success(__('Logout successful'));
+    }
+
+
+
+    /**
      * 手机验证码验证
      *
      * @ApiMethod (POST)
@@ -603,15 +636,6 @@ class User extends Api
         }
     }*/
 
-    //用户详细资料
-    public function userInfo($type = 1){
-        $info = $this->auth->getUserinfo();
-        if($type == 'return'){
-            return $info;
-        }
-        $this->success(__('success'),$info);
-    }
-
 
     //微信登录,预先假注册
     /*public function wechatlogin(){
@@ -881,26 +905,6 @@ class User extends Api
 
 
 
-    /**
-     * 退出登录
-     * @ApiMethod (POST)
-     */
-    public function logout()
-    {
-        if (!$this->request->isPost()) {
-            $this->error(__('Invalid parameters'));
-        }
-        //退出im
-        $tenIm = new Tenim();
-        $tenIm->loginoutim($this->auth->id);
-
-        //修改用户活跃0
-        Db::name('user')->where('id',$this->auth->id)->update(['is_active' => 0]);
-
-        $this->auth->logout();
-        $this->success(__('Logout successful'));
-    }
-
 
 
     /*
@@ -957,9 +961,9 @@ class User extends Api
         if (!$result) {
             $this->error(__('Captcha is incorrect'));
         }
-        $verification = $user->verification;
+        /*$verification = $user->verification;
         $verification->mobile = 1;
-        $user->verification = $verification;
+        $user->verification = $verification;*/
         $user->mobile = $mobile;
         $user->save();
 

+ 2 - 2
application/api/controller/Usercenter.php

@@ -47,8 +47,8 @@ class Usercenter extends Api
         'wages',
 
         'hometown_cityid',
-        'wechat_account',
-        'secretvideo_status',
+//        'wechat_account',
+//        'secretvideo_status',
 
         'character',
         'constellation',

+ 6 - 9
application/common/library/Auth.php

@@ -64,10 +64,10 @@ class Auth
 
         'hometown_cityid',
         'hide_is_finishinfo',
-        'level',
+//        'level',
         'wechat_openid',
-        'wechat_account',
-        'secretvideo_status',
+//        'wechat_account',
+//        'secretvideo_status',
 
         'character',
         'constellation',
@@ -609,10 +609,10 @@ class Auth
                 $time = time();
 
                 //判断连续登录和最大连续登录
-                if ($user->logintime < \fast\Date::unixtime('day')) {
+                /*if ($user->logintime < \fast\Date::unixtime('day')) {
                     $user->successions = $user->logintime < \fast\Date::unixtime('day', -1) ? 1 : $user->successions + 1;
                     $user->maxsuccessions = max($user->successions, $user->maxsuccessions);
-                }
+                }*/
 
                 $user->prevtime = $user->logintime;
                 //记录本次登录的IP和时间
@@ -709,13 +709,10 @@ class Auth
         //
         $userinfo = info_domain_image($userinfo,['avatar','photo_images']);
 
-        $idcard_confirm = Db::name('user_idconfirm')->where('user_id',$this->id)->find();
 
         $new_data = [
             'setpassword'    => !empty($this->password) ? 1 : 0,
             'age'            => birthtime_to_age($this->birthday),
-            'truename'       => ($this->idcard_status == 1 && isset($idcard_confirm['truename'])) ? $idcard_confirm['truename'] : '',
-            'alipay_account' => ($this->idcard_status == 1 && isset($idcard_confirm['alipay_account'])) ? $idcard_confirm['alipay_account'] : '',
         ];
 
         $userinfo = array_merge($userinfo,$new_data);
@@ -758,7 +755,7 @@ class Auth
         if ($userinfo['gender'] != -1) {
             $userinfo['info_completion'] = 10;
         }
-        $field_array = ['avatar','nickname',/*'gender',*/'birthday','constellation_id','bio','audio_bio','photo_images','hometown_cityid','job','education','wages','character','stature','weight','height','marital',/*'is_appointment',*/'hobby','tag'];
+        $field_array = ['avatar','nickname',/*'gender',*/'birthday','constellation','bio','audio_bio','photo_images','hometown_cityid','job','education','wages','character','stature','weight','height','marital',/*'is_appointment',*/'hobby','tag'];
         foreach ($field_array as &$v) {
             if ($userinfo[$v]) {
                 $userinfo['info_completion'] += 5;

+ 10 - 10
application/common/model/User.php

@@ -62,23 +62,23 @@ class User extends Model
      * @param array  $data
      * @return  object
      */
-    public function getVerificationAttr($value, $data)
+   /* public function getVerificationAttr($value, $data)
     {
         $value = array_filter((array)json_decode($value, true));
         $value = array_merge(['email' => 0, 'mobile' => 0], $value);
         return (object)$value;
-    }
+    }*/
 
     /**
      * 设置验证字段
      * @param mixed $value
      * @return string
      */
-    public function setVerificationAttr($value)
+   /* public function setVerificationAttr($value)
     {
         $value = is_object($value) || is_array($value) ? json_encode($value) : $value;
         return $value;
-    }
+    }*/
 
     /**
      * 变更会员余额
@@ -86,7 +86,7 @@ class User extends Model
      * @param int    $user_id 会员ID
      * @param string $memo    备注
      */
-    public static function money($money, $user_id, $memo)
+    /*public static function money($money, $user_id, $memo)
     {
         Db::startTrans();
         try {
@@ -104,7 +104,7 @@ class User extends Model
         } catch (\Exception $e) {
             Db::rollback();
         }
-    }
+    }*/
 
     /**
      * 变更会员积分
@@ -112,7 +112,7 @@ class User extends Model
      * @param int    $user_id 会员ID
      * @param string $memo    备注
      */
-    public static function score($score, $user_id, $memo)
+    /*public static function score($score, $user_id, $memo)
     {
         Db::startTrans();
         try {
@@ -130,14 +130,14 @@ class User extends Model
         } catch (\Exception $e) {
             Db::rollback();
         }
-    }
+    }*/
 
     /**
      * 根据积分获取等级
      * @param int $score 积分
      * @return int
      */
-    public static function nextlevel($score = 0)
+    /*public static function nextlevel($score = 0)
     {
         $lv = array(1 => 0, 2 => 30, 3 => 100, 4 => 500, 5 => 1000, 6 => 2000, 7 => 3000, 8 => 5000, 9 => 8000, 10 => 10000);
         $level = 1;
@@ -147,7 +147,7 @@ class User extends Model
             }
         }
         return $level;
-    }
+    }*/
 
     /**
      * 根据排行信息获取用户信息

+ 2 - 2
application/index/lang/zh-cn/user.php

@@ -12,8 +12,8 @@ return [
     'Score'                                      => '积分',
     'Day'                                        => '天',
     'Intro'                                      => '个人介绍',
-    'Successions'                                => '连续登录',
-    'Maxsuccessions'                             => '最长连续登录',
+//    'Successions'                                => '连续登录',
+//    'Maxsuccessions'                             => '最长连续登录',
     'Logintime'                                  => '登录时间',
     'Prevtime'                                   => '最后登录',
     'Change'                                     => '修改',

+ 2 - 2
public/assets/js/backend/ghuser.js

@@ -95,8 +95,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'register_from', title: __('Register_from'), operate: 'LIKE'},
 //                        {field: 'is_active', title: __('Is_active'), searchList: {"1":__('Is_active 1'),"0":__('Is_active 0')}, formatter: Table.api.formatter.normal},
 //                        {field: 'active_time', title: __('Active_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
-                        {field: 'wechat_account', title: __('Wechat_account'), operate: 'LIKE'},
-                        {field: 'secretvideo_status', title: __('Secretvideo_status'), searchList: {"-1":__('Secretvideo_status -1'),"0":__('Secretvideo_status 0'),"1":__('Secretvideo_status 1'),"2":__('Secretvideo_status 2')}, formatter: Table.api.formatter.status},
+//                        {field: 'wechat_account', title: __('Wechat_account'), operate: 'LIKE'},
+//                        {field: 'secretvideo_status', title: __('Secretvideo_status'), searchList: {"-1":__('Secretvideo_status -1'),"0":__('Secretvideo_status 0'),"1":__('Secretvideo_status 1'),"2":__('Secretvideo_status 2')}, formatter: Table.api.formatter.status},
                         {field: 'profit', title: '累计收益', operate: false},
                         {field: 'operate', title: __('Operate'), table: table,
                             buttons:[