...
|
...
|
@@ -3,6 +3,7 @@ |
|
|
use Action\AbstractAction;
|
|
|
use Plugin\Helpers;
|
|
|
use LibModels\Wap\Product\DetailData;
|
|
|
use Product\DetailModel;
|
|
|
|
|
|
/**
|
|
|
* 商品详情的控制器
|
...
|
...
|
@@ -33,7 +34,7 @@ class DetailController extends AbstractAction |
|
|
$vipLevel = Helpers::getVipLevel($this->_vip);
|
|
|
}
|
|
|
|
|
|
$data = \Product\DetailModel::getBaseInfo($productId, $goodsId, $uid, $vipLevel);
|
|
|
$data = DetailModel::getBaseInfo($productId, $goodsId, $uid, $vipLevel);
|
|
|
if (array() === $data) {
|
|
|
$this->error();
|
|
|
}
|
...
|
...
|
@@ -66,7 +67,7 @@ class DetailController extends AbstractAction |
|
|
$vipLevel = Helpers::getVipLevel($this->_vip);
|
|
|
}
|
|
|
|
|
|
$data = \Product\DetailModel::getBaseInfo(null, null, $uid, $vipLevel, $productSkn);
|
|
|
$data = DetailModel::getBaseInfo(null, null, $uid, $vipLevel, $productSkn);
|
|
|
if (array() === $data) {
|
|
|
$this->error();
|
|
|
}
|
...
|
...
|
@@ -94,7 +95,7 @@ class DetailController extends AbstractAction |
|
|
// 加入uid和udid参数,为了实现记录浏览记录的功能
|
|
|
$uid = $this->getUid();
|
|
|
$udid = $this->getUdid();
|
|
|
$data = \Product\DetailModel::getSizeInfo($productSkn, $uid, $udid);
|
|
|
$data = DetailModel::getSizeInfo($productSkn, $uid, $udid);
|
|
|
if (array() === $data) {
|
|
|
echo ' ';
|
|
|
exit();
|
...
|
...
|
@@ -126,7 +127,7 @@ class DetailController extends AbstractAction |
|
|
'goodsCommentsPage' => true,
|
|
|
'pageFooter' => true,
|
|
|
'comments' => array(
|
|
|
'list' => \Product\DetailModel::getComments($productId),
|
|
|
'list' => DetailModel::getComments($productId),
|
|
|
),
|
|
|
);
|
|
|
|
...
|
...
|
@@ -155,14 +156,14 @@ class DetailController extends AbstractAction |
|
|
$this->setTitle('购买咨询');
|
|
|
|
|
|
$uid = $this->getUid();
|
|
|
$consults = \Product\DetailModel::getConsults($uid, $productId);
|
|
|
$consults = DetailModel::getConsults($uid, $productId);
|
|
|
$data = array(
|
|
|
'goodsConsultsPage' => true,
|
|
|
'pageFooter' => true,
|
|
|
'consults' => array(
|
|
|
'list' => $consults
|
|
|
),
|
|
|
'faq' => \Product\DetailModel::getCommonConsults(),
|
|
|
'faq' => DetailModel::getCommonConsults(),
|
|
|
'showReadMore' => count($consults) > 2,
|
|
|
'link' => Helpers::url('/product/detail/consultform', array('product_id' => $productId)),
|
|
|
);
|
...
|
...
|
@@ -184,7 +185,7 @@ class DetailController extends AbstractAction |
|
|
$total = $this->post('total', 0);
|
|
|
$uid = $this->getUid();
|
|
|
$id = $this->post('id');
|
|
|
$result = \Product\DetailModel::upvoteConsult($uid, $id, $productId, $total);
|
|
|
$result = DetailModel::upvoteConsult($uid, $id, $productId, $total);
|
|
|
}
|
|
|
|
|
|
$this->echoJson($result);
|
...
|
...
|
@@ -202,7 +203,7 @@ class DetailController extends AbstractAction |
|
|
$total = $this->post('total', 0);
|
|
|
$uid = $this->getUid();
|
|
|
$id = $this->post('id');
|
|
|
$result = \Product\DetailModel::usefulConsult($uid, $id, $productId, $total);
|
|
|
$result = DetailModel::usefulConsult($uid, $id, $productId, $total);
|
|
|
}
|
|
|
|
|
|
$this->echoJson($result);
|
...
|
...
|
@@ -266,7 +267,7 @@ class DetailController extends AbstractAction |
|
|
$productSkn = $this->get('productSkn');
|
|
|
$brandId = $this->get('brandId');
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
$result = \Product\DetailModel::getPreference($productSkn, $channel, $brandId);
|
|
|
$result = DetailModel::getPreference($productSkn, $channel, $brandId);
|
|
|
}
|
|
|
|
|
|
if (empty($result)) {
|
...
|
...
|
@@ -276,4 +277,64 @@ class DetailController extends AbstractAction |
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 限购商品说明页面
|
|
|
*/
|
|
|
public function limitHelpAction()
|
|
|
{
|
|
|
$data = array();
|
|
|
$this->_view->display('limit-help', $data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 限购商品详情页
|
|
|
*/
|
|
|
public function limitAction()
|
|
|
{
|
|
|
/*$data = array(
|
|
|
'profile' => 'http://cdn.yoho.cn/myohobuy/assets/img/me/index/user-avatar.png?1455719653',
|
|
|
'banner' => 'http://img11.static.yhbimg.com/yhb-img01/2016/02/25/02/016ed5a17fb9d9bc7542174c22dccb4acf.jpg?imageView/2/w/640/h/240',
|
|
|
'bannerSrc' => './',
|
|
|
'name' => '潮流尖端商品啊啊啊啊',
|
|
|
'price' => '1999',
|
|
|
'releaseDate' => '2016年12月发售',
|
|
|
'appSrc' => './',
|
|
|
'mainImg' => 'http://img11.static.yhbimg.com/yhb-img01/2016/02/25/02/016ed5a17fb9d9bc7542174c22dccb4acf.jpg?imageView/2/w/640/h/240',
|
|
|
'goodDescription' => '独独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤独家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤家发售快乐的肌肤立刻就是大老骥伏枥开始的肌肤',
|
|
|
'imgList' => array(
|
|
|
array(
|
|
|
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2016/02/25/02/016ed5a17fb9d9bc7542174c22dccb4acf.jpg?imageView/2/w/640/h/240'
|
|
|
),
|
|
|
array(
|
|
|
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2016/02/25/02/016ed5a17fb9d9bc7542174c22dccb4acf.jpg?imageView/2/w/640/h/240'
|
|
|
),
|
|
|
array(
|
|
|
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2016/02/25/02/016ed5a17fb9d9bc7542174c22dccb4acf.jpg?imageView/2/w/640/h/240'
|
|
|
)
|
|
|
),
|
|
|
'vedio' => array(
|
|
|
'img' => './',
|
|
|
'list' => array(
|
|
|
array(
|
|
|
'src' => 'http://video.yohoboys.com/xuanchuan/wuyifan_mobile.mp4'
|
|
|
),
|
|
|
array(
|
|
|
'src' => 'http://video.yohoboys.com/xuanchuan/wuyifan_mobile.webm'
|
|
|
),
|
|
|
array(
|
|
|
'src' => 'http://video.yohoboys.com/xuanchuan/wuyifan_mobile.ogv'
|
|
|
)
|
|
|
)
|
|
|
)
|
|
|
);*/
|
|
|
|
|
|
$productCode = $this->get('code', '34343');
|
|
|
$data = DetailModel::getLimitProductData($productCode);
|
|
|
|
|
|
// APP下载链接地址
|
|
|
$data['appSrc'] = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho';
|
|
|
|
|
|
$this->_view->display('limit', $data);
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|