...
|
...
|
@@ -125,16 +125,23 @@ export default { |
|
|
hide: left - inx > 1 || inx - right > 1
|
|
|
};
|
|
|
},
|
|
|
praiseArticle(e) {
|
|
|
async praiseArticle(e) {
|
|
|
if (e.timeStamp - this._preTimeStamp < dblclickDdelay) {
|
|
|
this.onAnimation = true;
|
|
|
this._lottieTimer && clearTimeout(this._lottieTimer);
|
|
|
this.$refs.lottie.play();
|
|
|
this._lottieTimer = setTimeout(() => {
|
|
|
this.$refs.lottie.stop();
|
|
|
this.onAnimation = false;
|
|
|
}, 1000);
|
|
|
this.$emit('on-praise');
|
|
|
const user = await this.$sdk.getUser();
|
|
|
|
|
|
if (user && user.uid) {
|
|
|
this.onAnimation = true;
|
|
|
this._lottieTimer && clearTimeout(this._lottieTimer);
|
|
|
this.$refs.lottie.play();
|
|
|
this._lottieTimer = setTimeout(() => {
|
|
|
this.$refs.lottie.stop();
|
|
|
this.onAnimation = false;
|
|
|
}, 1000);
|
|
|
|
|
|
this.$emit('on-praise');
|
|
|
} else {
|
|
|
this.$sdk.goLogin();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
this._preTimeStamp = e.timeStamp;
|
...
|
...
|
|