:fix: the preference button in article page does not render correctly in time.

This commit is contained in:
Zeeland 2022-11-01 02:57:34 +08:00
parent f24bdbb1dc
commit 3d7562a4da

View File

@ -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() {