: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, idArticle: _ts.article.idArticle,
articlePerfect: '1', articlePerfect: '1',
}).then(function (res) { }).then(function (res) {
if (res) { _ts.isPerfect = !_ts.isPerfect;
if (res.success) {
_ts.$set(_ts, 'isPerfect', false);
_ts.$message.success("设置成功!"); _ts.$message.success("设置成功!");
} else {
_ts.$message.error(_ts.message);
}
}
}) })
}, },
cancelPreference() { cancelPreference() {
@ -357,14 +351,8 @@ export default {
idArticle: _ts.article.idArticle, idArticle: _ts.article.idArticle,
articlePerfect: '0', articlePerfect: '0',
}).then(function (res) { }).then(function (res) {
if (res) { _ts.isPerfect = !_ts.isPerfect;
if (res.success) { _ts.$message.success("设置成功!");
_ts.$set(_ts, 'isPerfect', true);
_ts.$message.success("取消成功!");
} else {
_ts.$message.error(_ts.message);
}
}
}) })
}, },
thumbsUp() { thumbsUp() {