Authored by uedxwg

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];
}
... ...
... ... @@ -247,6 +247,9 @@ class ListProcess
private static function priceRange($data)
{
// 首先对价格进行排序
ksort($data, SORT_NUMERIC);
$result = array(
'title' => '价格',
'name' => '所有价格',
... ...
require 'compass/import-once/activate'
# autoprefixer自动加浏览器前缀
# 需要先安装, gem install autoprefixer-rails
# require 'autoprefixer-rails'
#
# on_stylesheet_saved do |file|
# css = File.read(file)
# map = file + '.map'
# browsers = ['> 1%', 'ie 8']
#
# if File.exists? map
# result = AutoprefixerRails.process(css,
# from: file,
# to: file,
# browsers: browsers,
# map: { prev: File.read(map), inline: false })
# File.open(file, 'w') { |io| io << result.css }
# File.open(map, 'w') { |io| io << result.map }
# else
# File.open(file, 'w') { |io| io << AutoprefixerRails.process(css, browsers) }
# end
# end
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
... ... @@ -25,4 +49,4 @@ line_comments = false
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
Encoding.default_external = "utf-8"
\ No newline at end of file
Encoding.default_external = "utf-8"
... ...
... ... @@ -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.
... ... @@ -71,8 +71,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;
... ...
... ... @@ -112,7 +112,6 @@ function loadData($parent, url, page) {
} else {
return;
}
window.rePosFooter();
//},1000);
}
... ...
... ... @@ -82,6 +82,8 @@ $.ajax({
}
});
if ($('.good-detail-page').length > 0) {
$('#yoho-footer').css('border-top', '1px solid #e0e0e0');
}
require('./like');
... ...
... ... @@ -14,15 +14,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();
... ...
... ... @@ -45,4 +45,4 @@
}
}
}
}
\ No newline at end of file
}
... ...
... ... @@ -35,6 +35,7 @@
.sum-cost {
color: #e01;
margin-left: 5px;
}
.order-opt {
... ...
... ... @@ -31,6 +31,15 @@ $basicBtnC:#eb0313;
margin-bottom: pxToRem(20px);
font-size: pxToRem(24px);
line-height: pxToRem(36px);
b {
font-weight: bold;
}
i {
font-style: italic;
}
&.table {
@include flexbox((
display: box,
... ... @@ -208,18 +217,19 @@ $basicBtnC:#eb0313;
height: auto;
li {
float: left;
img {
height: auto;
}
}
}
}
.goodsName {
box-sizing: border-box;
width: 100%;
min-height: pxToRem(88px);
font-size: pxToRem(28px);
color: #fff;
padding-left: pxToRem(28px);
padding-right: pxToRem(28px);
line-height: pxToRem(36px);
padding: pxToRem(20px) pxToRem(28px);
line-height: pxToRem(48px);
background-color: #515150;
}
.goodsSubtitle {
... ... @@ -278,14 +288,14 @@ $basicBtnC:#eb0313;
line-height: pxToRem(88px);
}
}
.goodsName {
// width: 100%;
display: table;
span {
display: table-cell;
vertical-align: middle;
}
}
// .goodsName {
// // width: 100%;
// display: table;
// span {
// display: table-cell;
// vertical-align: middle;
// }
// }
.vip-level {
box-sizing: box-border;
padding-left: pxToRem(28px);
... ... @@ -360,21 +370,28 @@ $basicBtnC:#eb0313;
}
}
.enter-store {
min-height: pxToRem(100px);
display: table;
position: relative;
padding: 0 pxToRem(180px) 0 pxToRem(114px);
line-height: pxToRem(84px);
background-color: #fff;
a {
display: table-cell;
vertical-align: middle;
text-align: left;
}
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
.store-logo {
// padding-right: 35rem/$pxConvertRem;
position: absolute;
left: 0;
top: 1px;
width: pxToRem(68px);
height: pxToRem(84px);
margin-left: pxToRem(30px);
font-size: 0;
text-align: center;
img {
display: inline-block;
width: auto;
height: pxToRem(68px);
margin-left: 0;
margin-right: pxToRem(-25px);
vertical-align: middle;
}
}
.store-name {
... ... @@ -382,6 +399,10 @@ $basicBtnC:#eb0313;
color: $mainFontC;
}
.store-link {
position: absolute;
right: 0;
top: 1px;
padding-right: pxToRem(30px);
font-size: pxToRem(28px);
color: $subFontC;
text-align: right;
... ... @@ -402,6 +423,7 @@ $basicBtnC:#eb0313;
z-index: 2;
padding: pxToRem(20px) pxToRem(28px);
text-align: center;
border-top: 1px solid $borderC;
a {
display: inline-block;
&.num-incart {
... ... @@ -423,7 +445,7 @@ $basicBtnC:#eb0313;
margin: 0 pxToRem(100px) 0 pxToRem(115px);
color: #fff;
background-color: $basicBtnC;
font-size: pxToRem(40px);
font-size: pxToRem(32px);
line-height: pxToRem(80px);
text-align: center;
}
... ... @@ -447,9 +469,9 @@ $basicBtnC:#eb0313;
}
}
}
// .recommend-for-you {
// margin-bottom: pxToRem(30px);
// }
.recommend-for-you{
border-bottom: none;
}
.yoho-tip{
top:40%;
}
... ...
... ... @@ -38,8 +38,8 @@
<div class="price-date">
{{# goodsPrice}}
<div class="goodsPrice">
<h1 class="currentPrice">{{currentPrice}}</h1>
<h1 class="previousPrice">{{previousPrice}}</h1>
<h1 class="currentPrice"{{currentPrice}}</h1>
<h1 class="previousPrice"{{previousPrice}}</h1>
</div>
{{/ goodsPrice}}
... ... @@ -57,7 +57,7 @@
<li class="icons-item {{#if currentLevel}}current-level{{/if}}">
<span class="vip-img " style="background-size:contain;">
</span>
<span class="vip-price ">{{text}}</span>
<span class="vip-price ">¥{{text}}</span>
</li>
{{/ list}}
</ul>
... ...
... ... @@ -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);
... ... @@ -204,7 +204,7 @@ class LoginController extends AbstractAction
$access = $qqconnect->getAccessToken();
/* 获取QQ腾讯用户的详细信息 */
$partnerInfo = $qqconnect->getUserInfo($access);
$result = array();
if ($partnerInfo && is_array($partnerInfo)) {
$result = LoginData::signinByOpenID($partnerInfo['nickname'], $access['openid'], 'qq');
... ... @@ -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);
... ...
... ... @@ -177,7 +177,7 @@ class NewsaleController extends AbstractAction
$color = $this->get('color', null);
$size = $this->get('size', null);
$price = $this->get('price', null);
$p_d = $this->get('discount', null);
$p_d = '0.1,0.3';
$dayLimit = $this->get('dayLimit', null);
$limit = $this->get('limit', 60);
$page = $this->get('page', 1);
... ...