dataLists(new AssetLists()); } /** * @notes 添加资产 * @return \think\response\Json * @author heshihu * @date 2022/2/22 9:57 */ public function add() { $params = (new AssetValidate())->post()->goCheck('add'); AssetLists::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 AssetValidate())->post()->goCheck('edit'); $result = AssetLists::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(AssetLists::getError()); } /** * @notes 查看通知设置详情 * @return \think\response\Json * @author 段誉 * @date 2022/3/29 11:18 */ public function detail() { $params = (new NoticeValidate())->goCheck('detail'); $result = NoticeLogic::detail($params); return $this->data($result); } /** * @notes 通知设置 * @return \think\response\Json * @author 段誉 * @date 2022/3/29 11:18 */ public function set() { $params = $this->request->post(); $result = NoticeLogic::set($params); if ($result) { return $this->success('设置成功'); } return $this->fail(NoticeLogic::getError()); } }