|
@@ -17,7 +17,7 @@ class Worker extends Apic
|
|
|
|
|
|
public function index(){
|
|
|
$list = Db::name($this->table)->where('company_id',$this->auth->company_id)->where('deletetime',NULL)->order('id desc')->select();
|
|
|
- $list = list_domain_image($list,['avatar']);
|
|
|
+ $list = list_domain_image($list,['avatar','idcard_z_image','idcard_f_image','jineng_image']);
|
|
|
|
|
|
$this->success(1,$list);
|
|
|
}
|
|
@@ -38,7 +38,11 @@ class Worker extends Apic
|
|
|
'gonghao' => input('gonghao',''),
|
|
|
'mobile' => $mobile,
|
|
|
'password' => input('password',''),
|
|
|
- 'company_id' => $this->auth->company_id,
|
|
|
+ 'company_id' => $this->auth->company_id,
|
|
|
+ 'status' => input('status',1),
|
|
|
+ 'idcard_z_image' => input('idcard_z_image',''),
|
|
|
+ 'idcard_f_image' => input('idcard_f_image',''),
|
|
|
+ 'jineng_image' => input('jineng_image',''),
|
|
|
];
|
|
|
|
|
|
Db::name($this->table)->insertGetId($data);
|
|
@@ -49,7 +53,7 @@ class Worker extends Apic
|
|
|
public function info(){
|
|
|
$id = input('id',0);
|
|
|
$info = Db::name($this->table)->where('id',$id)->where('company_id',$this->auth->company_id)->where('deletetime',NULL)->find();
|
|
|
- $info = info_domain_image($info,['avatar']);
|
|
|
+ $info = info_domain_image($info,['avatar','idcard_z_image','idcard_f_image','jineng_image']);
|
|
|
|
|
|
$this->success(1,$info);
|
|
|
}
|
|
@@ -76,6 +80,11 @@ class Worker extends Apic
|
|
|
'gonghao' => input('gonghao',''),
|
|
|
'mobile' => $mobile,
|
|
|
'password' => input('password',''),
|
|
|
+ 'status' => input('status',1),
|
|
|
+
|
|
|
+ 'idcard_z_image' => input('idcard_z_image',''),
|
|
|
+ 'idcard_f_image' => input('idcard_f_image',''),
|
|
|
+ 'jineng_image' => input('jineng_image',''),
|
|
|
];
|
|
|
|
|
|
Db::name($this->table)->where('id',$id)->update($data);
|