assign('type', $type); return $this->fetch(); } public function list() { $where = Util::getMore([ ['status', ''], ['page', 1], ['limit', 20], ['name', ''], ['status', ''], ['type', ''], ]); return Json::successlayui(model::list($where)); } public function details($id) { $this->assign('id', $id); return $this->fetch(); } public function details_list($id) { $where = Util::getMore([ ['page', 1], ['limit', 20], ]); $list = Ach::where('a_id', $id)->page($where['page'], $where['limit'])->select(); $data['data'] = count($list) > 0 ? $list->toArray() : []; $data['count'] = Ach::where('a_id', $id)->count(); return Json::successlayui($data); } /** * 删除指定资源 * * @param int $id * @return \think\Response */ public function delete($id) { if (!model::del($id)) return Json::fail(UserNoticeModel::getErrorInfo('删除失败,请稍候再试!')); else return Json::successful('删除成功!'); } }