Authored by 毕凯

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.
... ... @@ -16,9 +16,9 @@ var introUrl = $('#introUrl').val(),
end = false;
var sizeSwiper,
d = document.documentElement.style
refSwiper;
var UA = navigator.userAgent.toLowerCase().toString();
//判断是否要显示向左滑动提示
function hiddenTips($ele) {
... ... @@ -38,6 +38,7 @@ function hiddenTips($ele) {
}
}
function search() {
if (searching || end) {
return;
... ... @@ -71,8 +72,9 @@ function search() {
hiddenTips($('#size-swiper-container'));
hiddenTips($('#reference-swiper-container'));
if (UA.indexOf('mqqbrowser') > 0) {
$('.detail > div').removeClass('column').addClass('oldbox');
if (('flexWrap' in d) || ('WebkitFlexWrap' in d))) {
$('.detail .column').removeClass('column').addClass('oldbox');
}
searching = false;
end = true;
... ...
... ... @@ -88,9 +88,11 @@
position: relative;
float: left;
color: #fff;
font-size: pxToRem(22px);
line-height: pxToRem(38px);
font-size: pxToRem(32px);
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;
}
}
... ...
... ... @@ -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);
... ...