Showing
3 changed files
with
11 additions
and
2 deletions
@@ -53,6 +53,13 @@ module.exports = { | @@ -53,6 +53,13 @@ module.exports = { | ||
53 | 53 | ||
54 | /* 收藏店铺 */ | 54 | /* 收藏店铺 */ |
55 | collectShop: (req, res, next) => { | 55 | collectShop: (req, res, next) => { |
56 | + if (!req.user.uid) { | ||
57 | + res.json({ | ||
58 | + code: 403, | ||
59 | + message: '未登录' | ||
60 | + }); | ||
61 | + } | ||
62 | + | ||
56 | shopModel.collectShopData({ | 63 | shopModel.collectShopData({ |
57 | shopId: req.body.shopId, | 64 | shopId: req.body.shopId, |
58 | favId: req.body.favId, | 65 | favId: req.body.favId, |
1 | <template> | 1 | <template> |
2 | <div class="brand-share"> | 2 | <div class="brand-share"> |
3 | - <div class="brand-top-box" v-lazy:background-image="shopInfo.brandBg | resize 750 478"></div> | 3 | + <div class="brand-top-box" v-bind:style="{ 'background-image': `url(${shopInfo.brandBg})` }"></div> |
4 | <div class="brand-title">{{ shopInfo.brandName }}</div> | 4 | <div class="brand-title">{{ shopInfo.brandName }}</div> |
5 | <div class="brand-intro">{{ shopInfo.brandIntro }}</div> | 5 | <div class="brand-intro">{{ shopInfo.brandIntro }}</div> |
6 | <div class="tip">进入 BLK 选购潮品</div> | 6 | <div class="tip">进入 BLK 选购潮品</div> |
7 | <div class="icon arrow"></div> | 7 | <div class="icon arrow"></div> |
8 | - <a href="//m.yohoblk.com"><img v-lazy="shopInfo.brandBg | resize 750 478"></a> | 8 | + <a href="//m.yohoblk.com"><img v-bind:src="shopInfo.brandBg | resize 752 365"></a> |
9 | </div> | 9 | </div> |
10 | <share-bottom></share-bottom> | 10 | <share-bottom></share-bottom> |
11 | </template> | 11 | </template> |
@@ -97,6 +97,8 @@ | @@ -97,6 +97,8 @@ | ||
97 | tip(result.message); | 97 | tip(result.message); |
98 | if (result.code === 200) { | 98 | if (result.code === 200) { |
99 | this.shareData.isFav = !this.shareData.isFav; | 99 | this.shareData.isFav = !this.shareData.isFav; |
100 | + } else if (result.code === 403) { | ||
101 | + yoho.goLogin(); | ||
100 | } | 102 | } |
101 | }).fail(() => { | 103 | }).fail(() => { |
102 | tip('网络错误'); | 104 | tip('网络错误'); |
-
Please register or login to post a comment