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 heshihu * @date 2022/2/22 10:17 */ public function delete() { $params = (new AssetValidate())->post()->goCheck('delete'); AssetLists::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 AssetValidate())->goCheck('detail'); $result = AssetLists::detail($params); return $this->data($result); } /** * @notes 获取资产数据 * @return \think\response\Json * @author 段誉 * @date 2022/3/29 11:18 */ public function getAssetData() { $result = AssetLists::getAssetData(); return $this->success('查询成功', $result, 1, 1); } }