Authored by 郭成尧

detail-shop-list-add-shopId

... ... @@ -42,9 +42,6 @@ const newDetail = {
return next();
}
// result.id = id;
// result.goodsId = goodsId;
let appParams = {product_skn: result.productSkn};
let appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.productDetail","params":' +
JSON.stringify(appParams) +
... ... @@ -99,6 +96,7 @@ const newDetail = {
*/
sknData(req, res, next) {
let brandId = req.query.brandId;
let shopId = req.query.shopId;
let productId = req.query.productId;
let skn = req.query.skn;
let bundleType = req.query.bundleType;
... ... @@ -111,6 +109,7 @@ const newDetail = {
newDetailModel.querySknData({
skn,
brandId,
shopId,
productId,
bundleType,
gid
... ...
... ... @@ -69,6 +69,7 @@ const tool = {
// dest.brandId = origin.brand_info && origin.brand_info.brand_id || 0;
dest.brandId = _.get(origin, 'brand_info.brand_id', 0);
dest.shopId = _.get(origin, 'shopId', 0);
dest.productSkn = origin.product_skn;
dest.id = origin.product_id;
... ... @@ -285,6 +286,7 @@ const newDetail = {
}
result.data.goods_id = data.goodsId;
result.data.shopId = _.get(result, 'data.shop_id', null);
return tool.prodessDetailData(result.data);
});
... ... @@ -295,11 +297,12 @@ const newDetail = {
*/
querySknData(params) {
let brandId = params.brandId;
let shopId = params.shopId;
let productId = params.productId;
let skn = params.skn;
let apiArray = [
this.queryShopsByBrandId(brandId), // 0 品牌信息
this.queryShopsByBrandId(brandId, shopId), // 0 品牌信息
commentModel.getCommentInfo({
productId: productId
}), // 1 评论信息
... ... @@ -352,10 +355,11 @@ const newDetail = {
/*
接口: 根据BrandID, 查询品牌信息
*/
queryShopsByBrandId(brandId) {
queryShopsByBrandId(brandId, shopId) {
let params = {
method: 'app.shop.queryShopsByBrandId',
brand_id: brandId
method: 'app.product.queryShopsInfoById',
brand_id: brandId,
shop_id: shopId
};
let cacheConf = {
... ...
... ... @@ -107,6 +107,7 @@
<input id="productSkn" type="hidden" value="{{productSkn}}">
<input id="brand-id" type="hidden" value="{{brandId}}">
<input id="shopId" type="hidden" value="{{shopId}}">
<input id="product-limit" type="hidden" value="{{isLimitBuy}}">
<input id="product-coupon-switch" type="hidden" value="{{showCoupon}}">
<input id="bundleType" type="hidden" value="{{bundleType}}">
... ...
... ... @@ -5,6 +5,7 @@ let productId = $('#productId').val();
let goodsId = $('#goodsId').val();
let productSkn = $('#productSkn').val();
let brandId = $('#brand-id').val();
let shopId = $('#shopId').val();
let bundleType = $('#bundleType').val();
require('../common');
... ... @@ -327,6 +328,7 @@ setTimeout(() => {
skn: skn,
productId: productId,
brandId: brandId,
shopId: shopId,
bundleType: bundleType,
gid: goodsId
}).done(function(info) {
... ...