dataLists(new BrandLists()); } /** * @notes 添加商品品牌 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 10:34 */ public function add() { $params = (new BrandValidate())->post()->goCheck('add'); $result = BrandLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(BrandLogic::getError()); } /** * @notes 编辑商品品牌 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 10:34 */ public function edit() { $params = (new BrandValidate())->post()->goCheck('edit'); $result = BrandLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(BrandLogic::getError()); } /** * @notes 删除商品品牌 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 10:34 */ public function delete() { $params = (new BrandValidate())->post()->goCheck('delete'); BrandLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取商品品牌详情 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 10:34 */ public function detail() { $params = (new BrandValidate())->goCheck('detail'); $result = BrandLogic::detail($params); return $this->data($result); } }