...
|
...
|
@@ -128,20 +128,8 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
* @param {string} skn 限购商品skn
|
|
|
* @return {string} 限购商品跳转url
|
|
|
*/
|
|
|
_getLimitCodeUrl(productCode, skn, ua) {
|
|
|
let url = 'yohoapp://yoho.app/openwith?limit_product_code=' + productCode +
|
|
|
'&product_skn=' + skn;
|
|
|
|
|
|
let isIphone = String(ua).indexOf('iPhone') >= 0;
|
|
|
let isIpad = ua.indexOf('iPad') >= 0;
|
|
|
|
|
|
if (isIphone || isIpad) {
|
|
|
let params = {};
|
|
|
|
|
|
params.lp = productCode;
|
|
|
url = 'yohobuy://' + helpers.urlFormat('/limitpurchase', params);
|
|
|
}
|
|
|
return url;
|
|
|
_getLimitCodeUrl(productCode, skn, ua, unionType) {
|
|
|
return `yohobuy://yohobuy.com/goapp?${unionType ? `ct=${unionType}` : ''}&openby:yohobuy={"action":"go.limitpurchase","params":{"lp":"${productCode}"}}`;
|
|
|
}
|
|
|
|
|
|
_getShopsInfo(brandId) {
|
...
|
...
|
@@ -461,7 +449,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
/**
|
|
|
* [商品信息格式化异步接口]
|
|
|
*/
|
|
|
_detailDataPkgAsync(origin, uid, vipLevel, ua) {
|
|
|
_detailDataPkgAsync(origin, uid, vipLevel, ua, unionType) {
|
|
|
let dest = {}; // 结果输出
|
|
|
|
|
|
// 用户未登录时
|
...
|
...
|
@@ -623,7 +611,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
dest = this._procShowStatus(dest, showStatus, isBeginSale);
|
|
|
|
|
|
dest.cartInfo.limitProductCode = origin.limitProductCode;
|
|
|
dest.cartInfo.limitCodeUrl = this._getLimitCodeUrl(origin.limitProductCode, origin.product_skn, ua); // eslint-disable-line
|
|
|
dest.cartInfo.limitCodeUrl = this._getLimitCodeUrl(origin.limitProductCode, origin.product_skn, ua, unionType); // eslint-disable-line
|
|
|
dest.cartInfo.limitProductPay = helpers.urlFormat('/cart/index/orderEnsure');
|
|
|
return resolve(dest);
|
|
|
} else {
|
...
|
...
|
@@ -733,7 +721,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
this._detailDataPkgAsync(_.assign(result, {
|
|
|
from: data.from,
|
|
|
closeBuyNowButton: data.closeBuyNowButton
|
|
|
}), data.uid, data.vipLevel, data.ua),
|
|
|
}), data.uid, data.vipLevel, data.ua, data.unionType),
|
|
|
this._getFavorite(result.product_id, data.uid)
|
|
|
];
|
|
|
|
...
|
...
|
|