Authored by hf

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

... ... @@ -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);
}
});
});
... ...
... ... @@ -10,7 +10,10 @@ 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);
(function() {
... ... @@ -36,26 +39,29 @@ 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() {
... ...
... ... @@ -9,23 +9,30 @@
border: 1px solid #eee;
border-radius: 10rem / $pxConvertRem;
padding: (12rem / $pxConvertRem) (20rem / $pxConvertRem);
display: flex;
align-items: center;
margin-bottom: 20rem / $pxConvertRem;
@include flexbox((display: box, box-align: center), $version: 1);
@include flexbox((display: flex, align-items: center));
> div {
min-height: 40rem / $pxConvertRem;
display: flex;
align-items: center;
@include flexbox((box-flex: 1, display: box, bax-align: center), $version: 1);
@include flexbox((display: flex, align-items: center));
}
.icon {
width: 15%;
@include flexbox((flex-basis: 15%));
img {
width: 60rem / $pxConvertRem;
margin: 0;
}
> div {
width: 60rem / $pxConvertRem;
height: 60rem / $pxConvertRem;
... ... @@ -39,19 +46,29 @@
.app {
width: 40%;
@include flexbox((flex-basis: 40%));
font-size: 32rem / $pxConvertRem;
color: #414141;
}
.hint {
width: 40%;
@include flexbox((flex-basis: 40%));
font-size: 24rem / $pxConvertRem;
color: #4b4b4b;
}
.iconfont {
width: 5%;
justify-content: flex-end;
@include flexbox((box-pack: end), $version: 1);
@include flexbox((flex-basis: 5%, justify-content: flex-end));
color: #e0e0e0;
font-size: 28rem / $pxConvertRem;
}
... ...
... ... @@ -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 {
... ...
... ... @@ -33,6 +33,11 @@ $basicBtnC:#eb0313;
line-height: pxToRem(36px);
&.table {
@include flexbox((
display: box,
box-lines: multiple,
box-pack: start
), $version: 1);
@include flexbox((
display: flex,
flex-wrap: wrap,
justify-content: flex-start
... ... @@ -42,11 +47,17 @@ $basicBtnC:#eb0313;
box-sizing: border-box;
//padding: pxToRem(20px) pxToRem(12px);
padding: 4% 3%;
//width: 50%;
width: 49.9%;
border-bottom: pxToRem(4px) solid #fff;
border-right: pxToRem(4px) solid #fff;
font-size: pxToRem(24px);
background-color: $tableCellC;
word-wrap: break-word;
@include flexbox((
box-flex: 1.0,
display: box,
box-align: center
), $version: 1);
@include flexbox((
display: flex,
align-items: center,
... ...
... ... @@ -2,12 +2,7 @@
.goods-desc {
padding-bottom: pxToRem(20px);
padding-top: pxToRem(20px);
&.page-block{
.table{
display: flex;
flex-wrap: wrap;
}
}
.service {
width: pxToRem(494px);
height: pxToRem(28px);
... ... @@ -48,6 +43,10 @@
.material-item{
margin: pxToRem(10px) 0;
@include flexbox((
display: box,
box-align: center
), $version: 1);
@include flexbox((
display: flex,
align-items: center
));
... ... @@ -56,6 +55,12 @@
margin: 0;
}
.material-image {
width: 23%;
@include flexbox((
box-flex: 1.0,
display: box,
box-pack: center
), $version: 1);
@include flexbox((
display: flex,
flex-basis: 23%,
... ... @@ -70,6 +75,12 @@
height: auto;
line-height: pxToRem(38px);
color: #4b4b4b;
word-wrap: break-word;
width: 76.9;
@include flexbox((
box-flex: 1.0,
display: box
), $version: 1);
@include flexbox((
display: flex,
flex-basis: 76.9%
... ...