public function _initialize() { $map['uid'] = is_login(); $map['status'] = 1; $count['posted'] = M('cat_info')->where($map)->count(); $count['fav'] = M('cat_fav')->where($map)->count(); $this->assign('count', $count); if (!is_login()) { $this->error('请登录后使用个人中心。'); } parent::_initialize(); }
public function _initialize() { parent::_initialize(); }