Showing
1 changed file
with
11 additions
and
1 deletions
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div class="top-nav"> | 2 | <div class="top-nav"> |
3 | <navbar> | 3 | <navbar> |
4 | <template slot="right"> | 4 | <template slot="right"> |
5 | - <a class="right-button no-intercept" href="javascript:void(0);" @click="like()"> | 5 | + <a class="right-button no-intercept" @click="like"> |
6 | <span class="count">{{likeCount ? likeCount : ''}}</span> | 6 | <span class="count">{{likeCount ? likeCount : ''}}</span> |
7 | <span class="icon" :class="{ 'icon-like': !isLiked, 'icon-liked': isLiked}"> | 7 | <span class="icon" :class="{ 'icon-like': !isLiked, 'icon-liked': isLiked}"> |
8 | </span> | 8 | </span> |
@@ -84,6 +84,16 @@ | @@ -84,6 +84,16 @@ | ||
84 | this.likeCount = result.data; | 84 | this.likeCount = result.data; |
85 | } | 85 | } |
86 | 86 | ||
87 | + if (results && (results.code === 403 || results.code === 401)) { | ||
88 | + // 未登录 | ||
89 | + yoho.goLogin('', () => { | ||
90 | + this.like(); | ||
91 | + }, function() { | ||
92 | + tip('登录失败'); | ||
93 | + }); | ||
94 | + return; | ||
95 | + } | ||
96 | + | ||
87 | if (misc && misc.code === 200) { | 97 | if (misc && misc.code === 200) { |
88 | this.isLiked = misc.data.isPraise === 'Y'; | 98 | this.isLiked = misc.data.isPraise === 'Y'; |
89 | if (misc.data.isPraise === 'Y') { | 99 | if (misc.data.isPraise === 'Y') { |
-
Please register or login to post a comment