Showing
7 changed files
with
33 additions
and
55 deletions
@@ -97,10 +97,10 @@ exports.cartPay = (uid, cartType, orderInfo, limitProductCode, sku, skn, buyNumb | @@ -97,10 +97,10 @@ exports.cartPay = (uid, cartType, orderInfo, limitProductCode, sku, skn, buyNumb | ||
97 | result.error = true; | 97 | result.error = true; |
98 | result.message = pay.message; | 98 | result.message = pay.message; |
99 | } else { | 99 | } else { |
100 | - result.cartUrl = helpers.urlFormat('/cart/index/new'); | 100 | + result.cartUrl = helpers.urlFormat('/cart/index/index'); |
101 | } | 101 | } |
102 | 102 | ||
103 | - return pay; | 103 | + return result; |
104 | } | 104 | } |
105 | 105 | ||
106 | result = Object.assign( | 106 | result = Object.assign( |
@@ -288,11 +288,17 @@ const orderDetailData = (uid, orderCode) => { | @@ -288,11 +288,17 @@ const orderDetailData = (uid, orderCode) => { | ||
288 | 288 | ||
289 | // 为支付的拆单配送信息 | 289 | // 为支付的拆单配送信息 |
290 | if (orderDetail.isMultiPackage && orderDetail.isMultiPackage === 'Y') { | 290 | if (orderDetail.isMultiPackage && orderDetail.isMultiPackage === 'Y') { |
291 | + let jitInfo = { | ||
292 | + deliveryId: orderDetail.deliveryId, | ||
293 | + paymentType: orderDetail.paymentType, | ||
294 | + couponCode: orderDetail.couponCode, | ||
295 | + yohoCoin: orderDetail.yohoCoin, | ||
296 | + cartType: 'ordinary' | ||
297 | + }; | ||
298 | + | ||
291 | orderDetail = _.assign(orderDetail, { | 299 | orderDetail = _.assign(orderDetail, { |
292 | isJit: true, | 300 | isJit: true, |
293 | - packageTitle: orderDetail.packageTitle | ||
294 | - | ||
295 | - // jitDetailUrl: '/cart/index/jitDetailUrl' | 301 | + jitDetailUrl: helpers.urlFormat('/cart/index/new/jitDetail', jitInfo) |
296 | }); | 302 | }); |
297 | } | 303 | } |
298 | 304 |
@@ -9,27 +9,6 @@ const crypto = global.yoho.crypto; | @@ -9,27 +9,6 @@ const crypto = global.yoho.crypto; | ||
9 | * 地址数据 | 9 | * 地址数据 |
10 | * @param uid | 10 | * @param uid |
11 | * @return | 11 | * @return |
12 | - * { | ||
13 | - * "code":200, | ||
14 | - * "data":[ | ||
15 | - * { | ||
16 | - * "area":"江苏省 南京市 浦口区", | ||
17 | - * "address":"沿江街道******, | ||
18 | - * "consignee":"孟令阶", | ||
19 | - * "is_support":"Y", | ||
20 | - * "area_code":"320111", | ||
21 | - * "mobile":"180****2255", | ||
22 | - * "address_id":"6117354", // 会被加密 | ||
23 | - * "is_default":"N", | ||
24 | - * "is_delivery":"Y", | ||
25 | - * "zip_code":"", | ||
26 | - * "uid":"14616040", | ||
27 | - * "phone":"", | ||
28 | - * "email":""} | ||
29 | - * ], | ||
30 | - * "md5":"c35872955397cd0aabff4583cd41ac4b", | ||
31 | - * "message":"Address List" | ||
32 | - * } | ||
33 | */ | 12 | */ |
34 | exports.addressData = (uid) => { | 13 | exports.addressData = (uid) => { |
35 | let params = { | 14 | let params = { |
@@ -38,7 +17,7 @@ exports.addressData = (uid) => { | @@ -38,7 +17,7 @@ exports.addressData = (uid) => { | ||
38 | }; | 17 | }; |
39 | 18 | ||
40 | let options = { | 19 | let options = { |
41 | - cache: true | 20 | + cache: false |
42 | }; | 21 | }; |
43 | 22 | ||
44 | return api.get('', params, options) | 23 | return api.get('', params, options) |
@@ -11,13 +11,6 @@ let $ = require('yoho-jquery'), | @@ -11,13 +11,6 @@ let $ = require('yoho-jquery'), | ||
11 | tip = require('../../plugin/tip'), | 11 | tip = require('../../plugin/tip'), |
12 | dialog = require('../../plugin/dialog'); | 12 | dialog = require('../../plugin/dialog'); |
13 | 13 | ||
14 | -// cookie 参数 | ||
15 | -let actCkOpthn = { | ||
16 | - expires: 'Session', | ||
17 | - path: '/cart/index', | ||
18 | - domain: 'm.yohobuy.com' | ||
19 | -}; | ||
20 | - | ||
21 | let cartObj = { | 14 | let cartObj = { |
22 | init(handle) { | 15 | init(handle) { |
23 | let self = this; | 16 | let self = this; |
@@ -64,38 +57,37 @@ let cartObj = { | @@ -64,38 +57,37 @@ let cartObj = { | ||
64 | }, | 57 | }, |
65 | promoItemClick(e) { | 58 | promoItemClick(e) { |
66 | let self = this; | 59 | let self = this; |
67 | - let promotionId = $(e.currentTarget).data('id'); | ||
68 | - let promotionType = $(e.currentTarget).data('type'); | ||
69 | - let promotionTitle = encodeURIComponent(`以下商品参加【${$(e.currentTarget).data('title')}】促销活动`); | 60 | + let promotionId = $(e.currentTarget).data('id'), |
61 | + promotionType = $(e.currentTarget).data('type'), | ||
62 | + status = $(e.currentTarget).data('status'), | ||
63 | + promotionTitle = encodeURIComponent(`以下商品参加【${$(e.currentTarget).data('title')}】促销活动`); | ||
70 | 64 | ||
71 | self.toPromotionPage({ | 65 | self.toPromotionPage({ |
72 | promotionType, | 66 | promotionType, |
73 | promotionId, | 67 | promotionId, |
74 | promotionTitle, | 68 | promotionTitle, |
75 | - status: $(e.currentTarget).data('status') | 69 | + status |
76 | }); | 70 | }); |
77 | }, | 71 | }, |
78 | toPromotionPage(opts) { | 72 | toPromotionPage(opts) { |
79 | let cartType = cookie.get('_cartType') || 'ordinary'; | 73 | let cartType = cookie.get('_cartType') || 'ordinary'; |
80 | let title = encodeURIComponent('优惠活动商品'); | 74 | let title = encodeURIComponent('优惠活动商品'); |
75 | + let href; | ||
81 | 76 | ||
82 | - if (opts.promotionType === 'Gift') { | 77 | + if (opts.status === 20 || (opts.promotionType !== 'Gift' && opts.promotionType !== 'Needpaygift')) { |
78 | + href = `/product/index/index?promotion_id=${opts.promotionId}&title=${title}&intro_text=${opts.promotionTitle}&cartType=${cartType}`; | ||
79 | + } else if (opts.promotionType === 'Gift') { | ||
80 | + href = `/cart/index/new/gift?promotion_id=${opts.promotionId}&title=${title}&intro_text=${opts.promotionTitle}&cartType=${cartType}`; | ||
83 | if (opts.status === 30) { | 81 | if (opts.status === 30) { |
84 | - window.location.href = `/cart/index/new/gift?promotion_id=${opts.promotionId}&title=${title}&intro_text=${opts.promotionTitle}&cartType=${cartType}&edit=1`; | ||
85 | - } else { | ||
86 | - window.location.href = `/cart/index/new/gift?promotion_id=${opts.promotionId}&title=${title}&intro_text=${opts.promotionTitle}&cartType=${cartType}`; | 82 | + href += '&edit=1'; |
87 | } | 83 | } |
88 | - | ||
89 | } else if (opts.promotionType === 'Needpaygift') { | 84 | } else if (opts.promotionType === 'Needpaygift') { |
85 | + href = `/cart/index/new/advanceBuy?promotion_id=${opts.promotionId}&title=${title}&intro_text=${opts.promotionTitle}&cartType=${cartType}`; | ||
90 | if (opts.status === 30) { | 86 | if (opts.status === 30) { |
91 | - window.location.href = `/cart/index/new/advanceBuy?promotion_id=${opts.promotionId}&title=${title}&intro_text=${opts.promotionTitle}&cartType=${cartType}&edit=1`; | ||
92 | - } else { | ||
93 | - window.location.href = `/cart/index/new/advanceBuy?promotion_id=${opts.promotionId}&title=${title}&intro_text=${opts.promotionTitle}&cartType=${cartType}`; | 87 | + href += '&edit=1'; |
94 | } | 88 | } |
95 | - | ||
96 | - } else { | ||
97 | - window.location.href = `/product/index/index?promotion_id=${opts.promotionId}&title=${title}&intro_text=${opts.promotionTitle}&cartType=${cartType}`; | ||
98 | } | 89 | } |
90 | + window.location.href = href; | ||
99 | }, | 91 | }, |
100 | allGiftBoxClick(e) { | 92 | allGiftBoxClick(e) { |
101 | let cartType = cookie.get('_cartType') || 'ordinary'; | 93 | let cartType = cookie.get('_cartType') || 'ordinary'; |
@@ -219,11 +219,13 @@ | @@ -219,11 +219,13 @@ | ||
219 | .to-gift { | 219 | .to-gift { |
220 | text-align: right; | 220 | text-align: right; |
221 | width: 139px; | 221 | width: 139px; |
222 | + | ||
222 | &.no-storage { | 223 | &.no-storage { |
223 | a { | 224 | a { |
224 | color: #c6c6c6; | 225 | color: #c6c6c6; |
225 | } | 226 | } |
226 | } | 227 | } |
228 | + | ||
227 | a { | 229 | a { |
228 | color: #ff575c; | 230 | color: #ff575c; |
229 | font-size: 23px; | 231 | font-size: 23px; |
@@ -698,12 +698,11 @@ | @@ -698,12 +698,11 @@ | ||
698 | height: 510px; | 698 | height: 510px; |
699 | background-color: #fff; | 699 | background-color: #fff; |
700 | z-index: 2; | 700 | z-index: 2; |
701 | - margin: auto; | ||
702 | - left: 0; | ||
703 | - right: 0; | ||
704 | - top: 0; | ||
705 | - bottom: 0; | ||
706 | border-radius: 10px; | 701 | border-radius: 10px; |
702 | + left: 50%; | ||
703 | + margin-left: -270px; | ||
704 | + top: 50%; | ||
705 | + margin-top: -255px; | ||
707 | 706 | ||
708 | .yoho-coin-title { | 707 | .yoho-coin-title { |
709 | font-size: 34px; | 708 | font-size: 34px; |
@@ -11,7 +11,7 @@ const productProcess = require('./product-process'); | @@ -11,7 +11,7 @@ const productProcess = require('./product-process'); | ||
11 | const regPromoTitle = /^【[^】]+】(.*)/; | 11 | const regPromoTitle = /^【[^】]+】(.*)/; |
12 | 12 | ||
13 | const transPrice = (price, isSepcialZero) => { | 13 | const transPrice = (price, isSepcialZero) => { |
14 | - return (price >= 0 || isSepcialZero) ? parseFloat(price).toFixed(2) : 0; | 14 | + return (price > 0 || isSepcialZero) ? parseFloat(price).toFixed(2) : 0; |
15 | }; | 15 | }; |
16 | const formatPromotionTitle = (promo) => { | 16 | const formatPromotionTitle = (promo) => { |
17 | let title; | 17 | let title; |
-
Please register or login to post a comment