Authored by 毕凯

Merge branch 'hotfix/jit' into 'gray'

JIT详情页BUG



See merge request !394
@@ -5,6 +5,7 @@ const helpers = global.yoho.helpers; @@ -5,6 +5,7 @@ const helpers = global.yoho.helpers;
5 const paymentProcess = require(global.utils + '/payment-process'); 5 const paymentProcess = require(global.utils + '/payment-process');
6 const shoppingAPI = require('./shopping'); 6 const shoppingAPI = require('./shopping');
7 const logger = global.yoho.logger; 7 const logger = global.yoho.logger;
  8 +const payModel = require('../models/pay');
8 9
9 /** 10 /**
10 * 转换价格 11 * 转换价格
@@ -326,6 +327,19 @@ exports.searchCoupon = (uid, couponCode) => { @@ -326,6 +327,19 @@ exports.searchCoupon = (uid, couponCode) => {
326 */ 327 */
327 exports.jitDetailData = (uid, cartType, skuList, orderCode, sessionKey, 328 exports.jitDetailData = (uid, cartType, skuList, orderCode, sessionKey,
328 deliveryId, paymentType, couponCode, yohoCoin) => { 329 deliveryId, paymentType, couponCode, yohoCoin) => {
  330 +
  331 + // 订单详情页拆单
  332 + if (orderCode) {
  333 + return payModel.getOtherDetail({
  334 + uid: uid,
  335 + orderCode: orderCode,
  336 + sessionKey: sessionKey
  337 + }).then(result => {
  338 + return paymentProcess.transformJit(_.get(result, 'data.package_list', []));
  339 + });
  340 + }
  341 +
  342 + // 购物车拆单
329 if (deliveryId) { 343 if (deliveryId) {
330 344
331 // 购物车选择改变字段,重新运算订单数据 345 // 购物车选择改变字段,重新运算订单数据
@@ -312,17 +312,9 @@ const orderDetailData = (uid, orderCode) => { @@ -312,17 +312,9 @@ const orderDetailData = (uid, orderCode) => {
312 312
313 // 为支付的拆单配送信息 313 // 为支付的拆单配送信息
314 if (orderDetail.isMultiPackage && orderDetail.isMultiPackage === 'Y') { 314 if (orderDetail.isMultiPackage && orderDetail.isMultiPackage === 'Y') {
315 - let jitInfo = {  
316 - deliveryId: orderDetail.deliveryId,  
317 - paymentType: orderDetail.paymentType,  
318 - couponCode: orderDetail.couponCode,  
319 - yohoCoin: orderDetail.yohoCoin,  
320 - cartType: 'ordinary'  
321 - };  
322 -  
323 orderDetail = _.assign(orderDetail, { 315 orderDetail = _.assign(orderDetail, {
324 isJit: true, 316 isJit: true,
325 - jitDetailUrl: helpers.urlFormat('/cart/index/new/jitDetail', jitInfo) 317 + jitDetailUrl: helpers.urlFormat('/cart/index/new/jitDetail', {orderCode: orderCode})
326 }); 318 });
327 } 319 }
328 320
@@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
74 74
75 {{!--搜索列表显示过少,显示猜您喜欢--}} 75 {{!--搜索列表显示过少,显示猜您喜欢--}}
76 {{#if @root.suggestion.isMaybeLike}} 76 {{#if @root.suggestion.isMaybeLike}}
77 - <div class="maybe-like-search">您可能喜欢的</div> 77 + <div class="maybe-like-search">你可能喜欢</div>
78 <div class='maybe-like'> 78 <div class='maybe-like'>
79 <div id="goods-list" class="goods-list clearfix"></div> 79 <div id="goods-list" class="goods-list clearfix"></div>
80 </div> 80 </div>
@@ -122,7 +122,7 @@ @@ -122,7 +122,7 @@
122 122
123 {{!--搜索列表显示过少,显示猜您喜欢--}} 123 {{!--搜索列表显示过少,显示猜您喜欢--}}
124 {{#if @root.suggestion.isMaybeLike}} 124 {{#if @root.suggestion.isMaybeLike}}
125 - <div class="maybe-like-search">您可能喜欢的</div> 125 + <div class="maybe-like-search">你可能喜欢</div>
126 <div class='maybe-like maybe-like-word'> 126 <div class='maybe-like maybe-like-word'>
127 <div id="goods-list" class="goods-list clearfix"></div> 127 <div id="goods-list" class="goods-list clearfix"></div>
128 </div> 128 </div>
@@ -390,11 +390,11 @@ @@ -390,11 +390,11 @@
390 line-height: 60px; 390 line-height: 60px;
391 background-color: #eee; 391 background-color: #eee;
392 text-align: center; 392 text-align: center;
393 - font-size: 16px; 393 + font-size: 20px;
394 } 394 }
395 395
396 .maybe-like-word { 396 .maybe-like-word {
397 - margin-top: none; 397 + margin-top: 0;
398 border-top: none; 398 border-top: none;
399 } 399 }
400 } 400 }