Showing
4 changed files
with
100 additions
and
4 deletions
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | <div class="order-ensure-page yoho-page clearfix"> | 2 | <div class="order-ensure-page yoho-page clearfix"> |
3 | {{# orderEnsure}} | 3 | {{# orderEnsure}} |
4 | <div class="order-edit"> | 4 | <div class="order-edit"> |
5 | + | ||
5 | <div class="order-title"> | 6 | <div class="order-title"> |
6 | <ul> | 7 | <ul> |
7 | <li class="first">立即购买</li> | 8 | <li class="first">立即购买</li> |
@@ -13,16 +14,26 @@ | @@ -13,16 +14,26 @@ | ||
13 | <div class="order-edit-main" id="order-edit-main" {{#isNewUser}}data-new="new"{{/isNewUser}} cartType="{{cartType}}"> | 14 | <div class="order-edit-main" id="order-edit-main" {{#isNewUser}}data-new="new"{{/isNewUser}} cartType="{{cartType}}"> |
14 | <h2 class="title">请填写并核对以下信息</h2> | 15 | <h2 class="title">请填写并核对以下信息</h2> |
15 | <div class="order-content"> | 16 | <div class="order-content"> |
16 | - <div class="order-selection pay-time"> | 17 | + <div class="ticket-selection"> |
17 | <h2>支付及发劵时间:</h2> | 18 | <h2>支付及发劵时间:</h2> |
18 | <ul class="modity-pay-info"> | 19 | <ul class="modity-pay-info"> |
19 | <li>付款方式:<span>在线支付</span></li> | 20 | <li>付款方式:<span>在线支付</span></li> |
20 | - <li>发劵时间:<span>自动发货-在您支付成功后,系统将立即为您发放二维码,您可以在您的订单中查看。</span></li> | ||
21 | - <li>手机号:<span>否</span></li> | 21 | + <li>发劵时间:<span>自动发货 - 在您支付成功后,系统将立即为您发放二维码,您可以在您的订单中查看。</span></li> |
22 | + <li>手机号: | ||
23 | + <span class="show-ticket-mobile hide"> | ||
24 | + <span class="ticket-mobile"></span><span class="ticket-modify-btn">[修改]</span> | ||
25 | + </span> | ||
26 | + <span class="set-ticket-mobile"> | ||
27 | + <input type="text" value="" class="ticket-mobile-input"/> | ||
28 | + <input type="button" value="确定" class="ticket-mobile-btn"/> | ||
29 | + <span class="ticket-mobile-tip">请填写正确手机号以便于接收票条信息</span> | ||
30 | + </span> | ||
31 | + </li> | ||
22 | </ul> | 32 | </ul> |
23 | </div><!--/order-selection pay-time--> | 33 | </div><!--/order-selection pay-time--> |
24 | </div><!--/order-content--> | 34 | </div><!--/order-content--> |
25 | </div><!--/order-edit-main--> | 35 | </div><!--/order-edit-main--> |
36 | + | ||
26 | </div> | 37 | </div> |
27 | 38 | ||
28 | <!-- 订单提示--> | 39 | <!-- 订单提示--> |
@@ -271,7 +271,7 @@ exports.newAddress = function(id, code) { | @@ -271,7 +271,7 @@ exports.newAddress = function(id, code) { | ||
271 | 271 | ||
272 | var provinceId = $province.val(); | 272 | var provinceId = $province.val(); |
273 | 273 | ||
274 | - if (provinceId !== '0') { | 274 | + if (typeof provinceId !== 'undefined' && provinceId !== '0') { |
275 | 275 | ||
276 | //如果获取的省有默认选中项则获取市 | 276 | //如果获取的省有默认选中项则获取市 |
277 | getAddress({ | 277 | getAddress({ |
@@ -755,11 +755,51 @@ var Order = { | @@ -755,11 +755,51 @@ 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 | + | ||
758 | Order.Data.activity = 0; | 797 | Order.Data.activity = 0; |
759 | Order.Data.carriage = 0; | 798 | Order.Data.carriage = 0; |
760 | 799 | ||
761 | Order.UI.init(); | 800 | Order.UI.init(); |
762 | Order.Bll.init(); | 801 | Order.Bll.init(); |
802 | +TicketCat.init(); | ||
763 | 803 | ||
764 | 804 | ||
765 | address.getUserAddressList(); | 805 | address.getUserAddressList(); |
@@ -117,6 +117,51 @@ | @@ -117,6 +117,51 @@ | ||
117 | font-size: 12px; | 117 | font-size: 12px; |
118 | color: #333; | 118 | color: #333; |
119 | 119 | ||
120 | + .ticket-selection { | ||
121 | + padding-top: 10px; | ||
122 | + | ||
123 | + ul { | ||
124 | + margin: 10px 0px; | ||
125 | + | ||
126 | + li { | ||
127 | + height: 10px; | ||
128 | + padding: 10px 20px; | ||
129 | + } | ||
130 | + | ||
131 | + } | ||
132 | + | ||
133 | + .ticket-modify-btn { | ||
134 | + font-size: 14px; | ||
135 | + color: #e8044f; | ||
136 | + text-decoration: underline; | ||
137 | + cursor: pointer; | ||
138 | + margin-left: 5px; | ||
139 | + } | ||
140 | + | ||
141 | + .ticket-mobile-input { | ||
142 | + border: 1px solid #000; | ||
143 | + width: 150px; | ||
144 | + height: 20px; | ||
145 | + } | ||
146 | + | ||
147 | + .ticket-mobile-btn { | ||
148 | + text-align: center; | ||
149 | + color: #fff; | ||
150 | + background: #DA0045; | ||
151 | + cursor: pointer; | ||
152 | + padding: 5px 15px; | ||
153 | + border: none; | ||
154 | + font-size: 14px; | ||
155 | + border-radius: 3px; | ||
156 | + } | ||
157 | + | ||
158 | + .ticket-mobile-tip { | ||
159 | + color: #999; | ||
160 | + margin-left: 15px; | ||
161 | + } | ||
162 | + } | ||
163 | + | ||
164 | + | ||
120 | .order-selection { | 165 | .order-selection { |
121 | border-bottom: 1px dashed #ccc; | 166 | border-bottom: 1px dashed #ccc; |
122 | padding: 15px 0 0 0; | 167 | padding: 15px 0 0 0; |
-
Please register or login to post a comment