userId; $result = IssueWorkLogic::lists($params); return $this->data($result); } /** * 获取投诉分类 * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function getIssueWorkType() { $list = DictData::where(['type_value'=>'complaint_type','status'=>1])->field('value,name')->select()->toArray(); return $this->data($list); } /** * 新增投诉 * @return \think\response\Json */ public function complaint() { $params = (new IssueWorkValidate())->post()->goCheck('add', [ 'user_id' => $this->userId, 'user_info' => $this->userInfo ]); $result = IssueWorkLogic::add($params); if (false === $result) { return $this->fail(IssueWorkLogic::getError()); } return $this->success('投诉成功', ['id'=>$result], 1, 1); } public function complaintInfo() { $params = (new IssueWorkValidate())->goCheck('detail', [ 'user_id' => $this->userId, ]); $result = IssueWorkLogic::detail($params); return $this->data($result); } }