Authored by 梁志锋

update

... ... @@ -18,10 +18,10 @@ 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/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_URL = 'http://api2.open.yohobuy.com/';
// const API_URL2 = 'http://api.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
/* 测试环境 */
const API_URL = 'http://test2.open.yohobuy.com/';
... ...
... ... @@ -214,7 +214,7 @@ function tsAnimate() {
setTimeout(tsAnimate, 3000);
$('.home-header .search-btn').on('touchstart', function() {
$('.home-header .iconfont').on('touchstart', function() {
$(this).addClass('highlight');
}).on('touchend touchcancel', function() {
$(this).removeClass('highlight');
... ...
... ... @@ -83,6 +83,28 @@ $addressForm.on('submit', function() {
if (isSubmiting) {
return false;
}
// 简单的表单校验
if (!$(this).find('[name="consignee"]').val()) {
tip.show('收件人不能为空');
$(this).find('[name="consignee"]').focus();
return false;
}
if (!$(this).find('[name="mobile"]').val()) {
tip.show('手机号不能为空');
$(this).find('[name="mobile"]').focus();
return false;
}
if (!$(this).find('[name="area_code"]').val() || !$(this).find('[name="area"]').val()) {
tip.show('省市区不能为空');
return false;
}
if (!$(this).find('[name="address"]').val()) {
tip.show('地址不能为空');
$(this).find('[name="address"]').focus();
return false;
}
isSubmiting = true;
$.ajax({
method: 'POST',
... ...
... ... @@ -75,11 +75,11 @@
font-size: 40rem / $pxConvertRem;
line-height: 90rem / $pxConvertRem;
}
}
&.highlight {
.iconfont.highlight {
background: rgba(200,200,200,.4);
}
}
}
.girls-wrap .home-header {
... ...
... ... @@ -30,6 +30,7 @@ $basicBtnC:#eb0313;
left: pxToRem(30px);
right: auto;
}
<<<<<<< HEAD
.good-detail-page {
overflow: hidden;
... ... @@ -108,10 +109,168 @@ $basicBtnC:#eb0313;
bottom: pxToRem(40px);
.swiper-pagination-bullet {
margin-right: 2px;
=======
.feedback-list {
padding-top: pxToRem(30px);
background-color: #f0f0f0;
.nodata{
height: pxToRem(88px);
background-color: #fff;
padding:0 pxToRem(28px);
span,a{
line-height: pxToRem(88px);
font-size: pxToRem(28px);
}
span{
color:$mainFontC;
}
a{
float: right;
color: $subFontC;
span.iconfont{
color:inherit;
}
}
}
.nav-tab{
width: 100%;
}
.nav-tab {
height: pxToRem(60px);
padding: pxToRem(10px) 0;
background-color: #fff;
border-top: 1px solid $borderC;
border-bottom: 1px solid $borderC;
}
.comment-nav, .consult-nav {
box-sizing: border-box;
float: left;
width: 50%;
height: pxToRem(60px);
line-height: pxToRem(60px);
font-size: pxToRem(28px);
text-align: center;
color: #ccc;
&.focus {
color: #000;
}
}
.comment-nav {
border-right: 1px solid #ccc;
}
.content{
.content-main{
background-color: #fff;
border-bottom: 1px solid $borderC;
&.comment-content-main{
.user-name{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
color:$mainFontC;
padding-left: pxToRem(28px);
padding-right: pxToRem(18px);
}
.goods-spec,
.comment-time{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
}
.detail-content{
// font-size: pxToRem(28px);
// line-height: pxToRem(36px);
font-size: pxToRem(24px);
line-height: pxToRem(62px);
color:$mainFontC;
padding-left: pxToRem(28px);
padding-right: pxToRem(18px);
}
.goods-spec,
.comment-time{
font-size: pxToRem(24px);
line-height: pxToRem(62px);
}
.detail-content{
font-size: pxToRem(28px);
line-height: pxToRem(36px);
}
.goods-spec,
.detail-content{
color:$mainFontC;
}
.detail-content,
.comment-time{
padding-left: pxToRem(28px);
}
.detail-content{
padding-right: pxToRem(28px);
padding-left: pxToRem(28px);
}
.detail-content{
padding-right: pxToRem(28px);
}
.comment-time{
color:#c1c1c1;
}
}
&.consult-content-main{
padding-right: pxToRem(28px);
padding-left: pxToRem(28px);
padding-top: pxToRem(20px);
padding-bottom: pxToRem(20px);
.question{
font-size: pxToRem(24px);
color:$mainFontC;
span{
display: block;
float: left;
font-size: inherit;
padding-right: pxToRem(15px);
}
p{
overflow: hidden;
}
}
.time{
font-size: pxToRem(22px);
color:$subFontC;
}
.answer{
font-size: pxToRem(24px);
line-height: pxToRem(36px);
color:$subFontC;
margin-top: pxToRem(14px);
span{
display: block;
float: left;
font-size: inherit;
color:$mainFontC;
padding-right: pxToRem(15px);
>>>>>>> 94393aa29a7f2704e60f85d3aa6ac8b379aa612d
}
.swiper-pagination-bullet-active {
background-color: #000;
}
<<<<<<< HEAD
=======
}
}
&.no-item{
font-size: pxToRem(28px);
text-align: center;
height: pxToRem(200px);
line-height: pxToRem(200px);
color: $subFontC;
span{
font-size: inherit;
}
}
}
>>>>>>> 94393aa29a7f2704e60f85d3aa6ac8b379aa612d
}
... ...
... ... @@ -21,15 +21,15 @@
</div>
<div class="my-link clearfix {{^isLogin}}no-login{{/isLogin}}">
<a class="link-item" href="/home/favorite">
{{#if product_favorite_total}}{{product_favorite_total}}{{/if}}
{{#isLogin}}{{product_favorite_total}}{{/isLogin}}
<p>收藏的商品</p>
</a>
<a class="link-item" href="/home/favorite?tab=brand">
{{#if brand_favorite_total}}{{brand_favorite_total}}{{/if}}
{{#isLogin}}{{brand_favorite_total}}{{/isLogin}}
<p>收藏的品牌</p>
</a>
<a class="link-item" href="/home/">
{{#if product_browse}}{{product_browse}}{{/if}}
{{#isLogin}}{{product_browse}}{{/isLogin}}
<p>浏览记录</p>
</a>
</div>
... ...
... ... @@ -47,14 +47,23 @@
</div>
{{/goodsDiscount}}
<div class="feedback-list-page ">
<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>
</div>
{{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">
{{# comments}}
<span class="user-name">
... ... @@ -71,11 +80,19 @@
</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="{{moreComments}}">查看更多 <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">
... ... @@ -94,10 +111,24 @@
{{/ consults}}
</div>
<div class="consult-content-footer">
<a href="{{moreComments}}">查看更多 <span class="iconfont">&#xe604;</span></a>
<a href="{{moreConsults}}">
查看更多
<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="{{gotoConsults}}">
我要咨询
<span class="iconfont">&#xe604;</span></a>
</div>
{{/if}}
</div>
</div>
{{/if}}
{{/ feedbacks}}
</div>
... ...
... ... @@ -48,7 +48,7 @@ class HomeController extends AbstractAction
'myIndexPage' => true,
'pageFooter' => true
);
echo $this->getRequest()->getActionName();
// echo $this->getRequest()->getActionName();
$uid = $this->getUid();
if ($uid) {
$data['isLogin'] = true;
... ...
... ... @@ -13,6 +13,10 @@ class DetailController extends AbstractAction
*/
public function indexAction()
{
$commentsNum = 0;
$consultsNum = 0;
$nodate =0;
$data = array (
'goodsDetailPage' => true,
'pageHeader' => array (
... ... @@ -66,12 +70,14 @@ SHOE BQT KEN BLOCK',
),
'goodsDiscount'=>'【summer final sale】满¥499立享6.8折',
'feedbacks'=>array(
'commentsNum'=>2,
'consultsNum'=>10,
'commentsNum'=>0,
'consultsNum'=>0,
'nodata' =>0,
'commentName'=>'商品评价',
'consultName' =>'购买咨询',
'moreComments'=>'http://www.baidu.com',
'moreConsults'=>'http://www.baidu.com',
'gotoConsults'=>'http://www.baidu.com',
'comments'=>array(
array(
'userName'=>'Lynnic',
... ...