Authored by 李奇

fixed:资讯点赞功能修正

... ... @@ -2,7 +2,7 @@
<div class="top-nav">
<navbar>
<template slot="right">
<a class="right-button no-intercept" href="javascript:void(0);" @click="like()">
<a class="right-button no-intercept" @click="like">
<span class="count">{{likeCount ? likeCount : ''}}</span>
<span class="icon" :class="{ 'icon-like': !isLiked, 'icon-liked': isLiked}">
</span>
... ... @@ -84,6 +84,16 @@
this.likeCount = result.data;
}
if (results && (results.code === 403 || results.code === 401)) {
// 未登录
yoho.goLogin('', () => {
this.like();
}, function() {
tip('登录失败');
});
return;
}
if (misc && misc.code === 200) {
this.isLiked = misc.data.isPraise === 'Y';
if (misc.data.isPraise === 'Y') {
... ...