Authored by 郭成尧

buynow

... ... @@ -37,7 +37,7 @@ class cartModel extends global.yoho.BaseModel {
// 是否需要重新计算
let needReComputer = orderInfoCookie && !_.isEmpty(orderInfoCookie) &&
(orderInfoCookie.yohoCoin || orderInfoCookie.couponCode);
(orderInfoCookie.yohoCoin || orderInfoCookie.coupon_code);
if (needReComputer) {
orderInfoCookie.paymentType = orderInfoCookie.paymentType ? orderInfoCookie.paymentType : '';
... ... @@ -46,7 +46,7 @@ class cartModel extends global.yoho.BaseModel {
cart_type: params.cartType,
delivery_way: orderInfoCookie.deliveryId,
payment_type: orderInfoCookie.paymentType,
coupon_code: orderInfoCookie.couponCode,
coupon_code: orderInfoCookie.coupon_code,
gift_card_code: orderInfoCookie.gift_card_code,
use_yoho_coin: orderInfoCookie.yohoCoin,
product_sku_list: skuList,
... ...
... ... @@ -13,8 +13,8 @@ class SelectCouponController extends Page {
this.selectCouponCodes = [];
this.isBuyNowPage = params.isBuyNowPage || false;
if (this.orderInfo('couponCode')) {
this.selectCouponCodes = this.orderInfo('couponCode').split(',');
if (this.orderInfo('coupon_code')) {
this.selectCouponCodes = this.orderInfo('coupon_code').split(',');
}
this.page = $('.select-coupons-page');
... ... @@ -41,7 +41,7 @@ class SelectCouponController extends Page {
url: this.couponListUrl,
data: postData
}).then(result => {
this.orderInfo('couponCode', couponCodeStr);
this.orderInfo('coupon_code', couponCodeStr);
let resultHtml = $(result);
... ...
... ... @@ -55,7 +55,7 @@ function isLimitGood() {
// 来自购物车的链接默认不使用优惠券
if (cookie.get('ensure_from') === 'cart') {
orderInfo('couponCode', null);
orderInfo('coupon_code', null);
orderInfo('usable_usual_code', null);
orderInfo('usable_free_code', null);
cookie.removeSpecific('ensure_from', actCkOpthn);
... ... @@ -121,7 +121,7 @@ function orderCompute() {
cartType: orderInfo('cartType') || 'ordinary',
deliveryId: orderInfo('deliveryId'),
paymentType: orderInfo('paymentType'),
couponCode: orderInfo('couponCode'),
couponCode: orderInfo('coupon_code'),
gift_card_code: orderInfo('gift_card_code'),
yohoCoin: yohoCoin,
skuList: isLimitGood() ? orderInfo('skuList') : void 0
... ... @@ -213,7 +213,7 @@ function submitOrder(verifyCode) {
isPrintPrice: orderInfo('isPrintPrice'),
paymentTypeId: orderInfo('paymentTypeId'),
paymentType: orderInfo('paymentType'), // 支付方式
couponCode: orderInfo('couponCode'),
couponCode: orderInfo('coupon_code'),
gift_card_code: orderInfo('gift_card_code'),
verifyCode: verifyCode || null,
yohoCoin: orderInfo('yohoCoin'),
... ...
... ... @@ -19,7 +19,7 @@ function init() {
paymentTypeId: 1,
yohoCoin: 0,
addressId: null,
couponCode: null,
coupon_code: null,
invoice: null,
invoices_title: null,
invoices_type: null,
... ...
... ... @@ -70,13 +70,13 @@ if (window.getUid() !== orderInfo('uid')) {
}
if ($couponUse.data('name') !== orderInfo('couponName')) {
orderInfo('couponCode', null);
orderInfo('coupon_code', null);
orderInfo('couponName', null);
}
// 来自购物车的链接默认不使用优惠券
if (document.referrer && document.referrer.indexOf('/cart/index/index') !== -1) {
orderInfo('couponCode', null);
orderInfo('coupon_code', null);
orderInfo('couponName', null);
}
... ...