post = $this->request->post(); } public function create() { $param = $this->request->filter('trim')->post(); $param['uid']= $this->uid; $param['uname']= $this->uname; $userCommon = \app\admin\common\User::getIns(); $rs = $userCommon->handle('cCreate',$param); return json_show($rs['code'],$rs['message'],$rs['data']); } public function list() { $param = $this->request->filter('trim')->post(); $userCommon = \app\admin\common\User::getIns(); $rs = $userCommon->handle('cList',$param); return json_show($rs['code'],$rs['message'],$rs['data']); } public function edit() { $param = $this->request->filter('trim')->post(); $param['uid']= $this->uid; $param['uname']= $this->uname; $userCommon = \app\admin\common\User::getIns(); $rs = $userCommon->handle('cEdit',$param); return json_show($rs['code'],$rs['message'],$rs['data']); } public function info() { $companyNo = isset($this->post['companyNo']) && $this->post['companyNo'] !== "" ? trim($this->post['companyNo']) : ""; if ($companyNo == "") return error_show(1002, "参数companyNo不能为空"); $userCommon = \app\admin\common\User::getIns(); $rs = $userCommon->handle('cInfo',['companyNo'=>$companyNo]); return json_show($rs['code'],$rs['message'],$rs['data']); } public function del(){ $param = $this->request->only(['id' => 0], 'post', 'trim'); $userCommon = \app\admin\common\User::getIns(); $rs = $userCommon->handle('delete', [ 'ids' => [$param['id']], 'type' => 2, 'updater' => $this->uname, 'updaterid' => $this->uid, ]); return json_show($rs['code'], $rs['message'], $rs['data']); } public function status(){ $param = $this->request->only(['id', 'status'], 'post', 'trim'); $param = array_merge($param, [ 'type' => 2, 'updater' => $this->uname, 'updaterid' => $this->uid, ]); $userCommon = \app\admin\common\User::getIns(); $rs = $userCommon->handle('status', $param); return json_show($rs['code'], $rs['message'], $rs['data']); } }