Authored by 郝肖肖

门票js

... ... @@ -190,6 +190,14 @@
seajs.use('js/order/ensure');
</script>
{{/if}}
{{!-- 发票-订单确认--}}
{{#if ticketEnsurePage}}
<script>
seajs.use('js/order/ticket-ensure');
</script>
{{/if}}
{{!-- 个人中心首页 --}}
{{#if meIndexPage}}
<script>
... ...
... ... @@ -755,52 +755,11 @@ var Order = {
}
};
//立即购买-门票
var TicketCat = {
el: {
$showTicketMobile: $('.show-ticket-mobile'),
$ticketMobile: $('.ticket-mobile'),
$ticketModifyBtn: $('.ticket-modify-btn'),
$setTicketMobile: $('.set-ticket-mobile'),
$ticketMobileBtn: $('.ticket-mobile-btn'),
$ticketMobileInput: $('.ticket-mobile-input')
},
init: function() {
var el = this.el;
if (el.$ticketModifyBtn.length === 0) {
return false;
}
//修改手机号按钮
el.$ticketModifyBtn.click(function() {
el.$showTicketMobile.addClass('hide');
el.$setTicketMobile.removeClass('hide');
});
//保存手机号按钮
el.$ticketMobileBtn.click(function() {
var val = el.$ticketMobileInput.val(),
phoneReg = /^(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
if (!phoneReg.test(val)) {
new dialog.Alert('请输入正确的手机号!').show();
return;
}
el.$showTicketMobile.removeClass('hide');
el.$setTicketMobile.addClass('hide');
el.$ticketMobile.text(val);
});
}
};
Order.Data.activity = 0;
Order.Data.carriage = 0;
Order.UI.init();
Order.Bll.init();
TicketCat.init();
address.getUserAddressList();
... ...
/**
* @description: 订单保存
* @time: 2015/12/21
*/
var $ = require('yoho.jquery');
var dialog = require('../common/dialog');
//立即购买-门票
var TicketCat = {
el: {
$showTicketMobile: $('.show-ticket-mobile'),
$ticketMobile: $('.ticket-mobile'),
$ticketModifyBtn: $('.ticket-modify-btn'),
$setTicketMobile: $('.set-ticket-mobile'),
$ticketMobileBtn: $('.ticket-mobile-btn'),
$ticketMobileInput: $('.ticket-mobile-input')
},
init: function() {
var el = this.el;
//修改手机号按钮
el.$ticketModifyBtn.click(function() {
el.$showTicketMobile.addClass('hide');
el.$setTicketMobile.removeClass('hide');
});
//保存手机号按钮
el.$ticketMobileBtn.click(function() {
var val = el.$ticketMobileInput.val(),
phoneReg = /^(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
if (!phoneReg.test(val)) {
new dialog.Alert('请输入正确的手机号!').show();
return;
}
el.$showTicketMobile.removeClass('hide');
el.$setTicketMobile.addClass('hide');
el.$ticketMobile.text(val);
});
}
};
TicketCat.init();
\ No newline at end of file
... ...
... ... @@ -586,7 +586,7 @@ class IndexController extends WebAction
// $result = CartModel::addTicket($uid, $productSku, $buyNumber, $yohoNum);
$this->_view->display('ticket-ensure', array(
'orderEnsurePage' => true,
'ticketEnsurePage' => true,
'orderEnsure' => $orderEnsure,
));
}
... ...