...
|
...
|
@@ -51,18 +51,35 @@ class HomeController extends AbstractAction |
|
|
);
|
|
|
$uid = $this->getUid();
|
|
|
if ($uid) {
|
|
|
// 优选新品数据
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
|
|
|
|
|
|
$data['isLogin'] = true;
|
|
|
$data += UserModel::getUserProfileData($uid);
|
|
|
$data += UserModel::getInfoNumData($uid);
|
|
|
$data['recommendForYou'] = UserModel::getPreferenceData($channel);
|
|
|
}
|
|
|
|
|
|
$this->_view->display('index', $data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 为您优选
|
|
|
*/
|
|
|
public function preferenceAction()
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
// 优选新品数据
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
$result = UserModel::getPreferenceData($channel);
|
|
|
}
|
|
|
|
|
|
if (empty($result)) {
|
|
|
echo ' ';
|
|
|
} else {
|
|
|
$this->_view->display('recommend-content', $result);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 用户收藏的商品
|
|
|
*/
|
...
|
...
|
|