|
@@ -128,20 +128,8 @@ module.exports = class extends global.yoho.BaseModel { |
|
@@ -128,20 +128,8 @@ module.exports = class extends global.yoho.BaseModel { |
128
|
* @param {string} skn 限购商品skn
|
128
|
* @param {string} skn 限购商品skn
|
129
|
* @return {string} 限购商品跳转url
|
129
|
* @return {string} 限购商品跳转url
|
130
|
*/
|
130
|
*/
|
131
|
- _getLimitCodeUrl(productCode, skn, ua) {
|
|
|
132
|
- let url = 'yohoapp://yoho.app/openwith?limit_product_code=' + productCode +
|
|
|
133
|
- '&product_skn=' + skn;
|
|
|
134
|
-
|
|
|
135
|
- let isIphone = String(ua).indexOf('iPhone') >= 0;
|
|
|
136
|
- let isIpad = ua.indexOf('iPad') >= 0;
|
|
|
137
|
-
|
|
|
138
|
- if (isIphone || isIpad) {
|
|
|
139
|
- let params = {};
|
|
|
140
|
-
|
|
|
141
|
- params.lp = productCode;
|
|
|
142
|
- url = 'yohobuy://' + helpers.urlFormat('/limitpurchase', params);
|
|
|
143
|
- }
|
|
|
144
|
- return url;
|
131
|
+ _getLimitCodeUrl(productCode, skn, ua, unionType) {
|
|
|
132
|
+ return `yohobuy://yohobuy.com/goapp?${unionType ? `ct=${unionType}` : ''}&openby:yohobuy={"action":"go.limitpurchase","params":{"lp":"${productCode}"}}`;
|
145
|
}
|
133
|
}
|
146
|
|
134
|
|
147
|
_getShopsInfo(brandId) {
|
135
|
_getShopsInfo(brandId) {
|
|
@@ -461,7 +449,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
@@ -461,7 +449,7 @@ module.exports = class extends global.yoho.BaseModel { |
461
|
/**
|
449
|
/**
|
462
|
* [商品信息格式化异步接口]
|
450
|
* [商品信息格式化异步接口]
|
463
|
*/
|
451
|
*/
|
464
|
- _detailDataPkgAsync(origin, uid, vipLevel, ua) {
|
452
|
+ _detailDataPkgAsync(origin, uid, vipLevel, ua, unionType) {
|
465
|
let dest = {}; // 结果输出
|
453
|
let dest = {}; // 结果输出
|
466
|
|
454
|
|
467
|
// 用户未登录时
|
455
|
// 用户未登录时
|
|
@@ -623,7 +611,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
@@ -623,7 +611,7 @@ module.exports = class extends global.yoho.BaseModel { |
623
|
dest = this._procShowStatus(dest, showStatus, isBeginSale);
|
611
|
dest = this._procShowStatus(dest, showStatus, isBeginSale);
|
624
|
|
612
|
|
625
|
dest.cartInfo.limitProductCode = origin.limitProductCode;
|
613
|
dest.cartInfo.limitProductCode = origin.limitProductCode;
|
626
|
- dest.cartInfo.limitCodeUrl = this._getLimitCodeUrl(origin.limitProductCode, origin.product_skn, ua); // eslint-disable-line
|
614
|
+ dest.cartInfo.limitCodeUrl = this._getLimitCodeUrl(origin.limitProductCode, origin.product_skn, ua, unionType); // eslint-disable-line
|
627
|
dest.cartInfo.limitProductPay = helpers.urlFormat('/cart/index/orderEnsure');
|
615
|
dest.cartInfo.limitProductPay = helpers.urlFormat('/cart/index/orderEnsure');
|
628
|
return resolve(dest);
|
616
|
return resolve(dest);
|
629
|
} else {
|
617
|
} else {
|
|
@@ -733,7 +721,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
@@ -733,7 +721,7 @@ module.exports = class extends global.yoho.BaseModel { |
733
|
this._detailDataPkgAsync(_.assign(result, {
|
721
|
this._detailDataPkgAsync(_.assign(result, {
|
734
|
from: data.from,
|
722
|
from: data.from,
|
735
|
closeBuyNowButton: data.closeBuyNowButton
|
723
|
closeBuyNowButton: data.closeBuyNowButton
|
736
|
- }), data.uid, data.vipLevel, data.ua),
|
724
|
+ }), data.uid, data.vipLevel, data.ua, data.unionType),
|
737
|
this._getFavorite(result.product_id, data.uid)
|
725
|
this._getFavorite(result.product_id, data.uid)
|
738
|
];
|
726
|
];
|
739
|
|
727
|
|