public function _initialize() { $map['uid'] = is_login(); $map['status'] = 1; $count['posted'] = D('Goods')->where($map)->count(); $count['fav'] = D('store_fav')->where($map)->count(); $this->assign('count', $count); if (!is_login()) { $this->error('请登录后使用个人中心。'); } $this->assign('tab', 'my'); $this->messageModel = D('Message'); $this->shopModel = D('Store/Shop'); parent::_initialize(); }
public function _initialize() { parent::_initialize(); }