request->get('page_no'); $limitLength = $this->request->get('page_size'); $result = (new LiveRoomLogic())->lists($limitOffset,$limitLength); if(is_array($result)){ return $this->success('',$result); } return $this->fail($result); } /** * @notes 创建直播间 * @author cjhao * @date 2021/11/22 17:51 */ public function add() { $post = (new LiveRoomValidate())->post()->goCheck('add'); $result = (new LiveRoomLogic())->add($post); if (true === $result) { return $this->success('创建成功',[],1,1); } return $this->fail($result); } /** * @notes 删除直播间 * @return \think\response\Json * @author cjhao * @date 2021/11/23 10:24 */ public function del() { $post = (new LiveRoomValidate())->post()->goCheck('del'); $result = (new LiveRoomLogic())->del($post['room_id']); if (true === $result) { return $this->success('删除成功',[],1,1); } return $this->fail($result); } }