Authored by 刘传洋

Merge branch 'feature/shoppingCart' of http://git.yoho.cn/fe/yohobuy-node into feature/shoppingCart

... ... @@ -158,38 +158,11 @@ payWay = {
});
$('#pay-type2').change(function() {
var val = $(this).val() * 1,
vd;
that.setSupportStatus('0', val);
if (val) { // 支持货到付款则退出
return;
}
vd = new dialog.Dialog({
content: '<div class="title">支付方式</div><p>很抱歉,该地区不支持货到付款,将为您选择<br>在线支付,是否继续?</p>',
className: 'ensure-cashdeli-dialog',
btns: [{
id: 'save',
btnClass: ['black'],
name: '继续',
cb: function() {
vd.close();
}
}, {
id: 'cancel',
name: '修改地址',
cb: function() {
vd.close();
$('.addr-select .modify-addr').trigger('click');
}
}]
}).show();
that.setSupportStatus('0', $(this).val() * 1);
});
},
setSupportStatus: function(id, support) {
var pt, $tip;
var pt, vd, $tip;
if (!id || !this.payType[id]) { // this.payType[id]不存在表示订单不支持货到付款
return;
... ... @@ -214,6 +187,26 @@ payWay = {
if (pt.dom.hasClass('checked')) {
this.$payType.eq(0).trigger('click');
}
vd = new dialog.Dialog({
content: '<div class="title">支付方式</div><p>很抱歉,该地区不支持货到付款,将为您选择<br>在线支付,是否继续?</p>',
className: 'ensure-cashdeli-dialog',
btns: [{
id: 'save',
btnClass: ['black'],
name: '继续',
cb: function() {
vd.close();
}
}, {
id: 'cancel',
name: '修改地址',
cb: function() {
vd.close();
$('.addr-select .modify-addr').trigger('click');
}
}]
}).show();
}
},
updateOrder: function(info) {
... ...