dataLists(new AssetAreaLists()); } /** * @notes 添加地址 * @return \think\response\Json * @author heshihu * @date 2022/2/22 9:57 */ public function add() { $params = (new AssetAreaValidate())->post()->goCheck('add'); AssetAreaLists::add($params); return $this->success('添加成功', [], 1, 1); } /** * @notes 编辑地址 * @return \think\response\Json * @author heshihu * @date 2022/2/22 10:12 */ public function edit() { $params = (new AssetAreaValidate())->post()->goCheck('edit'); $result = AssetAreaLists::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(AssetAreaLists::getError()); } /** * @notes 删除地址 * @return \think\response\Json * @author heshihu * @date 2022/2/22 10:17 */ public function delete() { $params = (new AssetAreaValidate())->post()->goCheck('delete'); AssetAreaLists::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 地址详情 * @return \think\response\Json * @author heshihu * @date 2022/2/22 10:15 */ public function detail() { $params = (new AssetAreaValidate())->goCheck('detail'); $result = AssetAreaLists::detail($params); return $this->data($result); } /** * @notes 更改农耕分类状态 * @return \think\response\Json * @author heshihu * @date 2022/2/21 10:15 */ public function updateStatus() { $params = (new AssetAreaValidate())->post()->goCheck('status'); $result = AssetAreaLists::updateStatus($params); if (true === $result) { return $this->success('修改成功', [], 1, 1); } return $this->fail(AssetAreaLists::getError()); } }