Authored by biao

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

... ... @@ -21,7 +21,7 @@ use LibModels\Wap\Product\SearchData;
class PlusstarData
{
const URI_BRANDLIST = 'guang/api/v1/plustar/getlist';
const URI_BRANDLIST = 'guang/api/v3/plustar/getlist';
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/';
... ... @@ -45,19 +45,20 @@ class PlusstarData
// 公共的参数
$param = Yohobuy::param();
$param['brand_type'] = '1';
$param['gender'] = $gender;
$param['yh_channel'] = $channel;
// 构建推荐的品牌参数及调用接口的URL
$build = $param;
$build['is_recommend'] = '1';
$build['brand_type'] = '4';
//$build['is_recommend'] = '1';
$build['client_secret'] = Sign::getSign($build);
$urlList['recom'] = Yohobuy::httpBuildQuery($url, $build);
// 构建所有的品牌参数及调用接口的URL
$build = $param;
$build['is_recommend'] = '0';
$build['brand_type'] = '1';
//$build['is_recommend'] = '0';
$build['client_secret'] = Sign::getSign($build);
$urlList['all'] = Yohobuy::httpBuildQuery($url, $build);
... ...
... ... @@ -101,6 +101,9 @@ $addressForm.on('submit', function() {
});
$submit.on('touchend', function() {
if (security.hasDangerInput(false)) {
return false;
}
$input.blur();
$addressForm.submit();
return false;
... ...
... ... @@ -6,12 +6,9 @@
var $ = require('jquery'),
tip = require('../plugin/tip'),
security = require('../plugin/security'),
loading = require('../plugin/loading');
var $action = $('.action'),
$addressForm = $('.edit-address'),
$submit = $('.submit'),
$addAddress = $('.add-address'),
$footer = $('#yoho-footer'),
$confim = $('.confim-mask'),
... ... @@ -24,12 +21,13 @@ $pageWrap.first().css('min-height', function() {
});
window.rePosFooter();
$confim.on('touchend', '.cancel', function() {
$confim.on('touchend', '.cancel', function(e) {
deleteId = null;
$confim.hide();
$confim.fadeOut();
return false;
}).on('touchend', '.confim', function() {
loading.showLoadingMask();
$confim.hide();
$confim.fadeOut();
$.ajax({
method: 'POST',
url: '/home/delAddress',
... ... @@ -52,6 +50,7 @@ $confim.on('touchend', '.cancel', function() {
}).always(function() {
deleteId = null;
});
return false;
});
... ... @@ -69,17 +68,5 @@ $addAddress.on('touchend', function() {
// 删除
$action.on('touchend', '.del', function() {
deleteId = $(this).data('id');
$confim.show();
});
$submit.on('touchend', function() {
if (security.hasDangerInput(false)) {
return false;
}
$addressForm.submit();
return false;
}).on('touchstart', function() {
$(this).addClass('highlight');
}).on('touchend touchcancel', function() {
$(this).removeClass('highlight');
$confim.fadeIn();
});
... ...
... ... @@ -114,11 +114,13 @@ $page.on('touchstart', '.del-icon', function() {
});
setTimeout(function() {
window.history.go(0);
}, 2500);
}, 1200);
}
},
complete: function() {
dialog.hideDialog(); //隐藏dialog
setTimeout(function() {
dialog.hideDialog();
}, 1500);
}
});
});
... ...
... ... @@ -37,7 +37,7 @@ function getOrders(option) {
page: order.page + 1
};
var show = option && option.showLoadingMask;
var show = option && !option.noLoadingMask;
if (inAjax) {
return;
... ...
... ... @@ -10,7 +10,14 @@ var $ = require('jquery'),
var commentsNum,consultsNum;
var consultFooterEle = document.getElementById('consult-content-footer'),
consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle);
consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle),
navtabEle = document.getElementById('nav-tab'),
navtabHammer = navtabEle && new Hammer(navtabEle),
gotoConsultEle = document.getElementById('goto-consult'),
gotoConsultHammer = gotoConsultEle && new Hammer(gotoConsultEle);
(function() {
... ... @@ -36,29 +43,38 @@ var consultFooterEle = document.getElementById('consult-content-footer'),
})();
$('#nav-tab li').on('touchend', function() {
var index = $(this).index();
if (navtabHammer) {
navtabHammer.on('tap', function(e) {
var $this = $(e.target).closest('li');
var index = $this.index();
if ($(this).hasClass('comment-nav') && 0 === commentsNum) {
tip.show('暂无商品评价');
} else {
if (!$(this).hasClass('focus')) {
if ($this.hasClass('comment-nav') && 0 === commentsNum) {
tip.show('暂无商品评价');
} else {
if (!$this.hasClass('focus')) {
$('#nav-tab li').each(function() {
$(this).removeClass('focus');
});
$('#feedback-content .content').each(function() {
$(this).addClass('hide');
});
$('#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');
}
}
}
});
});
}
if (consultFooterHammer) {
consultFooterHammer.on('tap', function() {
location.href = $(consultFooterEle).find('a').attr('href');
});
}
if (gotoConsultHammer) {
gotoConsultHammer.on('tap', function() {
location.href = $(gotoConsultEle).find('a').attr('href');
});
}
\ No newline at end of file
... ...
... ... @@ -47,14 +47,15 @@
font-size: 50px;
}
p{
width: 55.517241%;
width: 59.517241%;
height: auto;
padding: 0 5% 18em / $pxConvertRem;
margin: 0 3% 16em / $pxConvertRem;
float: left;
&:first-of-type{
padding-top: 0.75rem;
margin-top: 0.75rem;
font-size: 18px;
height: 76rem / $pxConvertRem;
height: auto;
min-height: 42px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
... ...
... ... @@ -310,7 +310,6 @@
line-height: pxToRem(65px);
text-align: center;
font-size: pxToRem(22px);
color: #fff;
.price-discount {
span {
... ...
... ... @@ -53,8 +53,8 @@
display: block;
position: relative;
i{
width:80rem / $pxConvertRem;
height: 30rem / $pxConvertRem;
width:72rem / $pxConvertRem;
height: 32rem / $pxConvertRem;
overflow: hidden;
display: block;
position: absolute;
... ...
... ... @@ -13,21 +13,28 @@
.basic-info {
padding-top: 30rem / $pxConvertRem;
padding-bottom: 25rem / $pxConvertRem;
p{
width: 100%;
height: auto;
overflow: hidden;
display: block;
}
span{
float: left;
overflow: hidden;
}
.user-name {
max-width: 240rem / $pxConvertRem;
text-overflow:ellipsis;
white-space:nowrap;
font-size: 25rem / $pxConvertRem;
margin-right: 0.5rem;
display: inline-block;
overflow: hidden;
}
.vip-icon {
display: inline-block;
width: pxToRem(72px);
height: pxToRem(32px);
vertical-align: sub;
line-height: 36rem / $pxConvertRem;
}
.vip-3 {
... ...
{{#coupons}}
<div class="employ-main" style="background-image:url('{{coupon_pic}}')">
<div class="employ-main">
<span>{{ money}}</span>
<p class="coupon-name">{{ coupon_name}}</p>
<p>有效期:{{ couponValidity}}</p>
... ...
{{> layout/header}}
<div class="goods-consults-page yoho-page">
<div class="goto-consult">
<i class="iconfont consult-logo">&#xe639;</i>
<span>我要咨询</span>
<a href="{{link}}" class="iconfont enter-consult-page">&#xe604;</a>
</div>
<div class="goto-consult" id="goto-consult">
<i class="iconfont consult-logo">&#xe639;</i>
<span>我要咨询</span>
<a href="{{link}}" class="iconfont enter-consult-page">&#xe604;</a>
</div>
{{# consults}}
<div class="goods-consults" id="goods-consults">
{{#list}}
... ...
... ... @@ -30,7 +30,7 @@ class HomeController extends AbstractAction
{
$uid = $this->getUid($useSession);
if (!$uid) {
$this->go(Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/'))));
$this->go(Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', SITE_MAIN))));
}
}
... ... @@ -785,7 +785,7 @@ class HomeController extends AbstractAction
if (empty($orderCode)) {
$this->error();
}
$this->_view->display('pay', array(
'payCenterPage' => true,
'payAppInfo' => array(
... ... @@ -807,6 +807,7 @@ class HomeController extends AbstractAction
),
),
'orderCode' => $orderCode,
'hasWxShare' => strpos($this->_request->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false
));
}
... ...
... ... @@ -51,7 +51,7 @@ class PlusstarModel
}
$result = array();
$brandList = PlusstarData::firstBrandList($gender, $channel);
$brandList = PlusstarData::firstBrandList($gender, $channel);
if (!empty($brandList['recom']['data']['list'][0]['data'])) {
$result['ps']['star'] = self::formatData($brandList['recom']['data']['list'][0]['data'], $gender, true);
//$result['ps']['sName'] = isset($brandList['recom']['data']['brand_type_name']) ? $brandList['recom']['data']['brand_type_name'] : '';
... ... @@ -107,7 +107,7 @@ class PlusstarModel
}
$result = array();
$brandList = PlusstarData::brandList($gender, $channel);
$brandList = PlusstarData::brandList($gender, $channel);
if (!empty($brandList['star']['data']['list'][0]['data'])) {
$result['ps']['star'] = self::formatData($brandList['star']['data']['list'][0]['data'], $gender, false);
//$result['ps']['pName'] = isset($brandList['star']['data']['brand_type_name']) ? $brandList['star']['data']['brand_type_name'] : '';
... ...
... ... @@ -251,7 +251,7 @@ class UserModel
$product['link'] = isset($one['goods'][0]) ? Helpers::url('/product/pro_' . $one['product_id'] . '_' . $one['goods'][0]['id'] . '/' . $one['cnAlphabet'] . '.html') : '';
$product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : '';
$product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] : 0;
$product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] : 0;
$product['discount'] = ($one['market_price'] > $one['sales_price']) ? '¥' . $one['sales_price'] : false;
$brand['productList'][] = $product;
}
... ...
... ... @@ -23,16 +23,16 @@ class NewsaleModel
/* 男生频道取新品到着及折扣专区数据的位置码 */
const CODE_TOP_NEW_BOYS = '3cf2c1be5217fbab6009ce83959e1e12';
const CODE_TOP_SALE_BOYS = 'e9c9be32d72e2906d404a72ee24cb523';
const CODE_TOP_SALE_BOYS = '153180b9a88c0b565848850c523bb637';
/* 女生频道取新品到着及折扣专区数据的位置码 */
const CODE_TOP_NEW_GIRLS = '1cf7f9f10e2a2670e73d05c568793ad9';
const CODE_TOP_SALE_GIRLS = '785c0e6aab746949073c4ffb9d5106ac';
const CODE_TOP_SALE_GIRLS = '0b2d133419a0f7c381306fd3522365e1';
/* 潮童频道取新品到着及折扣专区数据的位置码 */
const CODE_TOP_NEW_KIDS = '57457adececa6c748b29c90cad0ae940';
const CODE_TOP_SALE_KIDS = 'ad1bb67a6007819c86f737d74172fd2e';
const CODE_TOP_SALE_KIDS = 'de23648d28ee1e8a3f087a9dbac506f8';
/* 创意生活频道取新品到着及折扣专区数据的位置码 */
const CODE_TOP_NEW_LIFESTYLE = '04953a61cbf1db426a681e55d496d2fe';
const CODE_TOP_SALE_LIFESTYLE = '8132c7db3adbeb7b0d0002de9691c753';
const CODE_TOP_SALE_LIFESTYLE = '01269e498ff5b07756e0733ec0e88c75';
/**
* 获取新品到着的焦点图资源数据
... ...