Authored by 郭成尧

'处理收藏店铺分享'

... ... @@ -25,7 +25,7 @@ module.exports = {
getShopInfo: (req, res, next) => {
shopModel.getShopData({
domain: req.query.domain,
shopId: req.query.id,
shopId: req.query.shopId,
uid: req.user.uid
}).then(result => {
res.json(result);
... ... @@ -79,7 +79,8 @@ module.exports = {
res.render('shop/share', {
module: 'product',
page: 'shop-share',
domain: req.params.domain
domain: req.params.domain,
shopId: req.query.id
});
}
};
... ...
<div id="share" data-domain="{{domain}}">
<div id="share" data-domain="{{domain}}" data-shopid="{{shopId}}">
<share-box></share-box>
</div>
... ...
... ... @@ -77,7 +77,10 @@
getShopInfo() {
$.get({
url: '/product/shop/info.json',
data: { domain: $share.data('domain') }
data: {
domain: $share.data('domain'),
shopId: $share.data('shopid')
}
}).done(result => {
this.shopInfo = result;
}).fail(() => {
... ...
... ... @@ -76,16 +76,20 @@
url: '/product/shop/info.json',
data: {
domain: $shop.data('domain'),
id: $shop.data('shopid') // 店铺 ID
shopId: $shop.data('shopid') // 店铺 ID
}
}).done(result => {
if (result) {
this.shopInfo = result;
this.shopInfo.showBrandInfo = true;
let shareUrl = locationQuery.id ?
location.origin + '/product/shop/favorite/share?id=' + locationQuery.id :
location.origin + '/product/shop/' + $shop.data('domain') + '/share';
this.shareData = {
title: result.shopName,
des: shareSubTitle,
url: location.origin + '/product/shop/' + $shop.data('domain') + '/share',
url: shareUrl,
img: result.shopBg,
isBlkShop: result.isBlkShop,
domain: locationQuery.domain,
... ...