dataLists(new MapKeyLists()); } /** * @notes 公共列表 * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author ljj * @date 2024/11/5 下午1:57 */ public function commonLists() { $result = (new MapKeyLogic())->commonLists(); return $this->success('获取成功',$result); } /** * @notes 新增key * @return \think\response\Json * @author ljj * @date 2024/11/5 下午2:05 */ public function add() { $params = (new MapKeyValidate())->post()->goCheck('add'); (new MapKeyLogic())->add($params); return $this->success('操作成功', [],1,1); } /** * @notes 详情 * @return \think\response\Json * @author ljj * @date 2024/11/5 下午2:07 */ public function detail() { $params = (new MapKeyValidate())->get()->goCheck('detail'); $result = (new MapKeyLogic())->detail($params['id']); return $this->success('获取成功',$result); } /** * @notes 编辑 * @return \think\response\Json * @author ljj * @date 2024/11/5 下午2:21 */ public function edit() { $params = (new MapKeyValidate())->post()->goCheck('edit'); (new MapKeyLogic())->edit($params); return $this->success('操作成功',[],1,1); } /** * @notes 删除 * @return \think\response\Json * @author ljj * @date 2024/11/5 下午2:21 */ public function del() { $params = (new MapKeyValidate())->post()->goCheck('del'); (new MapKeyLogic())->del($params['id']); return $this->success('操作成功',[],1,1); } }