作者 lyh

gx

@@ -29,9 +29,8 @@ class ProjectUserController extends BaseController @@ -29,9 +29,8 @@ class ProjectUserController extends BaseController
29 * @time :2023/6/25 9:27 29 * @time :2023/6/25 9:27
30 */ 30 */
31 public function lists(){ 31 public function lists(){
32 - $filed = ['id','mobile','name','project_id','created_at','updated_at','image','operator_id'];  
33 $userModel = new UserModel(); 32 $userModel = new UserModel();
34 - $lists = $userModel->lists($this->map,$this->page,$this->row,$this->order,$filed); 33 + $lists = $userModel->lists($this->map,$this->page,$this->row,$this->order);
35 if(!empty($lists)){ 34 if(!empty($lists)){
36 foreach ($lists['list'] as $k => $v){ 35 foreach ($lists['list'] as $k => $v){
37 if($v['type'] == $this::TYPE_ONE){ 36 if($v['type'] == $this::TYPE_ONE){
@@ -48,10 +48,7 @@ class UserLogic extends BaseLogic @@ -48,10 +48,7 @@ class UserLogic extends BaseLogic
48 $this->param['create_id'] = $this->user['id']; 48 $this->param['create_id'] = $this->user['id'];
49 $this->param['operator_id'] = $this->user['id']; 49 $this->param['operator_id'] = $this->user['id'];
50 $this->param['project_id'] = $this->user['project_id']; 50 $this->param['project_id'] = $this->user['project_id'];
51 - //上传图片  
52 - if(isset($this->param['image'])){  
53 - $this->param['image'] = $this->upload();  
54 - } 51 + $this->param['type'] = 1;
55 //密码加密 52 //密码加密
56 $this->param['password'] = base64_encode(md5($this->param['password'])); 53 $this->param['password'] = base64_encode(md5($this->param['password']));
57 $rs = $this->model->add($this->param); 54 $rs = $this->model->add($this->param);
@@ -77,16 +74,9 @@ class UserLogic extends BaseLogic @@ -77,16 +74,9 @@ class UserLogic extends BaseLogic
77 if($info !== false){ 74 if($info !== false){
78 $this->fail('当前编辑的手机号码已存在'); 75 $this->fail('当前编辑的手机号码已存在');
79 } 76 }
  77 + $this->param['type'] = 1;
80 $this->param['operator_id'] = $this->user['id']; 78 $this->param['operator_id'] = $this->user['id'];
81 - try {  
82 - //上传图片  
83 - if(isset($this->param['image']) && is_file($this->param['image'])){  
84 - $this->param['image'] = $this->upload();  
85 - }  
86 - $this->edits($this->param);  
87 - }catch (\exception $e){  
88 - $this->fail('参数错误或其他服务器原因,编辑失败');  
89 - } 79 + $this->edits($this->param);
90 return $this->success(); 80 return $this->success();
91 } 81 }
92 82