diff --git a/pages/admin/articles.vue b/pages/admin/articles.vue index de12a55..0a0cfb3 100644 --- a/pages/admin/articles.vue +++ b/pages/admin/articles.vue @@ -171,18 +171,12 @@ export default { idArticle: idArticle, articlePerfect: '0' }).then(function (res) { - if (res) { - if (res.success) { - _ts.$store.commit('admin/updateArticlePreference', { - index: index, - idArticle: idArticle, - articlePerfect: '0' - }) - _ts.$message.success("取消成功!"); - } else { - _ts.$message.error(_ts.message); - } - } + _ts.$store.commit('admin/updateArticlePreference', { + index: index, + idArticle: idArticle, + articlePerfect: '0' + }) + _ts.$message.success("取消成功!"); }) }, updateTags(index, article) { diff --git a/pages/admin/dashboard.vue b/pages/admin/dashboard.vue index 45fc794..71090e1 100644 --- a/pages/admin/dashboard.vue +++ b/pages/admin/dashboard.vue @@ -517,18 +517,12 @@ export default { idArticle: idArticle, articlePerfect: '0' }).then(function (res) { - if (res) { - if (res.success) { - _ts.$store.commit('admin/updateArticlePreference', { - index: index, - idArticle: idArticle, - articlePerfect: '0' - }) - _ts.$message.success("取消成功!"); - } else { - _ts.$message.error(_ts.message); - } - } + _ts.$store.commit('admin/updateArticlePreference', { + index: index, + idArticle: idArticle, + articlePerfect: '0' + }) + _ts.$message.success("取消成功!"); }) }, updateTags(index, article) {