diff --git a/pages/admin/articles.vue b/pages/admin/articles.vue index bb5b231..de12a55 100644 --- a/pages/admin/articles.vue +++ b/pages/admin/articles.vue @@ -157,18 +157,12 @@ export default { idArticle: idArticle, articlePerfect: '1' }).then(function (res) { - if (res) { - if (res.success) { - _ts.$store.commit('admin/updateArticlePreference', { - index: index, - idArticle: idArticle, - articlePerfect: '1' - }) - _ts.$message.success("设置成功!"); - } else { - _ts.$message.error(_ts.message); - } - } + _ts.$store.commit('admin/updateArticlePreference', { + index: index, + idArticle: idArticle, + articlePerfect: '1' + }) + _ts.$message.success("设置成功!"); }) }, cancelPreference(index, idArticle) { diff --git a/pages/admin/dashboard.vue b/pages/admin/dashboard.vue index 5228568..45fc794 100644 --- a/pages/admin/dashboard.vue +++ b/pages/admin/dashboard.vue @@ -503,18 +503,12 @@ export default { idArticle: idArticle, articlePerfect: '1' }).then(function (res) { - if (res) { - if (res.success) { - _ts.$store.commit('admin/updateArticlePreference', { - index: index, - idArticle: idArticle, - articlePerfect: '1' - }) - _ts.$message.success("设置成功!"); - } else { - _ts.$message.error(_ts.message); - } - } + _ts.$store.commit('admin/updateArticlePreference', { + index: index, + idArticle: idArticle, + articlePerfect: '1' + }) + _ts.$message.success("设置成功!"); }) }, cancelPreference(index, idArticle) {