Authored by 梁志锋

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

framework @ e9d066dd
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
Subproject commit e9d066dd88a8e7e37103021c427a205a5cfcdcec
... ...
... ... @@ -17,7 +17,7 @@ use Plugin\Cache;
class Yohobuy
{
// /* 正式环境 */
/* 正式环境 */
// const API_URL = 'http://api2.open.yohobuy.com/';
// const API_URL2 = 'http://api.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
... ...
... ... @@ -35,18 +35,10 @@ class CacheConfig
const KEY_ACTION_SEARCH_SEARCH = 'key_action_search_search'; // 搜索的数据
const KEY_ACTION_SEARCH_FILTER = 'key_action_search_filter'; // 搜索的过滤条件
<<<<<<< HEAD
const KEY_ACTION_HOME_GRADE = 'key_action_home_grade';//会员等级
const KEY_ACTION_HOME_PREFERENTIAL = 'key_action_home_preferential';//会员特权详情
const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR
const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情
const KEY_ACTION_HOME_ORDER_ORDER = 'key_action_home_order_order';//订单列表
=======
const KEY_ACTION_GUANG_PLUSSTAR_INDEX = 'key_action_guang_plusstar_index'; // 国际优选
const KEY_ACTION_GUANG_PLUSSTAR_LIST = 'key_action_guang_plusstar_list'; // 明星原创
const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR
const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情
const KEY_ACTION_GUANG_RSS_DATA = 'key_action_guang_detail_data'; // 逛订阅内容
>>>>>>> master
}
... ...
... ... @@ -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/';
... ...
... ... @@ -13,9 +13,9 @@ var goodsSwiper,
// winH = $(window).height(),
sizeSwiper,
refSwiper,
commentsNum,
handleHelper;
lazyLoad($('img.lazy'));
goodsSwiper = new Swiper('.banner-swiper', {
... ... @@ -28,22 +28,56 @@ goodsSwiper = new Swiper('.banner-swiper', {
prevButton: '.my-swiper-button-prev'
});
//初始化tab
(function() {
var consultsNum = $('#nav-tab .consults-num').html() - 0;
$('#nav-tab li').on('click', function() {
var index = $(this).index();
commentsNum = $('#nav-tab .comments-num').html() - 0;
if (!$(this).hasClass('focus')) {
$('#nav-tab li').each(function() {
$(this).removeClass('focus');
});
$('#feedback-content .content').each(function() {
$(this).addClass('hide');
});
if (0 !== commentsNum) {
$('#nav-tab .comment-nav').addClass('focus');
$('#feedback-content .comment-content').removeClass('hide');
} else if (0 !== consultsNum) {
$('#nav-tab .consult-nav').addClass('focus');
$('#feedback-content .consult-content').removeClass('hide');
}
})();
$('#nav-tab li').each(function() {
$(this).removeClass('focus');
});
$('#feedback-content .content').each(function() {
$(this).addClass('hide');
});
$('#nav-tab li').on('click', function() {
var index = $(this).index();
if ($(this).hasClass('comment-nav') && 0 === commentsNum) {
alert('暂无商品评价');
} else {
if (!$(this).hasClass('focus')) {
$('#nav-tab li').each(function() {
$(this).removeClass('focus');
});
$('#feedback-content .content').each(function() {
$(this).addClass('hide');
});
$(this).addClass('focus');
$('#feedback-content .content:eq(' + index + ')').removeClass('hide');
}
}
});
$(this).addClass('focus');
$('#feedback-content .content:eq(' + index + ')').removeClass('hide');
$('.goodsDiscount .dropdown').on('click', function() {
if ($('.goodsDiscount .discount-folder').is(':hidden')) {
$('.goodsDiscount .discount-folder').slideDown();
} else {
$('.goodsDiscount .discount-folder').slideUp();
}
});
... ...
... ... @@ -9,9 +9,10 @@ var Swiper = require('yoho.iswiper');
var recommendSwiper;
recommendSwiper = new Swiper('.swiper-recommend', {
// lazyLoading: true,
// lazyLoadingInPrevNext: true,
slidesPerView: 'auto'
recommendSwiper = new Swiper('#swiper-recommend', {
slidesPerView: 'auto',
grabCursor: true,
slideElement: 'li',
lazyLoading: true,
watchSlidesVisibility: true
});
\ No newline at end of file
... ...
... ... @@ -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;
... ...
... ... @@ -12,25 +12,28 @@
font-weight: bold;
}
.swiper-recommend {
.swiper-container {
padding: pxToRem(20px) 0;
width: 100%;
height: pxToRem(252px);
overflow: hidden;
.swiper-slider {
margin: 0 pxToRem(10px);
.swiper-slide {
padding: 0 pxToRem(10px);
float: left;
width: pxToRem(156px);
&:first-child {
margin-left: pxToRem(30px);
padding-left: pxToRem(30px);
}
&:last-child {
margin-right: pxToRem(30px);
padding-right: pxToRem(30px);
}
img {
width: pxToRem(156px);
max-width: none;
width: 100%;
height: pxToRem(208px);
}
}
}
... ... @@ -42,19 +45,21 @@
line-height: 1;
span {
display: block;
// chrome 最小支持12px, 设计图是 10px ,用CSS3变换
@include transform(scale(0.875));
}
.sale-price {
color: #d9134f;
margin-left: pxToRem(-10px);
}
.old-price {
position: absolute;
top: 0;
right: 0;
color: #ededed;
right: pxToRem(-6px);
color: #b0b0b0;
}
.no-price {
... ...
... ... @@ -95,7 +95,9 @@
<span class="iconfont num">&#xe604;</span>
</a>
</div>
{{#isLogin}}
{{> product/recommend-for-you}}
{{/isLogin}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -43,28 +43,107 @@
{{#goodsDiscount}}
<div class="goodsDiscount">
<h1>{{.}}<span class="iconfont">&#xe609;</span></h1>
{{#each list}}
{{#if @first}}
<h1>{{this}}<span class="iconfont dropdown">&#xe609;</span></h1>
<div class="discount-folder">
{{else}}
<h1 class="folder-item">{{this}}</h1>
{{/if}}
{{/list}}
</div>
</div>
{{/goodsDiscount}}
<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 focus">{{commentName}}({{commentsNum}})</li>
<li class="consult-nav">{{consultName}}({{consultsNum}})</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}}
... ... @@ -80,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>
... ... @@ -101,7 +180,7 @@
<span class="time">
{{time}}
</span>
</p>
</p>
</div>
<div class="answer">
... ... @@ -111,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>
... ... @@ -189,7 +278,7 @@
<div class="swiper-container detail-swiper" id="size-swiper-container">
<div class="swiper-wrapper">
{{#list}}
<div class="swiper-slide blue-slide" >
<div class="swiper-slide " >
<div class="size-name cell">{{name}}</div>
<div class="size-m cell">{{sizem}}</div>
<div class="size-xl cell">{{sizexl}}</div>
... ... @@ -303,7 +392,11 @@
<div class="cart-bar">
<span class="num-tag">{{numInCart}}</span>
<a href="" class="num-incart iconfont">&#xe62c;</a>
{{#if goodsInstore}}
<a href="" class="addto-cart ">加入购物车</a>
{{else}}
<a href="" class="sold-out">已售罄</a>
{{/if}}
<a href="" class="favorite iconfont">&#xe605;</a>
</div>
{{/cartInfo}}
... ...
{{# recommendForYou}}
<div class="recommend-for-you">
<div class="title">为您优选新品</div>
<div class="swiper-recommend">
<ul class="swiper-wrapper">
<div id="swiper-recommend" class="swiper-container">
<ul class="swiper-wrapper swiper-wrapper-recommend">
{{#recommendList}}
<li class="swiper-slider">
<img class="img-box" src="{{thumb}}">
<li class="swiper-slide">
<img class="swiper-lazy img-box" data-src="{{thumb}}">
<div class="price">
<span class="sale-price {{^price}}no-price{{/price}}"{{salePrice}}</span>
{{#price}}<span class="old-price"{{.}}</span>{{/price}}
</div>
<div class="swiper-lazy-preloader"></div>
</li>
{{/recommendList}}
</ul>
... ...
... ... @@ -423,13 +423,13 @@ class UserModel
// 调用接口获取地址数据
$suggest = UserData::suggestData($udid, $page, $limit);
//print_r($suggest);
// 处理意见反馈数据
if (isset($suggest['data']) && !empty($suggest['data'])) {
$one = array();
foreach ($suggest['data']['list'] as $val) {
$one = array();
$one['suggest_id'] = $val['id'];
$one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240);
$one['title'] = $val['filter_content'];
$one['content'] = $val['reply_content'];
... ...
... ... @@ -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;' => ' '));
... ...
... ... @@ -13,10 +13,6 @@ class DetailController extends AbstractAction
*/
public function indexAction()
{
$commentsNum = 0;
$consultsNum = 0;
$nodate =0;
$data = array (
'goodsDetailPage' => true,
'pageHeader' => array (
... ... @@ -68,16 +64,21 @@ SHOE BQT KEN BLOCK',
)
)
),
'goodsDiscount'=>'【summer final sale】满¥499立享6.8折',
'goodsDiscount'=>array(
'list'=>array(
'【summer final sale】满¥499立享6.8折',
'【BACK TO SCHOOL】满¥499赠送Paul
Franke帽子一个,多买多送!',
'【BACK TO SCHOOL】满¥499赠送Paul
Franke帽子一个,多买多送!'
)
),
'feedbacks'=>array(
'commentsNum'=>0,
'consultsNum'=>0,
'nodata' =>0,
'commentName'=>'商品评价',
'consultName' =>'购买咨询',
'moreComments'=>'http://www.baidu.com',
'moreConsults'=>'http://www.baidu.com',
'gotoConsults'=>'http://www.baidu.com',
// 'commentName'=>'商品评价',
// 'consultName' =>'购买咨询',
'link'=>'',
'comments'=>array(
array(
'userName'=>'Lynnic',
... ... @@ -233,7 +234,8 @@ SHOE BQT KEN BLOCK',
),
'cartInfo' =>array(
'numInCart' => 3
'numInCart' => 3,
'goodsInstore'=>0
)
);
... ... @@ -247,6 +249,7 @@ SHOE BQT KEN BLOCK',
public function commentsAction(){
$data = array(
'goodsCommentsPage' =>true,
'pageHeader' => array (
'navBack' => 'sss ',
... ...