Authored by 郭成尧

noPrintPrice-page

... ... @@ -150,6 +150,15 @@
<form id="msg" action="" method="post">
<input type="text" name="msg" value="{{msg}}" maxlength="40" placeholder="留言">
</form>
<ul class="sale-invoice">
<li class="no-print-price">
<span class="title">不打印价格</span>
<span class="desc">送朋友可不打印价格哦</span>
<span class="check">
<i class="iconfont checkbox {{#if noPrintPrice}}icon-cb-radio{{else}}icon-radio{{/if}}"></i>
</span>
</li>
</ul>
</section>
<section class="price-cal block">
<ul class="total">
... ...
... ... @@ -31,7 +31,9 @@ let $invoice = $('.invoice'),
buyNumber = $('#buyNumber').val(),
headerTop = $('#yoho-header').outerHeight(),
isYohoCoinClick = $coinLi.data('yoho-coin-click') * 1, // 判断有货币是否可以单击
addressTop = $('.address-wrap').outerHeight();
addressTop = $('.address-wrap').outerHeight(),
$message = $('#msg'),
$noPrintPrice = $('.no-print-price');
let orderCont = cookie.get('order-info') && JSON.parse(cookie.get('order-info'));
let invoiceCont = {
... ... @@ -417,6 +419,17 @@ $invoice.on('touchend', '.checkbox', function(e) {
e.stopPropagation();
});
/**
* 是否打印价格
*/
$noPrintPrice.on('touchend', '.checkbox', function(e) {
let $this = $(this);
orderInfo('isPrintPrice', $this.hasClass('icon-cb-radio'));
e.preventDefault();
e.stopPropagation();
});
$invoice.find('[name="invoice-title"]').on('blur', function() {
orderInfo('invoiceText', $(this).val());
}).end().find('.invoice-type').on('change', function() {
... ... @@ -554,6 +567,13 @@ $ticketsMobile.blur(function() {
// 初始化发票信息内容
invoiceInit();
// 留言点击滚动屏幕
$message.on('click', function() {
$('html,body').animate({
scrollTop: $message.offset().top
}, 500);
});
$(window).scroll(function() {
if ($(this).scrollTop() >= (headerTop + addressTop)) {
... ...
... ... @@ -303,6 +303,35 @@
}
}
.no-print-price {
.title {
font-size: 34px;
color: #444;
}
.desc {
color: #999;
}
.check {
float: right;
color: #999;
.checkbox {
margin-left: 5px;
color: #000;
}
&.used {
color: #f00;
}
em {
color: #f00;
}
}
}
.address-bottom {
display: none;
position: fixed;
... ... @@ -619,6 +648,7 @@
#msg {
padding-top: 20px;
margin-bottom: 20px;
input {
margin: 0;
... ...