...
|
...
|
@@ -98,7 +98,7 @@ const procShowStatus = (data, showStatus, isBeginSale) => { |
|
|
* @param {[string]} skn 限购商品skn
|
|
|
* @return {[string]} 限购商品跳转url
|
|
|
*/
|
|
|
const getLimitCodeUrl = (productCode, skn) => {
|
|
|
const getLimitCodeUrl = (productCode, skn, ua) => {
|
|
|
var url = 'yohoapp://yoho.app/openwith?limit_product_code=' + productCode + '&product_skn=' + skn;
|
|
|
|
|
|
return url;
|
...
|
...
|
@@ -109,7 +109,7 @@ const getLimitCodeUrl = (productCode, skn) => { |
|
|
* @param origin Object 原始数据
|
|
|
* @return dest Object 格式化数据
|
|
|
*/
|
|
|
const detailDataPkg = (origin, uid, vipLevel) => {
|
|
|
const detailDataPkg = (origin, uid, vipLevel, ua) => {
|
|
|
var dest = {}, // 结果输出
|
|
|
colorGroup = {},
|
|
|
thumbImageList = {},
|
...
|
...
|
@@ -462,7 +462,7 @@ const detailDataPkg = (origin, uid, vipLevel) => { |
|
|
dest = procShowStatus(dest, showStatus, isBeginSale);
|
|
|
|
|
|
dest.cartInfo.limitProductCode = origin.limitProductCode;
|
|
|
dest.cartInfo.limitCodeUrl = getLimitCodeUrl(origin.limitProductCode, origin.erpProductId);
|
|
|
dest.cartInfo.limitCodeUrl = getLimitCodeUrl(origin.limitProductCode, origin.erpProductId, ua);
|
|
|
dest.cartInfo.limitProductPay = helpers.url('/cart/index/orderEnsure');
|
|
|
} else {
|
|
|
dest.cartInfo.addToCartUrl = helpers.url('/product/buy_' + origin.id + '_' +
|
...
|
...
|
@@ -495,7 +495,7 @@ module.exports = (data) => { |
|
|
productId: data.id,
|
|
|
method: 'h5.product.data'
|
|
|
})).then(result => {
|
|
|
finalResult = detailDataPkg(result, null, 0);
|
|
|
finalResult = detailDataPkg(result, null, 0, data.ua);
|
|
|
|
|
|
return api.get('', sign.apiSign({
|
|
|
method: 'app.shop.queryShopsByBrandId',
|
...
|
...
|
|