Authored by xuqi

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

... ... @@ -306,6 +306,9 @@ class AbstractAction extends Controller_Abstract
if (isset($cookieList[1]) && is_numeric($cookieList[1])) {
if ($useSession) {
$token = $this->getSession('_TOKEN');
if (empty($token)) {
$token = $this->getCookie('_TOKEN');
}
if ($token === Helpers::makeToken($cookieList[1])) {
$this->_uid = $cookieList[1];
}
... ...
... ... @@ -2028,8 +2028,8 @@ $('#search').on('touchend', function() {
if (historys && historys.length > 0) {
historys = historys.split(ranToken);
for (i = 0; i < historys.length; i++) {
history = historys[i];
for (i = historys.length; i > 0; i--) {
history = historys[i - 1];
if (history === '') {
continue;
... ... @@ -4711,7 +4711,7 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'),
goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
var $cart = $('.cart-bar');
var UA = navigator.userAgent.toLowerCase().toString();
require("js/product/detail/desc");
require("js/product/detail/comments-consults");
... ... @@ -4777,9 +4777,10 @@ $.ajax({
}
});
if (UA.indexOf('mqqbrowser') > -1) {
$('.detail > div').removeClass('column').addClass('oldbox');
if ($('.good-detail-page').length > 0) {
$('#yoho-footer').css('border-top', '1px solid #e0e0e0');
}
require("js/product/detail/like");
});
... ... @@ -4804,6 +4805,8 @@ var introUrl = $('#introUrl').val(),
var sizeSwiper,
refSwiper;
var UA = navigator.userAgent.toLowerCase().toString();
//判断是否要显示向左滑动提示
function hiddenTips($ele) {
var offsetContainer,
... ... @@ -4855,7 +4858,9 @@ function search() {
hiddenTips($('#size-swiper-container'));
hiddenTips($('#reference-swiper-container'));
if (UA.indexOf('mqqbrowser') > 0) {
$('.detail > div').removeClass('column').addClass('oldbox');
}
searching = false;
end = true;
loading.hideLoadingMask();
... ... @@ -4986,15 +4991,19 @@ var recommendSwiper,
if (preferenceUrl) {
$.get(preferenceUrl).then(function(html) {
$recommendForYou.html(html).show();
if ($('#swiper-recommend').length) {
recommendSwiper = new Swiper('#swiper-recommend', {
slidesPerView: 'auto',
grabCursor: true,
slideElement: 'a',
lazyLoading: true,
watchSlidesVisibility: true
});
if (html.length < 5) {
$recommendForYou.css('display', 'none');
} else {
$recommendForYou.html(html).show();
if ($('#swiper-recommend').length) {
recommendSwiper = new Swiper('#swiper-recommend', {
slidesPerView: 'auto',
grabCursor: true,
slideElement: 'a',
lazyLoading: true,
watchSlidesVisibility: true
});
}
}
window.rePosFooter();
... ... @@ -5784,7 +5793,6 @@ function loadData($parent, url, page) {
} else {
return;
}
window.rePosFooter();
//},1000);
}
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -18,7 +18,6 @@ var introUrl = $('#introUrl').val(),
var sizeSwiper,
refSwiper;
var UA = navigator.userAgent.toLowerCase().toString();
//判断是否要显示向左滑动提示
function hiddenTips($ele) {
... ... @@ -38,6 +37,19 @@ function hiddenTips($ele) {
}
}
function isFlexSupport() {
var flex = document.createElement('p').style.flex,
webkitFlex = document.createElement('p').style.webkitFlex,
flexWrap = document.createElement('p').style.flexWrap;
if ((flex === '' || webkitFlex === '') && flexWrap === '') {
return true;
} else {
return false;
}
}
function search() {
if (searching || end) {
return;
... ... @@ -71,8 +83,9 @@ function search() {
hiddenTips($('#size-swiper-container'));
hiddenTips($('#reference-swiper-container'));
if (UA.indexOf('mqqbrowser') > 0) {
$('.detail > div').removeClass('column').addClass('oldbox');
if (!isFlexSupport()) {
$('.detail .column').removeClass('column').addClass('oldbox');
}
searching = false;
end = true;
... ...
... ... @@ -457,5 +457,6 @@ $listNav.on('touchstart', 'li', function() {
// 用于统计点击了商品列表的第几个商品,序号从1开始计算。
if (window._yas) {
window._yas(1 * new Date(), '1.0.13.2', 'yohobuy_m', window._ozuid, '#goods-container >div >div .good-thumb >img');
window._yas(1 * new Date(), '1.0.13.2', 'yohobuy_m', window._ozuid,
'', '#goods-container >div >div .good-thumb >img');
}
\ No newline at end of file
... ...
... ... @@ -88,9 +88,13 @@
position: relative;
float: left;
color: #fff;
font-size: pxToRem(22px);
line-height: pxToRem(38px);
width: pxToRem(213px);
font-size: pxToRem(32px);
width: pxToRem(320px);
// width: pxToRem(213px); 三栏宽度
p {
font-size: pxToRem(22px);
}
&:after {
content: '';
... ...
... ... @@ -113,7 +113,9 @@
display: block;
}
}
.cost {
padding: 0 0 0 30rem / $pxConvertRem;
}
.cost li {
height: 90rem / $pxConvertRem;
line-height: 90rem / $pxConvertRem;
... ... @@ -125,6 +127,7 @@
}
> span {
float: right;
padding: 0 30rem / $pxConvertRem 0 0;
}
}
... ...
... ... @@ -168,6 +168,9 @@
&.focus {
color: #000;
}
.comments-num {
display: none;
}
}
.comment-nav {
border-right: 1px solid #ccc;
... ...
... ... @@ -350,12 +350,18 @@ $basicBtnC:#eb0313;
background-color: #fff;
border-bottom: 1px solid $borderC;
h1 {
padding: pxToRem(30px) pxToRem(28px);
position: relative;
padding: pxToRem(30px) pxToRem(60px) pxToRem(30px) pxToRem(28px);
line-height: pxToRem(36px);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
// line-height: pxToRem(88px);
}
.iconfont {
display: inline-block;
position: absolute;
top: pxToRem(30px);
right: pxToRem(36px);
width: pxToRem(35px);
font-size: pxToRem(45px);
float: right;
... ...
... ... @@ -28,10 +28,14 @@
{{#isLogin}}{{brand_favorite_total}}{{/isLogin}}
<p>收藏的品牌</p>
</a>
{{!
<a class="link-item" href="/home/record">
{{#isLogin}}{{product_browse}}{{/isLogin}}
<!-- product_browse -->
<p>浏览记录</p>
</a>
}}
</div>
<div class="my-order">
<div class="order-title">
... ... @@ -102,6 +106,7 @@
<span class="iconfont num">&#xe604;</span>
</a>
</div>
{{!
<div class="group-list">
<a class="list-item" href="/help.html">
<span class="iconfont icon">&#xe639;</span>
... ... @@ -109,6 +114,7 @@
<span class="iconfont num">&#xe604;</span>
</a>
</div>
}}
{{> product/recommend-for-you}}
{{> product/suspend-cart}}
... ...
<ul id="nav-tab" class="nav-tab clearfix">
<li class="comment-nav">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li>
<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" >
... ... @@ -27,7 +27,7 @@
</div>
{{/if}}
<!-- <div class="comment-content-footer">
<a href="{{link}}">查看更多 <span class="iconfont">&#xe604;</span></a>
<a href="{{link}}">查看更多 <span class="iconfont">&#xe604;</span></a>
</div> -->
</div>
... ... @@ -51,8 +51,8 @@
</div>
<div class="consult-content-footer" data-href="{{link}}">
<a href="javascript:;">
查看更多
<span class="iconfont">&#xe604;</span></a>
查看更多
<span class="iconfont">&#xe604;</span></a>
</div>
{{else}}
<div class="consult-content-main content-main no-item">
... ... @@ -61,9 +61,9 @@
<div class="consult-content-footer" data-href="{{link}}">
<a href="javascript:;">
我要咨询
<span class="iconfont">&#xe604;</span></a>
我要咨询
<span class="iconfont">&#xe604;</span></a>
</div>
{{/if}}
</div>
</div>
\ No newline at end of file
</div>
... ...
... ... @@ -805,7 +805,7 @@ class HomeController extends AbstractAction
'payLink' => '',
'appId' => 'weixin',
'app' => '微信支付',
'hint' => '需安装微信客户端',
'hint' => '推荐使用',
'subHint' => '',
),
),
... ...
... ... @@ -79,7 +79,7 @@ class DetailModel
$result['goodsPrice'] = array();
$result['goodsPrice']['currentPrice'] = $baseInfo['productPriceBo']['formatSalesPrice'];
if ($baseInfo['productPriceBo']['formatMarketPrice'] !== $baseInfo['productPriceBo']['formatSalesPrice']) {
$result['goodsPrice']['previousPrice'] = $baseInfo['productPriceBo']['formatMarketPrice'];
$result['goodsPrice']['previousPrice'] = strtr($baseInfo['productPriceBo']['formatMarketPrice'], array('¥' => ''));
}
}
// VIP商品价格
... ... @@ -87,7 +87,7 @@ class DetailModel
$build = array();
foreach ($baseInfo['productPriceBo']['vipPrices'] as $value) {
$build['level'] = $value['vipLevel'];
$build['text'] = $value['vipPrice'];
$build['text'] = strtr($value['vipPrice'], array('¥' => ''));
$build['currentLevel'] = ($value['vipLevel'] == $vipLevel) ? true : false;
$result['vipLevel']['list'][] = $build;
}
... ... @@ -419,7 +419,7 @@ class DetailModel
if (isset($sizeInfo['productIntroBo']['productIntro'])) {
$productIntro = '';
if (!empty($sizeInfo['productDescBo']['phrase'])) {
$productIntro .= $sizeInfo['productDescBo']['phrase'];
$productIntro .= $sizeInfo['productDescBo']['phrase'] . '<br/>';
}
$productIntro .= $sizeInfo['productIntroBo']['productIntro'];
if ($productIntro) {
... ...
... ... @@ -118,7 +118,7 @@ class LoginController extends AbstractAction
}
/* 调用登录接口进行登录 */
$data = LoginData::signin($area, $profile, $password);
$data = LoginData::signin($area, $profile, $password);
if ($data['code'] != 200 || !isset($data['data']['uid'])) {
break;
}
... ... @@ -187,8 +187,8 @@ class LoginController extends AbstractAction
$refer = rawurldecode($refer);
}
if ($result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid']));
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
$this->go($refer);
... ... @@ -217,8 +217,8 @@ class LoginController extends AbstractAction
$refer = rawurldecode($refer);
}
if ($result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid']));
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
$this->go($refer);
... ... @@ -247,8 +247,8 @@ class LoginController extends AbstractAction
$refer = rawurldecode($refer);
}
if ($result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid']));
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
$this->go($refer);
... ...