Authored by hf

do goods detail page merge other code

... ... @@ -22,7 +22,7 @@ class PlusstarData
{
const URI_BRANDLIST = 'guang/api/v1/plustar/getlist';
const URI_BRANDINFO_PLUSSTAR = 'guang/service/v1/plustar/'; // 'guang/service/v3/plustar/'
const URI_BRANDINFO_PLUSSTAR = 'guang/service/v3/plustar/'; // 'guang/service/v3/plustar/'
const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/';
const URI_BRANDINFO_ARTICLE = 'guang/service/v1/article/';
... ...
... ... @@ -226,29 +226,36 @@ $basicBtnC:#eb0313;
}
}
.goodsDiscount{
min-height: pxToRem(88px);
padding-left:pxToRem(28px);
padding-right:pxToRem(28px);
font-size: pxToRem(28px);
color: $mainFontC;
line-height: pxToRem(88px);
border-bottom: 1px solid $borderC;
.iconfont{
display: inline-block;
width: pxToRem(35px);
font-size: pxToRem(45px);
float: right;
color:#e0e0e0;
// padding-left:pxToRem(50px);
}
}
font-size: pxToRem(28px);
color: $mainFontC;
border-bottom: 1px solid $borderC;
h1{
padding : pxToRem(30px) pxToRem(28px);
line-height: pxToRem(36px);
// line-height: pxToRem(88px);
}
.iconfont{
display: inline-block;
width: pxToRem(35px);
font-size: pxToRem(45px);
float: right;
color:#e0e0e0;
// padding-left:pxToRem(50px);
}
.discount-folder{
.folder-item{
border-top: 1px solid $borderC;
}
display: none;
}
}
.goodsSubtitle,
.goodsDiscount{
text-indent: pxToRem(-14px);
}
.feedback-list-page {
.feedback-list {
padding-top: pxToRem(30px);
background-color: #f0f0f0;
... ... @@ -404,7 +411,20 @@ $basicBtnC:#eb0313;
display: none;
}
}
.feedback-list .nodata{
height: pxToRem(88px);
font-size: pxToRem(28px);
line-height: pxToRem(88px);
background-color: #fff;
padding:0 pxToRem(28px);
.go-consult{
float: right;
color: $subFontC;
span{
font-size: pxToRem(28px);
}
}
}
.enter-store{
min-height: pxToRem(100px);
display: table;
... ... @@ -484,6 +504,8 @@ $basicBtnC:#eb0313;
.detail-swiper{
.swiper-wrapper{
height: pxToRem(200px);
overflow: hidden;
.swiper-slide{
width: pxToRem(114px);
div{
... ... @@ -516,7 +538,7 @@ $basicBtnC:#eb0313;
.measurement-method{
.detail{
width: 100%;
// height: pxToRem(300px);
height: pxToRem(260px);
img{
float:left;
width: pxToRem(270px);
... ... @@ -584,7 +606,8 @@ $basicBtnC:#eb0313;
font-size: pxToRem(34px);
color:$basicBtnC;
}
&.addto-cart{
&.addto-cart,
&.sold-out{
height: pxToRem(80px);
width: pxToRem(260px);
margin:0 pxToRem(100px) 0 pxToRem(115px);
... ... @@ -594,6 +617,9 @@ $basicBtnC:#eb0313;
line-height: pxToRem(80px);
text-align: center;
}
&.sold-out{
background-color: #f58189;
}
}
.num-tag{
position: absolute;
... ...
... ... @@ -57,22 +57,93 @@
<div class="feedback-list ">
{{# feedbacks}}
{{#if nodata}}
<div class="nodata">
<span>暂无商品评价和咨询</span>
<a class="go-consult">我要咨询<i class="iconfont"><span class="iconfont">&#xe604;</span></a>
{{#if commentsNum}}
<!--tab begin-->
<ul id="nav-tab" class="nav-tab clearfix">
<li class="comment-nav">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li>
<li class="consult-nav">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li>
</ul>
<div id="feedback-content" >
<div class="comment-content content ">
{{#if commentsNum}}
<div class="comment-content-main content-main">
{{# comments}}
<span class="user-name">
{{userName}}
</span>
<span class="goods-spec">
{{desc}}
</span>
<p class="detail-content">
{{content}}
</p>
<span class="comment-time">
{{time}}
</span>
{{/ comments}}
</div>
{{else}}
<div class="comment-content-main content-main no-item">
<span class="iconfont">&#xe63c;</span>暂无评论
</div>
{{/if}}
<div class="comment-content-footer">
<a href="{{link}}">查看更多 <span class="iconfont">&#xe604;</span></a>
</div>
</div>
<div class="consult-content content hide ">
{{#if consultsNum}}
<div class="consult-content-main content-main">
{{# consults}}
<div class="question">
<span class="iconfont">&#xe639;</span>
<p>{{question}}
<span class="time">
{{time}}
</span>
</p>
</div>
<div class="answer">
<span class="iconfont">&#xe63c;</span>
<p>{{answer}}</p>
</div>
{{/ consults}}
</div>
<div class="consult-content-footer">
<a href="{{link}}">
查看更多
<span class="iconfont">&#xe604;</span></a>
</div>
{{else}}
<div class="comment-content-main content-main no-item">
<span class="iconfont">&#xe63c;</span>暂无咨询
</div>
<div class="consult-content-footer">
<a href="{{link}}">
我要咨询
<span class="iconfont">&#xe604;</span></a>
</div>
{{/if}}
</div>
</div>
<!--/tab end-->
{{else}}
<ul id="nav-tab" class="nav-tab clearfix">
<li class="comment-nav">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li>
<li class="consult-nav">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li>
</ul>
<div id="feedback-content" >
<div class="comment-content content ">
{{#if commentsNum}}
<div class="comment-content-main content-main">
{{#if consultsNum}}
<!--tab begin-->
<ul id="nav-tab" class="nav-tab clearfix">
<li class="comment-nav">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li>
<li class="consult-nav">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li>
</ul>
<div id="feedback-content" >
<div class="comment-content content ">
{{#if commentsNum}}
<div class="comment-content-main content-main">
{{# comments}}
<span class="user-name">
{{userName}}
... ... @@ -88,13 +159,13 @@
</span>
{{/ comments}}
</div>
{{else}}
<div class="comment-content-main content-main no-item">
<span class="iconfont">&#xe63c;</span>暂无评论
</div>
{{else}}
<div class="comment-content-main content-main no-item">
<span class="iconfont">&#xe63c;</span>暂无评论
</div>
{{/if}}
<div class="comment-content-footer">
<a href="{{moreComments}}">查看更多 <span class="iconfont">&#xe604;</span></a>
<a href="{{link}}">查看更多 <span class="iconfont">&#xe604;</span></a>
</div>
</div>
... ... @@ -109,7 +180,7 @@
<span class="time">
{{time}}
</span>
</p>
</p>
</div>
<div class="answer">
... ... @@ -119,24 +190,34 @@
{{/ consults}}
</div>
<div class="consult-content-footer">
<a href="{{moreConsults}}">
<a href="{{link}}">
查看更多
<span class="iconfont">&#xe604;</span></a>
</div>
</div>
{{else}}
<div class="comment-content-main content-main no-item">
<span class="iconfont">&#xe63c;</span>暂无咨询
</div>
<div class="consult-content-footer">
<a href="{{gotoConsults}}">
<div class="comment-content-main content-main no-item">
<span class="iconfont">&#xe63c;</span>暂无咨询
</div>
<div class="consult-content-footer">
<a href="{{link}}">
我要咨询
<span class="iconfont">&#xe604;</span></a>
</div>
{{/if}}
{{/if}}
</div>
</div>
<!--/tab end-->
{{else}}
<div class="nodata">
<span>暂无商品评价和咨询</span>
<a class="go-consult">我要咨询<span class="iconfont">&#xe604;</span></a>
</div>
</div>
{{/if}}
{{/if}}
{{/ feedbacks}}
</div>
... ...
... ... @@ -3,6 +3,7 @@
use Action\AbstractAction;
use LibModels\Wap\Guang\PlusstarData;
use Plugin\Helpers;
use Plugin\Images;
/**
* 明星品牌和原创品牌
... ... @@ -131,7 +132,7 @@ class PlusstarController extends AbstractAction
$data['psDetail'] = true;
$data['ps']['id'] = $brandId;
$data['ps']['banner'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['cover_img'], 640, 309);
$data['ps']['logo'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['brand_ico'], 160, 160);
$data['ps']['logo'] = Images::getSourceUrl($brandInfo['getBrandInfo']['data']['brand_ico'],'brandLogo');
$data['ps']['name'] = $brandInfo['getBrandInfo']['data']['brand_name'];
$data['ps']['isLike'] = $brandInfo['getUidBrandFav'];
$data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? false : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' '));
... ...
<?php
use Action\AbstractAction;
/**
... ... @@ -6,6 +7,7 @@ use Action\AbstractAction;
*/
class DetailController extends AbstractAction
{
/**
* 商品详情
*
... ... @@ -13,11 +15,11 @@ class DetailController extends AbstractAction
* @param int goodsId
*/
public function indexAction()
{
{
$productId = $this->param('productId', 123);
$goodsId = $this->param('goodsId', 3241);
$uid = $this->getUid();
$data = \Product\DetailModel::getBaseInfo($productId, $goodsId, $uid);
$data['goodsDetailPage'] = true;
... ... @@ -25,7 +27,7 @@ class DetailController extends AbstractAction
$this->setTitle($data['goodsName']);
}
$this->setNavHeader('商品详情');
// $data = array (
// 'goodsDetailPage' => true,
// 'pageHeader' => array (
... ... @@ -252,109 +254,105 @@ class DetailController extends AbstractAction
// )
//
// );
// 渲染模板
$this->_view->display('index', $data);
}
public function commentsAction(){
$data = array(
'goodsCommentsPage' =>true,
'pageHeader' => array (
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '购买评价(6)'
),
'pageFooter' => true,
'comments'=>array(
'list' =>array(
array(
'userName'=>'Lynnic',
'desc'=>'购买了白色Mate7',
'content'=>'活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time'=>'2014-08-12 10:24:26'
),
array(
'userName'=>'Lynnic',
'desc'=>'购买了白色Mate7',
'content'=>'活动时买的,挺超值。上身效果也不错。质量
public function commentsAction()
{
$data = array(
'goodsCommentsPage' => true,
'pageHeader' => array(
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '购买评价(6)'
),
'pageFooter' => true,
'comments' => array(
'list' => array(
array(
'userName' => 'Lynnic',
'desc' => '购买了白色Mate7',
'content' => '活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time'=>'2014-08-12 10:24:26'
),
array(
'userName'=>'Lynnic',
'desc'=>'购买了白色Mate7',
'content'=>'活动时买的,挺超值。上身效果也不错。质量
'time' => '2014-08-12 10:24:26'
),
array(
'userName' => 'Lynnic',
'desc' => '购买了白色Mate7',
'content' => '活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time'=>'2014-08-12 10:24:26'
)
)
'time' => '2014-08-12 10:24:26'
),
);
$this->_view->assign('title', '购买评价');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('comments', $data);
}
array(
'userName' => 'Lynnic',
'desc' => '购买了白色Mate7',
'content' => '活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time' => '2014-08-12 10:24:26'
)
)
),
);
$this->_view->assign('title', '购买评价');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('comments', $data);
}
public function consultsAction(){
$data = array(
'goodsConsultsPage' =>true,
'pageHeader' => array (
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '购买咨询(6)'
),
'pageFooter' => true,
'consults'=>array(
'list' =>array(
array(
'question' =>'您好 我一米七七 140斤 穿M的行吗',
'time'=>'2014-08-12 10:24:26',
'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
),
array(
'question' =>'您好 我一米七七 140斤 穿M的行吗',
'time'=>'2014-08-12 10:24:26',
'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
),
array(
'question' =>'您好 我一米七七 140斤 穿M的行吗',
'time'=>'2014-08-12 10:24:26',
'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
)
)
public function consultsAction()
{
$data = array(
'goodsConsultsPage' => true,
'pageHeader' => array(
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '购买咨询(6)'
),
'pageFooter' => true,
'consults' => array(
'list' => array(
array(
'question' => '您好 我一米七七 140斤 穿M的行吗',
'time' => '2014-08-12 10:24:26',
'answer' => '您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
),
);
$this->_view->assign('title', '购买咨询');
//$this->_view->display('brand', compact('brands'));
array(
'question' => '您好 我一米七七 140斤 穿M的行吗',
'time' => '2014-08-12 10:24:26',
'answer' => '您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
),
array(
'question' => '您好 我一米七七 140斤 穿M的行吗',
'time' => '2014-08-12 10:24:26',
'answer' => '您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
)
)
),
);
// 渲染模板
$this->_view->display('consults', $data);
}
$this->_view->assign('title', '购买咨询');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('consults', $data);
}
public function consultformAction(){
$data = array(
'consultform' =>true,
'pageHeader' => array (
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '我要咨询'
)
);
public function consultformAction()
{
$data = array(
'consultform' => true,
'pageHeader' => array(
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '我要咨询'
)
);
$this->_view->assign('title', '我要咨询');
//$this->_view->display('brand', compact('brands'));
$this->_view->assign('title', '我要咨询');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('consultform', $data);
}
// 渲染模板
$this->_view->display('consultform', $data);
}
}
\ No newline at end of file
}
... ...