Update _article_id.vue

This commit is contained in:
ronger 2022-11-01 07:46:34 +08:00 committed by GitHub
parent e50613586d
commit 66784c40cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -341,8 +341,12 @@ export default {
idArticle: _ts.article.idArticle,
articlePerfect: '1',
}).then(function (res) {
_ts.isPerfect = !_ts.isPerfect;
if (res) {
_ts.$set(_ts, 'isPerfect', true);
_ts.$message.success("设置成功!");
} else {
_ts.$message.error("设置失败!");
}
})
},
cancelPreference() {
@ -351,8 +355,12 @@ export default {
idArticle: _ts.article.idArticle,
articlePerfect: '0',
}).then(function (res) {
_ts.isPerfect = !_ts.isPerfect;
_ts.$message.success("设置成功!");
if (res) {
_ts.$set(_ts, 'isPerfect', false);
_ts.$message.success("取消成功!");
} else {
_ts.$message.error("设置失败!");
}
})
},
thumbsUp() {