Showing
1 changed file
with
8 additions
and
1 deletions
@@ -125,8 +125,11 @@ export default { | @@ -125,8 +125,11 @@ export default { | ||
125 | hide: left - inx > 1 || inx - right > 1 | 125 | hide: left - inx > 1 || inx - right > 1 |
126 | }; | 126 | }; |
127 | }, | 127 | }, |
128 | - praiseArticle(e) { | 128 | + async praiseArticle(e) { |
129 | if (e.timeStamp - this._preTimeStamp < dblclickDdelay) { | 129 | if (e.timeStamp - this._preTimeStamp < dblclickDdelay) { |
130 | + const user = await this.$sdk.getUser(); | ||
131 | + | ||
132 | + if (user && user.uid) { | ||
130 | this.onAnimation = true; | 133 | this.onAnimation = true; |
131 | this._lottieTimer && clearTimeout(this._lottieTimer); | 134 | this._lottieTimer && clearTimeout(this._lottieTimer); |
132 | this.$refs.lottie.play(); | 135 | this.$refs.lottie.play(); |
@@ -134,7 +137,11 @@ export default { | @@ -134,7 +137,11 @@ export default { | ||
134 | this.$refs.lottie.stop(); | 137 | this.$refs.lottie.stop(); |
135 | this.onAnimation = false; | 138 | this.onAnimation = false; |
136 | }, 1000); | 139 | }, 1000); |
140 | + | ||
137 | this.$emit('on-praise'); | 141 | this.$emit('on-praise'); |
142 | + } else { | ||
143 | + this.$sdk.goLogin(); | ||
144 | + } | ||
138 | } | 145 | } |
139 | 146 | ||
140 | this._preTimeStamp = e.timeStamp; | 147 | this._preTimeStamp = e.timeStamp; |
-
Please register or login to post a comment