Authored by Rock Zhang

Merge branch 'develop/wap' into beta/wap

... ... @@ -99,6 +99,17 @@ function checkColorSizeNum() {
return true;
}
//禁用数字编辑
function disableNumEdit() {
var $numBtn = $('.chose-panel').find('.num .btn>.iconfont');
//添加disabled样式
$numBtn.hasClass('disabled') ? null : $numBtn.addClass('disabled');
$yohoPage.off('touchstart', '.btn-minus');
$yohoPage.off('touchstart', '.btn-plus');
}
function show(html, cb) {
var scrollPosition = [
... ... @@ -116,8 +127,7 @@ function show(html, cb) {
if (html) {
$chosePanel.html(html);
if ($('#promotionId').val() !== '') {
$yohoPage.off('touchstart', '.btn-minus');
$yohoPage.off('touchstart', '.btn-plus');
disableNumEdit();
}
init();
}
... ... @@ -496,4 +506,5 @@ exports.init = init;
exports.show = show;
exports.remove = removePannel;
exports.setEditModeWithSknId = setEditModeWithSknId;
exports.disableNumEdit = disableNumEdit;
... ...
... ... @@ -16,6 +16,9 @@ var dialog = require('../me/dialog'),
var $selectAllBtn = $('.balance .checkbox'),
requesting = false;
//上次编辑的商品skn
var previousEditSkn;
ellipsis.init();
lazyLoad({
... ... @@ -86,11 +89,12 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
*
* @param {Bool} isSelected. 所要编辑的商品是否被选中
*
* @return false;
* @param {Bool} isEditNum. 所要编辑的商品是否被选中
*
* @return false or undefined
*
*/
function showEditPannelWithSku(html, id, isSelected) {
function showEditPannelWithSku(html, id, isSelected, isEditNum) {
if (html.length < 2) {
tip.show('出错啦!');
return false;
... ... @@ -100,21 +104,47 @@ function showEditPannelWithSku(html, id, isSelected) {
chosePanel.remove();
$(html).appendTo('#mainCart');
chosePanel.init();
chosePanel.setEditModeWithSknId(id, isSelected);
chosePanel.show();
return false;
if (!isEditNum) {
chosePanel.disableNumEdit();
}
chosePanel.show();
}
$('.icon-edit').on('touchstart', function(e) {
var $this = $(this),
$checkBox = $this.closest('.info').siblings('.checkbox');
skn = $this.closest('.shopping-cart-good').data('skn');
var $checkBox,
$tag;
var id,
count,
canEditNum;
//如果点击的是上次编辑的商品,直接显示chose-pannel
if (skn === previousEditSkn) {
chosePanel.show();
return;
}
previousEditSkn = skn;
$checkBox = $this.closest('.info').siblings('.checkbox');
$tag = $this.closest('.deps').siblings('.few-tag');
id = $this.closest('.shopping-cart-good').data('id');
count = $this.data('count');
var skn = $this.closest('.shopping-cart-good').data('skn'),
id = $this.closest('.shopping-cart-good').data('id'),
count = $this.data('count');
//加价购或者赠品不能编辑数量
canEditNum = $tag.hasClass('gift-tag') || $tag.hasClass('plus-tag') ? false : true;
e.stopPropagation();
... ... @@ -128,7 +158,7 @@ $('.icon-edit').on('touchstart', function(e) {
buy_num: count
},
success: function(res) {
showEditPannelWithSku(res, id, $checkBox.hasClass('icon-cb-checked'));
showEditPannelWithSku(res, id, $checkBox.hasClass('icon-cb-checked'), canEditNum);
},
error: function() {
tip.show('网络异常');
... ...
... ... @@ -29,6 +29,8 @@ module.exports = function(specificGender) {
index,
$navList = $('#maybe-like-nav');
var $footer;
//ajax url
if (kidsType) {
url = '/product/recom/maylikekids';
... ... @@ -92,15 +94,11 @@ module.exports = function(specificGender) {
page: page + 1
},
success: function(data) {
if (data === ' ') {
searching = false;
loading.hideLoadingMask();
//修复有货币页面最后一条数据显示被遮挡的问题
if (specificGender) {
window.rePosFooter();
}
// 有货币页面不加载底部
if (gender && !specificGender) {
if (gender === '1,3') {
... ... @@ -126,6 +124,12 @@ module.exports = function(specificGender) {
return;
}
//加载到数据后,去除bottom样式,使得footer能够随着页面长度的增加改变位置
if (data.length > 1) {
$footer ? null : $footer = $('#yoho-footer');
$footer.hasClass('bottom') ? $footer.removeClass('bottom') : null;
}
num = $goodList.find('.good-info').length;
$goodList.append(data);
... ...
... ... @@ -14,7 +14,7 @@
.checkbox {
position: absolute;
top: 50%;
margin-top: -14rem / $pxConvertRem;
margin-top: -34rem / $pxConvertRem;
margin-left: 8rem / $pxConvertRem;
font-size: 28rem / $pxConvertRem;
... ...
... ... @@ -126,13 +126,25 @@
width: 100%;
height: 90rem / $pxConvertRem;
overflow: hidden;
@include background-image(linear-gradient(#323232, #414141));
border-top: 1px solid #444;
border-top: 1px solid #fff;
color: #fff;
// position: absolute;
// top: 90rem / $pxConvertRem;
// left: 0;
// z-index: 10;
&.boys {
@include background-image(linear-gradient(#323232, #414141));
}
&.girls {
background: #ff88ae;
}
&.kids {
background: #7ad9f9;
}
&.life-style {
background: #4f4138;
}
ul{
width: 100%;
height: 90%;
... ...
... ... @@ -9,8 +9,6 @@ $border_color_light: #eee;
.logistic-page {
background-color: $logistic_gray;
@include set-singleBorder("bottom", $border_color_light);
.overview {
height: 120rem / $pxConvertRem;
line-height: 120rem / $pxConvertRem;
... ... @@ -66,9 +64,6 @@ $border_color_light: #eee;
font-size: 40rem / $pxConvertRem;
color: #4f4f4f;
@include set-singleBorder("top", $border_color_strong);
@include set-singleBorder("bottom", $border_color_light);
}
.detail {
... ...
... ... @@ -20,7 +20,7 @@
{{/navTitle}}
</header>
{{#navBtn}}
<div class="homebuttom none">
<div class="homebuttom none {{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}">
<ul>
<li>
<a href="{{ indexUrl }}">
... ...
... ... @@ -112,6 +112,12 @@ class OrderModel
break;
}
// 获取物流详情页banner
$banner = self::getLogisterBanner();
if ($banner) {
$result['banner'] = $banner;
}
$logistics = OrderData::LogisticsData($orderCode, $uid);
if (empty($logistics['data'])) {
break;
... ... @@ -129,12 +135,6 @@ class OrderModel
$result['logisticDetail'][] = $build;
}
// 获取物流详情页banner
$banner = self::getLogisterBanner();
if ($banner) {
$result['banner'] = $banner;
}
} while (false);
return $result;
... ...