Forráskód Böngészése

头像完整链接

dong025 1 hete
szülő
commit
b86c8a3835
1 módosított fájl, 10 hozzáadás és 8 törlés
  1. 10 8
      app/api/controller/GroupUser.php

+ 10 - 8
app/api/controller/GroupUser.php

@@ -95,8 +95,10 @@ class GroupUser extends Base
     //组员列表
     public function group_list(GroupUserModel $userModel)
     {
-        $todayTime = strtotime('today');
-        $list = $userModel->where('status', 'normal')->where('pid', $this->userinfo['id'])->where('createtime','>=', $todayTime)->select();
+        $list = $userModel->where('status', 'normal')->where('pid', $this->userinfo['id'])->select()->each(function ($item, $key) {
+                $item['avatar']=request()->domain().'/' . $item['avatar'];
+                return $item;
+            });;
         return $this->success('ok', $list);
     }
 
@@ -107,13 +109,13 @@ class GroupUser extends Base
         $param = $this->request->post();
         try {
             validate(UserValidate::class)->scene('add_group_user')->check($param);
-            $todayTime = strtotime('today');
+            // $todayTime = strtotime('today');
 
             //判断手机号和身份证号是否注册今天是否添加到该团队
             $where_item_id_card = [];
             $where_item_id_card[]=['pid', '=',$this->userinfo['id']];
             $where_item_id_card[]=['id_card', '=',$param['id_card']];
-            $where_item_id_card[]=['createtime', '>=',$todayTime];
+            // $where_item_id_card[]=['createtime', '>=',$todayTime];
             
             $group_user_data = $groupUserModel->where($where_item_id_card)->find();
             if(!empty($group_user_data)) return $this->error('该身份证号已添加',$param['id_card']);
@@ -121,7 +123,7 @@ class GroupUser extends Base
             $where_item_mobile = [];
             $where_item_mobile[]=['pid', '=',$this->userinfo['id']];
             $where_item_mobile[]=['mobile', '=',$param['mobile']];
-            $where_item_mobile[]=['createtime', '>=',$todayTime];
+            // $where_item_mobile[]=['createtime', '>=',$todayTime];
 
             $group_user_data = $groupUserModel->where($where_item_mobile)->find();
             if(!empty($group_user_data)) return $this->error('该手机号已添加');
@@ -177,14 +179,14 @@ class GroupUser extends Base
             $edit_data=$groupUserModel->find($param['id']);
             if($edit_data['pid']!=$this->userinfo['id']) return $this->error('无该用户');
             
-            $todayTime = strtotime('today');
+            // $todayTime = strtotime('today');
 
             //判断手机号和身份证号是否注册今天是否添加到该团队
             $where_item_id_card = [];
             $where_item_id_card[]=['id', '!=',$edit_data['id']];
             $where_item_id_card[]=['pid', '=',$this->userinfo['id']];
             $where_item_id_card[]=['id_card', '=',$param['id_card']];
-            $where_item_id_card[]=['createtime', '>=',$todayTime];
+            // $where_item_id_card[]=['createtime', '>=',$todayTime];
             
             $group_user_data = $groupUserModel->where($where_item_id_card)->find();
             if(!empty($group_user_data)) return $this->error('该身份证号已添加',$param['id_card']);
@@ -193,7 +195,7 @@ class GroupUser extends Base
             $where_item_mobile[]=['id', '!=',$edit_data['id']];
             $where_item_mobile[]=['pid', '=',$this->userinfo['id']];
             $where_item_mobile[]=['mobile', '=',$param['mobile']];
-            $where_item_mobile[]=['createtime', '>=',$todayTime];
+            // $where_item_mobile[]=['createtime', '>=',$todayTime];
 
             $group_user_data = $groupUserModel->where($where_item_mobile)->find();
             if(!empty($group_user_data)) return $this->error('该手机号已添加');