// +---------------------------------------------------------------------- // +---------------------------------------------------------------------- // | 单页模型 // +---------------------------------------------------------------------- namespace app\cms\model; use think\Model; class Page extends Model { protected $pk = 'catid'; /** * 根据栏目ID获取内容 * * @param type $catid 栏目ID * * @return boolean */ public function getPage($catid, $cache = false) { if (empty($catid)) { return false; } if (is_numeric($cache)) { $cache = (int) $cache; } return self::get($catid, $cache); } }