Authored by 郝肖肖

门票js

@@ -190,6 +190,14 @@ @@ -190,6 +190,14 @@
190 seajs.use('js/order/ensure'); 190 seajs.use('js/order/ensure');
191 </script> 191 </script>
192 {{/if}} 192 {{/if}}
  193 +
  194 +{{!-- 发票-订单确认--}}
  195 +{{#if ticketEnsurePage}}
  196 +<script>
  197 + seajs.use('js/order/ticket-ensure');
  198 +</script>
  199 +{{/if}}
  200 +
193 {{!-- 个人中心首页 --}} 201 {{!-- 个人中心首页 --}}
194 {{#if meIndexPage}} 202 {{#if meIndexPage}}
195 <script> 203 <script>
@@ -755,52 +755,11 @@ var Order = { @@ -755,52 +755,11 @@ var Order = {
755 } 755 }
756 }; 756 };
757 757
758 -//立即购买-门票  
759 -var TicketCat = {  
760 - el: {  
761 - $showTicketMobile: $('.show-ticket-mobile'),  
762 - $ticketMobile: $('.ticket-mobile'),  
763 - $ticketModifyBtn: $('.ticket-modify-btn'),  
764 - $setTicketMobile: $('.set-ticket-mobile'),  
765 - $ticketMobileBtn: $('.ticket-mobile-btn'),  
766 - $ticketMobileInput: $('.ticket-mobile-input')  
767 - },  
768 - init: function() {  
769 - var el = this.el;  
770 -  
771 - if (el.$ticketModifyBtn.length === 0) {  
772 - return false;  
773 - }  
774 -  
775 - //修改手机号按钮  
776 - el.$ticketModifyBtn.click(function() {  
777 - el.$showTicketMobile.addClass('hide');  
778 - el.$setTicketMobile.removeClass('hide');  
779 - });  
780 -  
781 - //保存手机号按钮  
782 - el.$ticketMobileBtn.click(function() {  
783 - var val = el.$ticketMobileInput.val(),  
784 - phoneReg = /^(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;  
785 -  
786 - if (!phoneReg.test(val)) {  
787 - new dialog.Alert('请输入正确的手机号!').show();  
788 - return;  
789 - }  
790 - el.$showTicketMobile.removeClass('hide');  
791 - el.$setTicketMobile.addClass('hide');  
792 - el.$ticketMobile.text(val);  
793 - });  
794 - }  
795 -};  
796 -  
797 Order.Data.activity = 0; 758 Order.Data.activity = 0;
798 Order.Data.carriage = 0; 759 Order.Data.carriage = 0;
799 760
800 Order.UI.init(); 761 Order.UI.init();
801 Order.Bll.init(); 762 Order.Bll.init();
802 -TicketCat.init();  
803 -  
804 763
805 address.getUserAddressList(); 764 address.getUserAddressList();
806 765
  1 +/**
  2 + * @description: 订单保存
  3 + * @time: 2015/12/21
  4 + */
  5 +
  6 +var $ = require('yoho.jquery');
  7 +
  8 +var dialog = require('../common/dialog');
  9 +
  10 +//立即购买-门票
  11 +var TicketCat = {
  12 + el: {
  13 + $showTicketMobile: $('.show-ticket-mobile'),
  14 + $ticketMobile: $('.ticket-mobile'),
  15 + $ticketModifyBtn: $('.ticket-modify-btn'),
  16 + $setTicketMobile: $('.set-ticket-mobile'),
  17 + $ticketMobileBtn: $('.ticket-mobile-btn'),
  18 + $ticketMobileInput: $('.ticket-mobile-input')
  19 + },
  20 + init: function() {
  21 + var el = this.el;
  22 +
  23 + //修改手机号按钮
  24 + el.$ticketModifyBtn.click(function() {
  25 + el.$showTicketMobile.addClass('hide');
  26 + el.$setTicketMobile.removeClass('hide');
  27 + });
  28 +
  29 + //保存手机号按钮
  30 + el.$ticketMobileBtn.click(function() {
  31 + var val = el.$ticketMobileInput.val(),
  32 + phoneReg = /^(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
  33 +
  34 + if (!phoneReg.test(val)) {
  35 + new dialog.Alert('请输入正确的手机号!').show();
  36 + return;
  37 + }
  38 + el.$showTicketMobile.removeClass('hide');
  39 + el.$setTicketMobile.addClass('hide');
  40 + el.$ticketMobile.text(val);
  41 + });
  42 + }
  43 +};
  44 +
  45 +TicketCat.init();
@@ -586,7 +586,7 @@ class IndexController extends WebAction @@ -586,7 +586,7 @@ class IndexController extends WebAction
586 // $result = CartModel::addTicket($uid, $productSku, $buyNumber, $yohoNum); 586 // $result = CartModel::addTicket($uid, $productSku, $buyNumber, $yohoNum);
587 587
588 $this->_view->display('ticket-ensure', array( 588 $this->_view->display('ticket-ensure', array(
589 - 'orderEnsurePage' => true, 589 + 'ticketEnsurePage' => true,
590 'orderEnsure' => $orderEnsure, 590 'orderEnsure' => $orderEnsure,
591 )); 591 ));
592 } 592 }