lizhen_gitee hai 1 ano
pai
achega
505c8eb9fd

+ 1 - 2
application/admin/lang/zh-cn/user/user.php

@@ -8,8 +8,7 @@ return [
     'Introcode'              => '邀请码',
     'Password'               => '密码',
     'Salt'                   => '密码盐',
-    'Mobile'                 => '区号手机号',
-    'Simplemobile'           => '手机号',
+    'Mobile'                 => '手机号',
     'Avatar'                 => '头像',
     'Gender'                 => '性别',
     'Gender 1'               => '男',

+ 1 - 5
application/common/library/Auth.php

@@ -34,7 +34,6 @@ class Auth
         'intro_uid',
 
         'mobile',
-        'simplemobile',
         'avatar',
         'gender',
         'height',
@@ -556,10 +555,7 @@ class Auth
         //用户受到实名限制,是否能主动发起聊天
         $userinfo['im_auth_limit'] = $this->im_auth_limit() ? 1 : 0;
 
-        //mobile与simplemobile互换,方便前端
-        $userinfo['fullmobile'] = $userinfo['mobile'] ? '+'.$userinfo['mobile'] : '';
-        $userinfo['mobile']     = $userinfo['simplemobile'];
-        unset($userinfo['simplemobile']);
+
 
         return $userinfo;
     }

+ 6 - 0
application/extra/site.php

@@ -90,4 +90,10 @@ return array (
   'question_basedatakey' => 'question',
   'enumtag_max' => '18',
   'lianmeng_msg_uids' => '536',
+  'teenage_rule' => '模式限制:
+无法使用安心聊的所有功能
+
+使用方法:
+1、青少年模式开启后会立即生效,需要输入密码关闭青少年模式才能继续使用。
+2、青少年模式开启后,每次登录或重启应用均需要输入密码,关闭后才能正常使用APP。',
 );

+ 6 - 49
application/index/controller/Plantask.php

@@ -8,52 +8,8 @@ use think\Cache;
 
 class Plantask extends Controller
 {
-    //计划任务
-    //定时清除用户关系,拒绝的
-    public function auto_relation(){
 
-        //拒绝七天后,可再次申请
-        $lists = Db::name('user_relation')->where('status',2)->where('updatetime','lt',time()-604800)->delete();
-    }
-
-    //定时清除用户关系,过期的
-    public function auto_relation_guoqi(){
-        //24小时未处理,过期
-        Db::startTrans();
-
-        $lists = Db::name('user_relation')->where('status',0)->where('createtime','lt',time()-86400)->limit(10)->lock(true)->select();
-        if(empty($lists)){
-            Db::rollback();
-            echo 'empty';
-            exit;
-        }
-
-        foreach($lists as $key => $info){
 
-            //退回关系卡
-            $use_card = Db::name('user_decorate_relation')->where('user_id',$info['uid'])->where('is_using',1)->order('id desc')->find();
-            if($use_card){
-                $rs2 = Db::name('user_decorate_relation')->where('id',$use_card['id'])->update(['is_using'=>0,'updatetime'=>time()]);
-                if($rs2 === false){
-                    Db::rollback();
-                    echo '退回关系卡失败';
-                    exit;
-                }
-            }
-        }
-
-        $ids = array_column($lists,'id');
-        $rs = Db::name('user_relation')->where('id','IN',$ids)->delete();
-        if(!$rs){
-            Db::rollback();
-            echo '清除失败';
-            exit;
-        }
-
-        Db::commit();
-        echo '完成';
-
-    }
 
     //定时跑用户活跃,改成离线
     public function auto_user_active(){
@@ -64,15 +20,16 @@ class Plantask extends Controller
     }
 
     //vip过期的,三个隐私设置改成0
+    //vip过期的,更新用户表is_vip
     public function auto_vipend(){
         $sql = 'update `mt_user_power` set yinsi = 0,yinshen = 0,wuhen = 0 where user_id in (select user_id from mt_user_wallet where vip_endtime > 0 and vip_endtime < '.time().')';
         db()->query($sql);
-    }
 
-    //禁言到期的,自动解禁
-    public function auto_jinyan(){
-        $sql = 'update `mt_user` set jinyantype = 1,jinyantime = 0 where jinyantype = 2 and jinyantime < '.time().'';
-        db()->query($sql);
+        $sql2 = 'update `mt_user` set is_vip = 0 where is_vip = 1 and user_id in (select user_id from mt_user_wallet where vip_endtime > 0 and vip_endtime < '.time().')';
+        db()->query($sql2);
     }
 
+
+
+
 }