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