Showing
2 changed files
with
12 additions
and
3 deletions
@@ -99,8 +99,18 @@ const procShowStatus = (data, showStatus, isBeginSale) => { | @@ -99,8 +99,18 @@ const procShowStatus = (data, showStatus, isBeginSale) => { | ||
99 | * @return {[string]} 限购商品跳转url | 99 | * @return {[string]} 限购商品跳转url |
100 | */ | 100 | */ |
101 | const getLimitCodeUrl = (productCode, skn, ua) => { | 101 | const getLimitCodeUrl = (productCode, skn, ua) => { |
102 | - var url = 'yohoapp://yoho.app/openwith?limit_product_code=' + productCode + '&product_skn=' + skn; | 102 | + var url = 'yohoapp://yoho.app/openwith?limit_product_code=' + productCode + |
103 | + '&product_skn=' + skn; | ||
103 | 104 | ||
105 | + let isIphone = String(ua).indexOf('iPhone') >= 0; | ||
106 | + let isIpad = ua.indexOf('iPad') >= 0; | ||
107 | + | ||
108 | + if (isIphone || isIpad) { | ||
109 | + let params = {}; | ||
110 | + | ||
111 | + params.lp = productCode; | ||
112 | + url = 'yohobuy://' + helpers.url('/limitpurchase', params); | ||
113 | + } | ||
104 | return url; | 114 | return url; |
105 | }; | 115 | }; |
106 | 116 | ||
@@ -460,7 +470,6 @@ const detailDataPkg = (origin, uid, vipLevel, ua) => { | @@ -460,7 +470,6 @@ const detailDataPkg = (origin, uid, vipLevel, ua) => { | ||
460 | 470 | ||
461 | // 处理限购商品有关的按钮状态 | 471 | // 处理限购商品有关的按钮状态 |
462 | dest = procShowStatus(dest, showStatus, isBeginSale); | 472 | dest = procShowStatus(dest, showStatus, isBeginSale); |
463 | - | ||
464 | dest.cartInfo.limitProductCode = origin.limitProductCode; | 473 | dest.cartInfo.limitProductCode = origin.limitProductCode; |
465 | dest.cartInfo.limitCodeUrl = getLimitCodeUrl(origin.limitProductCode, origin.erpProductId, ua); | 474 | dest.cartInfo.limitCodeUrl = getLimitCodeUrl(origin.limitProductCode, origin.erpProductId, ua); |
466 | dest.cartInfo.limitProductPay = helpers.url('/cart/index/orderEnsure'); | 475 | dest.cartInfo.limitProductPay = helpers.url('/cart/index/orderEnsure'); |
-
Please register or login to post a comment