|
@@ -98,7 +98,7 @@ const procShowStatus = (data, showStatus, isBeginSale) => { |
|
@@ -98,7 +98,7 @@ const procShowStatus = (data, showStatus, isBeginSale) => { |
98
|
* @param {[string]} skn 限购商品skn
|
98
|
* @param {[string]} skn 限购商品skn
|
99
|
* @return {[string]} 限购商品跳转url
|
99
|
* @return {[string]} 限购商品跳转url
|
100
|
*/
|
100
|
*/
|
101
|
-const getLimitCodeUrl = (productCode, skn) => {
|
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 + '&product_skn=' + skn;
|
103
|
|
103
|
|
104
|
return url;
|
104
|
return url;
|
|
@@ -109,7 +109,7 @@ const getLimitCodeUrl = (productCode, skn) => { |
|
@@ -109,7 +109,7 @@ const getLimitCodeUrl = (productCode, skn) => { |
109
|
* @param origin Object 原始数据
|
109
|
* @param origin Object 原始数据
|
110
|
* @return dest Object 格式化数据
|
110
|
* @return dest Object 格式化数据
|
111
|
*/
|
111
|
*/
|
112
|
-const detailDataPkg = (origin, uid, vipLevel) => {
|
112
|
+const detailDataPkg = (origin, uid, vipLevel, ua) => {
|
113
|
var dest = {}, // 结果输出
|
113
|
var dest = {}, // 结果输出
|
114
|
colorGroup = {},
|
114
|
colorGroup = {},
|
115
|
thumbImageList = {},
|
115
|
thumbImageList = {},
|
|
@@ -462,7 +462,7 @@ const detailDataPkg = (origin, uid, vipLevel) => { |
|
@@ -462,7 +462,7 @@ const detailDataPkg = (origin, uid, vipLevel) => { |
462
|
dest = procShowStatus(dest, showStatus, isBeginSale);
|
462
|
dest = procShowStatus(dest, showStatus, isBeginSale);
|
463
|
|
463
|
|
464
|
dest.cartInfo.limitProductCode = origin.limitProductCode;
|
464
|
dest.cartInfo.limitProductCode = origin.limitProductCode;
|
465
|
- dest.cartInfo.limitCodeUrl = getLimitCodeUrl(origin.limitProductCode, origin.erpProductId);
|
465
|
+ dest.cartInfo.limitCodeUrl = getLimitCodeUrl(origin.limitProductCode, origin.erpProductId, ua);
|
466
|
dest.cartInfo.limitProductPay = helpers.url('/cart/index/orderEnsure');
|
466
|
dest.cartInfo.limitProductPay = helpers.url('/cart/index/orderEnsure');
|
467
|
} else {
|
467
|
} else {
|
468
|
dest.cartInfo.addToCartUrl = helpers.url('/product/buy_' + origin.id + '_' +
|
468
|
dest.cartInfo.addToCartUrl = helpers.url('/product/buy_' + origin.id + '_' +
|
|
@@ -495,7 +495,7 @@ module.exports = (data) => { |
|
@@ -495,7 +495,7 @@ module.exports = (data) => { |
495
|
productId: data.id,
|
495
|
productId: data.id,
|
496
|
method: 'h5.product.data'
|
496
|
method: 'h5.product.data'
|
497
|
})).then(result => {
|
497
|
})).then(result => {
|
498
|
- finalResult = detailDataPkg(result, null, 0);
|
498
|
+ finalResult = detailDataPkg(result, null, 0, data.ua);
|
499
|
|
499
|
|
500
|
return api.get('', sign.apiSign({
|
500
|
return api.get('', sign.apiSign({
|
501
|
method: 'app.shop.queryShopsByBrandId',
|
501
|
method: 'app.shop.queryShopsByBrandId',
|