|
@@ -185,17 +185,18 @@ const shop = { |
|
@@ -185,17 +185,18 @@ const shop = { |
185
|
}).catch(next);
|
185
|
}).catch(next);
|
186
|
},
|
186
|
},
|
187
|
|
187
|
|
188
|
- _getMiniAppPath(brands) {
|
188
|
+ _getMiniAppPath(req, brands) {
|
189
|
if (!brands || brands.length !== 1) {
|
189
|
if (!brands || brands.length !== 1) {
|
190
|
return {};
|
190
|
return {};
|
191
|
}
|
191
|
}
|
192
|
|
192
|
|
193
|
// param:品牌ID, name:品牌名称, miniQrType 1:商品 2 品牌,miniapp_type 0:有货,1:新与力
|
193
|
// param:品牌ID, name:品牌名称, miniQrType 1:商品 2 品牌,miniapp_type 0:有货,1:新与力
|
194
|
- let miniPath = helpers.urlFormat('/api/wechat/miniapp.jpg', {
|
194
|
+ let miniPath = helpers.urlFormat('/wechat/miniapp.jpg', {
|
195
|
miniapp_type: 0,
|
195
|
miniapp_type: 0,
|
196
|
param: _.get(brands, '[0].brand_id', 0),
|
196
|
param: _.get(brands, '[0].brand_id', 0),
|
197
|
name: encodeURIComponent(_.get(brands, '[0].brand_name', '')),
|
197
|
name: encodeURIComponent(_.get(brands, '[0].brand_name', '')),
|
198
|
- miniQrType: 2
|
198
|
+ miniQrType: 2,
|
|
|
199
|
+ isOpen: _.get(req.app, 'locals.wap.wechat.miniPathOpen', false)
|
199
|
});
|
200
|
});
|
200
|
|
201
|
|
201
|
return {miniPath};
|
202
|
return {miniPath};
|
|
@@ -239,7 +240,7 @@ const shop = { |
|
@@ -239,7 +240,7 @@ const shop = { |
239
|
_noLazy: true,
|
240
|
_noLazy: true,
|
240
|
localCss: true
|
241
|
localCss: true
|
241
|
}, _tdkProcess(title),
|
242
|
}, _tdkProcess(title),
|
242
|
- shop._getMiniAppPath([{brand_id: brandId, brand_name: brandInfo.title}])));
|
243
|
+ shop._getMiniAppPath(req, [{brand_id: brandId, brand_name: brandInfo.title}])));
|
243
|
})().catch(next);
|
244
|
})().catch(next);
|
244
|
},
|
245
|
},
|
245
|
|
246
|
|
|
@@ -324,7 +325,7 @@ const shop = { |
|
@@ -324,7 +325,7 @@ const shop = { |
324
|
shppFavHide: shppFavHide
|
325
|
shppFavHide: shppFavHide
|
325
|
},
|
326
|
},
|
326
|
_tdkProcess(shopInfo.shop_name),
|
327
|
_tdkProcess(shopInfo.shop_name),
|
327
|
- shop._getMiniAppPath(shopBrands)
|
328
|
+ shop._getMiniAppPath(req, shopBrands)
|
328
|
));
|
329
|
));
|
329
|
})().catch(next);
|
330
|
})().catch(next);
|
330
|
},
|
331
|
},
|
|
@@ -385,7 +386,7 @@ const shop = { |
|
@@ -385,7 +386,7 @@ const shop = { |
385
|
couponData
|
386
|
couponData
|
386
|
},
|
387
|
},
|
387
|
_tdkProcess(title),
|
388
|
_tdkProcess(title),
|
388
|
- shop._getMiniAppPath(shopBrands)
|
389
|
+ shop._getMiniAppPath(req, shopBrands)
|
389
|
));
|
390
|
));
|
390
|
|
391
|
|
391
|
})().catch(next);
|
392
|
})().catch(next);
|
|
@@ -409,7 +410,7 @@ const shop = { |
|
@@ -409,7 +410,7 @@ const shop = { |
409
|
}),
|
410
|
}),
|
410
|
module: 'product',
|
411
|
module: 'product',
|
411
|
page: 'all-brand'
|
412
|
page: 'all-brand'
|
412
|
- }, shop._getMiniAppPath(result)));
|
413
|
+ }, shop._getMiniAppPath(req, result)));
|
413
|
}).catch(next);
|
414
|
}).catch(next);
|
414
|
},
|
415
|
},
|
415
|
|
416
|
|