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