Merge branch 'feature/shoppingCart' of http://git.yoho.cn/fe/yohobuy-node into feature/shoppingCart
Showing
1 changed file
with
22 additions
and
29 deletions
@@ -158,38 +158,11 @@ payWay = { | @@ -158,38 +158,11 @@ payWay = { | ||
158 | }); | 158 | }); |
159 | 159 | ||
160 | $('#pay-type2').change(function() { | 160 | $('#pay-type2').change(function() { |
161 | - var val = $(this).val() * 1, | ||
162 | - vd; | ||
163 | - | ||
164 | - that.setSupportStatus('0', val); | ||
165 | - | ||
166 | - if (val) { // 支持货到付款则退出 | ||
167 | - return; | ||
168 | - } | ||
169 | - | ||
170 | - vd = new dialog.Dialog({ | ||
171 | - content: '<div class="title">支付方式</div><p>很抱歉,该地区不支持货到付款,将为您选择<br>在线支付,是否继续?</p>', | ||
172 | - className: 'ensure-cashdeli-dialog', | ||
173 | - btns: [{ | ||
174 | - id: 'save', | ||
175 | - btnClass: ['black'], | ||
176 | - name: '继续', | ||
177 | - cb: function() { | ||
178 | - vd.close(); | ||
179 | - } | ||
180 | - }, { | ||
181 | - id: 'cancel', | ||
182 | - name: '修改地址', | ||
183 | - cb: function() { | ||
184 | - vd.close(); | ||
185 | - $('.addr-select .modify-addr').trigger('click'); | ||
186 | - } | ||
187 | - }] | ||
188 | - }).show(); | 161 | + that.setSupportStatus('0', $(this).val() * 1); |
189 | }); | 162 | }); |
190 | }, | 163 | }, |
191 | setSupportStatus: function(id, support) { | 164 | setSupportStatus: function(id, support) { |
192 | - var pt, $tip; | 165 | + var pt, vd, $tip; |
193 | 166 | ||
194 | if (!id || !this.payType[id]) { // this.payType[id]不存在表示订单不支持货到付款 | 167 | if (!id || !this.payType[id]) { // this.payType[id]不存在表示订单不支持货到付款 |
195 | return; | 168 | return; |
@@ -214,6 +187,26 @@ payWay = { | @@ -214,6 +187,26 @@ payWay = { | ||
214 | if (pt.dom.hasClass('checked')) { | 187 | if (pt.dom.hasClass('checked')) { |
215 | this.$payType.eq(0).trigger('click'); | 188 | this.$payType.eq(0).trigger('click'); |
216 | } | 189 | } |
190 | + | ||
191 | + vd = new dialog.Dialog({ | ||
192 | + content: '<div class="title">支付方式</div><p>很抱歉,该地区不支持货到付款,将为您选择<br>在线支付,是否继续?</p>', | ||
193 | + className: 'ensure-cashdeli-dialog', | ||
194 | + btns: [{ | ||
195 | + id: 'save', | ||
196 | + btnClass: ['black'], | ||
197 | + name: '继续', | ||
198 | + cb: function() { | ||
199 | + vd.close(); | ||
200 | + } | ||
201 | + }, { | ||
202 | + id: 'cancel', | ||
203 | + name: '修改地址', | ||
204 | + cb: function() { | ||
205 | + vd.close(); | ||
206 | + $('.addr-select .modify-addr').trigger('click'); | ||
207 | + } | ||
208 | + }] | ||
209 | + }).show(); | ||
217 | } | 210 | } |
218 | }, | 211 | }, |
219 | updateOrder: function(info) { | 212 | updateOrder: function(info) { |
-
Please register or login to post a comment