diff --git a/pages/article/_article_id.vue b/pages/article/_article_id.vue index 2f53a9d..eacbc05 100644 --- a/pages/article/_article_id.vue +++ b/pages/article/_article_id.vue @@ -341,14 +341,8 @@ export default { idArticle: _ts.article.idArticle, articlePerfect: '1', }).then(function (res) { - if (res) { - if (res.success) { - _ts.$set(_ts, 'isPerfect', false); - _ts.$message.success("设置成功!"); - } else { - _ts.$message.error(_ts.message); - } - } + _ts.isPerfect = !_ts.isPerfect; + _ts.$message.success("设置成功!"); }) }, cancelPreference() { @@ -357,14 +351,8 @@ export default { idArticle: _ts.article.idArticle, articlePerfect: '0', }).then(function (res) { - if (res) { - if (res.success) { - _ts.$set(_ts, 'isPerfect', true); - _ts.$message.success("取消成功!"); - } else { - _ts.$message.error(_ts.message); - } - } + _ts.isPerfect = !_ts.isPerfect; + _ts.$message.success("设置成功!"); }) }, thumbsUp() {