dataLists(); $limitOffset = $this->request->get('page_no'); $limitLength = $this->request->get('page_size'); $type = $this->request->get('type'); $result = (new LiveGoodsLogic())->lists($limitOffset,$limitLength,$type); if(is_array($result)){ return $this->success('',$result); } return $this->fail($result); } /** * @notes 添加直播商品 * @return \think\response\Json * @throws \GuzzleHttp\Exception\GuzzleException * @author cjhao * @date 2021/11/23 16:26 */ public function add() { $post = (new LiveGoodsValidate())->post()->goCheck('add'); $result = (new LiveGoodsLogic())->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 18:10 */ public function del() { $post = (new LiveGoodsValidate())->post()->goCheck('del'); $result = (new LiveGoodsLogic())->del($post['goods_id']); if (true === $result) { return $this->success('删除成功',[],1,1); } return $this->fail($result); } }