Authored by 郭成尧

'收藏未登录跳转登录'

... ... @@ -53,6 +53,13 @@ module.exports = {
/* 收藏店铺 */
collectShop: (req, res, next) => {
if (!req.user.uid) {
res.json({
code: 403,
message: '未登录'
});
}
shopModel.collectShopData({
shopId: req.body.shopId,
favId: req.body.favId,
... ...
<template>
<div class="brand-share">
<div class="brand-top-box" v-lazy:background-image="shopInfo.brandBg | resize 750 478"></div>
<div class="brand-top-box" v-bind:style="{ 'background-image': `url(${shopInfo.brandBg})` }"></div>
<div class="brand-title">{{ shopInfo.brandName }}</div>
<div class="brand-intro">{{ shopInfo.brandIntro }}</div>
<div class="tip">进入 BLK 选购潮品</div>
<div class="icon arrow">&#xe602;</div>
<a href="//m.yohoblk.com"><img v-lazy="shopInfo.brandBg | resize 750 478"></a>
<a href="//m.yohoblk.com"><img v-bind:src="shopInfo.brandBg | resize 752 365"></a>
</div>
<share-bottom></share-bottom>
</template>
... ...
... ... @@ -97,6 +97,8 @@
tip(result.message);
if (result.code === 200) {
this.shareData.isFav = !this.shareData.isFav;
} else if (result.code === 403) {
yoho.goLogin();
}
}).fail(() => {
tip('网络错误');
... ...