...
|
...
|
@@ -35,34 +35,10 @@ let $invoice = $('.invoice'), |
|
|
$message = $('#msg'),
|
|
|
$noPrintPrice = $('.no-print-price');
|
|
|
|
|
|
let orderCont = cookie.get('order-info') && JSON.parse(cookie.get('order-info'));
|
|
|
let invoiceCont = {
|
|
|
7: '服装',
|
|
|
1: '图书',
|
|
|
9: '配件',
|
|
|
11: '日用品',
|
|
|
3: '办公用品',
|
|
|
6: '体育用品',
|
|
|
10: '数码产品'
|
|
|
},
|
|
|
invoicesType = {
|
|
|
1: '纸质',
|
|
|
2: '电子'
|
|
|
};
|
|
|
|
|
|
require('common');
|
|
|
|
|
|
lazyLoad();
|
|
|
|
|
|
// 初始化发票信息
|
|
|
function invoiceInit() {
|
|
|
if (orderCont.invoiceType) {
|
|
|
$('.invoice-type').text(invoiceCont[orderCont.invoiceType] + '(' + invoicesType[orderCont.invoicesType] + ')');
|
|
|
} else {
|
|
|
$('.invoice-type').text('服装(电子)');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function getQueryParam() {
|
|
|
let queryArray = location.search.substr(1).split('&'),
|
|
|
i,
|
...
|
...
|
@@ -115,17 +91,6 @@ if (queryString.cartType || queryString.carttype || !orderInfo('cartType')) { |
|
|
orderInfo('cartType', queryString.cartType || queryString.carttype || 'ordinary');
|
|
|
}
|
|
|
|
|
|
// function dispacthTapEvt(e) {
|
|
|
// let $cur = $(e.target).closest('li');
|
|
|
|
|
|
// if ($cur.length === 0 || $cur.hasClass('chosed')) {
|
|
|
// return;
|
|
|
// }
|
|
|
|
|
|
// $cur.siblings('li.chosed').removeClass('chosed');
|
|
|
// $cur.addClass('chosed');
|
|
|
// }
|
|
|
|
|
|
$('.checkbox').on('touchstart', function(e) {
|
|
|
let $this = $(this);
|
|
|
|
...
|
...
|
@@ -162,9 +127,6 @@ $invoice.on('touchend', '.checkbox', function() { |
|
|
orderInfo('invoicesType', null);
|
|
|
orderInfo('invoiceTitle', null);
|
|
|
}
|
|
|
|
|
|
orderCont = cookie.get('order-info') && JSON.parse(cookie.get('order-info'));
|
|
|
invoiceInit();
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
@@ -258,17 +220,6 @@ function submitOrder() { |
|
|
return false;
|
|
|
}
|
|
|
|
|
|
// if (orderInfo('invoice')) {
|
|
|
// if (!invoiceText) {
|
|
|
// tip.show('请输入发票抬头');
|
|
|
// return;
|
|
|
// }
|
|
|
// if (invoiceText.length > 30) {
|
|
|
// tip.show('发票抬头不得超过30个汉字');
|
|
|
// return;
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
if (msg) {
|
|
|
if (msg.length > 40) {
|
|
|
tip.show('留言不得超过40个汉字');
|
...
|
...
|
@@ -566,9 +517,6 @@ $ticketsMobile.blur(function() { |
|
|
}
|
|
|
});
|
|
|
|
|
|
// 初始化发票信息内容
|
|
|
invoiceInit();
|
|
|
|
|
|
// 留言点击滚动屏幕
|
|
|
$message.on('click', function() {
|
|
|
$('html,body').animate({
|
...
|
...
|
|